Re: [weewx-user] Re: Using MQTT Subscribe

2020-10-09 Thread Graham Eddy
i know nothing of this driver, but these look like driver-global attributes, 
which should be declared in the top-level driver section to prevent them being 
absorbed into a subsection (i.e. in this case, before [[topics]])

> On 10 Oct 2020, at 1:55 pm, Timothy Buchanan  
> wrote:
> 
> I added those this way:
> 
> # The topics to subscribe to.
> [[topics]]
> # Units for MQTT payloads without unit value.
> # Valid values: US, METRIC, METRICWX
> # Default is: US
> unit_system = US
>   ignore_start_time = true
>   Ignore_end_time = true
> 
> but I still get this:
> 
> Oct  9 20:38:29 raspberrypi weewx[30461] INFO weewx.restx: MQTT: Published 
> record 2020-10-09 20:38:47 MDT (1602297527)
> Oct  9 20:38:30 raspberrypi weewx[30461] DEBUG user.MQTTSubscribe: (Service) 
> MessageCallbackProvider data-> incoming topic: snow/snowDepth, QOS: 0, 
> retain: 0, payload: b'7'
> Oct  9 20:38:30 raspberrypi weewx[30461] DEBUG user.MQTTSubscribe: (Service) 
> TopicManager data-> incoming snow/snowDepth: snow/snowDepth: 7.0
> Oct  9 20:38:31 raspberrypi weewx[30461] DEBUG user.MQTTSubscribe: (Service) 
> TopicManager data-> outgoing snow/snowDepth: dateTime: 1602297510.2596123, 
> snow/snowDepth: 7.0, usUnits: 1
> Oct  9 20:38:31 raspberrypi weewx[30461] INFO user.MQTTSubscribe: (Service) 
> TopicManager ignoring record outside of interval 1602297510.259612 
> 1602297529.00 1602297510.259612 dateTime: 1602297510.2596123, 
> snow/snowDepth: 7.0, usUnits: 1
> Oct  9 20:38:31 raspberrypi weewx[30461] DEBUG user.MQTTSubscribe: (Service) 
> TopicManager data-> outgoing accumulated snow/snowDepth: 
> Oct  9 20:38:31 raspberrypi weewx[30461] DEBUG user.MQTTSubscribe: (Service) 
> data-> final packet is 2020-10-09 20:38:49 MDT (1602297529): avg_distance: 0, 
> dateTime: 1602297529, lightning_strikes: 0, outHumidity: 23, outTemp: 13.34, 
> outTempBatteryStatus: 2.919, pressure: 744.7, usUnits: 17
> Oct  9 20:38:31 raspberrypi weewx[30461] INFO weewx.restx: MQTT: Published 
> record 2020-10-09 20:38:49 MDT (1602297529)
> Oct  9 20:38:32 raspberrypi weewx[30461] DEBUG user.MQTTSubscribe: (Service) 
> data-> final packet is 2020-10-09 20:38:50 MDT (1602297530): dateTime: 
> 1602297530, usUnits: 17, windDir: 336, windSpeed: 0.72
> Oct  9 20:38:32 raspberrypi weewx[30461] INFO weewx.restx: MQTT: Published 
> record 2020-10-09 20:38:50 MDT (1602297530)
> 
> On Friday, October 9, 2020 at 5:13:41 PM UTC-6 bell...@gmail.com wrote:
> 
> Ah, crap.  This has to do with an attempt to quality control data by time. 
> Next major release, I really need to rework it...
> Since you have individual payloads (no timestamp from the origin) add the 
> following under [[topics]]
> ignore_start_time = true
> Ignore_end_time = true
> 
> We are getting close.  Sorry for the pain.
> rich
> 
> 
> On Friday, 9 October 2020 at 18:36:27 UTC-4 timothye...@gmail.com 
>  wrote:
> syslog extract posted. weewx is loading the service, though it also seems to 
> subscribe to the data which MQTT is publishing from weewx. the second section 
> shows that subscribe receives the data I published from the terminal (6 
> inches of snow), but rejects it as outside of interval. Is there an entry to 
> be made somewhere to sync incoming data? I note that another extension I use 
> (GW1000) needed dateTime = datetime in a field map to work properly.
> 
> On Friday, October 9, 2020 at 2:54:56 PM UTC-6 bell...@gmail.com <> wrote:
> 
> That could be simplified, but looks like it should work. The quickest and 
> easiest way to proceed is to set debug to 1, restart WeeWX, let it run 
> through an archive cycle during which you published to that topic and then 
> post the log.
> 
> Re: snowBatteryStatus - The units config option is only needed if the field 
> units do not match the units expected by the unit_system. So eliminating will 
> at least get the data in the DB. 
> Note, units is not needed for snowDepth because inches is the Units for that 
> field in the US unit_system.
> rich
> On Friday, 9 October 2020 at 14:23:01 UTC-4 timothye...@gmail.com <> wrote:
> I've attached a syslog extract showing where weewx crashed. it seems that 
> "volt" is an invalid unit for my topic. i don't know why but for now I 
> commented out that topic and its parameters. Now, weewx will continue running 
> when subscribe is enabled, but subscribed topics are not being posted to the 
> database. Here is the first topic in weewx.conf:
> 
> # The first topic
>   # MQTT Topic
>   [[[snow/snowDepth]]]
>   # MQTT name
>   snowDepth
>   # weewx name
>   name = snowDepth
>   ignore = false
>   contains_total = false
>   conversion_type = float
>   units = inch
> 
> I used a terminal to publish "6" 

Re: [weewx-user] Re: Using MQTT Subscribe

