Re: [weewx-user] Your hardware experience (for running WeeWX, the service)

2024-02-23 Thread Graham Knights
I've been running weewx on a RPi 3B+ for just over 5 years, but after a 
couple of other pi's died for various reasons (SD card being one of them), 
I've moved it to a debian install on a VM in a Windows 10 Pro machine (runs 
my automation server).  Hardware is a Lenovo ThinkCentre M700 Tiny which I 
find perfect for running a couple of small linux VM's on it.  Low power, 
tiny, quiet, and versatile, and Lenovo hardware has been good to me over 
the years. Machines are cheap to find on ebay/amazon, probably less than a 
new Pi by the time you add all the parts.

On Friday, February 23, 2024 at 9:46:42 AM UTC-8 vince wrote:

> If I was starting clean 'today', I would probably just throw $125 at it 
> and get one of those little beelink boxes amazon sells and toss linux on it.
>
> But to answer - currently on a 4GB pi4 to sd card for 2+ years with no 
> issues.
>
> Stability issues on a pi are almost always bad power supply these days. 
>  I've never had a micro-sd fail on a pi3, 3+, 4, or pi5.  Never.   I did 
> burn a 'lot' of big sd cards on the old modelB over the years but again 
> that was related to either (a) cheapo cards or (b) cheapo power adaptors 
> not on surge suppressors.  My one remaining modelB is still happily 
> shooting my timelapse snaps for over a decade now.
>
> I do make one change to the pi setups to protect the sd card.  I mount 
> some filesystems as tmpfs so the sd can't be hammered by log writes by 
> appending this to /etc/stab
>
> # put logs and tmp dirs in ramdisk too ---
> tmpfs   /tmptmpfs   
> defaults,nosuid,mode=0755,nodev,noatime   0   0
> tmpfs   /var/logtmpfs   
> defaults,nosuid,mode=0755,nodev,noatime   0   0
> tmpfs   /var/tmptmpfs   
> defaults,nosuid,mode=0755,nodev,noatime   0   0
> #-
>
> Yes - if I reboot I lose the system logs.  But I basically never reboot.
>
> I might add that I do install rsyslog and the matching logrotate.d and 
> rsyslog.d files from util/ to my v5 setup, so weewx logs to under 
> /var/log/weewx in that tmpfs partition, so I just run debug=1 here because 
> it's not going to touch the actual sd card.  Super stable.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/e01b98c9-b636-45e2-ae7d-11fbf9ebff38n%40googlegroups.com.


[weewx-user] Interceptor (acurite) on weewx > v5.0.1 fix

2024-02-14 Thread Graham Knights
For others coming here with issues after upgrading to 5.0.1 or greater, my 
interceptor -> acurite hub was no longer working due to weewx no longer 
being run as root and thus being denied permission to port 80. Here is my 
solution for getting the interceptor driver working with the fewest 
workarounds:

Ensure weewx is disabled:
> sudo systemctl stop weewx

Install authbind:
> sudo apt install authbind

Configure authbind to allow weewx:
> sudo touch /etc/authbind/byport/80
> sudo chown weewx /etc/authbind/byport/80
> sudo chmod 777 /etc/authbind/byport/80

Modifiy /etc/weewx/systemd/weewx.service as follows (changes in bold):
[Service]
ExecStart=*authbind --deep* weewxd /etc/weewx/weewx.conf

Reload systemd manager config:
> sudo systemctl daemon-reload

Start weewx:
> sudo systemctl start weewx

Confirm no more errors:
> sudo tail -f /var/log/syslog

It took me forever to find the current weewx.service file as there are 
multiple copies scattered in several directories, and depending how you 
installed weewx the correct/currently used file may be in another directory 
so you may need to hunt and edit until the error stops.

Hopefully this helps others having similar issues!

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/87c1f9fe-4fd2-48e4-b6a5-2126e05dfe1dn%40googlegroups.com.


Re: [weewx-user] MQTTSubscribe and paho mqtt heads up

2024-02-11 Thread Graham Knights
I just migrated my install to a new machine and was pulling my hair out 
trying to figure this out until I saw this today, thanks @gary for figuring 
this out.  I've edited the weewx wiki to direct new setups to install the 
v1.6.1 paho-mqtt until the original mqtt extension is updated.  

On Sunday, February 11, 2024 at 5:04:01 PM UTC-8 bell...@gmail.com wrote:

> FWIW 
> Successfully ran integration tests on Ubuntu 22, python 3.12 with 
> paho-mqtt v2.0.0 and v1.6.1.
>
> On Sunday 11 February 2024 at 16:49:25 UTC-5 bell...@gmail.com wrote:
>
>> I've pretty much settled on this approach. Minimally tested
>>
>> try:
>> callback_api_version = mqtt.CallbackAPIVersion.VERSION1
>> self.client = 
>> mqtt.Client(callback_api_version=callback_api_version,
>> client_id=mqtt_options['clientid'],
>> userdata=self.userdata,
>> 
>> clean_session=mqtt_options['clean_session'])
>> except AttributeError:
>> self.client = mqtt.Client(client_id=mqtt_options['clientid'],
>> userdata=self.userdata,
>> 
>> clean_session=mqtt_options['clean_session'])
>>
>> rich
>> On Sunday 11 February 2024 at 15:21:58 UTC-5 matthew wall wrote:
>>
>>> On Sunday, February 11, 2024 at 1:37:20 PM UTC-5 bell...@gmail.com 
>>> wrote:
>>>
>>> It currently will not work with paho mqtt 2.0.0 or higher.
>>>
>>>
>>> rich, i too am interested in what you learn, as i will probably have to 
>>> update weewx-mqtt as well. m
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/12548e6a-ba98-4d59-9b57-8ed9bb1f860en%40googlegroups.com.