NB. The solution was solved here: https://github.com/bellrichm/WeeWX-MQTTSubscribe/issues/96 :) Thanks!
On Wednesday, November 11, 2020 at 5:50:20 PM UTC+1 Invisible Man wrote: > Sure. I'll post everything from the start. > > > On Wednesday, November 11, 2020 at 5:26:04 PM UTC+1 bell...@gmail.com > wrote: > >> >> Hard to say what is wrong from that snippet of log. Could you post the >> log from start up through an archive record creation? >> rich >> On Wednesday, 11 November 2020 at 11:09:00 UTC-5 axelle....@gmail.com >> wrote: >> >>> I've shifted to using https://github.com/bellrichm/WeeWX-MQTTSubscribe >>> but it's still not working : I don't see my external tempeature on weewx. >>> >>> This is my logs (I grepped for outTemp). I wonder if the issue is coming >>> from the fact that WMR200 has an outTemp but it is faulty so I have >>> outTempFault set to 1. >>> >>> Nov 11 16:39:42 vegan weewx[30478] INFO weewx.drivers.wmr200: sensor map >>> is {'outTempBatteryStatus': 'battery_status_out', 'outHumidity': >>> 'humidity_1', 'rainRate': 'rain_rate', 'heatindex4': 'heatindex_5', >>> 'rainTotal': 'rain_total', 'rainBatteryStatus': 'battery_status_rain', >>> 'heatindex6': 'heatindex_7', 'extraTemp5': 'temperature_6', 'uvFault': >>> 'uv_fault', 'extraTemp2': 'temperature_3', 'heatindex': 'heatindex_1', >>> 'extraTemp3': 'temperature_4', 'rain24': 'rain_24', 'inHeatindex': >>> 'heatindex_0', 'inTemp': 'temperature_0', 'extraTemp1': 'temperature_2', >>> 'hourRain': 'rain_hour', 'windFault': 'wind_fault', 'windchill': >>> 'windchill', 'clockUnsynchronized': 'clock_unsynchronized', 'extraTemp7': >>> 'temperature_8', 'rain': 'rain', 'forecastIcon': 'forecast_icon', >>> 'pressure': 'pressure', 'extraHumid4': 'humidity_5', 'extraHumid5': >>> 'humidity_6', 'extraHumid2': 'humidity_3', 'extraHumid3': 'humidity_4', >>> 'extraHumid1': 'humidity_2', 'extraTemp6': 'temperature_7', 'heatindex5': >>> 'heatindex_6', 'extraTemp4': 'temperature_5', 'heatindex7': 'heatindex_8', >>> 'altimeter': 'altimeter', 'heatindex1': 'heatindex_2', 'heatindex2': >>> 'heatindex_3', 'heatindex3': 'heatindex_4', 'extraHumid6': 'humidity_7', >>> 'extraHumid7': 'humidity_8', 'windBatteryStatus': 'battery_status_wind', >>> 'UV': 'uv', 'rainFault': 'rain_fault', 'windDir': 'wind_dir', 'outTemp': >>> 'temperature_1', 'windSpeed': 'wind_speed', 'inHumidity': 'humidity_0', >>> 'outTempFault': 'out_fault', 'windGust': 'wind_gust', 'uvBatteryStatus': >>> 'battery_status_uv'} >>> Nov 11 16:41:46 vegan weewx[30694] INFO weewx.drivers.wmr200: sensor map >>> is {'outTempBatteryStatus': 'battery_status_out', 'outHumidity': >>> 'humidity_1', 'rainRate': 'rain_rate', 'heatindex4': 'heatindex_5', >>> 'rainTotal': 'rain_total', 'rainBatteryStatus': 'battery_status_rain', >>> 'heatindex6': 'heatindex_7', 'extraTemp5': 'temperature_6', 'uvFault': >>> 'uv_fault', 'extraTemp2': 'temperature_3', 'heatindex': 'heatindex_1', >>> 'extraTemp3': 'temperature_4', 'rain24': 'rain_24', 'inHeatindex': >>> 'heatindex_0', 'inTemp': 'temperature_0', 'extraTemp1': 'temperature_2', >>> 'hourRain': 'rain_hour', 'windFault': 'wind_fault', 'windchill': >>> 'windchill', 'clockUnsynchronized': 'clock_unsynchronized', 'extraTemp7': >>> 'temperature_8', 'rain': 'rain', 'forecastIcon': 'forecast_icon', >>> 'pressure': 'pressure', 'extraHumid4': 'humidity_5', 'extraHumid5': >>> 'humidity_6', 'extraHumid2': 'humidity_3', 'extraHumid3': 'humidity_4', >>> 'extraHumid1': 'humidity_2', 'extraTemp6': 'temperature_7', 'heatindex5': >>> 'heatindex_6', 'extraTemp4': 'temperature_5', 'heatindex7': 'heatindex_8', >>> 'altimeter': 'altimeter', 'heatindex1': 'heatindex_2', 'heatindex2': >>> 'heatindex_3', 'heatindex3': 'heatindex_4', 'extraHumid6': 'humidity_7', >>> 'extraHumid7': 'humidity_8', 'windBatteryStatus': 'battery_status_wind', >>> 'UV': 'uv', 'rainFault': 'rain_fault', 'windDir': 'wind_dir', 'outTemp': >>> 'temperature_1', 'windSpeed': 'wind_speed', 'inHumidity': 'humidity_0', >>> 'outTempFault': 'out_fault', 'windGust': 'wind_gust', 'uvBatteryStatus': >>> 'battery_status_uv'} >>> Nov 11 16:46:29 vegan weewx[30993] INFO weewx.drivers.wmr200: sensor map >>> is {'outTempBatteryStatus': 'battery_status_out', 'outHumidity': >>> 'humidity_1', 'rainRate': 'rain_rate', 'heatindex4': 'heatindex_5', >>> 'rainTotal': 'rain_total', 'rainBatteryStatus': 'battery_status_rain', >>> 'heatindex6': 'heatindex_7', 'extraTemp5': 'temperature_6', 'uvFault': >>> 'uv_fault', 'extraTemp2': 'temperature_3', 'heatindex': 'heatindex_1', >>> 'extraTemp3': 'temperature_4', 'rain24': 'rain_24', 'inHeatindex': >>> 'heatindex_0', 'inTemp': 'temperature_0', 'extraTemp1': 'temperature_2', >>> 'hourRain': 'rain_hour', 'windFault': 'wind_fault', 'windchill': >>> 'windchill', 'clockUnsynchronized': 'clock_unsynchronized', 'extraTemp7': >>> 'temperature_8', 'rain': 'rain', 'forecastIcon': 'forecast_icon', >>> 'pressure': 'pressure', 'extraHumid4': 'humidity_5', 'extraHumid5': >>> 'humidity_6', 'extraHumid2': 'humidity_3', 'extraHumid3': 'humidity_4', >>> 'extraHumid1': 'humidity_2', 'extraTemp6': 'temperature_7', 'heatindex5': >>> 'heatindex_6', 'extraTemp4': 'temperature_5', 'heatindex7': 'heatindex_8', >>> 'altimeter': 'altimeter', 'heatindex1': 'heatindex_2', 'heatindex2': >>> 'heatindex_3', 'heatindex3': 'heatindex_4', 'extraHumid6': 'humidity_7', >>> 'extraHumid7': 'humidity_8', 'windBatteryStatus': 'battery_status_wind', >>> 'UV': 'uv', 'rainFault': 'rain_fault', 'windDir': 'wind_dir', 'outTemp': >>> 'temperature_1', 'windSpeed': 'wind_speed', 'inHumidity': 'humidity_0', >>> 'outTempFault': 'out_fault', 'windGust': 'wind_gust', 'uvBatteryStatus': >>> 'battery_status_uv'} >>> Nov 11 16:46:30 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> service_dict is {u'enable': u'true', u'host': u'192.168.0.9', u'port': >>> u'1883', u'keepalive': u'60', u'username': u'None', u'password': u'None', >>> u'binding': u'loop', u'message_callback': {u'type': u'individual'}, >>> u'topics': {u'unit_system': u'METRIC', u'temperature/jardin': {u'name': >>> u'outTemp', u'ignore': u'False', u'contains_total': u'False', >>> u'conversion_type': u'float', u'units': u'degree_C'}}} >>> Nov 11 16:46:30 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> service_dict is {u'enable': u'true', u'host': u'192.168.0.9', u'port': >>> u'1883', u'keepalive': u'60', u'username': u'None', u'password': u'None', >>> u'binding': u'loop', u'message_callback': {u'type': u'individual'}, >>> u'topics': {u'unit_system': u'METRIC', u'temperature/jardin': {u'name': >>> u'outTemp', u'ignore': u'False', u'contains_total': u'False', >>> u'conversion_type': u'float', u'units': u'degree_C'}}} >>> Nov 11 16:46:30 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> TopicManager config is {u'unit_system': u'METRIC', 'overlap': 0.0, >>> u'temperature/jardin': {u'name': u'outTemp', u'ignore': u'False', >>> u'contains_total': u'False', u'conversion_type': u'float', u'units': >>> u'degree_C'}} >>> Nov 11 16:49:36 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> data-> final packet is 2020-11-11 16:47:15 CET (1605109635): >>> clockUnsynchronized: 1, dateTime: 1605109635, outTempBatteryStatus: 0, >>> outTempFault: 1, rainBatteryStatus: 0, rainFault: 0, usUnits: 16, >>> uvBatteryStatus: 0, uvFault: 0, windBatteryStatus: 1, windFault: 0 >>> Nov 11 16:49:36 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> data-> final packet is 2020-11-11 16:48:09 CET (1605109689): >>> clockUnsynchronized: 1, dateTime: 1605109689, outTempBatteryStatus: 0, >>> outTempFault: 1, rainBatteryStatus: 0, rainFault: 0, usUnits: 16, >>> uvBatteryStatus: 0, uvFault: 0, windBatteryStatus: 1, windFault: 0 >>> Nov 11 16:49:36 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> data-> final packet is 2020-11-11 16:48:53 CET (1605109733): >>> clockUnsynchronized: 1, dateTime: 1605109733, outTempBatteryStatus: 0, >>> outTempFault: 1, rainBatteryStatus: 0, rainFault: 0, usUnits: 16, >>> uvBatteryStatus: 0, uvFault: 0, windBatteryStatus: 1, windFault: 0 >>> Nov 11 16:49:36 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> data-> final packet is 2020-11-11 16:49:08 CET (1605109748): >>> clockUnsynchronized: 1, dateTime: 1605109748, outTempBatteryStatus: 0, >>> outTempFault: 1, rainBatteryStatus: 0, rainFault: 0, usUnits: 16, >>> uvBatteryStatus: 0, uvFault: 0, windBatteryStatus: 1, windFault: 0 >>> Nov 11 16:50:15 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> data-> final packet is 2020-11-11 16:50:12 CET (1605109812): >>> clockUnsynchronized: 1, dateTime: 1605109812, outTempBatteryStatus: 0, >>> outTempFault: 1, rainBatteryStatus: 0, rainFault: 0, usUnits: 16, >>> uvBatteryStatus: 0, uvFault: 0, windBatteryStatus: 1, windFault: 0 >>> Nov 11 16:51:15 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> data-> final packet is 2020-11-11 16:51:08 CET (1605109868): >>> clockUnsynchronized: 1, dateTime: 1605109868, outTempBatteryStatus: 0, >>> outTempFault: 1, rainBatteryStatus: 0, rainFault: 0, usUnits: 16, >>> uvBatteryStatus: 0, uvFault: 0, windBatteryStatus: 1, windFault: 0 >>> Nov 11 16:52:15 vegan weewx[30993] DEBUG user.MQTTSubscribe: (Service) >>> data-> final packet is 2020-11-11 16:52:08 CET (1605109928): >>> clockUnsynchronized: 1, dateTime: 1605109928, outTempBatteryStatus: 0, >>> outTempFault: 1, rainBatteryStatus: 0, rainFault: 0, usUnits: 16, >>> uvBatteryStatus: 0, uvFault: 0, windBatteryStatus: 1, windFault: 0 >>> >>> My MQTT topic is "temperature/jardin" and I directly put as message the >>> temperature e.g 16.5. >>> This is how I configured MQTTSubscribe (as a service): >>> >>> [MQTTSubscribeService] >>> # This section is for the MQTTSubscribe service. >>> >>> # Turn the service on and off. >>> # Default is: true >>> # Only used by the service. >>> enable = true >>> >>> # The MQTT server. >>> # Default is localhost. >>> host = 192.168.0.9 >>> >>> # 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 = None >>> >>> # password for broker authentication. >>> # Default is None. >>> password = None >>> >>> # The binding, loop or archive. >>> # Default is: loop >>> # Only used by the service. >>> binding = loop >>> >>> # The message handler to use >>> [[message_callback]] >>> # The format of the MQTT payload. >>> # Currently support: individual, json, keyword >>> # Must be specified. >>> type = individual >>> >>> # The topics to subscribe to. >>> [[topics]] >>> # Units for MQTT payloads without unit value. >>> # Valid values: US, METRIC, METRICWX >>> # Default is: US >>> unit_system = METRIC >>> >>> [[[temperature/jardin]]] >>> name = outTemp >>> ignore = False >>> contains_total = False >>> conversion_type = float >>> units = degree_C >>> >>> >>> >>> On Wednesday, November 11, 2020 at 3:12:43 PM UTC+1 Invisible Man wrote: >>> >>>> Okay... it's just that I found >>>> https://github.com/bellrichm/WeeWX-MQTTSubscribe complicated for the >>>> task :( >>>> My script is only a few lines of Python... [but yes it's not working >>>> fully, so...] >>>> >>>> -- Axelle >>>> >>>> On Wednesday, November 11, 2020 at 2:37:36 PM UTC+1 Greg Troxel wrote: >>>> >>>>> >>>>> Invisible Man <axelle....@gmail.com> writes: >>>>> >>>>> > Ok I've changed my program to *modify* existing SQLite entries (from >>>>> > WMR200) and put the MQTT temperature I get. This should work better >>>>> because >>>>> > Gary noted weewx only works with whole minutes. >>>>> >>>>> You got really good advice from Gary. Services are supposed to add >>>>> entries into the loop/archive stream within the weewx code and let >>>>> weewx >>>>> handle the db. You are fighting the weewx way! >>>>> >>>> -- 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/b5573550-13e8-4168-9ec1-b9aabbfbdd04n%40googlegroups.com.