Re: [weewx-user] Highchart Air Quality

2021-07-09 Thread Tim Tuck

Hi Mitchell,

OK, there is more than 1 AQI plugin :)

the one I use is this...

https://github.com/jonathankoren/weewx-aqi/

Its easy to get confused between the various additions available.

If you want to use the one I am using you can download it thus...

wget https://github.com/jonathankoren/weewx-aqi/archive/v1.3.tar.gz

regards

Tim

On 9/7/21 10:33 am, Mitchell Tuckness wrote:
Thank you Tim. I must be missing something. I installed the 
weewx-aqixtypes-0.0.2.tar.gz.


--
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/ec4cfb21-178c-a40f-f7f4-4a7b3a0f2da1%40skybase.net.


Re: [weewx-user] Re-installed weewx using setup.py and now it won't start at boot

2021-07-09 Thread seano...@gmail.com
Just a quick update.

One last attempt to get weewx running at boot before I drive out and format 
the microsd card to start fresh. I followed the below article to 
automatically run weewx using systemd and it is working now! Thanks for all 
the support.

https://github.com/weewx/weewx/wiki/systemd

-- 
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/ecb10915-8d72-4484-bc4b-99adea19e707n%40googlegroups.com.


Re: [weewx-user] Re: Broadcast to weewx from Weatherflow tempest station

2021-07-09 Thread seano...@gmail.com
Just a quick update on this...

I managed to get my weather flow tempest weather station broadcasting to 
windguru. This was done by using the weewx extension 
https://github.com/captain-coredump/weatherflow-udp

Thanks for all the support. And a big thank you to everyone involved in 
creating this amazing software.

-- 
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/77934d3f-8ea9-4b92-a641-18cfe4fe63c3n%40googlegroups.com.


[weewx-user] Is there any way to get the rainy days into the month?

2021-07-09 Thread enu...@gmail.com
Another thing that would interest me is to know how many days in the month 
passed from 20º for example.
how and where could I put these functions if they don't exist

-- 
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/bf5ede36-514d-4e2e-9550-ecedba1a0705n%40googlegroups.com.


Re: [weewx-user] Wind Rose empty in Steel Series

2021-07-09 Thread Tom Keffer
Three things:

1. Let's see what's actually in your database.

*show tables in weewxwftest;*


2. Can we see the output of

*wee_debug --info*


Double check that the utility obfuscated any passwords you might have in
weewx.conf.

3. Just to double check: you only have one weewx.conf file, right?



On Thu, Jul 8, 2021 at 11:38 PM 'Jan-Jaap van der Geer' via weewx-user <
weewx-user@googlegroups.com> wrote:

> The log doesn't seem to tell anything special:
>
> [/share/homes/admin/weewxwftest] # cat /var/log/messages | grep
> wee_database
> Jul  9 08:23:30 qnap user.info wee_database[20528] INFO weewx.manager:
> Dropping daily summary tables from 'weewxwftest' ...
> Jul  9 08:23:30 qnap user.info wee_database[20528] INFO weewx.manager:
> Dropped daily summary tables from database 'weewxwftest'
> Jul  9 08:23:49 qnap user.info wee_database[21058] INFO __main__: All
> daily summaries will be rebuilt.
> Jul  9 08:23:56 qnap user.info wee_database[21058] INFO weewx.manager:
> Created daily summary tables
> Jul  9 08:23:56 qnap user.info wee_database[21058] INFO __main__:
> Rebuilding daily summaries in database 'weewxwftest' ...
> Jul  9 08:23:56 qnap user.info wee_database[21058] INFO weewx.manager:
> Starting backfill of daily summaries
> Jul  9 08:32:32 qnap user.info wee_database[21058] INFO weewx.manager:
> Processed 132119 records to backfill 208 day summaries in 515.43 seconds
> Jul  9 08:32:32 qnap user.info wee_database[21058] INFO __main__: Rebuild
> of daily summaries in database 'weewxwftest' complete
>
> (I had to run it again as the log from yesterday had already been purged
> but I suppose the result is the same. I did watch the log and didn't notice
> anything interesting at the time)
>
> Thanks,
> Jan-Jaap
> On Friday, July 9, 2021 at 3:57:22 AM UTC+2 tke...@gmail.com wrote:
>
>> How about the log from when you tried dropping and rebuilding the
>> database?
>>
>> On Thu, Jul 8, 2021 at 2:29 PM 'Jan-Jaap van der Geer' via weewx-user <
>> weewx...@googlegroups.com> wrote:
>>
>>> I have the exact same errors as fpb:
>>>
>>> Jul  8 23:20:16 qnap user.err weewx[2950] ERROR weewx.cheetahgenerator:
>>> Generate failed with exception ''
>>> Jul  8 23:20:16 qnap user.err weewx[2950] ERROR weewx.cheetahgenerator:
>>>  Ignoring template
>>> /share/homes/admin/weewxwf/skins/Seasons/NOAA/NOAA-%Y-%m.txt.tmpl
>>> Jul  8 23:20:16 qnap user.err weewx[2950] ERROR weewx.cheetahgenerator:
>>>  Reason: cannot find 'raw' while searching for 'day.wind.count.raw'
>>> Jul  8 23:20:16 qnap user.err weewx[2950] ERROR weewx.cheetahgenerator:
>>>   Traceback (most recent call last):
>>> Jul  8 23:20:16 qnap user.err weewx[2950] ERROR weewx.cheetahgenerator:
>>> File
>>> "/share/CACHEDEV1_DATA/homes/admin/weewxwf/bin/weewx/cheetahgenerator.py",
>>> line 326, in generate
>>> Jul  8 23:20:16 qnap user.err weewx[2950] ERROR weewx.cheetahgenerator:
>>>   unicode_string = compiled_template.respond()
>>> Jul  8 23:20:16 qnap user.err weewx[2950] ERROR weewx.cheetahgenerator:
>>> File
>>> "_share_homes_admin_weewxwf_skins_Seasons_NOAA_NOAA__Y__m_txt_tmpl.py",
>>> line 430, in respond
>>> Jul  8 23:20:16 qnap user.err weewx[2950] ERROR weewx.cheetahgenerator:
>>>   NotFound: cannot find 'raw' while searching for 'day.wind.count.raw'
>>>
>>> I don't really understand what this 'new schema' and 'old schema' is,
>>> but I tried:
>>>
>>> wee_database --drop-daily
>>> wee_database --rebuild-daily
>>>
>>> both without changing the binding in weewx.conf and after changing it.
>>> Right now I have
>>>
>>> [[wx_binding]]
>>> # The database must match one of the sections in [Databases].
>>> # This is likely to be the only option you would want to change.
>>> database = archive_mysql
>>> # The name of the table within the database
>>> table_name = archive
>>> # The manager handles aggregation of data for historical
>>> summaries
>>> manager = weewx.manager.DaySummaryManager
>>> # The schema defines the structure of the database.
>>> # It is *only* used when the database is created.
>>> schema = schemas.wview_extended.schema
>>>
>>> but using:
>>>
>>> manager = weewx.wxmanager.WXDaySummaryManager
>>>
>>> and rebuilding still caused the errors.
>>>
>>> What should I do to fix this?
>>>
>>> Thanks,
>>> Jan-Jaap
>>>
>>> On Wednesday, December 16, 2020 at 2:26:19 PM UTC+1 tke...@gmail.com
>>> wrote:
>>>
 You have the correct configuration, but remember, it only applies *when
 the database is created*. Thereafter, the schema is read from the
 database.

 You can try rebuilding the daily summaries using wee_database:

 *sudo wee_database --drop-daily*
 *sudo wee_database --rebuild-daily*


 The rebuild will use the configuration in weewx.conf.

 -tk

 On Tue, Dec 15, 2020 at 9:58 PM fpb  wrote:

