Page 1 of 1

Is the "trigger" fixed in 0.4.4?

PostPosted: Wed Dec 30, 2020 12:47 pm
by CliveS
Not sure if it is me but I cannot get the trigger to fire and my SP600 power plug turns on and off at the physical plug when I click the Turn On and Turn Off buttons but the State stays at On in the GUI.
Same happens with my Aqara 2 Gang Wireless Switch which has been opening and closing the garage door reliably for months but no longer.

Code: Select all
   MQTT Shims Debug                received notification of MQTT message type shellies from Indigo MQTT Server
   MQTT Shims Debug                SP600: publish_topic: zigbee2mqtt/SP600/set -> {"state": "ON"}
   MQTT Shims Debug                SP600: publish_topic: zigbee2mqtt/SP600/set -> {"state": "OFF"}
   MQTT Shims Debug                received notification of MQTT message type shellies from Indigo MQTT Server


Re: Is the "trigger" fixed in 0.4.4?

PostPosted: Wed Dec 30, 2020 3:04 pm
by FlyingDiver
I'm missing the context here. What IoT devices do you have, what MQTT messages are they publishing or receiving, and what's the content of those messages?

Don't assume I remember anything you've posted previously. ;)

Re: Is the "trigger" fixed in 0.4.4?

PostPosted: Wed Dec 30, 2020 5:01 pm
by CliveS
I think it is due to the problem of the extra " " being inserted.

I trigger an action

Code: Select all
if 'click' in dev.states:  # State "click" of "Aqara 2 Gang Wireless Switch"
   devSwitch = dev.states["click"]
   import time
   indigo.server.log(str(devSwitch) + " button Press")

   if devSwitch == "left":
      indigo.actionGroup.execute(actGarageOpen)
      indigo.server.log("Left Single Press")
      time.sleep(.5)
      indigo.server.log(" ")


which in the log gave

Code: Select all
2020-12-24 11:48:30.333   Trigger   Garage Door Open-Close By Aqara
2020-12-24 11:48:30.742   Script    Script Triggered
2020-12-24 11:48:30.744   Script   left button Press
2020-12-24 11:48:30.744   Action Group   Garage Door Left Open


but now errors due to the added "left" instead of left

Code: Select all
2020-12-30 22:46:38.435   Trigger   Garage Door Open-Close By Aqara
2020-12-30 22:46:38.858   Script    Script Triggered
2020-12-30 22:46:38.858   Script   "left" button Press
2020-12-30 22:46:38.859   Script Error   Aqara_Wireless_Switch.py: global name 'left' is not defined


So I will wait for the revamp of the MQTT Shims.

Re: Is the "trigger" fixed in 0.4.4?

PostPosted: Wed Dec 30, 2020 5:42 pm
by FlyingDiver
Change this line:

Code: Select all
   devSwitch = dev.states["click"]


to

Code: Select all
   devSwitch = dev.states["click"].strip('\"')

Re: Is the "trigger" fixed in 0.4.4?

PostPosted: Wed Dec 30, 2020 5:58 pm
by CliveS
Thank you, now opening and closing garage door
:D