Help with Xiaomi scenes and button

Hello

I have been trying in vain to configure my Xiaomi switch to work as a light switch with a Philips Hue bulb.

I have a strange behavior, here are my two scenes.

The first one works well, when the light is on, the click turns off the light.

The second one:


It only works when pressing the start button inside the edition: the lamp is off and turns on when I press start.
If my lamp is off and I do the same thing from the page of all the scenes, nothing happens…
(There is a typo on my screenshot, my variable is well at 1 on the button, I was doing tests with the double click at 2)
And of course, the action on the button does not work either, I have this in the logs:

2020-11-17T10:33:18+0100 <error> scene.execute.js:20 () AbortScene [Error]: CONDITION_NOT_VERIFIED
    at Object.condition.only-continue-if (/src/server/lib/scene/scene.actions.js:125:13)
    at executeAction (/src/server/lib/scene/scene.executeActions.js:32:35)
    at /src/server/lib/scene/scene.executeActions.js:66:13
    at tryCatcher (/src/server/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/src/server/node_modules/bluebird/js/release/map.js:68:38)
    at MappingPromiseArray.PromiseArray._iterate (/src/server/node_modules/bluebird/js/release/promise_array.js:115:31)
    at MappingPromiseArray.init (/src/server/node_modules/bluebird/js/release/promise_array.js:79:10)
    at MappingPromiseArray._asyncInit (/src/server/node_modules/bluebird/js/release/map.js:37:10)
    at _drainQueueStep (/src/server/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/src/server/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/src/server/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues (/src/server/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:461:21)

I reported the bug, Pierre Gilles opened a PR for it.

The bug is already fixed and will be included in the next tagged version of Gladys, probably by the end of this week or the beginning of next week :slight_smile:

@pierre-gilles, the issue is still present in version 4.0.1.

@Tlse-vins there hasn’t been a release with this fix

Edit: you’re right, it should have been fixed with 4.0.1

Oh man, the « start » button for a scene in the list view still doesn’t work? Is that the bug I fixed, or did I misunderstand!

That’s exactly it, at least it doesn’t work for me.

I confirm that it doesn’t work for me either. I am reopening the issue.

But what about my scene?
Because when I test my two scenes, they turn on and off while correctly checking the current state of the lamp.

Is there a conflict with the button?
I set state = 1 so =>
In one case, turning off works, in the other, turning on fails… :confused:

I just did a test, indeed I have the same problem as you. Sorry I thought your post was about a single problem I didn’t understand the other problem!

In fact, in my opinion the Abort launched when one of the two scenarios « fails » goes too far and also interrupts the other scene.

I created an issue to reference the bug:

I attract bugs… :smiley:

Well, that’s odd, I went back to the bug this morning and couldn’t reproduce it—it’s working on its own without any changes.

I created 2 scenes:

And everything works.

When I trigger the scene, I can turn the light on/off with a single button…

After all, my button is a virtual MQTT button, maybe the issue is with the Xiaomi?

Can you try again?

Nope

2020-12-03T20:55:02+0100 <error> scene.execute.js:20 () AbortScene [Error]: CONDITION_NOT_VERIFIED
    at Object.condition.only-continue-if (/src/server/lib/scene/scene.actions.js:123:13)
    at executeAction (/src/server/lib/scene/scene.executeActions.js:32:35)
    at /src/server/lib/scene/scene.executeActions.js:66:13
    at tryCatcher (/src/server/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/src/server/node_modules/bluebird/js/release/map.js:68:38)
    at MappingPromiseArray.PromiseArray._iterate (/src/server/node_modules/bluebird/js/release/promise_array.js:115:31)
    at MappingPromiseArray.init (/src/server/node_modules/bluebird/js/release/promise_array.js:79:10)
    at MappingPromiseArray._asyncInit (/src/server/node_modules/bluebird/js/release/map.js:37:10)
    at _drainQueueStep (/src/server/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/src/server/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/src/server/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues (/src/server/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:461:21)
2020-12-03T20:56:18+0100 <error> scene.execute.js:20 () AbortScene [Error]: CONDITION_NOT_VERIFIED
    at Object.condition.only-continue-if (/src/server/lib/scene/scene.actions.js:123:13)
    at executeAction (/src/server/lib/scene/scene.executeActions.js:32:35)
    at /src/server/lib/scene/scene.executeActions.js:66:13
    at tryCatcher (/src/server/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/src/server/node_modules/bluebird/js/release/map.js:68:38)
    at MappingPromiseArray.PromiseArray._iterate (/src/server/node_modules/bluebird/js/release/promise_array.js:115:31)
    at MappingPromiseArray.init (/src/server/node_modules/bluebird/js/release/promise_array.js:79:10)
    at MappingPromiseArray._asyncInit (/src/server/node_modules/bluebird/js/release/map.js:37:10)
    at _drainQueueStep (/src/server/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/src/server/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/src/server/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues (/src/server/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:461:21)
2020-12-03T20:56:29+0100 <error> scene.execute.js:20 () AbortScene [Error]: CONDITION_NOT_VERIFIED
    at Object.condition.only-continue-if (/src/server/lib/scene/scene.actions.js:123:13)
    at executeAction (/src/server/lib/scene/scene.executeActions.js:32:35)
    at /src/server/lib/scene/scene.executeActions.js:66:13
    at tryCatcher (/src/server/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/src/server/node_modules/bluebird/js/release/map.js:68:38)
    at MappingPromiseArray.PromiseArray._iterate (/src/server/node_modules/bluebird/js/release/promise_array.js:115:31)
    at MappingPromiseArray.init (/src/server/node_modules/bluebird/js/release/promise_array.js:79:10)
    at MappingPromiseArray._asyncInit (/src/server/node_modules/bluebird/js/release/map.js:37:10)
    at _drainQueueStep (/src/server/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/src/server/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/src/server/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues (/src/server/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:461:21)

Do you have more details about what’s happening?

Are you sure about how the button works? If you create a scene with just a message sent after a button trigger, does the message go through?

The logs you’re displaying are completely normal.