error on state_location_payload_key in version 0.5.2

Posted on
Fri Apr 30, 2021 12:05 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

error on state_location_payload_key in version 0.5.2

Hi FlyingDiver

This was not an issue in v 0.4.0.

Getting this:

Code: Select all
   MQTT Shims Error                Ring Alarm Basestation Info: error on state_location_payload_key, aborting
   MQTT Shims Error                Ring Alarm Keypad Entryway: error on state_location_payload_key, aborting
   MQTT Shims Error                Ring Alarm Keypad Bedroom: error on state_location_payload_key, aborting
   MQTT Shims Error                Ring Alarm Keypad Basement: error on state_location_payload_key, aborting
   MQTT Shims Error                Ring Alarm ZWave Extender: error on state_location_payload_key, aborting
   MQTT Shims Error                Ring Alarm ZWave Extender Basement: error on state_location_payload_key, aborting

These (in fact all of mine - 20+) are aggregate devices. But only these 6 throw the error. These six are all MQTT Generic Json devices (of which I have 7 total).

The one of the seven that does not show here is the panel, I don't track battery level and it's multi-state key is:
topics.alarm.topics.state

The multi-states key for the six that error is this:
topics.info.topics.state.payload

and Battery Payload Key is this:
topics.info.topics.state.payload.batteryLevel

My On/Off Sensors is the same multi-states key and battery key but are not throwing the error.

Ideas? Rolling back to v 0.4.0 resolves this.

Thanks

Posted on
Fri Apr 30, 2021 12:24 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: error on state_location_payload_key in version 0.5.2

Please use the menu command to create a template for one of the devices that is misbehaving, and post it here. I also need a typical topic and payload for the device, which is generally easiest to get by using debug logging in the Connector plugin.
Attachments
Screen Shot 2021-04-30 at 2.23.07 PM.png
Screen Shot 2021-04-30 at 2.23.07 PM.png (178.71 KiB) Viewed 3131 times

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Apr 30, 2021 1:40 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: error on state_location_payload_key in version 0.5.2

Code: Select all
   MQTT Shims                     
message_type: '##RingAlarm##'
props:
    SupportsBatteryLevel: true
    battery_payload_key: topics.info.topics.state.payload.batteryLevel
    state_dict_payload_key: topics.info.topics.state.payload
    state_location: payload
    state_location_payload_type: json
    uid_location: topic
    uid_location_topic_field: '3'
trigger:
    match_list: '["Match: ring", "Match:ACCOUNT_GUID, "Match: alarm", "Any: ", "End: "]'
    queueMessage: true
type: shimGeneric



and
Code: Select all
   MQTT Connector Debug            Ring MQTT Broker: Message topic: ring/ACCOUNT_GUID/alarm/DEVICE_GUID/info/state, payload = {"acStatus":"error","batteryLevel":85,"batteryStatus":"ok","brightness":1,"chirps":"enabled","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2021-04-30T19:01:09Z","lastUpdate":"2021-04-30T19:01:09Z","linkQuality":"ok","powerSave":"off","serialNumber":"SER_NUM","tamperStatus":"ok","volume":0.7}
   MQTT Connector Debug            Ring MQTT Broker: processReceivedMessage: ring/ACCOUNT_GUID/alarm/DEVICE_GUID/info/state, payload: {"acStatus":"error","batteryLevel":85,"batteryStatus":"ok","brightness":1,"chirps":"enabled","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2021-04-30T19:01:09Z","lastUpdate":"2021-04-30T19:01:09Z","linkQuality":"ok","powerSave":"off","serialNumber":"SER_NUM","tamperStatus":"ok","volume":0.7}
   MQTT Connector Debug            Ring MQTT Broker: agg_dict: {u'topics': {u'info': {'topics': {u'state': {u'payload': {u'batteryStatus': u'ok', u'lastUpdate': u'2021-04-30T19:01:09Z', u'serialNumber': u'SER_NUM', u'brightness': 1, u'chirps': u'enabled', u'firmwareStatus': u'up-to-date', u'acStatus': u'error', u'lastCommTime': u'2021-04-30T19:01:09Z', u'volume': 0.7, u'tamperStatus': u'ok', u'linkQuality': u'ok', u'batteryLevel': 85, u'commStatus': u'ok', u'powerSave': u'off'}}}}}}
   MQTT Connector Debug            Ring MQTT Broker: Saved states, topic: ring/ACCOUNT_GUID/alarm/DEVICE_GUID, payload: {"topics": {"info": {"topics": {"state": {"payload": {"batteryStatus": "ok", "lastUpdate": "2021-04-30T19:01:09Z", "brightness": 1, "chirps": "enabled", "serialNumber": "SER_NUM", "firmwareStatus": "up-to-date", "acStatus": "error", "lastCommTime": "2021-04-30T19:01:09Z", "volume": 0.7, "tamperStatus": "ok", "linkQuality": "ok", "batteryLevel": 85, "commStatus": "ok", "powerSave": "off"}}}}, "status": {"payload": "online"}}}

