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 [email protected] 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 [email protected] 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" to snow/snowDepth on Mosquitto. Another
>> terminal window command to subscribe to snow/snowDepth received the "6" but
>> the database entries for snowDepth are null. Is this configuration of
>> topics still not correct. Thanks.
>> On Tuesday, October 6, 2020 at 1:43:31 PM UTC-6 Timothy Buchanan wrote:
>>
>>> Thanks, Rich. I'll try it when I get back. I'll be in our second home
>>> for a few days: going to the gun range and the clothing-optional resort
>>> (not at the same time!).
>>>
>>> On Tuesday, October 6, 2020 at 1:19:26 PM UTC-6 [email protected] wrote:
>>>
>>>> So, the [[[first/topic]]] are meant to be replaced with the actual
>>>> topic. So it would be something like this
>>>> ```
>>>> [[Topics]]
>>>> [[[topic name that snowDepth is published on]]]
>>>> [[[[topic name that snowDepth is published on]]]]
>>>> name = snowDepth
>>>> [[[topic name that snowRate is published on]]]
>>>> [[[[topic name that snowRate is published on]]]]
>>>> name = snowRate
>>>> ```
>>>> The duplication is an artifact of dealing with json and keyword
>>>> payloads. The ```use_topic_as_fieldname``` option can be used to make
>>>> the config a bit prettier.
>>>> ```
>>>> [[Topics]]
>>>> use_topic_as_fieldname = true
>>>> [[[topic name that snowDepth is published on]]]
>>>> name = snowDepth
>>>> [[[topic name that snowRate is published on]]]
>>>> name = snowRate
>>>> ```
>>>> Note, if snowDepth is actually published on the topic snowDepth, the
>>>> ```name``` option can be left off.
>>>> I don’t think that you want to set contains_total=true for snowDepth.
>>>> This is used when the field contains a total and it needs to be converted
>>>> into an increment for WeeWX.
>>>>
>>>> I’ll work on clarifying the wiki.
>>>>
>>>> With that said, it shouldn’t have broken WeeWX. If you are up for it,
>>>> before changing the config, setting debug=1, restarting WeeWX for a couple
>>>> of archive intervals and attaching the log would be appreciated .
>>>>
>>>> rich
>>>>
>>>>
>>>>
>>>> On Tuesday, 6 October 2020 at 13:28:34 UTC-4 [email protected]
>>>> wrote:
>>>>
>>>>> Attached is the extension material that I put into weewx.conf. But
>>>>> when I set enable = true, weewx stops archiving data. Is there an error
>>>>> in
>>>>> this configuration, or could subscribe be incompatible with another
>>>>> service? I'm using the Weatherflowudp driver with mqtt and GW1000
>>>>> extensions.
>>>>>
>>>>> On Tuesday, October 6, 2020 at 9:17:07 AM UTC-6 Timothy Buchanan wrote:
>>>>>
>>>>>> Thanks, Rich, I should be able to edit weewx.conf based on the
>>>>>> example at the bottom of that page.
>>>>>>
>>>>>> I am using an ESP8266 board with an ultrasonic sensor and a
>>>>>> temperature sensor (to calibrate the speed of sound), and programming in
>>>>>> the Arduino IDE. I'll 3D print a case and mount it above my deck. The
>>>>>> materials cost about $15.
>>>>>>
>>>>>> I'd be happy to post the code here, under a new topic, once I get it
>>>>>> working.
>>>>>>
>>>>>> Timothy
>>>>>>
>>>>>> On Tuesday, October 6, 2020 at 8:53:45 AM UTC-6 [email protected]
>>>>>> wrote:
>>>>>>
>>>>>>> What type of sensor are you using for measuring snow depth?
>>>>>>>
>>>>>>>
>>>>>>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/e5f6c2e2-45a4-4a2f-9d73-abe9bee632dan%40googlegroups.com.
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG weewx.engine: Loading service
user.MQTTSubscribe.MQTTSubscribeService
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
Using weewx version 4.1.1
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
Using Python 3.7.3 (default, Jul 25 2020, 13:03:44) #012[GCC 8.3.0]
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
Platform Linux-5.4.51-v7l+-armv7l-with-debian-10.6
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
Locale is 'en_US.UTF-8'
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
Version is 1.6.1
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service) Log
level: 0
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service) Log
debug setting: 1
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service) Log
console: None
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service) Log
file: None
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
service_dict is {'enable': 'true', 'host': 'localhost', 'port': '1883',
'keepalive': '60', 'username': 'None', 'password': 'None', 'binding': 'loop',
'message_callback': {'type': 'individual'}, 'topics': {'unit_system': 'US',
'snow/snowDepth': {'snowDepth': {'name': 'snowDepth', 'ignore': 'false',
'contains_total': 'false', 'conversion_type': 'float', 'units': 'inch'}},
'snow/snowRate': {'snowRate': {'name': 'snowRate', 'ignore': 'false',
'contains_total': 'False', 'conversion_type': 'float', 'units':
'inch_per_hour'}}}}
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
service_dict is {'enable': 'true', 'host': 'localhost', 'port': '1883',
'keepalive': '60', 'username': 'None', 'password': 'None', 'binding': 'loop',
'message_callback': {'type': 'individual'}, 'topics': {'unit_system': 'US',
'snow/snowDepth': {'snowDepth': {'name': 'snowDepth', 'ignore': 'false',
'contains_total': 'false', 'conversion_type': 'float', 'units': 'inch'}},
'snow/snowRate': {'snowRate': {'name': 'snowRate', 'ignore': 'false',
'contains_total': 'False', 'conversion_type': 'float', 'units':
'inch_per_hour'}}}}
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
overlap is 0.0
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
TopicManager config is {'unit_system': 'US', 'overlap': 0.0, 'snow/snowDepth':
{'snowDepth': {'name': 'snowDepth', 'ignore': 'false', 'contains_total':
'false', 'conversion_type': 'float', 'units': 'inch'}}, 'snow/snowRate':
{'snowRate': {'name': 'snowRate', 'ignore': 'false', 'contains_total': 'False',
'conversion_type': 'float', 'units': 'inch_per_hour'}}}
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
TopicManager self.subscribed_topics is {'snow/snowDepth': {'type': 'normal',
'unit_system': 1, 'msg_id_field': None, 'qos': 0, 'use_server_datetime': False,
'ignore_start_time': False, 'ignore_end_time': False, 'adjust_start_time': 0.0,
'adjust_end_time': 0.0, 'datetime_format': None, 'offset_format': None,
'ignore': False, 'max_queue': 2147483647, 'queue': deque([]), 'fields':
{'snowDepth': {'name': 'snowDepth', 'use_topic_as_field_name': False, 'ignore':
False, 'contains_total': False, 'conversion_type': 'float', 'units': 'inch'}},
'ignore_msg_id_field': []}, 'snow/snowRate': {'type': 'normal', 'unit_system':
1, 'msg_id_field': None, 'qos': 0, 'use_server_datetime': False,
'ignore_start_time': False, 'ignore_end_time': False, 'adjust_start_time': 0.0,
'adjust_end_time': 0.0, 'datetime_format': None, 'offset_format': None,
'ignore': False, 'max_queue': 2147483647, 'queue': deque([]), 'fields':
{'snowRate': {'name': 'snowRate', 'use_topic_as_field_name': False, 'ignore':
False, 'contains_total': False, 'conversion_type': 'float', 'units':
'inch_per_hour'}}, 'ignore_msg_id_field': []},
'1602280353.767589-windGust-windGustDir-windDir-windSpeed': {'type':
'collector', 'unit_system': 1, 'qos': 0, 'use_server_datetime': False,
'ignore_start_time': False, 'ignore_end_time': False, 'adjust_start_time': 0.0,
'adjust_end_time': 0.0, 'datetime_format': None, 'offset_format': None,
'max_queue': 2147483647, 'queue': deque([])}}
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
TopicManager self.cached_fields is {}
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
message_callback_provider_name is user.MQTTSubscribe.MessageCallbackProvider
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
clientid is MQTTSubscribe-3947
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
client_session is True
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
host is localhost
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
port is 1883
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
keepalive is 60
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
username is None
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
password is set
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
Archive topic is None
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
MessageCallbackProvider config is {'type': 'individual'}
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
MessageCallbackProvider self.fields is {}
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
binding is loop
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
archive_field_cache_dict is None
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
Starting loop
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG gw1000: user.gw1000: Next update
in 60 seconds
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
Connected with result code 0
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
Connected flags {'session present': 0}
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
Subscribed to snow/snowDepth has a mid 1 and rc 0
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
Subscribed to snow/snowRate has a mid 2 and rc 0
Oct 9 15:52:33 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
Subscribed to 1602280353.767589-windGust-windGustDir-windDir-windSpeed has a
mid 3 and rc 0
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
Subscribed to topic mid: 1 is size 1 has a QOS of 0
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
Subscribed to topic mid: 2 is size 1 has a QOS of 0
Oct 9 15:52:33 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
Subscribed to topic mid: 3 is size 1 has a QOS of 0
Oct 9 15:52:34 raspberrypi weewx[15167] DEBUG weewx.engine: Finished loading
service user.MQTTSubscribe.MQTTSubscribeService
Oct 9 15:52:52 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
MessageCallbackProvider data-> incoming topic: snow/snowDepth, QOS: 0, retain:
0, payload: b'6'
Oct 9 15:52:52 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
TopicManager data-> incoming snow/snowDepth: snow/snowDepth: 6.0
Oct 9 15:52:55 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
TopicManager data-> outgoing snow/snowDepth: dateTime: 1602280372.629519,
snow/snowDepth: 6.0, usUnits: 1
Oct 9 15:52:55 raspberrypi weewx[15167] INFO user.MQTTSubscribe: (Service)
TopicManager ignoring record outside of interval 1602280390.000000
1602280393.000000 1602280372.629519 dateTime: 1602280372.629519,
snow/snowDepth: 6.0, usUnits: 1
Oct 9 15:52:55 raspberrypi weewx[15167] DEBUG user.MQTTSubscribe: (Service)
TopicManager data-> outgoing accumulated snow/snowDepth: