sorry
Fibaro RGBW control by Fibaro switch Topic is solved
Moderator: leecollings
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Fibaro RGBW control by Fibaro switch
uh..
sorry
sorry
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
piokuc
Re: Fibaro RGBW control by Fibaro switch
No
It no works ok. Because when i Turn OFF KINKIET for about some time it Turn ON automatical.
I dont know what is it.
It no works ok. Because when i Turn OFF KINKIET for about some time it Turn ON automatical.
I dont know what is it.
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Fibaro RGBW control by Fibaro switch
leave only the script and remove the secondary dependecy from devices....
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
piokuc
Re: Fibaro RGBW control by Fibaro switch
ok
I corrected script and now works fast and good:
BTW
Problem which i post with setting SLAVE/SECONDARY device also should be repaired by developer.
@emme thanks for your HELP
I corrected script and now works fast and good:
Code: Select all
commandArray = {}
if devicechanged['Kinkiet'] and otherdevices['Kinkiet'] == 'On' then
if otherdevices['Switch2'] == 'Off' then
commandArray['Switch2'] = 'On'
end
end
if devicechanged['Kinkiet'] and otherdevices['Kinkiet'] == 'Off' then
if otherdevices['Switch2'] == 'On' then
commandArray['Switch2'] = 'Off'
end
end
if devicechanged['Switch2'] and otherdevices['Switch2'] == 'On' then
if otherdevices['Kinkiet'] == 'Off' then
commandArray['Kinkiet'] = 'On'
end
end
if devicechanged['Switch2'] and otherdevices['Switch2'] == 'Off' then
if otherdevices['Kinkiet'] == 'On' then
commandArray['Kinkiet'] = 'Off'
end
end
return commandArrayProblem which i post with setting SLAVE/SECONDARY device also should be repaired by developer.
@emme thanks for your HELP
-
piokuc
Re: Fibaro RGBW control by Fibaro switch
BTW
I can use script lua to control relay by GPIO from directory /scripts to use it in GUI in menu EVENTS ?
I can use script lua to control relay by GPIO from directory /scripts to use it in GUI in menu EVENTS ?
Code: Select all
-- script_device_Zaluzje_pietro.lua
local sensor = 'Zaluzje pietro'
commandArray = {}
if (devicechanged[sensor] == 'On') then
print ("Odsloniecie zaluzji na pietrze przez przekaznik na GPIO 19")
os.execute ("/usr/local/bin/gpio export 19 in")
os.execute ("/usr/local/bin/gpio export 19 out")
os.execute ("sleep 0.1")
os.execute ("/usr/local/bin/gpio export 19 in")
end
if (devicechanged[sensor] == 'Off') then
print ("Zasloniecie zaluzji na pietrze przez przekaznik na GPIO 16")
os.execute ("/usr/local/bin/gpio export 16 in")
os.execute ("/usr/local/bin/gpio export 16 out")
os.execute ("sleep 0.1")
os.execute ("/usr/local/bin/gpio export 16 in")
end
if (devicechanged[sensor] == 'Stop') then
print ("Ustawienie zaluzji na pietrze w pozycji MY przez przekaznik na GPIO 13")
os.execute ("/usr/local/bin/gpio export 13 in")
os.execute ("/usr/local/bin/gpio export 13 out")
os.execute ("sleep 0.1")
os.execute ("/usr/local/bin/gpio export 13 in")
end
return commandArray- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Fibaro RGBW control by Fibaro switch
GPIO needs to be exported BEFORE domoticz Start (see http://www.domoticz.com/wiki/GPIO )
then you can see them as devices
then you can see them as devices
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
piokuc
Re: Fibaro RGBW control by Fibaro switch
yes ok but if now i use script in directory i can not exported GPIO. But if i want use scipt in event i must exported ?
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Fibaro RGBW control by Fibaro switch
if you want to use GPIO it would be better to export them and configure the hardware in domoticz
Running from a script is not a good idea:
each os.execute is a different thread, so except the first, all others generate an error for missing gpio definition
by the time the os.execute finish, all the settings regard the GPIO are lost... no more output, no more input
If you have always connected a switch to a gpio... than configure it as hardware
Running from a script is not a good idea:
each os.execute is a different thread, so except the first, all others generate an error for missing gpio definition
by the time the os.execute finish, all the settings regard the GPIO are lost... no more output, no more input
If you have always connected a switch to a gpio... than configure it as hardware
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
piokuc
Re: Fibaro RGBW control by Fibaro switch
but how control gpio in lua script by Events menu ?
Who is online
Users browsing this forum: No registered users and 1 guest