-
Here is the MQTT format. I am only needing the first section - "pm25":2 MQTTSubscribe is complaining about the wifi data (which I don't want anyway). in weewx.conf I have the following: [[[esp8266-vindriktning-particle-sensor/VINDRIKTNING-CFCDF0/state]]]
If I remove the 'ignore = True' syslog is filled with errors like this. relating to the wifi portion: Nov 1 15:11:45 k1m weewx[20269] ERROR user.MQTTSubscribe: (Service) **** MessageCallbackProvider Traceback (most recent call last):#12 File "/usr/share/weewx/user/MQTTSubscribe.py", line 1300, in _convert_value#012 return conversion_func'compiled'#12 File "", line 1, in #12 File "/usr/share/weewx/weeutil/weeutil.py", line 1533, in to_float#012 return float(x) if x is not None else None#012ValueError: could not convert string to float: 'guest'#12#012During handling of the above exception, another exception occurred:#12#012Traceback (most recent call last):#12 File "/usr/share/weewx/user/MQTTSubscribe.py", line 1492, in _on_message_json#012 (fieldname, value) = self._update_data(fields, fields_conversion_func, lookup_key, data_flattened[key], unit_system)#12 File "/usr/share/weewx/user/MQTTSubscribe.py", line 1259, in _update_data#012 value = self._convert_value(fields, default_field_conversion_func, orig_name, orig_value)#12 File "/usr/share/weewx/user/MQTTSubscribe.py", line 1306, in _convert_value#012 % (field, value, conversion_func['source'], exception))#012user.MQTTSubscribe.ConversionError: Failed converting field wifi_ssid with value Surveillance Van#2 using 'lambda x: to_float(x)' with reason could not convert string to float: 'guest'. If I leave the 'ignore = True' in then I get no errors, but weewx does not seem to parse the "pm25" data. As it does not show in syslog or on weewx webpage. I am going to see if I can drop the extra data from the AQI sensor, but it would be good to be able to handle it in MQTTSubscribe too. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I think you are missing one set of
|
Beta Was this translation helpful? Give feedback.
-
Looks like something strange/bug in MQTTSubscribe’s datetime checking. This should workaround it.
|
Beta Was this translation helpful? Give feedback.
-
I know you have switched things up, but I think in the original setup you want is to set |
Beta Was this translation helpful? Give feedback.
I know you have switched things up, but I think in the original setup you want is to set
name = pm2_5
reference: https://github.com/weewx/weewx/blob/master/bin/schemas/wview_extended.py
That should get it into the db. Then it is dependent on the skin you are using to graph it. Not sure, but I think the seasons skin wil graph it…