Page 1 of 1

Blockly not executed with http command and dummy level switch

Posted: Wednesday 08 April 2020 8:22
by ebretteville
Hye,

Here is a piece of blockly that should be executed on a dummy level switch. I don't know why it is not working.

Image

Here is the dummy level switch:

Image

Thanks for your heads up.

Re: Blockly not executed with http command and dummy level switch

Posted: Wednesday 08 April 2020 22:04
by wouterlet
Nothing happens?
Does the dummy switch get to the right state?
What's written in your log?
You can also add an "write to log" to debug maybe

Re: Blockly not executed with http command and dummy level switch

Posted: Thursday 09 April 2020 9:04
by ebretteville
Thanks for your reply.
It's a nice idea to add a write to log, here is how I modified the blockly:
Image

And here is the log when changing the state of the switch:

Code: Select all

 
2020-04-09 08:52:49.698 ([CAM]) Light/Switch ([CAM] ABSENT/PRESENT)
2020-04-09 08:52:49.688 Status: User: etienne initiated a switch command (1410/[CAM] ABSENT/PRESENT/Set Level)
2020-04-09 08:53:13.215 ([CAM]) Light/Switch ([CAM] ABSENT/PRESENT)
2020-04-09 08:53:13.204 Status: User: etienne initiated a switch command (1410/[CAM] ABSENT/PRESENT/Set Level)
And in the events variable state tab i see 20 or 10 but a strange:

Code: Select all

Idx    Dernière mise à jour  Nom                                 État          Valeur
1410	2020-04-09 09:03:22	[CAM] ABSENT/PRESENT	PRESENT	2/20
So from my understanding, it even don't go inside one of those two tests... Strange, maybe because no actions are configured in the switch for each level?

Re: Blockly not executed with http command and dummy level switch

Posted: Thursday 09 April 2020 10:36
by ebretteville
I found a way to "enter" in the test. Instead of checking the level value. I check the string value. Strange. Now I have to figure out if it's possible to open url with cgi commands...

Image

Image

Re: Blockly not executed with http command and dummy level switch

Posted: Thursday 09 April 2020 11:49
by ebretteville
Found the pbm. One of url type was malformed for domoticz. It worked in a browser but not in blockly. So I homogenized all urls and with the string level test, everything worked. It's a solved pbm.

Re: Blockly not executed with http command and dummy level switch

Posted: Wednesday 30 September 2020 8:40
by jarmoboy
For those who dont know, if you want to set level, it should be a tab of percentage, not integer!
So you can use name of level as a string (caps sensitive) or percentage bar.