I have a script publishing readings from my gas meter to topic=readings/25170699/meter_reading with a raw integer value. (I could change any of this if it helps).
I set up a MQTT Connector device pointing to the broker, subscribed it to readings/#, and created a trigger event on the topic component match. I created a MQTT Shim device ("MQTT Value Sensor Device") with the intent of capturing the incoming value.
However, whenever a message comes in, I get something like this:
- Code: Select all
Trigger receive gas
MQTT Shims Debug message_handler: MQTT message ##gas## from Docker MQTT
MQTT Shims Debug gas meter: processMessages: '##gas##' readings/99978223/meter_reading -> 2494
MQTT Shims Debug gas meter: Raw payload = 2494
MQTT Shims Debug gas meter: states_key=
MQTT Shims Debug gas meter: update adjustmentFunction: ''
MQTT Shims Debug gas meter: Updating state to 2494.0
Error device "gas meter" state key sensorValue not defined (ignoring update request)
Error device "gas meter" state key sensorValue not defined (ignoring update request)
What am I missing? What should be creating the actual value here?