Error message from MQTT Shims following CC2531 reflash

Posted on
Sun Dec 27, 2020 8:05 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Error message from MQTT Shims following CC2531 reflash

I have had to reflash my CC2531 as it wouldn't connect to my iMac. It now does. :D

I am now getting these error messages from MQTT Shims:
Code: Select all
   MQTT Shims Debug                Hue Motion 4 - Illuminance: processMessages: '##hue_motion_4##' zigbee2mqtt/Hue_motion_4 -> {"battery":100,"illuminance":18190,"illuminance_lux":66,"last_seen":"2020-12-27T13:40:02+00:00","linkquality":15,"motion_sensitivity":"high","occupancy":true,"occupancy_timeout":0,"temperature":16.44,"update":{"state":"idle"},"update_available":false}
   MQTT Shims Debug                Hue Motion 4 - Illuminance: shimValueSensor, key = illuminance_lux, data = {u'linkquality': 15, u'illuminance_lux': 66, u'update_available': False, u'motion_sensitivity': u'high', u'temperature': 16.44, u'battery': 100, u'update': {u'state': u'idle'}, u'occupancy': True, u'illuminance': 18190, u'occupancy_timeout': 0, u'last_seen': u'2020-12-27T13:40:02+00:00'}, value = 66
   MQTT Shims Debug                Hue Motion 4 - Illuminance: Updating state to 66.0
[color=#FF0000]   MQTT Shims Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 107, in runConcurrentThread
  File "plugin.py", line 132, in processMessages
  File "plugin.py", line 541, in update
TypeError: state value type must be bool, int, real, or string

   MQTT Shims Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
[/color]   MQTT Shims Debug                Hue Motion 5 - Illuminance: processMessages: '##hue_motion_5##' zigbee2mqtt/Hue_motion_5 -> {"battery":100,"illuminance":21816,"illuminance_lux":152,"last_seen":"2020-12-27T13:36:45+00:00","linkquality":44,"occupancy":true,"temperature":21,"update_available":false}
   MQTT Shims Debug                Hue Motion 5 - Illuminance: shimValueSensor, key = illuminance_lux, data = {u'linkquality': 44, u'illuminance_lux': 152, u'update_available': False, u'temperature': 21, u'battery': 100, u'occupancy': True, u'illuminance': 21816, u'last_seen': u'2020-12-27T13:36:45+00:00'}, value = 152
   MQTT Shims Debug                Hue Motion 5 - Illuminance: Updating state to 152.0
   MQTT Shims Debug                Hue Motion 5 - Temperature: processMessages: '##hue_motion_5##' zigbee2mqtt/Hue_motion_5 -> {"battery":100,"illuminance":21816,"illuminance_lux":152,"last_seen":"2020-12-27T13:36:45+00:00","linkquality":44,"occupancy":true,"temperature":21,"update_available":false}
   MQTT Shims Debug                Hue Motion 5 - Temperature: shimValueSensor, key = temperature, data = {u'linkquality': 44, u'illuminance_lux': 152, u'update_available': False, u'temperature': 21, u'battery': 100, u'occupancy': True, u'illuminance': 21816, u'last_seen': u'2020-12-27T13:36:45+00:00'}, value = 21
   MQTT Shims Debug                Hue Motion 5 - Temperature: Updating state to 21.0
   MQTT Shims Debug                MOTION - Bathroom - SENSOR: processMessages: '##hue_motion_5##' zigbee2mqtt/Hue_motion_5 -> {"battery":100,"illuminance":21816,"illuminance_lux":152,"last_seen":"2020-12-27T13:36:45+00:00","linkquality":44,"occupancy":true,"temperature":21,"update_available":false}
   MQTT Shims Debug                MOTION - Bathroom - SENSOR: shimOnOffSensor, state_key = occupancy, data = {u'linkquality': 44, u'illuminance_lux': 152, u'update_available': False, u'temperature': 21, u'battery': 100, u'occupancy': True, u'illuminance': 21816, u'last_seen': u'2020-12-27T13:36:45+00:00'}, value = True
   MQTT Shims Debug                MOTION - Bathroom - SENSOR: Updating state to True
   MQTT Shims Debug                Hue Motion 1 - Illuminance: processMessages: '##hue_motion_1##' zigbee2mqtt/Hue_motion_1 -> {"battery":87.5,"illuminance":13279,"illuminance_lux":21,"last_seen":"2020-12-27T13:40:11+00:00","linkquality":105,"motion_sensitivity":"high","occupancy":true,"occupancy_timeout":0,"temperature":22.47,"update":{"state":"idle"},"update_available":false}
   MQTT Shims Debug                Hue Motion 1 - Illuminance: shimValueSensor, key = illuminance_lux, data = {u'linkquality': 105, u'illuminance_lux': 21, u'update_available': False, u'motion_sensitivity': u'high', u'temperature': 22.47, u'battery': 87.5, u'update': {u'state': u'idle'}, u'occupancy': True, u'illuminance': 13279, u'occupancy_timeout': 0, u'last_seen': u'2020-12-27T13:40:11+00:00'}, value = 21
   MQTT Shims Debug                Hue Motion 1 - Illuminance: Updating state to 21.0
[color=#FF0000]   MQTT Shims Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 107, in runConcurrentThread
  File "plugin.py", line 132, in processMessages
  File "plugin.py", line 541, in update
TypeError: state value type must be bool, int, real, or string

   MQTT Shims Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
[/color]

It appears to be with Hue Motion sensors - other devices, when they get a look in, appear to be working OK. :)

Any suggestions on what I can try or further info needed?

Posted on
Sun Dec 27, 2020 8:44 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Error message from MQTT Shims following CC2531 reflash

Which version plugin you running? Make sure you're running the latest.

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

Posted on
Sun Dec 27, 2020 10:01 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Error message from MQTT Shims following CC2531 reflash

FlyingDiver wrote:
Which version plugin you running? Make sure you're running the latest.

I was running an earlier version - Oddly, it wasn't showing up in the menu list as an updated plugin (Indigo 7.5) - others are though. :?

Anyway, updated to V0.4.0 and I am still getting the same error - but there are a load of messages pending; about 138.

How do I flush the queue? :)

