Re: [weewx-user] Which driver should i target for my custom weather station?

2024-02-11 Thread 'Pavocracy' via weewx-user
So just to clarify, can weewx pull weather data from mqtt? I dont see a 
driver for that. I can see there is community projects for enable both 
subscribing to mqtt and also to publish to mqtt for data it already has in 
its own database, but i cant find any documentation or examples of this 
kind of picture:

weather data collected by esp8266 ---> publish to mqtt (still isn't clear 
what kind of message structure i would need to follow for weewx to 
understand this) --> weewx subscribes to the mqtt messages and so can see 
them and puts it into its own database

If thats only possible through third party extensions, this leads me back 
to instead wanting to just "emulate" a specific drivers data format to be 
able to use the built in driver support instead. Because what i really want 
is to really only have 2 pieces of the puzzle here. My esp8266 with sensors 
attached, and in micropython i collect data points and put them into a data 
structure directly understood by weewx, which then sends those messages to 
a weewx instance running on a machine. But to do this, obviously i need to 
understand the exact data structure of a given weewx driver, which is the 
part i was asking about and can't easily find documented anywhere, i was 
basically looking at the driver code and trying to see how it maps packet 
data to weather data.

On Tuesday 6 February 2024 at 23:28:05 UTC+10 p q wrote:

> Yeah. I'm assuming you will be running Weewx on some computer other than 
> the ESP and have a network connection between the ESP and the computer. I 
> would use MQTT to publish the sensor data to a MQTT broker running 
> somewhere on your network, likely Mosquitto running on the same machine as 
> Weewx. Weewx would subscribe to the sensor data and go from there. I am not 
> up on the Weewx MQTT driver, but I would look into using it. I personally 
> use the Accurite driver as my original system is an Accurite. Over time as 
> I've added new sensors or replaced crummy ones, I've started to use MQTT as 
> my preferred method of sending data from microcontrollers to Weewx 
> with various hacks on the Accurite driver.
>
> On Tue, Feb 6, 2024 at 2:51 AM 'michael.k...@gmx.at' via weewx-user <
> weewx...@googlegroups.com> wrote:
>
>> A few thoughts:
>>
>> Building the "station" on a ESP8266 doesn't sound like you are planning 
>> to get too far with your project. Compared to it's successor, it is very 
>> limited and has some really weird flaws.
>> Why would you connect the station with a serial interface, when it has 
>> WIFI on board?
>> p q's MQTT suggestion is a not a bad one. Let your station emit every 
>> single sensor reading as a MQTT message, and let weewx receive it with MQTT 
>> Subscribe 
>> Either MQTT Subscribe as a service, augmenting any off-the-shelf station 
>> supported by weewx with your sensors data, or use it as a driver. 
>> Encapsulating sensor data in JSON for the MQTT payload is commonly done and 
>> supported by MQTT Subscribe.
>> Pavocracy schrieb am Dienstag, 6. Februar 2024 um 11:07:05 UTC+1:
>>
>>> I'm not sure if im misunderstanding what you are saying, or if i am not 
>>> doing a good job at explaining my question, but even if i choose mqtt as my 
>>> location to push the data, the data still needs to be in some specific 
>>> format for weewx to understand it no?
>>>
>>> So on the esp8266, that has a bunch of sensors attached to it, in my 
>>> embedded code i need to collect the data point for the sensor, and then put 
>>> it in some specific format to send along somewhere that weewx will read. 
>>> Reading through the source code it looked like the drivers are where these 
>>> message formats are interrupted, but i could be wrong?
>>>
>>> On Monday 5 February 2024 at 23:45:25 UTC+10 p q wrote:
>>>
 If I was going to do this, I would look into mqtt options. 

 On Sun, Feb 4, 2024, 11:03 PM 'Pavocracy' via weewx-user <
 weewx...@googlegroups.com> wrote:

> Hello all,
>
> I am working on a hobby project where i am trying to build my own 
> "weather station" from an esp8266 and a bunch of sensors. I am very keen 
> on 
> using weewx to display the post the data, and so i am looking at the 
> supported drivers and wondering if there is an obvious answer to which 
> driver i should be targeting for my weather station output. 
>
> Is there an obvious choice for which driver supports the most data, or 
> perhaps is the easiest data to read or is there a driver that is the most 
> robust? (particularly for serial connections)
>
> any thoughts or experience on the matter would be greatly appreciated 
> :) 
>
> -- 
> 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+...@googlegroups.com.
> To view this 

Re: [weewx-user] Re: purge / clean mysql database?

2024-02-11 Thread 'michael.k...@gmx.at' via weewx-user
Nate, this is 
what 
https://weewx.com/docs/5.0/utilities/weectl-database/#recalculate-daily-summary-weights
 
is for. Imagine you manipulate the database an know, the average of a 
certain type will change after that, the highs an lows aren't affected, 
e.g. you backfill a gap in the database for outTemp from another source, 
because your primary sensors battery was empty. Last good value was at 8:00 
a.m., after the morning low, you've replaced the battery at 1 p.m., before 
the afternoon high. After you've replaced the values in the database, you 
run "reweight" for that day, you highs and lows will be untouched.

Nate Bargmann schrieb am Sonntag, 11. Februar 2024 um 21:39:35 UTC+1:

> Be careful throwing away archive_day-* data!
>
> On my setup with the Davis driver min and max values often occur in
> between archive intervals. I found that those are lost if the daily
> summaries have to be rebuilt from the archive table. My archive
> interval is 5 minutes.
>
> I did some testing a couple of months back cleaning up some spurious
> solar sensor data that crept in from a failing ISS transmitter. In the
> process I rebuilt the daily summaries on a copy of the database and saw
> every daily summary min/max value was on the five minute mark. I knew a
> recent day had recorded a low, just briefly, at something like 24.4 and
> in the original DB was recorded at that value at the precise time but
> both values were lost in the regenerated daily summaries. I've become
> quite careful to not disturb the daily summaries after that.
>
> I think this should be prominently noted in the WeeWX documentation.
>
> In my DB I noticed that the dailies started recording this information
> when I switched to version 4.x in the first days of 2021. I don't
> recall if there was something done to the DB in that upgrade or not.
>
> - Nate
>
> -- 
> "The optimist proclaims that we live in the best of all
> possible worlds. The pessimist fears this is true."
> Web: https://www.n0nb.us
> Projects: https://github.com/N0NB
> GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
>
>

-- 
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/c38a6b00-64db-4bd4-ac63-37564a8135ebn%40googlegroups.com.


[weewx-user] Re: Is there any way to tell dpkg/apt that you are running a weewx-multi via systemd?

2024-02-11 Thread 'Cameron D' via weewx-user
Thanks Matthew,
I just wasn't sure if I was missing something with my eccentric 
installation.
Cameron.

On Monday 12 February 2024 at 12:05:10 am UTC+10 matthew wall wrote:

> hi cameron,
>
> i'm working on this, hopefully to appear in the 5.0.3 release (or 5.1 if 
> tom and gary are faster on their work to other parts of weewx).
>
> redhat has one convention, debian has a different convention.  on top of 
> that, we are trying to (1) migrate any sysv installations on an obviously 
> systemd system, (2) continue to support sysv installations where no systemd 
> exists, and (3) respect any weewx-multi installations, whether they are 
> sysv or systemd.
>
> 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/9d339f4d-ae23-425e-ab0f-ab08f1a0fc1dn%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.


[weewx-user] Re: Trouble with new weewx update

2024-02-11 Thread matthew wall
hi!

> I blacklisted the kernel module dvb_usb_rtl28xxu in  
/etc/modprobe.d/blacklist using sudo nano 
> /etc/modprobe.d/blacklist and adding in blacklist dvb_usb_rtl28xxu but 
this didn't work.

you might have to unplug then replug the device.  worst case you can 
reboot.  but be sure there is no other process using the SDR.

> On another Rspberry pi everything on ChrisM510 instructions installed and 
also installed weewx-mqtt but the only time 
> the broker will get information from the raspberry pi is when I run weewx 
directly and not as a daemon.

this sounds like the user running weewx does not have permission to 
read/write to the SDR.  when you install the rtl-sdr software, that adds 
*you* to whatever group can read/write to the SDR.  so if my guess is 
correct, you must add weewx to whatever group the rtl-sdr software created.

1) find the group by looking at the sdr udev rules:

more /etc/udev/rules.d/rtl-sdr.rules

you should see likes something like this:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", 
ENV{ID_SOF
TWARE_RADIO}="1", MODE="0660", GROUP="plugdev"

in this case, the group is "plugdev"

2) add the weewx user to that group:

sudo usermod -aG plugdev weewx

then when you run weewxd as 'weewx', it should be able to read the SDR

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/56aabc7c-68c0-4fb6-8dab-9e050de78077n%40googlegroups.com.


[weewx-user] Trouble with new weewx update

2024-02-11 Thread Harley Welsh
I am using an acurite atlas 7 in 1 weather station and am following the 
instructions on Matthew walls sdr rpi recipe and similarly ChrisM510 on  
Acurite Atlas on WeeWX RTL SDR RTL_433 RPi on GitHub. Before the weewx 5.0 
update I had everything in these instructions working and was using the 
weewx-mqtt to send information to a broker. Now as i try to do the same as 
on this tutorial with weewx 5.0 I run into many errors. 
I followed these steps
 git clone https://github.com/merbanan/rtl_433
 cd rtl_433
 mkdir build
 cd build
 cmake ..
 make
 sudo make install 
And when i enter rtl_433 to see what devices are broadcasting data I get 
the following message 
"rtl_433 version 23.11-54-gf88bf685 branch master at 202402112003 inputs 
file rtl_tcp RTL-SDR

Kernel driver is active, or device is claimed by second instance of 
librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

usb_claim_interface error -6
[sdr_open_rtl] Failed to open rtlsdr device #0.
[sdr_open_rtl] Unable to open a device"

I blacklisted the kernel module dvb_usb_rtl28xxu in  
/etc/modprobe.d/blacklist using sudo nano  /etc/modprobe.d/blacklist and 
adding in blacklist dvb_usb_rtl28xxu but this didn't work.

On another Rspberry pi everything on ChrisM510 instructions installed and 
also installed weewx-mqtt but the only time the broker will get information 
from the raspberry pi is when I run weewx directly and not as a daemon.

Any help would be appreciated.
Thanks

-- 
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/3a34ba47-8322-43af-b98b-c5e3c0b4252en%40googlegroups.com.


