Page 1 of 1
Time Triggered Blockly does not work (LED Off - Xiaomi Gateway v2)
Posted: Sunday 03 November 2019 21:36
by misfit
I turn on the LED of a xiaomi gateway (v2) at sunset:
Code: Select all
If Time = Sunset and Gateway = Off
Do Set Gateway = On
Set Gateway = Level (%) 15
That's working ok.
But why it's not turning off using this logic? >>
Code: Select all
If Time >= 22:00 and Gateway = On
Do Set Gateway = Off
Set Gateway = Level (%) 0
Re: Time Triggered Blockly does not work (LED Off - Xiaomi Gateway v2)
Posted: Sunday 03 November 2019 22:40
by Geitje
Have you set the "trigger" drop down menu to "time"?
Please post a screenshot of your blocky.
Re: Time Triggered Blockly does not work (LED Off - Xiaomi Gateway v2)
Posted: Monday 04 November 2019 9:02
by misfit
Yes i set the trigger to 'time':

- trigger.jpg (3.59 KiB) Viewed 619 times
The logic for On/Off:

- on.jpg (19.36 KiB) Viewed 618 times

- off.jpg (19.68 KiB) Viewed 618 times
Re: Time Triggered Blockly does not work (LED Off - Xiaomi Gateway v2)
Posted: Monday 04 November 2019 9:52
by waaren
misfit wrote: ↑Monday 04 November 2019 9:02
Yes i set the trigger to 'time':
Try with this, State can be something else then 'On' or 'Off'
Changing level to > 0% does switch the devce On and changing level to 0% does switch the device to Off.

- dimmer on.png (28.33 KiB) Viewed 615 times

- dimmer off.png (28.59 KiB) Viewed 615 times
Re: Time Triggered Blockly does not work (LED Off - Xiaomi Gateway v2)
Posted: Monday 04 November 2019 19:25
by misfit
waaren wrote: ↑Monday 04 November 2019 9:52
misfit wrote: ↑Monday 04 November 2019 9:02
Yes i set the trigger to 'time':
Try with this, State can be something else then 'On' or 'Off'
Changing level to > 0% does switch the devce On and changing level to 0% does switch the device to Off.
dimmer on.pngdimmer off.png
That's working, thank you. Any idea how to change the LED color using blockly?
Re: Time Triggered Blockly does not work (LED Off - Xiaomi Gateway v2)
Posted: Monday 04 November 2019 20:12
by waaren
misfit wrote: ↑Monday 04 November 2019 19:25
That's working, thank you. Any idea how to change the LED color using blockly?
You could call a scene with predefined colors for switches or use [messages] openURL with something like '
http://127.0.0.1:8080/json.htm?type=com ... htness=100'
But it would be to complicated for Blockly for my taste. I would always use dzVents to do something more complicated then switching something on or off.
But that is a matter of personal preference.