Posted on
Sun Dec 27, 2020 10:26 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Error message from MQTT Shims following CC2531 reflash

autolog wrote:
FlyingDiver wrote:
Which version plugin you running? Make sure you're running the latest.

I was running an earlier version - Oddly, it wasn't showing up in the menu list as an updated plugin (Indigo 7.5) - others are though. :?

Anyway, updated to V0.4.0 and I am still getting the same error - but there are a load of messages pending; about 138.

How do I flush the queue? :)


Restarting the Connector plugin is the only way to empty the queue.

You might want to disable the trigger until you get this fixed.

What line number in 0.4.0 is the error now?

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

Posted on
Sun Dec 27, 2020 10:32 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Error message from MQTT Shims following CC2531 reflash

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 742, in update
TypeError: state value type must be bool, int, real, or string

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

Posted on
Sun Dec 27, 2020 10:38 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Error message from MQTT Shims following CC2531 reflash

Hmm. I need to see the Shim device definition. Either screenshot or template output.

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

Posted on
Sun Dec 27, 2020 11:20 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Error message from MQTT Shims following CC2531 reflash

message_type: '##hue_motion_5##'
props:
SupportsBatteryLevel: true
SupportsSensorValue: true
battery_payload_key: battery
shimSensorPrecision: '0'
shimSensorSubtype: Luminance
state_dict_payload_key: .
state_location: payload
state_location_payload_key: illuminance_lux
state_location_payload_type: json
state_location_topic_field: '0'
uid_location: topic
uid_location_topic_field: '1'
trigger:
match_list: '["Match: zigbee2mqtt", "Match: Hue_motion_5"]'
queueMessage: true
type: shimValueSensor

Hopefully this is what you are looking for? :)

Posted on
Sun Dec 27, 2020 11:28 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Error message from MQTT Shims following CC2531 reflash

Yeah, that'll do. I don't see anything obviously wrong, so I'm going to create a device per that definition and see what happens here.

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

Posted on
Sun Dec 27, 2020 11:35 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Error message from MQTT Shims following CC2531 reflash

OK - Thanks for your help. :)

Posted on
Sun Dec 27, 2020 12:31 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Error message from MQTT Shims following CC2531 reflash

Ok, what's causing the error is this part of the payload:

Code: Select all
 u'update': {u'state': u'idle'}


I thought I had code in there to check for this situation. Need to look a little closer.

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

Posted on
Sun Dec 27, 2020 12:52 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Error message from MQTT Shims following CC2531 reflash

I had added code for that issue, but had forgotten to include it for all device types. Oops.

Try this pre-release: https://github.com/FlyingDiver/Indigo-S ... /tag/0.4.1

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

Posted on
Sun Dec 27, 2020 12:59 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Error message from MQTT Shims following CC2531 reflash

Installed new version. :)

Now getting a different error:
MQTT Shims Debug MOTION - Study - SENSOR 2: Updating state to True
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 626, in update
UnboundLocalError: local variable 'new_states' referenced before assignment

MQTT Shims Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
MQTT Connector Warning Queue for message type '##aqara_motion_1##' has 31 messages pending
MQTT Shims Debug received notification of MQTT message type ##aqara_motion_1## from Flying Diver MQTT
MQTT Connector Warning Queue for message type '##aqara_motion_1##' has 32 messages pending
MQTT Shims Debug received notification of MQTT message type ##aqara_motion_1## from Flying Diver MQTT


Taking a break for supper now :)

Posted on
Sun Dec 27, 2020 1:05 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Error message from MQTT Shims following CC2531 reflash


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

Posted on
Sun Dec 27, 2020 1:06 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Error message from MQTT Shims following CC2531 reflash

I've got to go back and refactor this code so I don't have so many duplicate code blocks...

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

Posted on
Sun Dec 27, 2020 1:46 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Error message from MQTT Shims following CC2531 reflash

Installed 0.4.2 :)

Got this error:
MQTT Shims Debug MOTION - Kitchen - SENSOR 2: Updating state to True
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 632, in update
TypeError: argument of type 'type' is not iterable

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


Who is online

Users browsing this forum: No registered users and 4 guests