2020-10-06 Thread bell...@gmail.com
What is the topic and format of the MQTT data? For example, are you 
publishing to a topic of 'snow/snowlevel' and the payload is the actual 
snow level?
Some information is 
here, https://github.com/bellrichm/WeeWX-MQTTSubscribe/wiki/Configuring 
But, I'm happy to walk you through it.
rich

On Tuesday, 6 October 2020 at 09:50:29 UTC-4 timothye...@gmail.com wrote:

> Thanks, changing the database was easy with that article. As to my other 
> question, I'm guessing I need to put a Sensor Map in weewx.conf in the 
> MQTTSubscribe section, something like snow/snowlevel = snow?
>
> On Monday, October 5, 2020 at 6:59:11 PM UTC-6 tke...@gmail.com wrote:
>
>> The schemas are used *only when creating a new database*. Upgrading to 
>> v4.x will not change your old database. 
>>
>> If you wish to switch, there is a Wiki article *Switching to the new 
>> wview_extended schema 
>> *
>>  on 
>> how to do it.
>>
>> On Mon, Oct 5, 2020 at 5:09 PM Timothy Buchanan  
>> wrote:
>>
>>> I upgraded to 4.1.1 but I don't see these entries in the database. Do I 
>>> have to install or change something to get the "extended" schema?
>>>
>>> On Monday, October 5, 2020 at 12:20:12 PM UTC-6 storm...@gmail.com 
>>> wrote:
>>>
 WeeWX Version  4.1.1 using the extended schema has entries for snow.





 On Monday, October 5, 2020 at 10:30:47 AM UTC-4, Timothy Buchanan wrote:
>
> I use the mqtt extension to publish to a mosquitto broker, and want to 
> use MQTTSubscribe to receive topics posted by another device and put them 
> into the weewx database. I installed MQTTSubscribe as an extension 
> following the wiki, enabled it, and it didn't break anything (always 
> good!).
>
> Next, I may need to extend the database, since there doesn't seem to 
> be snowLevel entries, and to map the published topics to the database. 
> where could I find information on these two subjects? Thanks.
>
> Timothy
>
 -- 
>>> 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/e4f7cdca-aec1-42f7-b232-5bdec8f90501n%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/12e4c0d4-0e91-44f2-97a8-17f55a324d49n%40googlegroups.com.


Re: [weewx-user] Re: Using MQTT Subscribe

2020-10-06 Thread Timothy Buchanan
Thanks, changing the database was easy with that article. As to my other 
question, I'm guessing I need to put a Sensor Map in weewx.conf in the 
MQTTSubscribe section, something like snow/snowlevel = snow?

On Monday, October 5, 2020 at 6:59:11 PM UTC-6 tke...@gmail.com wrote:

> The schemas are used *only when creating a new database*. Upgrading to 
> v4.x will not change your old database. 
>
> If you wish to switch, there is a Wiki article *Switching to the new 
> wview_extended schema 
> *
>  on 
> how to do it.
>
> On Mon, Oct 5, 2020 at 5:09 PM Timothy Buchanan  
> wrote:
>
>> I upgraded to 4.1.1 but I don't see these entries in the database. Do I 
>> have to install or change something to get the "extended" schema?
>>
>> On Monday, October 5, 2020 at 12:20:12 PM UTC-6 storm...@gmail.com wrote:
>>
>>> WeeWX Version  4.1.1 using the extended schema has entries for snow.
>>>
>>>
>>>
>>>
>>>
>>> On Monday, October 5, 2020 at 10:30:47 AM UTC-4, Timothy Buchanan wrote:

 I use the mqtt extension to publish to a mosquitto broker, and want to 
 use MQTTSubscribe to receive topics posted by another device and put them 
 into the weewx database. I installed MQTTSubscribe as an extension 
 following the wiki, enabled it, and it didn't break anything (always 
 good!).

 Next, I may need to extend the database, since there doesn't seem to be 
 snowLevel entries, and to map the published topics to the database. where 
 could I find information on these two subjects? Thanks.

 Timothy

>>> -- 
>> 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/e4f7cdca-aec1-42f7-b232-5bdec8f90501n%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/d774c276-2929-447b-89be-42c186b08999n%40googlegroups.com.


Re: [weewx-user] Re: Using MQTT Subscribe

2020-10-05 Thread Tom Keffer
The schemas are used *only when creating a new database*. Upgrading to v4.x
will not change your old database.

If you wish to switch, there is a Wiki article *Switching to the new
wview_extended schema
*
on
how to do it.

On Mon, Oct 5, 2020 at 5:09 PM Timothy Buchanan 
wrote:

> I upgraded to 4.1.1 but I don't see these entries in the database. Do I
> have to install or change something to get the "extended" schema?
>
> On Monday, October 5, 2020 at 12:20:12 PM UTC-6 storm...@gmail.com wrote:
>
>> WeeWX Version  4.1.1 using the extended schema has entries for snow.
>>
>>
>>
>>
>>
>> On Monday, October 5, 2020 at 10:30:47 AM UTC-4, Timothy Buchanan wrote:
>>>
>>> I use the mqtt extension to publish to a mosquitto broker, and want to
>>> use MQTTSubscribe to receive topics posted by another device and put them
>>> into the weewx database. I installed MQTTSubscribe as an extension
>>> following the wiki, enabled it, and it didn't break anything (always good!).
>>>
>>> Next, I may need to extend the database, since there doesn't seem to be
>>> snowLevel entries, and to map the published topics to the database. where
>>> could I find information on these two subjects? Thanks.
>>>
>>> Timothy
>>>
>> --
> 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/e4f7cdca-aec1-42f7-b232-5bdec8f90501n%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/CAPq0zECj5htTv18kBX8%2B_Gp784iRqmu1TQK7N8Bu0nQNb1Z-zQ%40mail.gmail.com.