> @Tom,
>
> I'm having a similar issue but I'm tryi

Re: [weewx-user] Is there any way to get the rainy days into the month?

2021-07-09 Thread Tom Keffer
Not sure what you mean by "passed from 20°", but if you mean the number of
days below 20, you can get that with

The number of days that fell below 20°F is $month.outTemp.min_le((20.0,
"degree_F", "group_temperature")) 

Note the double parentheses.



On Fri, Jul 9, 2021 at 4:55 AM enu...@gmail.com  wrote:

> Another thing that would interest me is to know how many days in the month
> passed from 20º for example.
> how and where could I put these functions if they don't exist
>
> --
> 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/bf5ede36-514d-4e2e-9550-ecedba1a0705n%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/CAPq0zECDZpAkQwShsNR4_7dQhvBvwu3%3D3r6LbYymF%2B6pNse5gA%40mail.gmail.com.


[weewx-user] WeeWX reports not updating: Database corrupt?

2021-07-09 Thread David Lewison
Hello everyone. First off, please pardon my ignorance of Linux. I was able 
to follow the wonderful instructions for setting up WeeWX on a RasPi 
running Debian Linux, but aside from what's written in the tutorials, my 
debugging skills are very primitive. 

That said, I'm running WeeWX v3.7.1 on a RasPi model B using Debian 
pre-packaged install. Weather station is a Davis Vantage Pro with USB data 
logger. It has been running pretty much flawlessly for 3 years, generating 
reports every 10 minutes and uploading to a webpage. Occasionally, it'll 
stop updating, but restarting the RasPi always fixes it. The other day, we 
had a violent storm that knocked out power for 4 hours. When everything 
came back up, WeeWX wouldn't update no matter what I did. 

What I've done: 
- Checked WeeWX live connection to Vantage. Data is reporting properly 
every 2 seconds.
- Checked Vantage datalogger using Davis Weatherlink software. The logger 
has been recording data properly since the power came back on.
- Ran WeeWX reports manually. The image & text files update with a new 
timestamp, but no new data. The WeeWX server uptime on the HTML file also 
updates. Seems like the reports are generating correctly...just with no new 
data.
- Checked the weewx.sdb database file. The file's timestamp hasn't been 
updated since the power went out. This is where I think the problem is. For 
some reason, WeeWX is not adding new data to the database. Perhaps a 
corrupt database? 

If that's the issue, I'm not sure what to do about repairing the database. 
I'd hate to lose 3 years worth of data by doing a clean re-install. And I'm 
reluctant to wipe the logger's memory, since I'd lose 2 days worth of 
data...and it's looking like the logger is working properly anyway. 

Attached is a log file for a few archive cycles today. Thanks in advance 
for any help!!

-- 
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/7c29793a-88ef-435a-a80c-b88f493864fbn%40googlegroups.com.
Jul  9 11:16:05 raspberrypi systemd[1]: Starting LSB: weewx weather system...
Jul  9 11:16:05 raspberrypi weewx[5581]: engine: Initializing weewx version 
3.7.1
Jul  9 11:16:05 raspberrypi weewx[5581]: engine: Using Python 2.7.9 (default, 
Sep 17 2016, 20:26:04) #012[GCC 4.9.2]
Jul  9 11:16:05 raspberrypi weewx[5581]: engine: Platform 
Linux-4.9.28-v7+-armv7l-with-debian-8.0
Jul  9 11:16:05 raspberrypi weewx[5581]: engine: Locale is 'en_US.UTF-8'
Jul  9 11:16:05 raspberrypi weewx[5581]: engine: pid file is /var/run/weewx.pid
Jul  9 11:16:05 raspberrypi weewx[5571]: Starting weewx weather system: weewx.
Jul  9 11:16:05 raspberrypi systemd[1]: Started LSB: weewx weather system.
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Using configuration file 
/etc/weewx/weewx.conf
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: debug is 1
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Initializing engine
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Loading station type Vantage 
(weewx.drivers.vantage)
Jul  9 11:16:05 raspberrypi weewx[5585]: vantage: driver version is 3.0.10
Jul  9 11:16:05 raspberrypi weewx[5585]: vantage: Opened up serial port 
/dev/ttyUSB0; baud 19200; timeout 4.00
Jul  9 11:16:05 raspberrypi weewx[5585]: vantage: rude wake up of console 
successful
Jul  9 11:16:05 raspberrypi weewx[5585]: vantage: _setup; hardware type is 16
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Loading service 
weewx.engine.StdTimeSynch
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Finished loading service 
weewx.engine.StdTimeSynch
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Loading service 
weewx.engine.StdConvert
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: StdConvert target unit is 0x1
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Finished loading service 
weewx.engine.StdConvert
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Loading service 
weewx.engine.StdCalibrate
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Finished loading service 
weewx.engine.StdCalibrate
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Loading service 
weewx.engine.StdQC
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Finished loading service 
weewx.engine.StdQC
Jul  9 11:16:05 raspberrypi weewx[5585]: engine: Loading service 
weewx.wxservices.StdWXCalculate
Jul  9 11:16:05 raspberrypi weewx[5585]: wxcalculate: The following values will 
be calculated: barometer=prefer_hardware, windchill=prefer_hardware, 
dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, 
windrun=prefer_hardware, heatindex=prefer_hardware, 
maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, 
inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, 
cloudbase=prefer_hardware
Jul  9 1

Re: [weewx-user] WeeWX reports not updating: Database corrupt?

