My example: [MQTTSubscribeService] enable = True host = 192.168.1.171 port = 1883 keepalive = 60 username = None password = None binding = loop [[message_callback]] type = json [[topics]] unit_system = US # #--- these are emitted every 5 minutes --- # mosquitto_sub -t BaseballRoomConditions -h nuc2 # {"dateTime": 1621715702, "extraTemp1": 63.16, "extraTemp2": 63.5, "pi": 100.28} # [[[BaseballRoomConditions]]] <=== the topic to subscribe to [[[[dateTime]]]] <=== the element in that topic ignore = True <=== optionally ignore this item within the topic [[[[extraTemp1]]]] name = extraTemp1 <=== db element to map the item to units = degree_F <=== its units [[[[extraTemp2]]]] name = extraTemp2 units = degree_F [[[[pi]]]] ignore = True
On Saturday, November 27, 2021 at 2:26:46 PM UTC-8 storm...@gmail.com wrote: > I believe you need to add the topic you subscribing to in > [[[first/topic]]]. > > Example: > > > ########################################################################################## > # Acurite-5n1 Sensors > # SDR # 1 > # 433 MHz > > ########################################################################################## > > > > > [[[Acurite-Tower/8785/]]] > > [[[[temperature_F]]]] > name = extraTemp7 > ignore = False > contains_total = False > conversion_type = float > units = degree_F > > On Saturday, November 27, 2021 at 5:15:24 PM UTC-5 bgra...@umw.edu wrote: > >> Hello, >> I'm running a RAK7244 LoRaWAN server/gateway on a local network to which >> my weewx server is connected. Weeex is the latest stable on Ubuntu with >> extended db. >> >> A CO2 sensor is sending data to the LoRa server. I have node-red on my >> weewx server with a flow connecting to the RAK7244. I want to have the CO2 >> data put into the co2 slot that is available on the weewx db. >> >> I have installed the weewx extension Mosquitto-subscribe and attempted to >> configure weewx.conf as: >> ################################################# >> # Options for 'MQTTSubscribeService' >> [MQTTSubscribeService] >> # This section is for the MQTTSubscribe service. >> # Turn the service on and off. >> # Default is: true >> # Only used by the service. >> enable = true # false >> >> # The MQTT server. >> # Default is localhost. >> host = localhost #192.168.1.10 #localhost >> >> # 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 = json #REPLACE_ME >> >> # The application/18/device/2cf7f12122500013/rx topics to subscribe >> to. >> [[topics]] >> # Units for MQTT payloads without unit value. >> # Valid values: US, METRIC, METRICWX >> # Default is: US >> unit_system = US >> >> [[[first/topic]]] >> >> #value sent from RAK7244 >> >> [[[[CO2_Value_PPM]]]] >> #weewx db name >> name = co2 >> ignore = false >> contains total = True >> conversion type = float >> >> #[[[SECOND/REPLACE_ME]]] >> ################################################ >> >> The message (data) every 60 minutes coming from the node-red function is: >> >> {"CO2_Value_PPM":401} >> >> I may have too many things going here but, as I'm not a programmer, I'm >> stuck trying to figure out the problem. The node-red flow is connected on >> both ends (RAK7244-->weewx) but I don't see any data reaching the db. >> >> Thanks in advance if anyone can help on this. >> Cheers' >> Bob >> >> -- 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/9a5340de-b823-4e1b-a447-7051da2c0d0en%40googlegroups.com.