Page 1 of 1

JSON decode error for uid_location = payload, aborting

PostPosted: Mon May 03, 2021 10:54 am
by dssinger
I'm still getting errors with 0.5.5:

Code: Select all
May 3, 2021 at 9:39:44 AM
   MQTT Shims Error                outside thermometer: JSON decode error for uid_location = payload, aborting


Here's the template:
Code: Select all
   MQTT Shims                     
message_type: '##therm##'
props:
    SupportsSensorValue: true
    shimSensorPrecision: '1'
    shimSensorSubtype: Temperature-F
    state_location: payload
    state_location_payload_key: temperature_F
    state_location_payload_type: json
    state_location_topic_field: '0'
    uid_location: payload
    uid_location_payload_key: model
    uid_location_topic_field: '0'
trigger:
    match_list: '["Match: thermometer"]'
    queueMessage: true
type: shimValueSensor


Here's the payload and topic, logged by both the connector and the shim:

Code: Select all
May 3, 2021 at 9:47:13 AM
   MQTT Connector Debug            MQTT Broker: processReceivedMessage: sensors/thermometer, payload: {"time":"2021-05-03 09:47:11","model":"FT-004B","temperature_F":69.8}
   MQTT Shims Debug                message_handler: MQTT message ##therm## from MQTT Broker
   MQTT Shims Debug                outside thermometer: processMessages: '##therm##' sensors/thermometer -> {"time":"2021-05-03 09:47:11","model":"FT-004B","temperature_F":69.8}
   MQTT Shims Error                outside thermometer: JSON decode error for uid_location = payload, aborting


And here's the aggregator and topic info from the connector (there is none, but it works with the 0.4.4 version of Shims; I am running 0.4.10 of the Connector):
Code: Select all
   MQTT Connector                  MQTT Broker: Current topic subscriptions:
   MQTT Connector                  MQTT Broker: sensors/# (0)
   MQTT Connector                  No Aggregators defined


Thanks.

Re: JSON decode error for uid_location = payload, aborting

PostPosted: Mon May 03, 2021 10:58 am
by FlyingDiver
I split this to a new thread since it's a different error.

Re: JSON decode error for uid_location = payload, aborting

PostPosted: Mon May 03, 2021 11:11 am
by FlyingDiver
https://github.com/FlyingDiver/Indigo-S ... /tag/0.5.6

You might want to re-think using the 'model' as the unique-id. If you get another sensor of the same type, they'll conflict. What's the source for this data?

Re: JSON decode error for uid_location = payload, aborting

PostPosted: Mon May 03, 2021 5:17 pm
by dssinger
Thanks, Joe - version 0.5.6 is working.

I'm getting the data from an Ambient Weather FT-004-B thermometer via rtl_433. It doesn't appear that the thermometer has a unique ID, so all I can key off of is the model name. I don't plan to add another outdoor sensor, so I should be OK unless one of my nearby neighbors puts one in.

Re: JSON decode error for uid_location = payload, aborting

PostPosted: Mon May 03, 2021 6:51 pm
by FlyingDiver
Ouch. Well, if it works, it works.