Alright, I am determined to make this work, hopefully with one clearly posted question (fingers crossed).
(I PROMISE I read your wiki article a bunch of times first)
Device: home-cooked esp32 and a bme280
Device publishes to: sensors/air/0001/update // 0001 is the device id
MQTT payload: {"id": 0001, "temperature": 80.6, "humidity": 47.6}
A trouble-shooting trigger in Indigo appears to capture these to variables alright:
- indigo variables.png (83.92 KiB) Viewed 2130 times
The MQTT Connector runs of my Synology NAS, and has never seemed to be a problem. I THINK it is reporting correctly in MQTT Explorer:
- mqttExplorer.png (69.97 KiB) Viewed 2130 times
- MQTT Connector.png (133.46 KiB) Viewed 2130 times
The Trigger may be where I am having problems. I tried it with and without "End:" at the end of the "Topic Strings for Matching" box.
- MQTT Trigger 1.png (193.7 KiB) Viewed 2130 times
- MQTT Trigger 2.png (141.55 KiB) Viewed 2130 times
Here is the MQTT Shims Device:
- MQTT shims 1.png (230.34 KiB) Viewed 2130 times
- MQTT shims 2.png (324.92 KiB) Viewed 2130 times
And here are the errors I'm getting:
- Code: Select all
Nov 11, 2020 at 5:28:02 PM
MQTT Connector Debug MQTT Connector Broker: Message received: sensors/air/0001/update, payload: {"id": 0001, "temperature": 80.6, "humidity": 47.7}
Trigger MQTT espsensor trigger
MQTT Shims Debug received notification of MQTT message type ##espsensor## from MQTT Connector Broker
MQTT Shims Debug esp bme280 sensor: processMessages: '##espsensor##' sensors/air/0001/update -> {"id": 0001, "temperature": 80.6, "humidity": 47.7}
MQTT Shims Debug esp bme280 sensor: JSON decode error for state_location = payload, aborting
My main theory is that the payload needs to be some exotic byte array kinda thing, and I'm simply sending a string containing json and an '\n'. If you suspect that's the case, any easy way to change this in C?
Many thanks!