I am a bit confused. From your weew.conf snippet, it looks like the topic
is ‘lht65b’. From your mosquitto_sub invocation you used
‘application/7/device/a84041c14184b062/rx’. From the log snippet, ‘ ****
MessageCallbackProvider Ignoring topic=lht65b‘, it looks like ‘lht65b’ has
the data.
The other info from the log, MQTTSubscribe is trying to convert the field
‘applicationName’ to a float.
'Failed converting field applicationName with value LHT65 using 'lambda x:
to_float(x)' with reason could not convert string to float: 'LHT65''
The last important piece of information is that the json is ‘nested’.
Meaning that the desired field, ‘TempF_SHT’ is nested under ‘object’.
It looks like ypu currently have one topic, ‘[[[mytopic]]]]’, configured
under ‘[[topics]]’. Adding a second topic, ‘[[[lht65b]]]’ with the
following configuration should accomplish what you want.
# second topic
[[[lht65b]]]
ignore = true # opt out of all data for this topic
# This field is ‘nested under’ object
[[[[object_TempF_SHT]]]]
ignore = false # opt in for this field
name = extraTemp3
Note, this is untested. If it doesn’t capture the log, post here, and we
will figure out what is wrong.
rich
On Monday, 13 February 2023 at 16:47:30 UTC-5 [email protected] wrote:
> Thanks for the help, vince. I guess you mean mosquitto_sub because I
> couldn't get *mqtt_subscribe to work.*
>
> *```*
> n4mrv:~$ sudo mosquitto_sub -t application/7/device/a84041c14184b062/rx -h
> 192.168.1.10:
>
> {"applicationID":"7","applicationName":"LHT65","deviceName":"LHT65b","deviceProfileName":"my-device-profile","deviceProfileID":"67920d1f-034b-4739-8116-4bc7ebb1703d","devEUI":"a84041c14184b062","txInfo":{"frequency":904900000,"dr":0},"adr":true,"fCnt":16,"fPort":2,"data":"y9oI2AE5AQixf/8=","object":{"BatV":3.034,"Ext_sensor":"Temperature
>
> Sensor","Hum_SHT":"31.3","TempF_DS":"72.05","TempF_SHT":"72.75"}}
>
> MQTT explorer:
> {
> "applicationID": "7",
> "applicationName": "LHT65",
> "deviceName": "LHT65b",
> "deviceProfileName": "my-device-profile",
> "deviceProfileID": "67920d1f-034b-4739-8116-4bc7ebb1703d",
> "devEUI": "a84041c14184b062",
> "txInfo": {
> "frequency": 904900000,
> "dr": 0
> },
> "adr": true,
> "fCnt": 16,
> "fPort": 2,
> "data": "y9oI2AE5AQixf/8=",
> "object": {
> "BatV": 3.034,
> "Ext_sensor": "Temperature Sensor",
> "Hum_SHT": "31.3",
> "TempF_DS": "72.05",
> "TempF_SHT": "72.75"
> }
> }
> ```
>
>
> On Monday, February 13, 2023 at 3:18:07 PM UTC-5 vince wrote:
> Lets see a "*mqtt_subscribe -t yourtopicname -h yourhostname*" command
> and resulting output please, but the temperatures and humidity in your .txt
> file at the top sure looks like strings to me. The syslog messages saying
> 'could not convert string to float' seem to agree.
>
>
> On Monday, February 13, 2023 at 9:23:48 AM UTC-8 [email protected] wrote:
> Hello,
> I have a Dragino LHT65 temp/hum sensor sending MQTT data from a RAK7244
> LoRa gateway. Presently I also have a Seeed CO2 sensor sending data
> correctly to weewx (Standard skin) via MQTT--this is working via Node-Red
> on the weewx server (many thanks to vince and storm for the help setting
> this up).
>
> Not being a programmer, I thought it would be simple to copy the CO2 flow,
> with certain modifications, and get the LHT65 running. Not so...
> I have a connection at both ends of the NR flow but there seems to be a
> problem with the format of the data being parsed and exchanged. I would
> like to store the data as extraTemp3 in the db.[image: LHT65flow.png]
> I am attaching a file of areas that might explain what the problem might
> be; however, I can send any additional information that might be needed.
>
> My setup is weewx 4.10.1 (setup.py) running on ubuntu 22.04.1.
> Thanks in advance for any help for this.
> Cheers,
> Bob [grattans.org/wx]
>
--
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/77f3a4dc-ca0c-4fe5-93ee-6b71ac0c19f7n%40googlegroups.com.