2021-07-09 Thread Greg Troxel

David Lewison  writes:

> That said, I'm running WeeWX v3.7.1 on a RasPi model B using Debian 
> pre-packaged install. Weather station is a Davis Vantage Pro with USB data 
> logger. It has been running pretty much flawlessly for 3 years, generating 
> reports every 10 minutes and uploading to a webpage. Occasionally, it'll 
> stop updating, but restarting the RasPi always fixes it. The other day, we 
> had a violent storm that knocked out power for 4 hours. When everything 
> came back up, WeeWX wouldn't update no matter what I did. 

My advice:

  tread lightly until you get advice from others more clueful than me

  immediately, copy the archive file to someplace else in the
  filesystem, then to a different computer, and ideally to an offsite
  computer.  Hopefully you have been doing backups anyway.

  check that time sync is ok on your machine (logs don't suggest this is wrong)

  make sure you aren't running multiple copies of weewx (I see no hints
  of this, but am a fan of doing the easy checks anyway)

  read the following:
http://www.weewx.com/docs/utilities.htm#wee_device_utility
http://www.weewx.com/docs/hardware.htm#vantage_notes

https://github.com/weewx/weewx/wiki/Troubleshooting-the-Davis-Vantage-station

  I am guessing from your logs -- but wait for someone else to confirm
  -- that you are having a corruption issue and that you should be using
  --dump.

  re-read the hint #1 above about making backups and really do it

  do an sqlite integrity check (with weewx stopped)
sqlite3 weewx.sdb 'pragma integrity_check;'

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


signature.asc
Description: PGP signature


Re: [weewx-user] WeeWX reports not updating: Database corrupt?

2021-07-09 Thread Tom Keffer
You have all the classic symptoms of corrupted memory in your logger. See
the wiki article *WeeWX generates HTML pages, but it does not update them
*

On Fri, Jul 9, 2021 at 9:00 AM David Lewison  wrote:

> Hello everyone. First off, please pardon my ignorance of Linux. I was able
> to follow the wonderful instructions for setting up WeeWX on a RasPi
> running Debian Linux, but aside from what's written in the tutorials, my
> debugging skills are very primitive.
>
> That said, I'm running WeeWX v3.7.1 on a RasPi model B using Debian
> pre-packaged install. Weather station is a Davis Vantage Pro with USB data
> logger. It has been running pretty much flawlessly for 3 years, generating
> reports every 10 minutes and uploading to a webpage. Occasionally, it'll
> stop updating, but restarting the RasPi always fixes it. The other day, we
> had a violent storm that knocked out power for 4 hours. When everything
> came back up, WeeWX wouldn't update no matter what I did.
>
> What I've done:
> - Checked WeeWX live connection to Vantage. Data is reporting properly
> every 2 seconds.
> - Checked Vantage datalogger using Davis Weatherlink software. The logger
> has been recording data properly since the power came back on.
> - Ran WeeWX reports manually. The image & text files update with a new
> timestamp, but no new data. The WeeWX server uptime on the HTML file also
> updates. Seems like the reports are generating correctly...just with no new
> data.
> - Checked the weewx.sdb database file. The file's timestamp hasn't been
> updated since the power went out. This is where I think the problem is. For
> some reason, WeeWX is not adding new data to the database. Perhaps a
> corrupt database?
>
> If that's the issue, I'm not sure what to do about repairing the database.
> I'd hate to lose 3 years worth of data by doing a clean re-install. And I'm
> reluctant to wipe the logger's memory, since I'd lose 2 days worth of
> data...and it's looking like the logger is working properly anyway.
>
> Attached is a log file for a few archive cycles today. Thanks in advance
> for any help!!
>
> --
> 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/7c29793a-88ef-435a-a80c-b88f493864fbn%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/CAPq0zEAsXjK%3DjhY32%2BQwCiuDKKp38GbGSfwKikM62p-EK8jXAA%40mail.gmail.com.


Re: [weewx-user] WeeWX reports not updating: Database corrupt?

2021-07-09 Thread vince
Agree with Greg's suggestions for sure 'especially' the thought to get a 
copy of your db 'off' of that SD card onto another computer immediately 
just in case

Always always always have a backup of your weewx db if your old data is 
important to you.  There are many threads in the weewx-user group archives 
for how to do this, but FWIW the script I cooked up back in 2013 or so 
(wow) might be worth taking a look at -  (link) 
 - I just run it from 
cron daily and try to remember to grab it from another computer weekly or 
so.


-- 
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/feeccbc6-fe29-40fd-804b-aa2093d61b2dn%40googlegroups.com.


[weewx-user] MQTTSubscribe - when no data is avail, archive function appears to halt

2021-07-09 Thread bdf0506
This might be more appropriate for an issue on GitHub, but figured I would 
start here.

I have Weewx 4.5.1 running with Weewx-MQTTSubscribe v 2.0.0. MQTTSubscribe 
is running as a driver. For my DB, I'm using MySQL.

Everything works fine as is, but what I've found is that if I simply stop 
publishing data to my MQTT broker, *something* will silently die. If this 
happens at the Archive interval, the reporting is delayed until the data 
comes back and the driver picks up at least one loop packet.

To make matters worse, if I stop publishing my data for more than 5 
minutes, WeeWx loses the connection to MySQL and then has to re-establish 
(not sure where the mysql timeout is set? I don't believe this is a mysql 
server side, I think its a weewx client side issue). The good news is that 
there is already logic built in to recover from the errors, so worse case 
on all this is just a delayed Archive report.

Relevant weewx.conf:

[Station]
station_type = MQTTSubscribeDriver

[MQTTSubscribeDriver]
# This section is for the MQTTSubscribe driver.

# The driver to use:
driver = user.MQTTSubscribe

# The MQTT server.
# Default is localhost.
host = unraid.home

# The port to connect to.
# Default is 1883.
port = 1883

# Maximum period in seconds allowed between communications with the 
broker.
# Default is 60.
keepalive = 60

# username for broker authentication.
# Default is None.
username = mqtt

# password for broker authentication.
# Default is None.
password = mqtt

# Configuration for the message callback.
[[message_callback]]
type = individual

# The topics to subscribe to.
[[topics]]
unit_system = US

[[[rtl_433/devices/Acurite-Tower/2070/temperature_C]]]
  name = extraTemp1
  units = degree_C
[[[rtl_433/devices/Acurite-Tower/2070/humidity]]]
  name = extraHumid1
[[[rtl_433/devices/Acurite-Tower/2070/battery_ok]]]
  name = batteryStatus1
.trimmedmany more topics listed

[DataBindings]

[[wx_binding]]
database = archive_mysql
table_name = archive
manager = weewx.manager.DaySummaryManager
schema = schemas.wview_extended.schema

[Databases]
[[archive_mysql]]
database_name = weewx_cb_july_6_3
database_type = MySQL

[DatabaseTypes]

[[MySQL]]
driver = weedb.mysql
# The host where the database is located
host = unraid.home
# The user name for logging in to the host
user = weewx
# The password for the user name (quotes guard against parsing 
errors)
password = "weewx"


Here's two examples:

First example shows it stopped for only 3 minutes, but it was stopped 
during the scheduled Archive window, so archive was delayed until data 
reappeared.

Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager 
data-> outgoing rtl_433/devices/Acurite-Tower/14680/battery_ok: 
batteryStatus6: 1.0, dateTime: 1625852913.3931665, usUnits: 1
Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) data-> final 
loop packet is rtl_433/devices/Acurite-Tower/14680/battery_ok 2021-07-09 
13:48:33 EDT (1625852913): batteryStatus6: 1.0, dateTime: 
1625852913.3931665, usUnits: 1
Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager 
data-> outgoing rtl_433/devices/Acurite-Tower/14680/battery_ok: 
batteryStatus6: 1.0, dateTime: 1625852913.3937244, usUnits: 1
Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) data-> final 
loop packet is rtl_433/devices/Acurite-Tower/14680/battery_ok 2021-07-09 
13:48:33 EDT (1625852913): batteryStatus6: 1.0, dateTime: 
1625852913.3937244, usUnits: 1
Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager 
data-> outgoing rtl_433/devices/Acurite-Tower/14680/battery_ok: 
batteryStatus6: 1.0, dateTime: 1625852913.3942847, usUnits: 1
Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) data-> final 
loop packet is rtl_433/devices/Acurite-Tower/14680/battery_ok 2021-07-09 
13:48:33 EDT (1625852913): batteryStatus6: 1.0, dateTime: 
1625852913.3942847, usUnits: 1



Jul  9 13:53:15 weewx[17] DEBUG user.MQTTSubscribe: (Driver) 
MessageCallbackProvider data-> incoming topic: 
rtl_433/devices/Fineoffset-WH65B/202/battery_ok, QOS: 0, retain: 0, 
payload: b'1'
Jul  9 13:53:15 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager 
data-> incoming rtl_433/devices/Fineoffset-WH65B/202/battery_ok: 
outTempBatteryStatus: 1.0
Jul  9 13:53:15 weewx[17] DEBUG user.MQTTSubscribe: (Driver) 
MessageCallbackProvider data-> incoming topic: 
rtl_433/devices/Fineoffset-WH65B/202/temperature_C, QOS: 0, retain: 0, 
payload: b'31.1'
Jul  9 13:53:15 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager 
data-> incoming rtl_433/devices/Fineoffset-WH65B/202/temperature_C: 
outTemp: 87.98
Jul  9 13:53:15 weewx[17] DEBUG user.MQTTSubscribe: (Drive

Re: [weewx-user] MQTTSubscribe - when no data is avail, archive function appears to halt

2021-07-09 Thread Tom Keffer
Yes, WeeWX blocks on LOOP packets. No LOOP packet = no action. It will sit
and wait indefinitely.

The alternative is the complexity of select statements and asynchronous
events.

I suppose one thing you could do is to set a timeout in the driver so that
if nothing is received after a while, it emits a minimal packet with no
data.

On Fri, Jul 9, 2021 at 11:18 AM bdf0506  wrote:

> This might be more appropriate for an issue on GitHub, but figured I would
> start here.
>
> I have Weewx 4.5.1 running with Weewx-MQTTSubscribe v 2.0.0. MQTTSubscribe
> is running as a driver. For my DB, I'm using MySQL.
>
> Everything works fine as is, but what I've found is that if I simply stop
> publishing data to my MQTT broker, *something* will silently die. If this
> happens at the Archive interval, the reporting is delayed until the data
> comes back and the driver picks up at least one loop packet.
>
> To make matters worse, if I stop publishing my data for more than 5
> minutes, WeeWx loses the connection to MySQL and then has to re-establish
> (not sure where the mysql timeout is set? I don't believe this is a mysql
> server side, I think its a weewx client side issue). The good news is that
> there is already logic built in to recover from the errors, so worse case
> on all this is just a delayed Archive report.
>
> Relevant weewx.conf:
>
> [Station]
> station_type = MQTTSubscribeDriver
>
> [MQTTSubscribeDriver]
> # This section is for the MQTTSubscribe driver.
>
> # The driver to use:
> driver = user.MQTTSubscribe
>
> # The MQTT server.
> # Default is localhost.
> host = unraid.home
>
> # The port to connect to.
> # Default is 1883.
> port = 1883
>
> # Maximum period in seconds allowed between communications with the
> broker.
> # Default is 60.
> keepalive = 60
>
> # username for broker authentication.
> # Default is None.
> username = mqtt
>
> # password for broker authentication.
> # Default is None.
> password = mqtt
>
> # Configuration for the message callback.
> [[message_callback]]
> type = individual
>
> # The topics to subscribe to.
> [[topics]]
> unit_system = US
>
> [[[rtl_433/devices/Acurite-Tower/2070/temperature_C]]]
>   name = extraTemp1
>   units = degree_C
> [[[rtl_433/devices/Acurite-Tower/2070/humidity]]]
>   name = extraHumid1
> [[[rtl_433/devices/Acurite-Tower/2070/battery_ok]]]
>   name = batteryStatus1
> .trimmedmany more topics listed
>
> [DataBindings]
>
> [[wx_binding]]
> database = archive_mysql
> table_name = archive
> manager = weewx.manager.DaySummaryManager
> schema = schemas.wview_extended.schema
>
> [Databases]
> [[archive_mysql]]
> database_name = weewx_cb_july_6_3
> database_type = MySQL
>
> [DatabaseTypes]
>
> [[MySQL]]
> driver = weedb.mysql
> # The host where the database is located
> host = unraid.home
> # The user name for logging in to the host
> user = weewx
> # The password for the user name (quotes guard against parsing
> errors)
> password = "weewx"
>
>
> Here's two examples:
>
> First example shows it stopped for only 3 minutes, but it was stopped
> during the scheduled Archive window, so archive was delayed until data
> reappeared.
>
> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager
> data-> outgoing rtl_433/devices/Acurite-Tower/14680/battery_ok:
> batteryStatus6: 1.0, dateTime: 1625852913.3931665, usUnits: 1
> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) data-> final
> loop packet is rtl_433/devices/Acurite-Tower/14680/battery_ok 2021-07-09
> 13:48:33 EDT (1625852913): batteryStatus6: 1.0, dateTime:
> 1625852913.3931665, usUnits: 1
> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager
> data-> outgoing rtl_433/devices/Acurite-Tower/14680/battery_ok:
> batteryStatus6: 1.0, dateTime: 1625852913.3937244, usUnits: 1
> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) data-> final
> loop packet is rtl_433/devices/Acurite-Tower/14680/battery_ok 2021-07-09
> 13:48:33 EDT (1625852913): batteryStatus6: 1.0, dateTime:
> 1625852913.3937244, usUnits: 1
> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager
> data-> outgoing rtl_433/devices/Acurite-Tower/14680/battery_ok:
> batteryStatus6: 1.0, dateTime: 1625852913.3942847, usUnits: 1
> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) data-> final
> loop packet is rtl_433/devices/Acurite-Tower/14680/battery_ok 2021-07-09
> 13:48:33 EDT (1625852913): batteryStatus6: 1.0, dateTime:
> 1625852913.3942847, usUnits: 1
>
> 
>
> Jul  9 13:53:15 weewx[17] DEBUG user.MQTTSubscribe: (Driver)
> MessageCallbackProvider data-> incoming topic:
> rtl_433/devices/Fineoffset-WH65B/202/battery_ok, QOS: 0, retain: 0,
> payload: b'1'
> Ju

