Newest Beta
Raspberry Pi2
ZStick
How can I use the percentage of my blinds as a trigger signal for Lua? elseif (otherdevices_svalues['kitchen left'] >= 'Set Level: 64 %' and sUV > 2) don't work. Tried with elseif (otherdevice_svalues['kitchen left'] >= 64 and sUV >2) without succeed.
With /json.htm?type=command¶m=switchlight&idx=99&switchcmd=Set%20Level&level=6
I can set the blind to differnt level. I assume I have to use something with level inside the script but I can't find the right code.
elseif (otherdevices['kitchen left'] == 'Closed' and sUV > 2) works.
Please can someone point me in the right direction.
use percentage blinds as trigger signal Topic is solved
Moderator: leecollings
- jvdz
- Posts: 2335
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: use percentage blinds as trigger signal
What about:
Jos
Code: Select all
elseif (tonumber(otherdevices_svalues['kitchen left']) >= 64 and sUV >2)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 245
- Joined: Wednesday 17 February 2016 22:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Germany
- Contact:
Re: use percentage blinds as trigger signal
Jos, thank you very much, that did the trick with trigger
But now I have problem to set the blind to a specific value. Can't find a commandArray in Domoticz documentation. SetSetPoint doesn't work. Any idea?
I would like to set my blinds in my kitchen to 60% when the sun radiation is higher than 500 that protect against head up my kitchen but it is still bright enough.
But now I have problem to set the blind to a specific value. Can't find a commandArray in Domoticz documentation. SetSetPoint doesn't work. Any idea?
I would like to set my blinds in my kitchen to 60% when the sun radiation is higher than 500 that protect against head up my kitchen but it is still bright enough.
- bewo
- Posts: 74
- Joined: Monday 13 July 2015 12:27
- Target OS: Linux
- Domoticz version: 2021.1
- Location: Bavaria - Germany
- Contact:
Re: use percentage blinds as trigger signal
When 'kitchen left' is your blind and sUV is your sun radiation, i think it should be
Code: Select all
commandArray = {}
if (tonumber(otherdevices_svalues['kitchen left']) >= 61 and sUV >500)
then
commandArray ['kitchen left'] = 'Set Level 60'
end
return commandArray
Individual projects:
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
Who is online
Users browsing this forum: Google [Bot] and 1 guest