Re: [weewx-user] updated to 5.0.1 still no joy

2024-02-11 Thread Glen N
I was having a no start problem after upgrading RPi3B running DietPi. I 
tried Tom's suggestion and it fixed the problem.

Prior to the "fix" my log file showed:
-- Journal begins at Mon 2024-02-12 11:47:21 AEDT, ends at Mon 2024-02-12 
12:40:34 AEDT. --
Feb 12 11:47:23 SystemName systemd[1]: Started WeeWX.
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Initializing weewxd 
version 5.0.1
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Command line: 
/usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Using Python 3.9.2 
(default, Feb 28 2021, 17:03:44)
 [GCC 10.2.1 20210110]
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Located at 
/usr/bin/python3
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Platform 
Linux-6.1.21-v8+-aarch64-with-glibc2.31
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Locale: 'en_AU.UTF-8'
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Entry path: 
/usr/share/weewx/weewxd.py
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: WEEWX_ROOT: 
/etc/weewx
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Configuration file: 
/etc/weewx/weewx.conf
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: User module: 
/etc/weewx/bin/user
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Debug: 0
Feb 12 11:47:24 SystemName weewxd[309]: INFO weewx.engine: Loading station 
type FineOffsetUSB (weewx.drivers.fousb)
Feb 12 11:47:24 SystemName weewxd[309]: INFO weewx.drivers.fousb: driver 
version is 1.3
Feb 12 11:47:24 SystemName weewxd[309]: INFO weewx.drivers.fousb: polling 
mode is PERIODIC
Feb 12 11:47:24 SystemName weewxd[309]: INFO weewx.drivers.fousb: polling 
interval is 60
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.drivers.fousb: found 
station on USB bus= device=
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: StdConvert 
target unit is 0x11
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.wxservices: 
StdWXCalculate will use data binding wx_binding
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: Archive will use 
data binding wx_binding
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: Record 
generation will be attempted in 'software'
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: Using archive 
interval of 300 seconds (software record generation)
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: StationRegistry: 
Station will not be registered: no station_url specified.
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: Wunderground-PWS: 
Data for station ITEATR7 will be posted
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: PWSWeather: Data 
for station THISTLEWIND will be posted
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: CWOP: Posting not 
enabled.
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: WOW: Posting not 
enabled.
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: AWEKAS: Posting 
not enabled.
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: 'pyephem' 
detected, extended almanac data is available
Feb 12 11:47:25 SystemName weewxd[309]: INFO __main__: Starting up weewx 
version 5.0.1
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: Using binding 
'wx_binding' to database 'weewx.sdb'
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.manager: Starting 
backfill of daily summaries
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.manager: Daily summaries 
up to date
Feb 12 11:47:26 SystemName weewxd[309]: INFO weewx.drivers.fousb: 
synchronising to the weather station (quality=0)
Feb 12 11:47:57 SystemName weewxd[309]: INFO weewx.drivers.fousb: unstable 
read: blocks differ for ptr 0x001380
Feb 12 11:49:44 SystemName weewxd[309]: ERROR weewx.drivers.fousb: invalid 
data in get_records at 0x09b0, 2024-02-08T18:19:29
Feb 12 11:49:47 SystemName weewxd[309]: 
/usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: 
Falling back from rpigpio: No module named 'RPi'
Feb 12 11:49:47 SystemName weewxd[309]:   warnings.warn(
Feb 12 11:49:47 SystemName weewxd[309]: 
/usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: 
Falling back from lgpio: No module named 'lgpio'
Feb 12 11:49:47 SystemName weewxd[309]:   warnings.warn(
Feb 12 11:49:47 SystemName weewxd[309]: 
/usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: 
Falling back from rpio: No module named 'RPIO'
Feb 12 11:49:47 SystemName weewxd[309]:   warnings.warn(
Feb 12 11:49:47 SystemName weewxd[309]: 
/usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: 
Falling back from pigpio: No module named 'pigpio'
Feb 12 11:49:47 SystemName weewxd[309]:   warnings.warn(
Feb 12 11:49:47 SystemName weewxd[309]: 
/usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: 
Falling back from native: unable to open /dev/gpiomem or /dev/mem; upgrade 
your kernel or 

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

2024-02-11 Thread bell...@gmail.com
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/9a43f501-7476-4065-be9d-05e1ba6c2a03n%40googlegroups.com.


[weewx-user] Re: can't seem to find epel-release for fedora fc38

2024-02-11 Thread Joseph Verreau
   that works.  that is the rpm option.  rpm is happy, dnf distro-sync is 
happy and weewx is reporting to my configured services.
   I think the yum.dnf --skip-broken will just pass on the install/update.  

On Sunday, February 11, 2024 at 12:41:35 PM UTC-5 matthew wall wrote:

> joe,
>
> the epel-release dependency has been removed for the redhat el8 and el9 
> packages.  this will appear in the next weewx release (probably 5.0.3, but 
> perhaps 5.1).
>
> meanwhile, you can tell rpm to ignore that dependency, since you already 
> have installed the prereqs that weewx actually uses.
>
> rpm --nodeps
>
> for yum/dnf, you could try the skip broken option
>
> yum --skip-broken
>
> 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/064c30fe-1594-4dbe-8faf-29c49524e625n%40googlegroups.com.


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

2024-02-11 Thread bell...@gmail.com
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/90111f2c-4885-4ef9-bf61-52dd0abc02d2n%40googlegroups.com.


Re: [weewx-user] Re: purge / clean mysql database?

2024-02-11 Thread Nate Bargmann
Be careful throwing away archive_day-* data!

On my setup with the Davis driver min and max values often occur in
between archive intervals.  I found that those are lost if the daily
summaries have to be rebuilt from the archive table.  My archive
interval is 5 minutes.

I did some testing a couple of months back cleaning up some spurious
solar sensor data that crept in from a failing ISS transmitter.  In the
process I rebuilt the daily summaries on a copy of the database and saw
every daily summary min/max value was on the five minute mark.  I knew a
recent day had recorded a low, just briefly, at something like 24.4 and
in the original DB was recorded at that value at the precise time but
both values were lost in the regenerated daily summaries.  I've become
quite careful to not disturb the daily summaries after that.

I think this should be prominently noted in the WeeWX documentation.

In my DB I noticed that the dailies started recording this information
when I switched to version 4.x in the first days of 2021.  I don't
recall if there was something done to the DB in that upgrade or not.

- Nate

-- 
"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."
Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819

-- 
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/20240211203930.wdv3dzmpk5leh5vm%40n0nb.us.


signature.asc
Description: PGP signature


Re: [weewx-user] Re: WeeWX updated - Restart of Service failed

2024-02-11 Thread matthew wall
On Sunday, February 11, 2024 at 8:27:23 AM UTC-5 tke...@gmail.com wrote:

Glad that worked out, but you've uncovered another problem: the error 
handler for crt calls a non-existent function. 

I've created issue #11  to 
track, but it's likely to be a very long time before anyone gets around to 
it!


thanks tom.  fix is available in weewx-crt 0.23

a robust, future-proof fix for the /var/tmp permissions will take a bit 
more thought.  meanwhile, if anyone sees a permission failure from 
weewx-crt, or wonders why weewx-crt does not update the realtime file, just 
delete the previous realtime.txt (or other output file).

-- 
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/4fcf22a3-4fd2-480b-909c-f557216da983n%40googlegroups.com.


Re: [weewx-user] unable to save to file '/var/www/html/weewx/...

2024-02-11 Thread matthew wall
On Sunday, February 11, 2024 at 2:44:18 PM UTC-5 moth...@gmail.com wrote:

Do you have the files generated by the weewx in the */var/www/html* folder 
without the many error messages I have?
If not,  I have no idea what to do next.


please note that /var/www/html is not the same as /var/www/html/weewx

the weewx installer sets permissions on /var/www/html/weewx, since that is 
the default location of HTML_ROOT

the owner of /var/www/html is typically www-data, although this depends on 
the linux distribution and web server configuration.

be sure that you know who weewxd is running as.  when you do 'ps aux | grep 
weewxd', the first column will be the username of the owner of the weewxd 
process. that user must have read/write permission on the HTML_ROOT 
directory.

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/76c69870-83a3-4c66-bbd1-15f4b812425cn%40googlegroups.com.


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

2024-02-11 Thread matthew wall
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/c1bd436a-3d01-4ef8-bb53-74ea72bc7646n%40googlegroups.com.


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

2024-02-11 Thread bell...@gmail.com

Because (1) its inevitable and (2) I’ll get tired of typing the wiki url 
explaining this.
I just hope they wait long enough (that 1.x is gone) before removing the 
other signatures that have changed…

On Sunday 11 February 2024 at 14:23:07 UTC-5 vince wrote:

> Why not stick with 1.6.1 indefinitely and the matching version of the 
> extension and not sweat it ?
>
> On Sunday, February 11, 2024 at 11:12:32 AM UTC-8 Greg Troxel wrote:
>
>> "bell...@gmail.com"  writes: 
>>
>> > It currently will not work with paho mqtt 2.0.0 or higher. 
>>
>> Sorry, I understood that. I have looked briefly at the migration which 
>> says "change your code because a function signature changed", and have I 
>> have been holding off because I'll need to fully absorb it, and then 
>> update rtl_433_mqtt_relay.pt (for which I am somewhat the maintainer) 
>> and a program (that I haven't published yet) that polls ups-nut and 
>> reports status over mqtt. 
>>
>> What I meant, is, do you expect that when you figure out how to deal 
>> with the incompatible changes, you'll end up with a MQTTSubscribe that 
>> can function with either, or if we'll need to match versions. 
>>
>> If there's a way to do it (try/catch and figure out the signature?) then 
>> presumaly the MQTT publish extension, rtl_433_mqtt_relay and everything 
>> else can use that technique. 
>>
>

-- 
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/e1c26ae9-7e8a-4a89-bb81-d74e2a510306n%40googlegroups.com.


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

2024-02-11 Thread 'michael.k...@gmx.at' via weewx-user
It did a fresh pip install on bookworm and ran into this for weewx-mqtt. It 
will be an issue people ask about in the near future, that's for sure.

vince schrieb am Sonntag, 11. Februar 2024 um 20:32:48 UTC+1:

> No reason to upgrade if it works for you already and if there are no 
> security risks since then.
>
> To list all versions available "pip list paho-mqtt=="
> To install a specified version "pip install paho-mqtt==1.6.1"
>
> Or for apt...
>
> List all versions "apt-cache policy python3-paho-mqtt"
> Install one specified version "apt-get install python3-paho-mqtt=1.5.1-1"
>
>
> Note that for deb12 (raspi) the latest package is 1.5.1 which is a year 
> older than 1.6.1, so they're not upgrading either.
>
>
> On Sunday, February 11, 2024 at 11:27:54 AM UTC-8 Greg Troxel wrote:
>
>> vince  writes: 
>>
>> > Why not stick with 1.6.1 indefinitely and the matching version of the 
>> > extension and not sweat it ? 
>>
>> Because bugs are not going to be fixed, and packaging systems are going 
>> to have 2.0.0, and in general trying to stay in the past causes too much 
>> trouble eventually. The same reason weewx had to cope with python 
>> instead of just telling people to use 2.7 :) 
>>
>

-- 
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/1305fec1-cdb8-4ebd-8c67-0caede21e73dn%40googlegroups.com.


[weewx-user] Re: Install error

2024-02-11 Thread matthew wall
On Sunday, February 11, 2024 at 1:24:13 PM UTC-5 xzei...@googlemail.com 
wrote:

Had the same problem. 
The reason for this was:
The file weewx in /etc/default was 0 bytes long.
After removing this file, the update (from 5.0.0 to 5.0.1) was installed 
successfully .
The update to 5.0.2 then had no problem.


werner, did you also have a message of "weectl.py: error: unrecognized 
arguments: meters,foot"?  if so, then i do not understand the problem 
experienced by dusan.  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/65c278cf-1d7a-4bd3-b6ef-ec6a350f34a5n%40googlegroups.com.


[weewx-user] Extension for Sylphide

2024-02-11 Thread Ton vanN
VWK (=Vereniging van Weerkundigen) is a Dutch community of 'serious' 
weather observers ( with own website at vwkweb.nl )
Part of the website is generation of weathermaps, obviously needing upload 
of data from members' PWSes. That part of the website is a project called 
Sylphide.
No result when searching in this group, but having WeeWX in operation for 
various other uploads, just wondering whether one of the members of this 
WeeWX-group has an WeeWX-extension to support upload to Sylphide.

-- 
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/776f51a5-81bc-49fd-b4df-89a645e0826cn%40googlegroups.com.


[weewx-user] Re: Install error

2024-02-11 Thread matthew wall


On Sunday, February 11, 2024 at 1:32:19 PM UTC-5 dusan.ta...@gmail.com 
wrote:

usage: weectl.py -v|--version
   weectl.py -h|--help
   weectl.py database --help
   weectl.py debug --help
   weectl.py device --help
   weectl.py extension --help
   weectl.py import --help
   weectl.py report --help
   weectl.py station --help
weectl.py: error: unrecognized arguments: meters,foot
dpkg: error processing package weewx (--configure):
 installed weewx package post-installation script subprocess returned error 
exit
 status 2
Errors were encountered while processing:
 weewx


it looks like you have a bogus value for the units in your station 
altitude.  apparently you entered 'meters,foot' instead of just 'meter' or 
'foot'.  this is in the debconf database.

you can verify this by looking at the values in /var/cache/debconf

you can purge the values for weewx by doing this:

echo PURGE | sudo debconf-communicate weewx

then do 'apt install weewx' again, and be sure to enter the correct units 
for altitude.

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/f25ea8f4-a176-43ba-8a01-455d0dbb7355n%40googlegroups.com.


Re: [weewx-user] unable to save to file '/var/www/html/weewx/...

2024-02-11 Thread vince
Everything writes to /var/www/html/weewx here.  No errors.

On Sunday, February 11, 2024 at 11:44:18 AM UTC-8 Ton Karsten wrote:

> Vince,
>
> Do you have the files generated by the weewx in the */var/www/html* 
> folder without the many error messages I have?
> If not,  I have no idea what to do next.
>
> Op zo 11 feb 2024 om 17:25 schreef vince :
>
>> Debian12 virtual machine for me:
>>
>>- a new installation works
>>- a v4 installation works
>>- a v4 to v5 upgrade works
>>
>> I did 'not' need to do any of the chmod/chown/chgrp commands. The dpkg 
>> installation worked just fine here.
>>
>> On Sunday, February 11, 2024 at 2:20:17 AM UTC-8 Ton Karsten wrote:
>>
>>> Vince,
>>> I use a raspberry Pi3 B+
>>> As web server nginx
>>> The latest version OS from December 5, 23 Kernel version: 6.1
>>> Debian version: 12 (bookworm)
>>> Completely new latest version of Weewx
>>> installation on a new SD card
>>> Settings for the folders according to schedule
>>> For the HTML_ROOT directory:
>>>
>>> # set the permissions
>>>
>>> sudo find /var/www/html/weewx -type d -exec chmod 2775 {} \;
>>> sudo find /var/www/html/weewx -type f -exec chmod 664 {} \;
>>> # set the owner and group
>>>
>>> sudo chown -R weewx /var/www/html/weewx
>>> sudo chgrp -R weewx /var/www/html/weewx
>>>
>>> The server writes a file in the /var/www/html directory
>>> index.nginx-debian.html
>>> Is also visible in the FF browser
>>>
>>> Op zo 11 feb 2024 om 09:40 schreef Uwe S. :
>>>
 I had a very similar issue while updating my weewx instance. Finally it 
 was a permission issue in /var/tmp

 You can try changing permission or ownership of the files reported. For 
 me it was working afterwards.

 vince schrieb am Sonntag, 11. Februar 2024 um 05:28:45 UTC+1:

> Or if you have it via cron, put it in weewx's crontab, not user 'pi'
>
> On Saturday, February 10, 2024 at 6:12:12 PM UTC-8 Graham Eddy wrote:
>
>> why are you writing into files outside weewx’s area? weewx user is 
>> unlikely to have perms to do that
>> *⊣GE⊢*
>>
>> On 11 Feb 2024, at 1:59 am, Ton Karsten  wrote:
>>
>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>   File "/usr/lib/python3.11/shutil.py", line 258, in copyfile
>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>     with open(dst, 'wb') as fdst:
>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>      ^^^
>>
>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>     PermissionError: [Errno 13] Toegang geweigerd: 
>> '/var/www/html/favicon.ico’
>>
>> ...
>>
>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>   File "/etc/weewx/bin/user/belchertown.py", line 2817, in 
>> run
>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>     with open(json_filename, mode="w") as jf:
>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>      ^
>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>     FileNotFoundError: [Errno 2] Bestand of map bestaat niet: 
>> '/var/www/html/json/homepage.json'
>>
>> -- 

>>> 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+...@googlegroups.com.

>>> To view this discussion on the web visit 
 https://groups.google.com/d/msgid/weewx-user/030883da-55f0-4ab2-bbf5-33c79849364fn%40googlegroups.com
  
 
 .

>>> -- 
>> 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+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/f416c1be-2a9f-43bd-9c7c-3c88776c7c63n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/5f4b4203-39b2-426d-a083-e5e254eae165n%40googlegroups.com.


Re: [weewx-user] unable to save to file '/var/www/html/weewx/...

2024-02-11 Thread Ton Karsten
Vince,

Do you have the files generated by the weewx in the */var/www/html* folder
without the many error messages I have?
If not,  I have no idea what to do next.

Op zo 11 feb 2024 om 17:25 schreef vince :

> Debian12 virtual machine for me:
>
>- a new installation works
>- a v4 installation works
>- a v4 to v5 upgrade works
>
> I did 'not' need to do any of the chmod/chown/chgrp commands. The dpkg
> installation worked just fine here.
>
> On Sunday, February 11, 2024 at 2:20:17 AM UTC-8 Ton Karsten wrote:
>
>> Vince,
>> I use a raspberry Pi3 B+
>> As web server nginx
>> The latest version OS from December 5, 23 Kernel version: 6.1
>> Debian version: 12 (bookworm)
>> Completely new latest version of Weewx
>> installation on a new SD card
>> Settings for the folders according to schedule
>> For the HTML_ROOT directory:
>>
>> # set the permissions
>>
>> sudo find /var/www/html/weewx -type d -exec chmod 2775 {} \;
>> sudo find /var/www/html/weewx -type f -exec chmod 664 {} \;
>> # set the owner and group
>>
>> sudo chown -R weewx /var/www/html/weewx
>> sudo chgrp -R weewx /var/www/html/weewx
>>
>> The server writes a file in the /var/www/html directory
>> index.nginx-debian.html
>> Is also visible in the FF browser
>>
>> Op zo 11 feb 2024 om 09:40 schreef Uwe S. :
>>
>>> I had a very similar issue while updating my weewx instance. Finally it
>>> was a permission issue in /var/tmp
>>>
>>> You can try changing permission or ownership of the files reported. For
>>> me it was working afterwards.
>>>
>>> vince schrieb am Sonntag, 11. Februar 2024 um 05:28:45 UTC+1:
>>>
 Or if you have it via cron, put it in weewx's crontab, not user 'pi'

 On Saturday, February 10, 2024 at 6:12:12 PM UTC-8 Graham Eddy wrote:

> why are you writing into files outside weewx’s area? weewx user is
> unlikely to have perms to do that
> *⊣GE⊢*
>
> On 11 Feb 2024, at 1:59 am, Ton Karsten  wrote:
>
> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>   File "/usr/lib/python3.11/shutil.py", line 258, in copyfile
> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>     with open(dst, 'wb') as fdst:
> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>      ^^^
>
> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>     PermissionError: [Errno 13] Toegang geweigerd:
> '/var/www/html/favicon.ico’
>
> ...
>
> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>   File "/etc/weewx/bin/user/belchertown.py", line 2817, in run
> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>     with open(json_filename, mode="w") as jf:
> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>      ^
> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>     FileNotFoundError: [Errno 2] Bestand of map bestaat niet:
> '/var/www/html/json/homepage.json'
>
> --
>>>
>> 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+...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/030883da-55f0-4ab2-bbf5-33c79849364fn%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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/f416c1be-2a9f-43bd-9c7c-3c88776c7c63n%40googlegroups.com
> 
> .
>

-- 
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/CACngpzZAFt%3DeJCtqnedhm6p9u%2B9FAv6pNJ7nX2-BRVrWR%2Bx4Bg%40mail.gmail.com.


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

2024-02-11 Thread vince
No reason to upgrade if it works for you already and if there are no 
security risks since then.

To list all versions available "pip list paho-mqtt=="
To install a specified version "pip install paho-mqtt==1.6.1"

Or for apt...

List all versions "apt-cache policy python3-paho-mqtt"
Install one specified version "apt-get install python3-paho-mqtt=1.5.1-1"


Note that for deb12 (raspi) the latest package is 1.5.1 which is a year 
older than 1.6.1, so they're not upgrading either.


On Sunday, February 11, 2024 at 11:27:54 AM UTC-8 Greg Troxel wrote:

> vince  writes:
>
> > Why not stick with 1.6.1 indefinitely and the matching version of the 
> > extension and not sweat it ?
>
> Because bugs are not going to be fixed, and packaging systems are going
> to have 2.0.0, and in general trying to stay in the past causes too much
> trouble eventually. The same reason weewx had to cope with python
> instead of just telling people to use 2.7 :)
>

-- 
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/af716446-6b2b-485b-859f-b6d81bd1a0b1n%40googlegroups.com.


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

2024-02-11 Thread Greg Troxel
vince  writes:

> Why not stick with 1.6.1 indefinitely and the matching version of the 
> extension and not sweat it ?

Because bugs are not going to be fixed, and packaging systems are going
to have 2.0.0, and in general trying to stay in the past causes too much
trouble eventually.  The same reason weewx had to cope with python
instead of just telling people to use 2.7 :)

-- 
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/rmieddi243w.fsf%40s1.lexort.com.


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

2024-02-11 Thread bell...@gmail.com
My plan is to try the 2.0 signature. I think it will throw a TypeError (but 
what ever it throws) and catch that and use the 1.6 signature.
Unless a Python expert has a better idea.
The alternative is use an if to check the version and call the appropriate 
signature.
Make sure to a read the upgrade notes. You will want to pass in the value 
to say to use the old signatures for other methods. Looks like a bunch 
changed.
I hope to start working on it soon. The biggest pain will be updating my 
CI/CD to (1) deal with multiple versions and (2) decide how much to test 
against each version… 
rich

On Sunday 11 February 2024 at 14:12:32 UTC-5 Greg Troxel wrote:

> "bell...@gmail.com"  writes:
>
> > It currently will not work with paho mqtt 2.0.0 or higher.
>
> Sorry, I understood that. I have looked briefly at the migration which
> says "change your code because a function signature changed", and have I
> have been holding off because I'll need to fully absorb it, and then
> update rtl_433_mqtt_relay.pt (for which I am somewhat the maintainer)
> and a program (that I haven't published yet) that polls ups-nut and
> reports status over mqtt.
>
> What I meant, is, do you expect that when you figure out how to deal
> with the incompatible changes, you'll end up with a MQTTSubscribe that
> can function with either, or if we'll need to match versions.
>
> If there's a way to do it (try/catch and figure out the signature?) then
> presumaly the MQTT publish extension, rtl_433_mqtt_relay and everything
> else can use that technique.
>

-- 
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/6cfef91c-5d81-42ec-be12-ce14a25be384n%40googlegroups.com.


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

2024-02-11 Thread vince
Why not stick with 1.6.1 indefinitely and the matching version of the 
extension and not sweat it ?

On Sunday, February 11, 2024 at 11:12:32 AM UTC-8 Greg Troxel wrote:

> "bell...@gmail.com"  writes:
>
> > It currently will not work with paho mqtt 2.0.0 or higher.
>
> Sorry, I understood that. I have looked briefly at the migration which
> says "change your code because a function signature changed", and have I
> have been holding off because I'll need to fully absorb it, and then
> update rtl_433_mqtt_relay.pt (for which I am somewhat the maintainer)
> and a program (that I haven't published yet) that polls ups-nut and
> reports status over mqtt.
>
> What I meant, is, do you expect that when you figure out how to deal
> with the incompatible changes, you'll end up with a MQTTSubscribe that
> can function with either, or if we'll need to match versions.
>
> If there's a way to do it (try/catch and figure out the signature?) then
> presumaly the MQTT publish extension, rtl_433_mqtt_relay and everything
> else can use that technique.
>

-- 
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/faa7dc2d-c59c-4f98-8ce1-b657a6fc8d62n%40googlegroups.com.


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

2024-02-11 Thread Greg Troxel
"bell...@gmail.com"  writes:

> It currently will not work with paho mqtt 2.0.0 or higher.

Sorry, I understood that.  I have looked briefly at the migration which
says "change your code because a function signature changed", and have I
have been holding off because I'll need to fully absorb it, and then
update rtl_433_mqtt_relay.pt (for which I am somewhat the maintainer)
and a program (that I haven't published yet) that polls ups-nut and
reports status over mqtt.

What I meant, is, do you expect that when you figure out how to deal
with the incompatible changes, you'll end up with a MQTTSubscribe that
can function with either, or if we'll need to match versions.

If there's a way to do it (try/catch and figure out the signature?) then
presumaly the MQTT publish extension, rtl_433_mqtt_relay and everything
else can use that technique.

-- 
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/rmiil2u24ti.fsf%40s1.lexort.com.


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

2024-02-11 Thread bell...@gmail.com
It currently will not work with paho mqtt 2.0.0 or higher.

On Sunday 11 February 2024 at 13:24:17 UTC-5 Greg Troxel wrote:

> "bell...@gmail.com"  writes:
>
> > There is new release of paho mqtt, 2.0.0. This has a breaking change for 
> > all clients using this library. I'll let you know when MQTTSubscribe 
> > supports it.
>
> Do you expect that MQTTSubscribe can work ok if either 1.6.x or 2.0.0
> is installed?
>

-- 
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/98d40882-21b1-4298-95d7-113ae4b22f43n%40googlegroups.com.


[weewx-user] Re: Install error

2024-02-11 Thread Dusan Tatomirovic
Werner Krenn - I will look for that, thanks. 

On Sunday, February 11, 2024 at 10:24:13 AM UTC-8 Werner Krenn wrote:

> Had the same problem. 
> The reason for this was:
> The file weewx in /etc/default was 0 bytes long.
> After removing this file, the update (from 5.0.0 to 5.0.1) was installed 
> successfully .
> The update to 5.0.2 then had no problem.
>
> Werner
>
> matthew wall schrieb am Sonntag, 11. Februar 2024 um 01:31:21 UTC+1:
>
>> could you provide a bit more information?
>>
>> - which version of mint are you using?
>> - is this an upgrade of weewx, or a new installation?
>> - could you provide the full output from the install/upgrade, not just 
>> the last bit?
>>
>> thank you!
>>
>

-- 
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/539192b5-b66d-47cc-960a-c37b1c45465bn%40googlegroups.com.


[weewx-user] Re: Install error

2024-02-11 Thread Dusan Tatomirovic
Matthew Wall, as requested:

Mint version 21.3
Cinnamon version 6.0.4

Here is the entire response:

sudo apt install weewx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
weewx is already the newest version (5.0.2-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up weewx (5.0.2-1) ...
Using weewx:weewx as user:group
Saving old defaults to /etc/default/weewx-20240210155912
Creating /etc/default/weewx
usage: weectl.py -v|--version
   weectl.py -h|--help
   weectl.py database --help
   weectl.py debug --help
   weectl.py device --help
   weectl.py extension --help
   weectl.py import --help
   weectl.py report --help
   weectl.py station --help
weectl.py: error: unrecognized arguments: meters,foot
dpkg: error processing package weewx (--configure):
 installed weewx package post-installation script subprocess returned error 
exit
 status 2
Errors were encountered while processing:
 weewx


On Saturday, February 10, 2024 at 4:31:21 PM UTC-8 matthew wall wrote:

> could you provide a bit more information?
>
> - which version of mint are you using?
> - is this an upgrade of weewx, or a new installation?
> - could you provide the full output from the install/upgrade, not just the 
> last bit?
>
> thank you!
>

-- 
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/f235fad1-208d-4934-abd5-ba9c9e35ea29n%40googlegroups.com.


[weewx-user] Re: Install error

2024-02-11 Thread 'Werner Krenn' via weewx-user
Had the same problem. 
The reason for this was:
The file weewx in /etc/default was 0 bytes long.
After removing this file, the update (from 5.0.0 to 5.0.1) was installed 
successfully .
The update to 5.0.2 then had no problem.

Werner

matthew wall schrieb am Sonntag, 11. Februar 2024 um 01:31:21 UTC+1:

> could you provide a bit more information?
>
> - which version of mint are you using?
> - is this an upgrade of weewx, or a new installation?
> - could you provide the full output from the install/upgrade, not just the 
> last bit?
>
> thank you!
>

-- 
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/24d20547-3ad8-4d70-a28b-a6bf28103bcdn%40googlegroups.com.


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

2024-02-11 Thread Greg Troxel
"bell...@gmail.com"  writes:

> There is new release of paho mqtt, 2.0.0. This has a breaking change for 
> all clients using this library. I'll let you know when MQTTSubscribe 
> supports it.

Do you expect that MQTTSubscribe can work ok if either  1.6.x or 2.0.0
is installed?

-- 
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/rmizfw6271v.fsf%40s1.lexort.com.


[weewx-user] Re: can't seem to find epel-release for fedora fc38

2024-02-11 Thread matthew wall
joe,

the epel-release dependency has been removed for the redhat el8 and el9 
packages.  this will appear in the next weewx release (probably 5.0.3, but 
perhaps 5.1).

meanwhile, you can tell rpm to ignore that dependency, since you already 
have installed the prereqs that weewx actually uses.

rpm --nodeps

for yum/dnf, you could try the skip broken option

yum --skip-broken

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/1b14d94b-8237-46eb-b228-209a449e8f61n%40googlegroups.com.


[weewx-user] Re: Upgrade to 5.0.x does not start

2024-02-11 Thread matthew wall


On Sunday, February 11, 2024 at 10:59:41 AM UTC-5 geni08...@gmail.com wrote:

weewx ist schon die neueste Version (4.10.2-1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.


which operating system are you using?

weewx v5 will install from a debian package only on debian 10 or later.  if 
you are using debian 10 or later, be sure that your apt config 
(/etc/apt/sources.list.d/weewx.list) refers to python3, not python2.

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/d9cbf6a1-2498-42b6-bedb-badcc881c612n%40googlegroups.com.


[weewx-user] Re: can't seem to find epel-release for fedora fc38

2024-02-11 Thread Joseph Verreau
Vince,
   curiously, I tried following those instructions.  they worked for 
upgrading from 4.10 to 5.0.0 but not for upgrading from 5.0.0 to 5.0.2.  
the first upgrade ran without installing epel-release but yet not requiring 
to upgrade weewx; the second upgrade just won't.  Go figure.

joev.mi

On Saturday, February 10, 2024 at 6:52:45 PM UTC-5 vince wrote:

> Try reading https://www.weewx.com/docs/5.0/quickstarts/redhat/
>
> On Saturday, February 10, 2024 at 3:31:48 PM UTC-8 Joseph Verreau wrote:
>
>> here's another piece,  looking at this list of dependencies as below I 
>> checked to see if they were installed.  All but epel-release are on my 
>> system.  
>> The issue I'm anticipating is that desktop is running fc38.  I won't be 
>> able to install fc39 unless all the packages have a path to an upgrade 
>> source.
>> Of course I could erase weewx upgrade the OS and then reinstall weewx.  
>> seems clugey.
>>
>> Joe Verreau  
>>
>> [jverreau@xps8700 epel-repo]$ sudo dnf repoquery --depends weewx
>> Last metadata expiration check: 1:42:39 ago on Sat 10 Feb 2024 04:44:34 
>> PM EST.
>> /bin/sh
>> /usr/bin/getent
>> /usr/sbin/groupadd
>> /usr/sbin/useradd
>> epel-release
>> python3
>> python3-cheetah
>> python3-configobj
>> python3-pillow
>> python3-pyserial
>> python3-pyusb
>> [jverreau@xps8700 epel-repo]$
>>
>> On Saturday, February 10, 2024 at 6:19:46 PM UTC-5 Joseph Verreau wrote:
>>
>>> currently running weewx v 5.0.0-1 following an erase of 4.10.  I did 
>>> finally sort out a few issues, like I didn't know I needed to re-run the 
>>> device script to add the vantage driver but I got there.  Then there was 
>>> the issue of udev rules but another thread helped me sort that out.  My 
>>> version of 5.0.0-1 is running and reporting to my selected weather services 
>>> (WOW, CWOP and Wunderground).  
>>> So moving ahead I thought I could just update from 5.0.0.1 to 5.0.2-1.  
>>> But I'm getting the error about no path to epel-release.  Apparently I had 
>>> a path to install v5.0.0-1.  I've tried a couple alternatives including a 
>>> fedora site that claimed I could install that package but I either get a 
>>> response saying it isn't available or I need to install 
>>> subscription-manager first.  
>>>
>>> [jverreau@xps8700 epel-repo]$ *dnf repolist weewx list*
>>> repo id 
>>>   repo name   
>>>  status
>>> weewx   
>>>   weewx   
>>>  enabled
>>> [jverreau@xps8700 epel-repo]$ *dnf repolist weewx list available*
>>> repo id 
>>>   repo name   
>>>  status
>>> weewx   
>>>   weewx   
>>>  enabled
>>> [jverreau@xps8700 epel-repo]$ *dnf repoquery weewx list available*
>>> Last metadata expiration check: 5:17:03 ago on Sat 10 Feb 2024 12:51:11 
>>> PM EST.
>>> weewx-0:5.0.0-1.el9.noarch
>>> weewx-0:5.0.1-1.el9.noarch
>>> weewx-0:5.0.1-2.el9.noarch
>>> weewx-0:5.0.1-3.el9.noarch
>>> weewx-0:5.0.2-1.el9.noarch
>>> [jverreau@xps8700 epel-repo]$ *dnf list weewx*
>>> Last metadata expiration check: 5:18:10 ago on Sat 10 Feb 2024 12:51:11 
>>> PM EST.
>>> Installed Packages
>>> weewx.noarch 
>>>  5.0.0-1.el9   
>>> @weewx
>>> Available Packages
>>> weewx.noarch 
>>>  5.0.2-1.el9   
>>> weewx 
>>> [jverreau@xps8700 epel-repo]$ *sudo dnf upgrade weewx*
>>> Last metadata expiration check: 1:25:12 ago on Sat 10 Feb 2024 04:44:34 
>>> PM EST.
>>> Dependencies resolved.
>>>
>>>  Problem: cannot install the best update candidate for package 
>>> weewx-5.0.0-1.el9.noarch
>>>   - nothing provides epel-release needed by weewx-5.0.2-1.el9.noarch 
>>> from weewx
>>>
>>> ==
>>>  PackageArchitecture   
>>>  Version  Repository   
>>>Size
>>>
>>> ==
>>> Skipping packages with broken dependencies:
>>>  weewx  noarch 
>>>  5.0.2-1.el9  weewx 
>>>  1.2 M
>>>
>>> Transaction Summary

[weewx-user] Re: can't seem to find epel-release for fedora fc38

2024-02-11 Thread Joseph Verreau
Matt,
   I find under fc39  python3-pillow and python3-configobj in @updates repo 
and python3-cheetah in @fedora repo.  These have been on my system since 
fc34 for the first two and fc39 for python3-cheetah.
   Curiously, when I ran the update from weewx 4.10 to v5.0.0  it 
installed.  Both my laptop and desktop are running fedora altho I upgraded 
weewx after upgrading from fc38 to fc39 whereas I upgraded weewx on my 
desktop before upgrading my desktop to fc39.  I mean I'm not implying that 
was relevant just different in my process.  
as to installing epel-release on fedora following redhat instructions: 
I tried that.  It requires a subscription to redhat, starting with 
installing subscription-manager.  
joev.mi
On Saturday, February 10, 2024 at 7:38:53 PM UTC-5 matthew wall wrote:

how did you install the other dependencies, i.e., python3-cheetah, 
python3-pillow, python3-configobj?

you could try installing epel-release as per the redhat installation 
instructions - that will satisfy the epel-release dependency.

i guess we should remove the 'epel-release' dependency from the redhat 
packages.  the intent was that by specifying epel as a dependency, one 
would not have to install epel explicitly.  but fedora and redhat are 
completely different systems; its a challenge to make a package that will 
work consistently on both, even when your dependencies are few and simple.

-- 
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/55037a60-7018-476b-8a7a-174217ceb04cn%40googlegroups.com.


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

2024-02-11 Thread gary....@gmail.com
pip install paho-mqtt==1.6.1

Downgraded paho-mqtt in my venv, restarted weewx and all is well.

On Saturday, February 10, 2024 at 5:44:36 PM UTC-5 bell...@gmail.com wrote:

> There is new release of paho mqtt, 2.0.0. This has a breaking change for 
> all clients using this library. I'll let you know when MQTTSubscribe 
> supports it.
> Sigh, backwards compatibility is overrated.
> rich
>

-- 
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/65c25bbc-9fa2-4319-af6d-3d060e4484d1n%40googlegroups.com.


Re: [weewx-user] unable to save to file '/var/www/html/weewx/...

2024-02-11 Thread vince
Debian12 virtual machine for me:

   - a new installation works
   - a v4 installation works
   - a v4 to v5 upgrade works

I did 'not' need to do any of the chmod/chown/chgrp commands. The dpkg 
installation worked just fine here.

On Sunday, February 11, 2024 at 2:20:17 AM UTC-8 Ton Karsten wrote:

> Vince,
> I use a raspberry Pi3 B+
> As web server nginx
> The latest version OS from December 5, 23 Kernel version: 6.1
> Debian version: 12 (bookworm)
> Completely new latest version of Weewx
> installation on a new SD card
> Settings for the folders according to schedule
> For the HTML_ROOT directory:
>
> # set the permissions
>
> sudo find /var/www/html/weewx -type d -exec chmod 2775 {} \;
> sudo find /var/www/html/weewx -type f -exec chmod 664 {} \;
> # set the owner and group
>
> sudo chown -R weewx /var/www/html/weewx
> sudo chgrp -R weewx /var/www/html/weewx
>
> The server writes a file in the /var/www/html directory
> index.nginx-debian.html
> Is also visible in the FF browser
>
> Op zo 11 feb 2024 om 09:40 schreef Uwe S. :
>
>> I had a very similar issue while updating my weewx instance. Finally it 
>> was a permission issue in /var/tmp
>>
>> You can try changing permission or ownership of the files reported. For 
>> me it was working afterwards.
>>
>> vince schrieb am Sonntag, 11. Februar 2024 um 05:28:45 UTC+1:
>>
>>> Or if you have it via cron, put it in weewx's crontab, not user 'pi'
>>>
>>> On Saturday, February 10, 2024 at 6:12:12 PM UTC-8 Graham Eddy wrote:
>>>
 why are you writing into files outside weewx’s area? weewx user is 
 unlikely to have perms to do that
 *⊣GE⊢*

 On 11 Feb 2024, at 1:59 am, Ton Karsten  wrote:

 feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine: 
 File "/usr/lib/python3.11/shutil.py", line 258, in copyfile
 feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine: 
   with open(dst, 'wb') as fdst:
 feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine: 
    ^^^

 feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine: 
   PermissionError: [Errno 13] Toegang geweigerd: 
 '/var/www/html/favicon.ico’

 ...

 feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine: 
 File "/etc/weewx/bin/user/belchertown.py", line 2817, in run
 feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine: 
   with open(json_filename, mode="w") as jf:
 feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine: 
    ^
 feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine: 
   FileNotFoundError: [Errno 2] Bestand of map bestaat niet: 
 '/var/www/html/json/homepage.json'

 -- 
>>
> 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+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/030883da-55f0-4ab2-bbf5-33c79849364fn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/f416c1be-2a9f-43bd-9c7c-3c88776c7c63n%40googlegroups.com.


[weewx-user] Re: Upgrade to 5.0.x does not start

2024-02-11 Thread vince
https://www.weewx.com/docs/5.0/quickstarts/debian/

On Sunday, February 11, 2024 at 7:59:41 AM UTC-8 geni08...@gmail.com wrote:

> My input on Raspi4
>
> sudo apt update
> sudo apt install weewx
> Paketlisten werden gelesen… Fertig
> Abhängigkeitsbaum wird aufgebaut… Fertig
> Statusinformationen werden eingelesen… Fertig
> weewx ist schon die neueste Version (4.10.2-1).
> 0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
>
> What am I doing wrong

-- 
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/2c9185ff-013e-4d27-821c-9f5d3d11ba33n%40googlegroups.com.


[weewx-user] Upgrade to 5.0.x does not start

2024-02-11 Thread geni08...@gmail.com
My input on Raspi4

sudo apt update
sudo apt install weewx
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
weewx ist schon die neueste Version (4.10.2-1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

What am I doing wrong

-- 
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/8f27377c-590a-443e-9b57-af4ddf82a56fn%40googlegroups.com.


[weewx-user] Re: Is there any way to tell dpkg/apt that you are running a weewx-multi via systemd?

2024-02-11 Thread matthew wall
hi cameron,

i'm working on this, hopefully to appear in the 5.0.3 release (or 5.1 if 
tom and gary are faster on their work to other parts of weewx).

redhat has one convention, debian has a different convention.  on top of 
that, we are trying to (1) migrate any sysv installations on an obviously 
systemd system, (2) continue to support sysv installations where no systemd 
exists, and (3) respect any weewx-multi installations, whether they are 
sysv or systemd.

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/7ef801d2-7888-4f9f-ba77-5aad2544ebddn%40googlegroups.com.


Re: [weewx-user] Re: WeeWX updated - Restart of Service failed

2024-02-11 Thread Tom Keffer
Glad that worked out, but you've uncovered another problem: the error
handler for crt calls a non-existent function.

I've created issue #11  to
track, but it's likely to be a very long time before anyone gets around to
it!

On Sun, Feb 11, 2024 at 12:31 AM Uwe S.  wrote:

> Answering myself, as it was easier than i thought.
> The instance wasn't able to access the files in /var/tmp which worked
> before the update.
> Changed the ownership and the system was running again.
>
> Uwe S. schrieb am Sonntag, 11. Februar 2024 um 09:21:48 UTC+1:
>
>> Morning everyone,
>>
>> i have updated my WeeWX installation (Installed on Debian Bookworm in a
>> Proxmox container) using the apt-update command.
>>
>> But the service can't be started anymore, it throws this error which i am
>> unable so solve with my limited Python skills:
>>
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: Caught
>> unrecoverable exception:
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   module
>> 'weeutil.weeutil' has no attribute 'log_traceback'
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>  Traceback (most recent call last):
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File
>> "/etc/weewx/bin/user/crt.py", line 550, in handle_data
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>  self.write_data(self.realtime_txt,
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File
>> "/etc/weewx/bin/user/crt.py", line 567, in write_data
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   with
>> open(filename, 'w') as f:
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>   ^^^
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>  PermissionError: [Errno 13] Permission denied: '/var/tmp/realtime.txt'
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   During
>> handling of the above exception, another exception occurred:
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>  Traceback (most recent call last):
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File
>> "/usr/share/weewx/weewxd.py", line 166, in main
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>  engine.run()
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File
>> "/usr/share/weewx/weewx/engine.py", line 206, in run
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>  self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File
>> "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
>> Feb 11 09:16:20 WeeWX weewxd[5800]: Traceback (most recent call last):
>> Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py",
>> line 550, in handle_data
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>  callback(event)
>> Feb 11 09:16:20 WeeWX weewxd[5800]:
>> self.write_data(self.realtime_txt,
>> Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py",
>> line 567, in write_data
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File
>> "/etc/weewx/bin/user/crt.py", line 540, in handle_new_loop
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>  self.handle_data(event.packet)
>> Feb 11 09:16:20 WeeWX weewxd[5800]: with open(filename, 'w') as f:
>> Feb 11 09:16:20 WeeWX weewxd[5800]:  ^^^
>> Feb 11 09:16:20 WeeWX weewxd[5800]: PermissionError: [Errno 13]
>> Permission denied: '/var/tmp/realtime.txt'
>> Feb 11 09:16:20 WeeWX weewxd[5800]: During handling of the above
>> exception, another exception occurred:
>> Feb 11 09:16:20 WeeWX weewxd[5800]: Traceback (most recent call last):
>> Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewxd.py",
>> line 265, in 
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File
>> "/etc/weewx/bin/user/crt.py", line 563, in handle_data
>> Feb 11 09:16:20 WeeWX weewxd[5800]: main()
>> Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewxd.py",
>> line 166, in main
>> Feb 11 09:16:20 WeeWX weewxd[5800]: engine.run()
>> Feb 11 09:16:20 WeeWX weewxd[5800]:   File
>> "/usr/share/weewx/weewx/engine.py", line 206, in run
>> Feb 11 09:16:20 WeeWX weewxd[5800]:
>> self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
>> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: 
>>  weeutil.weeutil.log_traceback('crt:  ')
>> Feb 11 09:16:20 WeeWX weewxd[5800]:   File
>> "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
>> Feb 11 09:16:20 WeeWX weewxd[5800]:

[weewx-user] Re: Noob Question

2024-02-11 Thread 'michael.k...@gmx.at' via weewx-user
Everything looks right to me, although I can't tell, because you didn't 
past the wind speed plot.
Nick Name schrieb am Sonntag, 11. Februar 2024 um 14:00:27 UTC+1:

> Following epic session finally have WeeWx up and running. Learned much & 
> happy with this software.
>
> Vanilla RaspberryPi -> Vantage Pro2 -> Clean install WeeWx, Zero 
> customisation.
>
> Have repeated above about three time too get here so have learned a bit 
> about the overall process.
>
> I have one tiny issue and I wonder if anyone has seen similar and could 
> offer pointer.
> Attached image is of wind graphs from current running setup.[image: 
> screenshot 2024-02-11 at 09.29.10.png]
> "Something" does not look right to me! This being a vanilla install I 
> thought I would ask before I get into ANY "investigation".
>
> Hope above makes sense.
> Thanks for any suggestions.
> Regards.
> Frank C.
>

-- 
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/a25f9968-844d-495f-88fa-a25dd724606fn%40googlegroups.com.


[weewx-user] Re: Noob Question

2024-02-11 Thread 'Cameron D' via weewx-user
If you are referring to the vector direction, that is the default - note 
the North pointer at bottom left.
If you have a strongly dominant westerly wind then you probably want to 
leave it like that, otherwise there is a setting in the skin config file to 
"fix" it.


On Sunday 11 February 2024 at 11:00:27 pm UTC+10 Nick Name wrote:

> Following epic session finally have WeeWx up and running. Learned much & 
> happy with this software.
>
> Vanilla RaspberryPi -> Vantage Pro2 -> Clean install WeeWx, Zero 
> customisation.
>
> Have repeated above about three time too get here so have learned a bit 
> about the overall process.
>
> I have one tiny issue and I wonder if anyone has seen similar and could 
> offer pointer.
> Attached image is of wind graphs from current running setup.[image: 
> screenshot 2024-02-11 at 09.29.10.png]
> "Something" does not look right to me! This being a vanilla install I 
> thought I would ask before I get into ANY "investigation".
>
> Hope above makes sense.
> Thanks for any suggestions.
> Regards.
> Frank C.
>

-- 
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/4ec22fb8-69e9-489b-bb38-39c6d72f3798n%40googlegroups.com.


Re: [weewx-user] Re: SDR no longer supported? :( What's gong on?!

2024-02-11 Thread Tom Keffer
It always pays to read the Upgrade Guide. That's what it's there for.

On Sat, Feb 10, 2024 at 11:42 PM Kevin Key  wrote:

> Well I'll be damned. Removing the references to 'rotate" fixed the
> problem. :)
>
> On Saturday, February 10, 2024 at 11:35:54 PM UTC-8 Kevin Key wrote:
>
>> Thanks. I'm going to see where - unknowingly - I may be calling that in
>> my config..
>>
>> On Saturday, February 10, 2024 at 9:13:57 PM UTC-8 vince wrote:
>>
>>> You must be coming from a very old version…
>>>
>>> From the release notes…
>>>
>>> 4.10.1 01/30/2023¶
>>> 
>>>
>>> Logging handler rotate has been removed. Its need to access privileged
>>> location /var/log/weewx.log on start up would cause crashes, even if it
>>> was never used.
>>>
>>> V5 logging docs are at https://github.com/weewx/weewx/wiki/logging
>>>
>>> On Saturday, February 10, 2024 at 6:37:44 PM UTC-8 Kevin Key wrote:
>>>
 I made the mistake of upgrading weewx to the latest version. Now it
 won't run.

 kevin@linux:~$ sudo systemctl status weewx
 × weewx.service - WeeWX
  Loaded: loaded (/lib/systemd/system/weewx.service; enabled;
 preset: enabled)
  Active: failed (Result: exit-code) since Sat 2024-02-10 18:36:31
 PST; 11s ago
Duration: 177ms
Docs: https://weewx.com/docs
 Process: 25355 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited,
 status=3)
Main PID: 25355 (code=exited, status=3)
 CPU: 153ms

 Feb 10 18:36:31 linux weewxd[25355]:
 weeutil.logger.setup(namespace.log_label, config_dict)
 Feb 10 18:36:31 linux weewxd[25355]:   File
 "/usr/share/weewx/weeutil/logger.py", line 154, in setup
 Feb 10 18:36:31 linux weewxd[25355]:
 logging.config.dictConfig(log_dict)
 Feb 10 18:36:31 linux weewxd[25355]:   File
 "/usr/lib/python3.11/logging/config.py", line 823, in dictConfig
 Feb 10 18:36:31 linux weewxd[25355]:
 dictConfigClass(config).configure()
 Feb 10 18:36:31 linux weewxd[25355]:   File
 "/usr/lib/python3.11/logging/config.py", line 580, in configure
 Feb 10 18:36:31 linux weewxd[25355]: raise ValueError('Unable to
 configure handler '
 Feb 10 18:36:31 linux weewxd[25355]: ValueError: Unable to configure
 handler 'rotate'
 Feb 10 18:36:31 linux systemd[1]: weewx.service: Main process exited,
 code=exited, status=3/NOTIMPLEMENTED
 Feb 10 18:36:31 linux systemd[1]: weewx.service: Failed with result
 'exit-code'.
 kevin@linux:~$

>>> --
> 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/69437ced-6925-4af3-b0e2-e5c1d7c1e151n%40googlegroups.com
> 
> .
>

-- 
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/CAPq0zEDF4xOc%2B4inQc6JwnzTw0WPsquXb1AbnGuaeoq5ii%3Ds1g%40mail.gmail.com.


[weewx-user] Re: purge / clean mysql database?

2024-02-11 Thread geoff...@gmail.com
No need to purge - why throw away the data?  My archive table 
contains 4229492 records, no problem.
On Sunday 11 February 2024 at 11:14:45 UTC michael.k...@gmx.at wrote:

> What's the problem with even millions of entries in the database?
> The min/max values are stored in the corresponding archive_day_xxx-tables 
> but derived from archive and (re)built from archive.
>
> Mario Wesolek schrieb am Sonntag, 11. Februar 2024 um 12:03:00 UTC+1:
>
>> hi there,
>>
>> i use weewx 5.0.2 with belchertown skin 1.3.1 with mysql database. over 
>> the time there are tousends of entrys in the database. is there a good / 
>> easy way to purge them without lost of alltime records statistik? i think 
>> the min/max values came from table archives, so i can select them and 
>> delete the other - so i think this is not a good way to do that like this. 
>> does anybody knows a better way or is a tool for that job include?
>>
>> thank you
>> mario
>> dg1fi
>>
>

-- 
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/220edd5b-a277-4f90-87f5-4b9951d55492n%40googlegroups.com.


[weewx-user] Is there any way to tell dpkg/apt that you are running a weewx-multi via systemd?

2024-02-11 Thread 'Cameron D' via weewx-user
The problems I am seeing are:

An upgrade does not automatically stop the running services - I try to 
manually stop them first, but occasionally I do not even notice a new weewx 
among the other packages.

I have standard weewx config as a simulator, so it does not matter if it 
runs, but I prefer it not to. However, if I mask the weewx service, then 
dpkg configure fails and tries to complete configuration every time it runs.
If I disable weewx.service, then dpkg always re-enables it and starts it.

I can see that if a sysV-init version is running, then the scripts could 
presumably handle it, but is there a way to configure the system so the 
install scripts know to do something different for a multi-system?

-- 
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/c4e189d9-9cc1-4151-ab50-36c97905fadbn%40googlegroups.com.


[weewx-user] Re: dpkg: error processing package weewx (--configure):

2024-02-11 Thread 'Cameron D' via weewx-user
The "string to float" exception can happen if you lose the separator 
character (comma) between station latitude and longitude, or perhaps have 
some extra spurious character.  I don't know what happens for different 
languages.

When dpkg configure fails then it will again attempt to complete the 
configuration every time apt upgrade runs. That will be why it is running 
again even if you have already "installed" the latest version.

Instead of fully reinstalling, you should just try *dpkg --configure -a*
On Friday 9 February 2024 at 1:37:23 am UTC+10 Daniel Fourlas wrote:

> Journal begins at Thu 2022-09-22 06:17:24 EEST, ends at Thu 2024-02-08 
> 17:35:55 EET. --
> Oct 23 02:19:57 SunSDR-pi4 systemd[1]: Starting LSB: weewx weather 
> system...
> Oct 23 02:19:57 SunSDR-pi4 python3[11888]: weewx[11888] INFO __main__: 
> Initializing weewx version 4.10.2
> Oct 23 02:19:57 SunSDR-pi4 python3[11888]: weewx[11888] INFO __main__: 
> Using Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
>[GCC 10.2.1 20210110]
> Oct 23 02:19:57 SunSDR-pi4 python3[11888]: weewx[11888] INFO __main__: 
> Located at /bin/python3
> Oct 23 02:19:57 SunSDR-pi4 python3[11888]: weewx[11888] INFO __main__: 
> Platform Linux-6.1.21-v8+-aarch64-with-glibc2.31
> Oct 23 02:19:57 SunSDR-pi4 python3[11888]: weewx[11888] INFO __main__: 
> Locale is 'en_GB.UTF-8'
> Oct 23 02:19:57 SunSDR-pi4 python3[11888]: weewx[11888] INFO __main__: 
> Using configuration file /etc/weewx/weewx.conf
> Oct 23 02:19:57 SunSDR-pi4 python3[11888]: weewx[11888] INFO __main__: 
> Debug is 0
> Oct 23 02:19:57 SunSDR-pi4 python3[11888]: weewx[11888] INFO __main__: PID 
> file is /var/run/weewx.pid
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] INFO weewx.engine: 
> Loading station type Ultimeter (weewx.drivers.ultimeter)
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] INFO 
> weewx.drivers.ultimeter: Driver version is 0.6
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] INFO 
> weewx.drivers.ultimeter: Using serial port /dev/ttyUSB0
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
> Caught unrecoverable exception:
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
>   could not convert string to float: 
> '___>
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
>   Traceback (most recent call last):
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
> File "/usr/share/weewx/weewxd", line 148, in main
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
>   engine = weewx.engine.StdEngine(config_dict)
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
> File "/usr/share/weewx/weewx/engine.py", line 84, in __init__
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
>   self.stn_info = weewx.station.StationInfo(self.console, 
> **config_dict['Station'])
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
> File "/usr/share/weewx/weewx/station.py", line 51, in __init__
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
>   self.latitude_f  = float(stn_dict['latitude'])
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
>   ValueError: could not convert string to float: 
> '___>
> Oct 23 02:19:57 SunSDR-pi4 python3[11891]: weewx[11891] CRITICAL __main__: 
>   Exiting.
> Oct 23 02:19:57 SunSDR-pi4 weewx[11877]: Starting weewx weather system: 
> weewx.
> Oct 23 02:19:57 SunSDR-pi4 systemd[1]: Started LSB: weewx weather system.
> Oct 23 02:21:25 SunSDR-pi4 systemd[1]: Stopping LSB: weewx weather 
> system...
> Oct 23 02:21:25 SunSDR-pi4 weewx[12401]: Stopping weewx weather system: 
> weewx not running
> Oct 23 02:21:25 SunSDR-pi4 systemd[1]: weewx.service: Succeeded.
> Oct 23 02:21:25 SunSDR-pi4 systemd[1]: Stopped LSB: weewx weather system.
>
>
> Daniel Fourlas schrieb am Donnerstag, 8. Februar 2024 um 17:29:16 UTC+2:
>
>> Many Tnx for the info, now i fid this!
>>
>> Now give a unique URL for the station. A Weather Underground 
>> URL such as https://www.wunderground.com/dashboard/pws/KORPORT12 will do.
>> Unique URL: https://stationsweb.awekas.at/index.php?id=34255
>> Saving configuration file /etc/weewx/weewx.conf
>> Traceback (most recent call last):
>>   File "/usr/lib/python3.9/shutil.py", line 806, in move
>> os.rename(src, real_dst)
>> PermissionError: [Errno 13] Permission denied: '/etc/weewx/weewx.conf' -> 
>> '/etc/weewx/weewx.conf.20240208172027'
>>
>> During handling of the above exception, another exception occurred:
>>
>> Traceback (most recent call last):
>>   File "/usr/share/weewx/weectl.py", line 74, in 
>> main()
>>   

[weewx-user] Re: purge / clean mysql database?

2024-02-11 Thread 'michael.k...@gmx.at' via weewx-user
What's the problem with even millions of entries in the database?
The min/max values are stored in the corresponding archive_day_xxx-tables 
but derived from archive and (re)built from archive.

Mario Wesolek schrieb am Sonntag, 11. Februar 2024 um 12:03:00 UTC+1:

> hi there,
>
> i use weewx 5.0.2 with belchertown skin 1.3.1 with mysql database. over 
> the time there are tousends of entrys in the database. is there a good / 
> easy way to purge them without lost of alltime records statistik? i think 
> the min/max values came from table archives, so i can select them and 
> delete the other - so i think this is not a good way to do that like this. 
> does anybody knows a better way or is a tool for that job include?
>
> thank you
> mario
> dg1fi
>

-- 
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/8331ccd5-7783-45ff-9d09-69ba3a701876n%40googlegroups.com.


[weewx-user] purge / clean mysql database?

2024-02-11 Thread Mario Wesolek
hi there,

i use weewx 5.0.2 with belchertown skin 1.3.1 with mysql database. over the 
time there are tousends of entrys in the database. is there a good / easy 
way to purge them without lost of alltime records statistik? i think the 
min/max values came from table archives, so i can select them and delete 
the other - so i think this is not a good way to do that like this. does 
anybody knows a better way or is a tool for that job include?

thank you
mario
dg1fi

-- 
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/757cf9a9-13df-40a6-8169-dd987317c3b7n%40googlegroups.com.


Re: [weewx-user] unable to save to file '/var/www/html/weewx/...

2024-02-11 Thread Ton Karsten
Vince,
I use a raspberry Pi3 B+
As web server nginx
The latest version OS from December 5, 23 Kernel version: 6.1
Debian version: 12 (bookworm)
Completely new latest version of Weewx
installation on a new SD card
Settings for the folders according to schedule
For the HTML_ROOT directory:

# set the permissions
sudo find /var/www/html/weewx -type d -exec chmod 2775 {} \;
sudo find /var/www/html/weewx -type f -exec chmod 664 {} \;
# set the owner and group
sudo chown -R weewx /var/www/html/weewx
sudo chgrp -R weewx /var/www/html/weewx

The server writes a file in the /var/www/html directory
index.nginx-debian.html
Is also visible in the FF browser

Op zo 11 feb 2024 om 09:40 schreef Uwe S. :

> I had a very similar issue while updating my weewx instance. Finally it
> was a permission issue in /var/tmp
>
> You can try changing permission or ownership of the files reported. For me
> it was working afterwards.
>
> vince schrieb am Sonntag, 11. Februar 2024 um 05:28:45 UTC+1:
>
>> Or if you have it via cron, put it in weewx's crontab, not user 'pi'
>>
>> On Saturday, February 10, 2024 at 6:12:12 PM UTC-8 Graham Eddy wrote:
>>
>>> why are you writing into files outside weewx’s area? weewx user is
>>> unlikely to have perms to do that
>>> *⊣GE⊢*
>>>
>>> On 11 Feb 2024, at 1:59 am, Ton Karsten  wrote:
>>>
>>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>>> File "/usr/lib/python3.11/shutil.py", line 258, in copyfile
>>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>>>   with open(dst, 'wb') as fdst:
>>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>>>    ^^^
>>>
>>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>>>   PermissionError: [Errno 13] Toegang geweigerd:
>>> '/var/www/html/favicon.ico’
>>>
>>> ...
>>>
>>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>>> File "/etc/weewx/bin/user/belchertown.py", line 2817, in run
>>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>>>   with open(json_filename, mode="w") as jf:
>>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>>>    ^
>>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:
>>>   FileNotFoundError: [Errno 2] Bestand of map bestaat niet:
>>> '/var/www/html/json/homepage.json'
>>>
>>> --
> 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/030883da-55f0-4ab2-bbf5-33c79849364fn%40googlegroups.com
> 
> .
>

-- 
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/CACngpzZEWuwPQrkEpwCQ_XguCXFgTXSkHKdw3%2BmO3XPduuc0tQ%40mail.gmail.com.


Re: [weewx-user] unable to save to file '/var/www/html/weewx/...

2024-02-11 Thread Uwe S.
I had a very similar issue while updating my weewx instance. Finally it was 
a permission issue in /var/tmp

You can try changing permission or ownership of the files reported. For me 
it was working afterwards.

vince schrieb am Sonntag, 11. Februar 2024 um 05:28:45 UTC+1:

> Or if you have it via cron, put it in weewx's crontab, not user 'pi'
>
> On Saturday, February 10, 2024 at 6:12:12 PM UTC-8 Graham Eddy wrote:
>
>> why are you writing into files outside weewx’s area? weewx user is 
>> unlikely to have perms to do that
>> *⊣GE⊢*
>>
>> On 11 Feb 2024, at 1:59 am, Ton Karsten  wrote:
>>
>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>   File "/usr/lib/python3.11/shutil.py", line 258, in copyfile
>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>     with open(dst, 'wb') as fdst:
>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>      ^^^
>>
>> feb 10 15:10:15 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>     PermissionError: [Errno 13] Toegang geweigerd: 
>> '/var/www/html/favicon.ico’
>>
>> ...
>>
>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>   File "/etc/weewx/bin/user/belchertown.py", line 2817, in run
>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>     with open(json_filename, mode="w") as jf:
>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>      ^
>> feb 10 15:10:16 raspberrypi weewxd[4548]: ERROR weewx.reportengine:   
>>     FileNotFoundError: [Errno 2] Bestand of map bestaat niet: 
>> '/var/www/html/json/homepage.json'
>>
>>

-- 
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/030883da-55f0-4ab2-bbf5-33c79849364fn%40googlegroups.com.


[weewx-user] Re: WeeWX updated - Restart of Service failed

2024-02-11 Thread Uwe S.
Answering myself, as it was easier than i thought.
The instance wasn't able to access the files in /var/tmp which worked 
before the update.
Changed the ownership and the system was running again.

Uwe S. schrieb am Sonntag, 11. Februar 2024 um 09:21:48 UTC+1:

> Morning everyone,
>
> i have updated my WeeWX installation (Installed on Debian Bookworm in a 
> Proxmox container) using the apt-update command.
>
> But the service can't be started anymore, it throws this error which i am 
> unable so solve with my limited Python skills:
>
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: Caught 
> unrecoverable exception: 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   module 
> 'weeutil.weeutil' has no attribute 'log_traceback' 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   Traceback 
> (most recent call last): 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
> "/etc/weewx/bin/user/crt.py", line 550, in handle_data 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
>  self.write_data(self.realtime_txt, 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
> "/etc/weewx/bin/user/crt.py", line 567, in write_data 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   with 
> open(filename, 'w') as f: 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
>   ^^^ 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
>  PermissionError: [Errno 13] Permission denied: '/var/tmp/realtime.txt' 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   During 
> handling of the above exception, another exception occurred: 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   Traceback 
> (most recent call last): 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
> "/usr/share/weewx/weewxd.py", line 166, in main 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
>  engine.run() 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
> "/usr/share/weewx/weewx/engine.py", line 206, in run 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
>  self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet)) 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
> "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent 
> Feb 11 09:16:20 WeeWX weewxd[5800]: Traceback (most recent call last): 
> Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", 
> line 550, in handle_data 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
>  callback(event) 
> Feb 11 09:16:20 WeeWX weewxd[5800]: self.write_data(self.realtime_txt, 
> Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", 
> line 567, in write_data 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
> "/etc/weewx/bin/user/crt.py", line 540, in handle_new_loop 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
>  self.handle_data(event.packet) 
> Feb 11 09:16:20 WeeWX weewxd[5800]: with open(filename, 'w') as f: 
> Feb 11 09:16:20 WeeWX weewxd[5800]:  ^^^ 
> Feb 11 09:16:20 WeeWX weewxd[5800]: PermissionError: [Errno 13] Permission 
> denied: '/var/tmp/realtime.txt' 
> Feb 11 09:16:20 WeeWX weewxd[5800]: During handling of the above 
> exception, another exception occurred: 
> Feb 11 09:16:20 WeeWX weewxd[5800]: Traceback (most recent call last): 
> Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewxd.py", 
> line 265, in  
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
> "/etc/weewx/bin/user/crt.py", line 563, in handle_data 
> Feb 11 09:16:20 WeeWX weewxd[5800]: main() 
> Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewxd.py", 
> line 166, in main 
> Feb 11 09:16:20 WeeWX weewxd[5800]: engine.run() 
> Feb 11 09:16:20 WeeWX weewxd[5800]:   File 
> "/usr/share/weewx/weewx/engine.py", line 206, in run 
> Feb 11 09:16:20 WeeWX weewxd[5800]: 
> self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet)) 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
>  weeutil.weeutil.log_traceback('crt:  ') 
> Feb 11 09:16:20 WeeWX weewxd[5800]:   File 
> "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent 
> Feb 11 09:16:20 WeeWX weewxd[5800]: callback(event) 
> Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", 
> line 540, in handle_new_loop 
> Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
>  ^ 
> Feb 11 09:16:20 WeeWX weewxd[5800]: self.handle_data(event.packet) 
> Feb 11 09:16:20 WeeWX weewxd[5800]:   

[weewx-user] WeeWX updated - Restart of Service failed

2024-02-11 Thread Uwe S.
Morning everyone,

i have updated my WeeWX installation (Installed on Debian Bookworm in a 
Proxmox container) using the apt-update command.

But the service can't be started anymore, it throws this error which i am 
unable so solve with my limited Python skills:

Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: Caught unrecoverable 
exception: 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   module 
'weeutil.weeutil' has no attribute 'log_traceback' 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   Traceback 
(most recent call last): 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
"/etc/weewx/bin/user/crt.py", line 550, in handle_data 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
 self.write_data(self.realtime_txt, 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
"/etc/weewx/bin/user/crt.py", line 567, in write_data 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   with 
open(filename, 'w') as f: 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
  ^^^ 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
 PermissionError: [Errno 13] Permission denied: '/var/tmp/realtime.txt' 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   During 
handling of the above exception, another exception occurred: 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:   Traceback 
(most recent call last): 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
"/usr/share/weewx/weewxd.py", line 166, in main 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
 engine.run() 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
"/usr/share/weewx/weewx/engine.py", line 206, in run 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
 self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet)) 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
"/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent 
Feb 11 09:16:20 WeeWX weewxd[5800]: Traceback (most recent call last): 
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", 
line 550, in handle_data 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
 callback(event) 
Feb 11 09:16:20 WeeWX weewxd[5800]: self.write_data(self.realtime_txt, 
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", 
line 567, in write_data 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
"/etc/weewx/bin/user/crt.py", line 540, in handle_new_loop 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
 self.handle_data(event.packet) 
Feb 11 09:16:20 WeeWX weewxd[5800]: with open(filename, 'w') as f: 
Feb 11 09:16:20 WeeWX weewxd[5800]:  ^^^ 
Feb 11 09:16:20 WeeWX weewxd[5800]: PermissionError: [Errno 13] Permission 
denied: '/var/tmp/realtime.txt' 
Feb 11 09:16:20 WeeWX weewxd[5800]: During handling of the above exception, 
another exception occurred: 
Feb 11 09:16:20 WeeWX weewxd[5800]: Traceback (most recent call last): 
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewxd.py", 
line 265, in  
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: File 
"/etc/weewx/bin/user/crt.py", line 563, in handle_data 
Feb 11 09:16:20 WeeWX weewxd[5800]: main() 
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewxd.py", 
line 166, in main 
Feb 11 09:16:20 WeeWX weewxd[5800]: engine.run() 
Feb 11 09:16:20 WeeWX weewxd[5800]:   File 
"/usr/share/weewx/weewx/engine.py", line 206, in run 
Feb 11 09:16:20 WeeWX weewxd[5800]: 
self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet)) 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
 weeutil.weeutil.log_traceback('crt:  ') 
Feb 11 09:16:20 WeeWX weewxd[5800]:   File 
"/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent 
Feb 11 09:16:20 WeeWX weewxd[5800]: callback(event) 
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", 
line 540, in handle_new_loop 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
 ^ 
Feb 11 09:16:20 WeeWX weewxd[5800]: self.handle_data(event.packet) 
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", 
line 563, in handle_data 
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:  
 AttributeError: module 'weeutil.weeutil' has no attribute 'log_traceback' 
Feb 11 09:16:20 WeeWX weewxd[5800]: weeutil.weeutil.log_traceback('crt: 
 ') 
Feb 11 09:16:20 WeeWX weewxd[5800]: ^ 
Feb 11 09:16:20 WeeWX weewxd[5800]: AttributeError: module 

[weewx-user] paho-mqtt and weewx-mqtt: paho-mqtt-2.0.0 not compatible!

2024-02-11 Thread 'michael.k...@gmx.at' via weewx-user
WeeWX won't crash, but MQTT won't work: when using weewx-mqtt with 
paho-mqtt-2.0.0, it fails with:

Exception ignored in: 
Traceback (most recent call last):
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/paho/mqtt/client.py", 
line 874, in __del__
self._reset_sockets()
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/paho/mqtt/client.py", 
line 1133, in _reset_sockets
self._sock_close()
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/paho/mqtt/client.py", 
line 1119, in _sock_close
if not self._sock:
   ^^
AttributeError: 'Client' object has no attribute '_sock'
Exception in thread MQTT:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/weewx/restx.py", line 
357, in run
self.run_loop(_manager)
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/weewx/restx.py", line 
384, in run_loop
self.process_record(_record, dbmanager)
  File "/home/michi/weewx-data/bin/user/mqtt.py", line 522, in 
process_record
self.get_mqtt_client()
  File "/home/michi/weewx-data/bin/user/mqtt.py", line 444, in 
get_mqtt_client
mc = mqtt.Client(client_id=client_id)
 
TypeError: Client.__init__() missing 1 required positional argument: 
'callback_api_version'

With pip, install paho-mqtt-1.6.1 as a workaround:

pip install paho-mqtt==1.6.1

-- 
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/741ccdcb-2c24-43a0-94c9-6b9ae203f129n%40googlegroups.com.