Posted on
Fri Apr 30, 2021 1:43 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: error on state_location_payload_key in version 0.5.2

Ah, I also need the aggregator info from the Connector plugin. There's a menu command to write it to the log.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Apr 30, 2021 1:54 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: error on state_location_payload_key in version 0.5.2

Code: Select all
   MQTT Connector                  1416305691:ring/ACCOUNT_GUID/alarm/DEVICE_GUIDring/ACCOUNT_GUID//alarm/DEVICE_GUID{
    "topics": {
        "info": {
            "topics": {
                "state": {
                    "payload": {
                        "acStatus": "error",
                        "batteryLevel": 85,
                        "batteryStatus": "ok",
                        "brightness": 1,
                        "chirps": "enabled",
                        "commStatus": "ok",
                        "firmwareStatus": "up-to-date",
                        "lastCommTime": "2021-04-30T19:01:09Z",
                        "lastUpdate": "2021-04-30T19:01:09Z",
                        "linkQuality": "ok",
                        "powerSave": "off",
                        "serialNumber": "SER_NUM",
                        "tamperStatus": "ok",
                        "volume": 0.7
                    }
                }
            }
        },
        "status": {
            "payload": "online"
        }
    }
}

Posted on
Fri Apr 30, 2021 1:57 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: error on state_location_payload_key in version 0.5.2

The first line lost it's formatting. And does it really have double slashes in there?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Apr 30, 2021 1:59 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: error on state_location_payload_key in version 0.5.2

I think I have enough. I'll try to look into this over the weekend.

https://github.com/FlyingDiver/Indigo-Shims/issues/21

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 01, 2021 10:36 pm
dssinger offline
Posts: 8
Joined: Aug 22, 2018

Re: error on state_location_payload_key in version 0.5.2

In case it helps you find the bug, I have the same problem - I reverted to 0.4.4 and it's working again. Fails in 0.5.1 and above.

Thanks!

Posted on
Sun May 02, 2021 6:13 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: error on state_location_payload_key in version 0.5.2

Turns out I missed something in the code refactor in 0.5.0. Try this version.

https://github.com/FlyingDiver/Indigo-S ... /tag/0.5.3

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun May 02, 2021 11:53 am
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: error on state_location_payload_key in version 0.5.2

Updated and now getting this:

Code: Select all
   MQTT Shims Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 115, in runConcurrentThread
  File "plugin.py", line 139, in processMessages
  File "plugin.py", line 302, in update
UnboundLocalError: local variable 'state_data' referenced before assignment

   MQTT Shims Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   MQTT Shims Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 115, in runConcurrentThread
  File "plugin.py", line 139, in processMessages
  File "plugin.py", line 302, in update
UnboundLocalError: local variable 'state_data' referenced before assignment

   MQTT Shims Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   MQTT Shims Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 115, in runConcurrentThread
  File "plugin.py", line 139, in processMessages
  File "plugin.py", line 302, in update
UnboundLocalError: local variable 'state_data' referenced before assignment

   MQTT Shims Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   MQTT Shims Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 115, in runConcurrentThread
  File "plugin.py", line 139, in processMessages
  File "plugin.py", line 302, in update
UnboundLocalError: local variable 'state_data' referenced before assignment

   MQTT Shims Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   MQTT Shims Error                Error in plugin execution runConcurrentThread:

Posted on
Sun May 02, 2021 12:00 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: error on state_location_payload_key in version 0.5.2

Grrr. More complicated than I thought. That's what I get for trying to streamline the code. Give me a few minutes.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun May 02, 2021 12:42 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: error on state_location_payload_key in version 0.5.2


joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun May 02, 2021 1:07 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: error on state_location_payload_key in version 0.5.2

Now back to a variation of the first error message:

Code: Select all
   Stopped plugin MQTT Shims
   Upgrading plugin MQTT Shims to newer version 0.5.4 (previous version moved to trash)
   Loading plugin "MQTT Shims 0.5.4"
   Starting plugin "MQTT Shims 0.5.4" (pid 61195)
   Started plugin "MQTT Shims 0.5.4"
   MQTT Shims                      Starting MQTT Shims

May 2, 2021 at 2:46:57 PM
   MQTT Shims Error                Ring Alarm Basestation Info: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm Keypad Entryway: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm Keypad Bedroom: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm Keypad Basement: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm ZWave Extender: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm ZWave Extender Basement: error on state_location_payload_key

May 2, 2021 at 2:52:00 PM
   MQTT Shims Error                Ring Alarm Basestation Info: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm Keypad Entryway: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm Keypad Bedroom: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm Keypad Basement: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm ZWave Extender: error on state_location_payload_key
   MQTT Shims Error                Ring Alarm ZWave Extender Basement: error on state_location_payload_key

Posted on
Sun May 02, 2021 1:19 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: error on state_location_payload_key in version 0.5.2

Darn it all. These are all generic shims, right?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun May 02, 2021 1:22 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: error on state_location_payload_key in version 0.5.2

Yes. Generic json

Who is online

Users browsing this forum: No registered users and 1 guest