Re: [weewx-user] MQTTSubscribe - when no data is avail, archive function appears to halt

2021-07-09 Thread Brad Furman
That seems like a driver enhancement that would be needed. I’ll explore
opening up an issue with that project to ask to make it an enhancement
option.

But what about the MySQL connection being lost as shown in the second
example? Is that expected? Is that a timeout that can be set somewhere?

On Fri, Jul 9, 2021 at 3:08 PM Tom Keffer  wrote:

> Yes, WeeWX blocks on LOOP packets. No LOOP packet = no action. It will sit
> and wait indefinitely.
>
> The alternative is the complexity of select statements and asynchronous
> events.
>
> I suppose one thing you could do is to set a timeout in the driver so that
> if nothing is received after a while, it emits a minimal packet with no
> data.
>
> On Fri, Jul 9, 2021 at 11:18 AM bdf0506  wrote:
>
>> This might be more appropriate for an issue on GitHub, but figured I
>> would start here.
>>
>> I have Weewx 4.5.1 running with Weewx-MQTTSubscribe v 2.0.0.
>> MQTTSubscribe is running as a driver. For my DB, I'm using MySQL.
>>
>> Everything works fine as is, but what I've found is that if I simply stop
>> publishing data to my MQTT broker, *something* will silently die. If this
>> happens at the Archive interval, the reporting is delayed until the data
>> comes back and the driver picks up at least one loop packet.
>>
>> To make matters worse, if I stop publishing my data for more than 5
>> minutes, WeeWx loses the connection to MySQL and then has to re-establish
>> (not sure where the mysql timeout is set? I don't believe this is a mysql
>> server side, I think its a weewx client side issue). The good news is that
>> there is already logic built in to recover from the errors, so worse case
>> on all this is just a delayed Archive report.
>>
>> Relevant weewx.conf:
>>
>> [Station]
>> station_type = MQTTSubscribeDriver
>>
>> [MQTTSubscribeDriver]
>> # This section is for the MQTTSubscribe driver.
>>
>> # The driver to use:
>> driver = user.MQTTSubscribe
>>
>> # The MQTT server.
>> # Default is localhost.
>> host = unraid.home
>>
>> # The port to connect to.
>> # Default is 1883.
>> port = 1883
>>
>> # Maximum period in seconds allowed between communications with the
>> broker.
>> # Default is 60.
>> keepalive = 60
>>
>> # username for broker authentication.
>> # Default is None.
>> username = mqtt
>>
>> # password for broker authentication.
>> # Default is None.
>> password = mqtt
>>
>> # Configuration for the message callback.
>> [[message_callback]]
>> type = individual
>>
>> # The topics to subscribe to.
>> [[topics]]
>> unit_system = US
>>
>> [[[rtl_433/devices/Acurite-Tower/2070/temperature_C]]]
>>   name = extraTemp1
>>   units = degree_C
>> [[[rtl_433/devices/Acurite-Tower/2070/humidity]]]
>>   name = extraHumid1
>> [[[rtl_433/devices/Acurite-Tower/2070/battery_ok]]]
>>   name = batteryStatus1
>> .trimmedmany more topics listed
>>
>> [DataBindings]
>>
>> [[wx_binding]]
>> database = archive_mysql
>> table_name = archive
>> manager = weewx.manager.DaySummaryManager
>> schema = schemas.wview_extended.schema
>>
>> [Databases]
>> [[archive_mysql]]
>> database_name = weewx_cb_july_6_3
>> database_type = MySQL
>>
>> [DatabaseTypes]
>>
>> [[MySQL]]
>> driver = weedb.mysql
>> # The host where the database is located
>> host = unraid.home
>> # The user name for logging in to the host
>> user = weewx
>> # The password for the user name (quotes guard against parsing
>> errors)
>> password = "weewx"
>>
>>
>> Here's two examples:
>>
>> First example shows it stopped for only 3 minutes, but it was stopped
>> during the scheduled Archive window, so archive was delayed until data
>> reappeared.
>>
>> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager
>> data-> outgoing rtl_433/devices/Acurite-Tower/14680/battery_ok:
>> batteryStatus6: 1.0, dateTime: 1625852913.3931665, usUnits: 1
>> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) data-> final
>> loop packet is rtl_433/devices/Acurite-Tower/14680/battery_ok 2021-07-09
>> 13:48:33 EDT (1625852913): batteryStatus6: 1.0, dateTime:
>> 1625852913.3931665, usUnits: 1
>> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager
>> data-> outgoing rtl_433/devices/Acurite-Tower/14680/battery_ok:
>> batteryStatus6: 1.0, dateTime: 1625852913.3937244, usUnits: 1
>> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) data-> final
>> loop packet is rtl_433/devices/Acurite-Tower/14680/battery_ok 2021-07-09
>> 13:48:33 EDT (1625852913): batteryStatus6: 1.0, dateTime:
>> 1625852913.3937244, usUnits: 1
>> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) TopicManager
>> data-> outgoing rtl_433/devices/Acurite-Tower/14680/battery_ok:
>> batteryStatus6: 1.0, dateTime: 16

Re: [weewx-user] MQTTSubscribe - when no data is avail, archive function appears to halt

