Page 1 of 1

set action not triggering other script

Posted: Friday 07 June 2019 16:22
by Jheronymus
Hi,

I made a block;y script that triggers on time. It checks the time and temp and if applicable sets a aircondition switch from "Off" to "Cool".

If you do this manually on the dashboard, the device changed event triggers another script acutally sending the appropiate command to the AC unit.

For some reason using the set command in the blocky script isn't working. I was quite sure this was working before upgrade to 4.10717
switch.png
switch.png (18.06 KiB) Viewed 1709 times
blockly.png
blockly.png (23.48 KiB) Viewed 1709 times
for testing purpose I was changing the time and temp to make sure the thing triggers. I did see the log entry "Running evening AC script" but the script listening to the device change on AC Mode never fired.

I did gave the hardware and the virtual device the same 'AC Mode' name.

Any ideas?

Kind regards,
Jeroen

Re: set action not triggering other script

Posted: Monday 10 June 2019 21:55
by waaren
Jheronymus wrote: Friday 07 June 2019 16:22 I made a Blockly script that triggers on time. It checks the time and temp and if applicable sets a air condition switch from "Off" to "Cool".
If you do this manually on the dashboard, the device changed event triggers another script actually sending the appropriate command to the AC unit.
For some reason using the set command in the Blockly script isn't working. I was quite sure this was working before upgrade to 4.10717
I don't work very often with Blockly and have not tested with versions before V4.10717 but to get it working with this version you will have to use a Level(%) Block because using the level-name does not set the level.
Blockly.png
Blockly.png (62.82 KiB) Viewed 1704 times
AC Mode.png
AC Mode.png (23.72 KiB) Viewed 1704 times

Re: set action not triggering other script

Posted: Wednesday 19 June 2019 23:32
by Jheronymus
thx! That solved it.