Script not running? Topic is solved

Moderator: leecollings

Post Reply
User avatar
FearNaBoinne
Posts: 144
Joined: Tuesday 30 April 2019 10:08
Target OS: Linux
Domoticz version: 2021.1
Location: Sector 0
Contact:

Script not running?

Post by FearNaBoinne »

Hi all,

I made this quick script:
Image

I have tried with trigger set both as Time and User Variable, but I never see it run in the logs, nor do I see the text devices change...

Any suggestions what is wrong? I just don't see it (anymore)!
RasPi, Raspbian , Domoticz v2021.1, Z-Wave Stick, RFLink, RFXtrx433e, Hue, Tuya (Tasmota/Mosquitto with Discovery), ESP(easy), MySensors.org, OTGW
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Script not running?

Post by waaren »

FearNaBoinne wrote: Tuesday 18 June 2019 0:23 Any suggestions what is wrong? I just don't see it (anymore)!
You try to use the Value of a text device as trigger for the script (in the if part) but in Blockly this value can only be used in the do part. See the tooltip for this element when you hover over it with your mouse-pointer.

You can find an alternative way of doing this in this topic
Blockly with
Blockly with
Blockly.png (49.36 KiB) Viewed 1613 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
FearNaBoinne
Posts: 144
Joined: Tuesday 30 April 2019 10:08
Target OS: Linux
Domoticz version: 2021.1
Location: Sector 0
Contact:

Re: Script not running?

Post by FearNaBoinne »

Thanks! I did not see the mouseover tooltip... There's some weird restrictions with Blockly... :P

I actually tried to do it in the LUA script that builds the user variables sunset and sunrise, but was unable to figure out how to set both text devices (Sunrise.text and Sunset.text) from LUA (I could not find examples for that)... So if someone can show me how to set the text of a text device from LUA, I'll be happy too! (Or actually happier, as I can lose a script and consolidate...)
RasPi, Raspbian , Domoticz v2021.1, Z-Wave Stick, RFLink, RFXtrx433e, Hue, Tuya (Tasmota/Mosquitto with Discovery), ESP(easy), MySensors.org, OTGW
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Script not running?

Post by waaren »

FearNaBoinne wrote: Tuesday 18 June 2019 10:15 I actually tried to do it in the LUA script that builds the user variables sunset and sunrise, but was unable to figure out how to set both text devices (Sunrise.text and Sunset.text) from LUA (I could not find examples for that)...
Have a look at this topic (dzVents = 100% Lua)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest