argument of type 'NoneType' is not iterable

User avatar
macpro
Posts: 818
Joined: Thu Dec 29, 2005 6:10 am
Location: Third byte on the right

argument of type 'NoneType' is not iterable

Post by macpro »

I've created a trigger for a Topic Component Match.
It has 4 strings for matching:
Match: unifi
Match: protect
Any:
Match: motion

The trigger works and the device that uses it get's a correct motion state.
But every time the trigger fires the log shows this error:

Code: Select all

   MQTT Shims Debug                message_handler: MQTT message ##UniFiProtectMotion## from UniFi Protect
   MQTT Shims Debug                GardenCam Detectie: processMessages: '##UniFiProtectMotion##' unifi/protect/CAFE1234ACBD/motion -> false
   MQTT Shims Debug                GardenCam Detectie: update uid: CAFE1234ACBD
   MQTT Shims Debug                GardenCam Detectie: multi_states_key= 
   MQTT Shims Debug                GardenCam Detectie: Updating state to False
   MQTT Shims Error                Error in plugin execution runConcurrentThread:

  File "plugin.py", line 148, in runConcurrentThread
  File "plugin.py", line 175, in processMessages
  File "plugin.py", line 651, in update
type: argument of type 'NoneType' is not iterable

   MQTT Shims Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Any idea how I can fix this?
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: argument of type 'NoneType' is not iterable

Post by FlyingDiver »

I'll need to see the trigger definition, and do you have any extra actions defined for that trigger?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: argument of type 'NoneType' is not iterable

Post by FlyingDiver »

Also, is this your only shim device? If not, try disabling the others to see if the error goes away.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
macpro
Posts: 818
Joined: Thu Dec 29, 2005 6:10 am
Location: Third byte on the right

Re: argument of type 'NoneType' is not iterable

Post by macpro »

I have multiple shim devices.
But it looks like I found the cause of these messages.

I had a couple of triggers defined on that particular shim device with event "Device Updated and State Present".
After changing the event to "Device Updated" and checking for the device state in the Condition tab, the error disappeared.
Post Reply

Return to “MQTT”