Page 1 of 1

Send message with Blockly with a new expression

Posted: Sunday 02 August 2020 19:53
by PeterB1
In the WiKi pages of domoticz is a chapter that describes the use of blockly.
I miss an expression which would very helpful. My case:

I have a windmeter which gives me information about temperture, windspeed, winddirection, windgust. Every morning I want to send a message with blockly about the actual winddirection (North, East, South or West) and temperature. Blockly gives an expression: winddirdevice (See https://www.domoticz.com/wiki/Blockly#Switches ). But this gives an angle and no direction like North or South.

Is it possible to add an expression in blockly DirectionStr?
As an example I get with json the following (partial) information of the windmeter.


Data" : "315.00;NW;11;12;22.8;22.8",
"Description" : "",
"Direction" : 315.0,
"DirectionStr" : "NW",
"Favorite" : 1,
"Gust" : "1",

Re: Send message with Blockly with a new expression

Posted: Monday 03 August 2020 14:36
by knielen
As far as I know this is not possible in Blockly, you need to switch to DzVents for this.
Maybe you can check the angle in the Blockly and then make a message with the direction, but this is a lot of work.