2021-07-09 Thread Tom Keffer
You can post it to the issues list, but I doubt it will go anywhere. It's
not something that comes up very often.

Googling around shows some strategies for dealing with dropped MySQL
connections. Example:
https://bitworks.software/en/2019-03-12-tornado-persistent-mysql-connection-strategy.html

On Fri, Jul 9, 2021 at 12:11 PM Brad Furman  wrote:

> That seems like a driver enhancement that would be needed. I’ll explore
> opening up an issue with that project to ask to make it an enhancement
> option.
>
> But what about the MySQL connection being lost as shown in the second
> example? Is that expected? Is that a timeout that can be set somewhere?
>
> On Fri, Jul 9, 2021 at 3:08 PM Tom Keffer  wrote:
>
>> Yes, WeeWX blocks on LOOP packets. No LOOP packet = no action. It will
>> sit and wait indefinitely.
>>
>> The alternative is the complexity of select statements and asynchronous
>> events.
>>
>> I suppose one thing you could do is to set a timeout in the driver so
>> that if nothing is received after a while, it emits a minimal packet with
>> no data.
>>
>> On Fri, Jul 9, 2021 at 11:18 AM bdf0506  wrote:
>>
>>> This might be more appropriate for an issue on GitHub, but figured I
>>> would start here.
>>>
>>> I have Weewx 4.5.1 running with Weewx-MQTTSubscribe v 2.0.0.
>>> MQTTSubscribe is running as a driver. For my DB, I'm using MySQL.
>>>
>>> Everything works fine as is, but what I've found is that if I simply
>>> stop publishing data to my MQTT broker, *something* will silently die. If
>>> this happens at the Archive interval, the reporting is delayed until the
>>> data comes back and the driver picks up at least one loop packet.
>>>
>>> To make matters worse, if I stop publishing my data for more than 5
>>> minutes, WeeWx loses the connection to MySQL and then has to re-establish
>>> (not sure where the mysql timeout is set? I don't believe this is a mysql
>>> server side, I think its a weewx client side issue). The good news is that
>>> there is already logic built in to recover from the errors, so worse case
>>> on all this is just a delayed Archive report.
>>>
>>> Relevant weewx.conf:
>>>
>>> [Station]
>>> station_type = MQTTSubscribeDriver
>>>
>>> [MQTTSubscribeDriver]
>>> # This section is for the MQTTSubscribe driver.
>>>
>>> # The driver to use:
>>> driver = user.MQTTSubscribe
>>>
>>> # The MQTT server.
>>> # Default is localhost.
>>> host = unraid.home
>>>
>>> # The port to connect to.
>>> # Default is 1883.
>>> port = 1883
>>>
>>> # Maximum period in seconds allowed between communications with the
>>> broker.
>>> # Default is 60.
>>> keepalive = 60
>>>
>>> # username for broker authentication.
>>> # Default is None.
>>> username = mqtt
>>>
>>> # password for broker authentication.
>>> # Default is None.
>>> password = mqtt
>>>
>>> # Configuration for the message callback.
>>> [[message_callback]]
>>> type = individual
>>>
>>> # The topics to subscribe to.
>>> [[topics]]
>>> unit_system = US
>>>
>>> [[[rtl_433/devices/Acurite-Tower/2070/temperature_C]]]
>>>   name = extraTemp1
>>>   units = degree_C
>>> [[[rtl_433/devices/Acurite-Tower/2070/humidity]]]
>>>   name = extraHumid1
>>> [[[rtl_433/devices/Acurite-Tower/2070/battery_ok]]]
>>>   name = batteryStatus1
>>> .trimmedmany more topics listed
>>>
>>> [DataBindings]
>>>
>>> [[wx_binding]]
>>> database = archive_mysql
>>> table_name = archive
>>> manager = weewx.manager.DaySummaryManager
>>> schema = schemas.wview_extended.schema
>>>
>>> [Databases]
>>> [[archive_mysql]]
>>> database_name = weewx_cb_july_6_3
>>> database_type = MySQL
>>>
>>> [DatabaseTypes]
>>>
>>> [[MySQL]]
>>> driver = weedb.mysql
>>> # The host where the database is located
>>> host = unraid.home
>>> # The user name for logging in to the host
>>> user = weewx
>>> # The password for the user name (quotes guard against parsing
>>> errors)
>>> password = "weewx"
>>>
>>>
>>> Here's two examples:
>>>
>>> First example shows it stopped for only 3 minutes, but it was stopped
>>> during the scheduled Archive window, so archive was delayed until data
>>> reappeared.
>>>
>>> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver)
>>> TopicManager data-> outgoing
>>> rtl_433/devices/Acurite-Tower/14680/battery_ok: batteryStatus6: 1.0,
>>> dateTime: 1625852913.3931665, usUnits: 1
>>> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver) data->
>>> final loop packet is rtl_433/devices/Acurite-Tower/14680/battery_ok
>>> 2021-07-09 13:48:33 EDT (1625852913): batteryStatus6: 1.0, dateTime:
>>> 1625852913.3931665, usUnits: 1
>>> Jul  9 13:48:35 weewx[17] DEBUG user.MQTTSubscribe: (Driver)
>>> TopicManager data-> outgoing
>>> rtl_433/devices/Acurite-Tower/14680/battery_ok: 

Re: [weewx-user] WeeWX reports not updating: Database corrupt?

2021-07-09 Thread David Lewison
Oh yes, I definitely backed up the SDB and CONF files, along with the skins 
directory, as suggested in the tutorials on how to back up. I FTP them to 
another server for safe-keeping every few weeks. I probably should have 
mentioned that, but didn't think it was relevant to the issue I was having. 

But on a happy note, it looks like the wee_device --dump did the trick! I 
guess the station's logger got corrupted somehow. I thought it was fine 
because I could retrieve all the data from it via the Davis software. But 
when I ran the dump command, it polled the logger and updated the SDB with 
all the missing data. I then ran the reports and all looked normal. I 
probably didn't need to run the clear-memory command afterwards, but the 
tutorial suggested doing it, so I did. No harm in clearing the data, now 
that it's been ingested into the database. Hope there weren't issues with 
duplicate records, but it looks normal from what I can tell. 

THANKS EVERYONE FOR YOUR HELP! :D

On Friday, July 9, 2021 at 1:31:27 PM UTC-4 vince wrote:

> Agree with Greg's suggestions for sure 'especially' the thought to get a 
> copy of your db 'off' of that SD card onto another computer immediately 
> just in case
>
> Always always always have a backup of your weewx db if your old data is 
> important to you.  There are many threads in the weewx-user group archives 
> for how to do this, but FWIW the script I cooked up back in 2013 or so 
> (wow) might be worth taking a look at -  (link) 
>  - I just run it 
> from cron daily and try to remember to grab it from another computer weekly 
> or so.
>
>
>

-- 
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/0ddf441f-ecd5-41b6-843f-571f32afec79n%40googlegroups.com.


Re: [weewx-user] MQTTSubscribe - when no data is avail, archive function appears to halt

2021-07-09 Thread bell...@gmail.com
Ironically I just finished up. an enhancement that might meet your needs. I 
added an option, ‘max_loop_interval’. If MQTTSubscribeDriver has not 
created a loop packet in ‘max_loop_interval’ seconds, an ‘empty’ loop 
packet is created. An ‘empty’ loop packet contains one dummy observation 
along with the required dateTime and usUnit fields.

A bit more information can be found here,  
https://github.com/bellrichm/WeeWX-MQTTSubscribe/wiki/Configuring-experimental-options#max_loop_interval
And it can downloaded from here, 
https://github.com/bellrichm/WeeWX-MQTTSubscribe/releases/tag/v2.1.0-rc02

With that being said, I’m not sure it is going to accomplish what you want. 
The loop packet(s) will allow WeeWX to kick off the archival/reporting, but 
because the loop packet(s) have no real data, nothing will be stored in the 
DB nor will the reports have any updates. 

This is beta code, so is subject to change, etc.
rich

On Friday, 9 July 2021 at 15:11:28 UTC-4 bdf0506 wrote:

> That seems like a driver enhancement that would be needed. I’ll explore 
> opening up an issue with that project to ask to make it an enhancement 
> option. 
>
> But what about the MySQL connection being lost as shown in the second 
> example? Is that expected? Is that a timeout that can be set somewhere?
>
> On Fri, Jul 9, 2021 at 3:08 PM Tom Keffer  wrote:
>
>> Yes, WeeWX blocks on LOOP packets. No LOOP packet = no action. It will 
>> sit and wait indefinitely.
>>
>> The alternative is the complexity of select statements and asynchronous 
>> events. 
>>
>> I suppose one thing you could do is to set a timeout in the driver so 
>> that if nothing is received after a while, it emits a minimal packet with 
>> no data. 
>>
>> On Fri, Jul 9, 2021 at 11:18 AM bdf0506  wrote:
>>
>>> This might be more appropriate for an issue on GitHub, but figured I 
>>> would start here.
>>>
>>> I have Weewx 4.5.1 running with Weewx-MQTTSubscribe v 2.0.0. 
>>> MQTTSubscribe is running as a driver. For my DB, I'm using MySQL.
>>>
>>> Everything works fine as is, but what I've found is that if I simply 
>>> stop publishing data to my MQTT broker, *something* will silently die. If 
>>> this happens at the Archive interval, the reporting is delayed until the 
>>> data comes back and the driver picks up at least one loop packet.
>>>
>>> To make matters worse, if I stop publishing my data for more than 5 
>>> minutes, WeeWx loses the connection to MySQL and then has to re-establish 
>>> (not sure where the mysql timeout is set? I don't believe this is a mysql 
>>> server side, I think its a weewx client side issue). The good news is that 
>>> there is already logic built in to recover from the errors, so worse case 
>>> on all this is just a delayed Archive report.
>>>
>>> Relevant weewx.conf:
>>>
>>> [Station]
>>> station_type = MQTTSubscribeDriver
>>>
>>> [MQTTSubscribeDriver]
>>> # This section is for the MQTTSubscribe driver.
>>>
>>> # The driver to use:
>>> driver = user.MQTTSubscribe
>>>
>>> # The MQTT server.
>>> # Default is localhost.
>>> host = unraid.home
>>>
>>> # The port to connect to.
>>> # Default is 1883.
>>> port = 1883
>>>
>>> # Maximum period in seconds allowed between communications with the 
>>> broker.
>>> # Default is 60.
>>> keepalive = 60
>>>
>>> # username for broker authentication.
>>> # Default is None.
>>> username = mqtt
>>>
>>> # password for broker authentication.
>>> # Default is None.
>>> password = mqtt
>>>
>>> # Configuration for the message callback.
>>> [[message_callback]]
>>> type = individual
>>>
>>> # The topics to subscribe to.
>>> [[topics]]
>>> unit_system = US
>>>
>>> [[[rtl_433/devices/Acurite-Tower/2070/temperature_C]]]
>>>   name = extraTemp1
>>>   units = degree_C
>>> [[[rtl_433/devices/Acurite-Tower/2070/humidity]]]
>>>   name = extraHumid1
>>> [[[rtl_433/devices/Acurite-Tower/2070/battery_ok]]]
>>>   name = batteryStatus1
>>> .trimmedmany more topics listed
>>>
>>> [DataBindings]
>>>
>>> [[wx_binding]]
>>> database = archive_mysql
>>> table_name = archive
>>> manager = weewx.manager.DaySummaryManager
>>> schema = schemas.wview_extended.schema
>>>
>>> [Databases]
>>> [[archive_mysql]]
>>> database_name = weewx_cb_july_6_3
>>> database_type = MySQL
>>>
>>> [DatabaseTypes]
>>>
>>> [[MySQL]]
>>> driver = weedb.mysql
>>> # The host where the database is located
>>> host = unraid.home
>>> # The user name for logging in to the host
>>> user = weewx
>>> # The password for the user name (quotes guard against parsing 
>>> errors)
>>> password = "weewx"
>>>
>>>
>>> Here's two examples:
>>>
>>> First example shows it stopped for only 3 minutes, but it was stopped 
>>> during the scheduled Archive window, so archiv

Re: [weewx-user] MQTTSubscribe - when no data is avail, archive function appears to halt

2021-07-09 Thread Brad Furman
Awesome! This might work for what I need. Thanks!

On Fri, Jul 9, 2021 at 5:22 PM bell...@gmail.com 
wrote:

> Ironically I just finished up. an enhancement that might meet your needs.
> I added an option, ‘max_loop_interval’. If MQTTSubscribeDriver has not
> created a loop packet in ‘max_loop_interval’ seconds, an ‘empty’ loop
> packet is created. An ‘empty’ loop packet contains one dummy observation
> along with the required dateTime and usUnit fields.
>
> A bit more information can be found here,
> https://github.com/bellrichm/WeeWX-MQTTSubscribe/wiki/Configuring-experimental-options#max_loop_interval
> And it can downloaded from here,
> https://github.com/bellrichm/WeeWX-MQTTSubscribe/releases/tag/v2.1.0-rc02
>
> With that being said, I’m not sure it is going to accomplish what you
> want. The loop packet(s) will allow WeeWX to kick off the
> archival/reporting, but because the loop packet(s) have no real data,
> nothing will be stored in the DB nor will the reports have any updates.
>
> This is beta code, so is subject to change, etc.
> rich
>
> On Friday, 9 July 2021 at 15:11:28 UTC-4 bdf0506 wrote:
>
>> That seems like a driver enhancement that would be needed. I’ll explore
>> opening up an issue with that project to ask to make it an enhancement
>> option.
>>
>> But what about the MySQL connection being lost as shown in the second
>> example? Is that expected? Is that a timeout that can be set somewhere?
>>
>> On Fri, Jul 9, 2021 at 3:08 PM Tom Keffer  wrote:
>>
>>> Yes, WeeWX blocks on LOOP packets. No LOOP packet = no action. It will
>>> sit and wait indefinitely.
>>>
>>> The alternative is the complexity of select statements and asynchronous
>>> events.
>>>
>>> I suppose one thing you could do is to set a timeout in the driver so
>>> that if nothing is received after a while, it emits a minimal packet with
>>> no data.
>>>
>>> On Fri, Jul 9, 2021 at 11:18 AM bdf0506  wrote:
>>>
 This might be more appropriate for an issue on GitHub, but figured I
 would start here.

 I have Weewx 4.5.1 running with Weewx-MQTTSubscribe v 2.0.0.
 MQTTSubscribe is running as a driver. For my DB, I'm using MySQL.

 Everything works fine as is, but what I've found is that if I simply
 stop publishing data to my MQTT broker, *something* will silently die. If
 this happens at the Archive interval, the reporting is delayed until the
 data comes back and the driver picks up at least one loop packet.

 To make matters worse, if I stop publishing my data for more than 5
 minutes, WeeWx loses the connection to MySQL and then has to re-establish
 (not sure where the mysql timeout is set? I don't believe this is a mysql
 server side, I think its a weewx client side issue). The good news is that
 there is already logic built in to recover from the errors, so worse case
 on all this is just a delayed Archive report.

 Relevant weewx.conf:

 [Station]
 station_type = MQTTSubscribeDriver

 [MQTTSubscribeDriver]
 # This section is for the MQTTSubscribe driver.

 # The driver to use:
 driver = user.MQTTSubscribe

 # The MQTT server.
 # Default is localhost.
 host = unraid.home

 # The port to connect to.
 # Default is 1883.
 port = 1883

 # Maximum period in seconds allowed between communications with the
 broker.
 # Default is 60.
 keepalive = 60

 # username for broker authentication.
 # Default is None.
 username = mqtt

 # password for broker authentication.
 # Default is None.
 password = mqtt

 # Configuration for the message callback.
 [[message_callback]]
 type = individual

 # The topics to subscribe to.
 [[topics]]
 unit_system = US

 [[[rtl_433/devices/Acurite-Tower/2070/temperature_C]]]
   name = extraTemp1
   units = degree_C
 [[[rtl_433/devices/Acurite-Tower/2070/humidity]]]
   name = extraHumid1
 [[[rtl_433/devices/Acurite-Tower/2070/battery_ok]]]
   name = batteryStatus1
 .trimmedmany more topics listed

 [DataBindings]

 [[wx_binding]]
 database = archive_mysql
 table_name = archive
 manager = weewx.manager.DaySummaryManager
 schema = schemas.wview_extended.schema

 [Databases]
 [[archive_mysql]]
 database_name = weewx_cb_july_6_3
 database_type = MySQL

 [DatabaseTypes]

 [[MySQL]]
 driver = weedb.mysql
 # The host where the database is located
 host = unraid.home
 # The user name for logging in to the host
 user = weewx
 # The password for the user name (quotes guar

RE: [weewx-user] Highchart Air Quality

2021-07-09 Thread purchase


OK, thanks. 

I did install that one. I just have to see if I can figure out the fields I 
need to change. I was hoping we might have the same equipment, and I could just 
copy your configs, and it would work. But I see some errors I will have to try 
and figure out if I can 😊


-Original Message-
From: weewx-user@googlegroups.com  On Behalf Of 
Tim Tuck
Sent: Friday, July 9, 2021 1:30 AM
To: weewx-user@googlegroups.com
Subject: Re: [weewx-user] Highchart Air Quality

Hi Mitchell,

OK, there is more than 1 AQI plugin :)

the one I use is this...

https://github.com/jonathankoren/weewx-aqi/

Its easy to get confused between the various additions available.

If you want to use the one I am using you can download it thus...

wget https://github.com/jonathankoren/weewx-aqi/archive/v1.3.tar.gz

regards

Tim

On 9/7/21 10:33 am, Mitchell Tuckness wrote:
> Thank you Tim. I must be missing something. I installed the 
> weewx-aqixtypes-0.0.2.tar.gz.

--
You received this message because you are subscribed to a topic in the Google 
Groups "weewx-user" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/weewx-user/Pq9ZwFkyDvs/unsubscribe.
To unsubscribe from this group and all its topics, 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/ec4cfb21-178c-a40f-f7f4-4a7b3a0f2da1%40skybase.net.

-- 
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/071501d7751d%24129b0690%2437d113b0%24%40maladomini.com.


Re: [weewx-user] MQTTSubscribe - when no data is avail, archive function appears to halt

2021-07-09 Thread Graham Eddy
perhaps introduce a ‘null’ driver which just pumps out empty packets, and 
everything else is a service that augments it

> On 10 Jul 2021, at 7:22 am, bell...@gmail.com  wrote:
> 
> Ironically I just finished up. an enhancement that might meet your needs. I 
> added an option, ‘max_loop_interval’. If MQTTSubscribeDriver has not created 
> a loop packet in ‘max_loop_interval’ seconds, an ‘empty’ loop packet is 
> created. An ‘empty’ loop packet contains one dummy observation along with the 
> required dateTime and usUnit fields.
> 

-- 
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/719EE992-F36D-408C-AAF6-8DBFEBC4B485%40gmail.com.


Re: [weewx-user] Highchart Air Quality

2021-07-09 Thread Tim Tuck

Hi Mitchell,

All my kit is Ecowitt, the PM2.5 sensor is a WH41 if that helps :)

cheers

Tim

On 10/7/21 9:49 am, purch...@maladomini.com wrote:

OK, thanks.

I did install that one. I just have to see if I can figure out the fields I 
need to change. I was hoping we might have the same equipment, and I could just 
copy your configs, and it would work. But I see some errors I will have to try 
and figure out if I can 😊






--
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/fdba639b-274d-6711-9ed8-bd0ee27e6637%40skybase.net.