Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tuto Script LUA
#16
Le script me semble bon, mais tu ne modifie que la variable locale "Variable_Activation_Inter", tu ne modifies pas la valeur de "intern_7"
Je pense qu'en changeat la valeur de "intern_7" ca devrait fonctionner comme tu souhaites :
essaye avec ce script :



Code:
local Variable_Activation_Inter = calaos:getInputValue("intern_7")

if Variable_Activation_Inter == false then
  calaos:setOutputValue("output_78", true)
  calaos:setOutputValue("output_54", true)
  calaos:setOutputValue("output_14", true)
  calaos:setOutputValue("intern_7", true)
elseif Variable_Activation_Inter == true then
  calaos:setOutputValue("output_78", false)
  calaos:setOutputValue("output_54", false)
  calaos:setOutputValue("output_14", false)
  calaos:setOutputValue("intern_7", false)
end
return true

Ce script fonctionne, mais a mon sens il est plus simple de réaliser ce genre de comportement avec des regles calaos toute simple. puisque ici tu as une condition et 3 actions.
Mais c'est tout a fait possible de faire ca avec calaos et des scripts lua ;-)
Calaos v2 sur Rpi et MeleA1000 | Eco Device | IPX800 | Karotz | 1Wire | Relais GPIO | Squeezebox
Reply


Messages In This Thread
Tuto Script LUA - by tom - 01-08-2014, 12:27 AM
RE: Tuto Script LUA - by raoulh - 01-08-2014, 10:29 AM
RE: Tuto Script LUA - by tom - 01-08-2014, 02:14 PM
RE: Tuto Script LUA - by raoulh - 01-08-2014, 02:22 PM
RE: Tuto Script LUA - by captainigloo - 01-08-2014, 02:59 PM
RE: Tuto Script LUA - by tom - 01-09-2014, 12:06 AM
RE: Tuto Script LUA - by raoulh - 01-09-2014, 10:10 AM
RE: Tuto Script LUA - by tom - 01-09-2014, 10:36 AM
RE: Tuto Script LUA - by raoulh - 01-09-2014, 10:40 AM
RE: Tuto Script LUA - by tom - 01-09-2014, 07:00 PM
RE: Tuto Script LUA - by Cyridle - 02-01-2015, 12:29 AM
RE: Tuto Script LUA - by Eric64 - 12-22-2015, 04:42 PM
RE: Tuto Script LUA - by raoulh - 12-22-2015, 05:58 PM
RE: Tuto Script LUA - by Eric64 - 12-22-2015, 06:15 PM
RE: Tuto Script LUA - by Eric64 - 12-22-2015, 06:44 PM
RE: Tuto Script LUA - by captainigloo - 12-23-2015, 03:50 PM
RE: Tuto Script LUA - by Eric64 - 12-23-2015, 07:20 PM
RE: Tuto Script LUA - by Eric64 - 12-23-2015, 07:47 PM
RE: Tuto Script LUA - by captainigloo - 12-23-2015, 08:36 PM
RE: Tuto Script LUA - by Eric64 - 02-15-2016, 09:46 AM
RE: Tuto Script LUA - by raoulh - 02-15-2016, 10:25 AM
RE: Tuto Script LUA - by Eric64 - 02-16-2016, 12:15 PM
RE: Tuto Script LUA - by raoulh - 02-16-2016, 12:29 PM
RE: Tuto Script LUA - by Eric64 - 02-16-2016, 03:12 PM
RE: Tuto Script LUA - by eh3an2010 - 12-15-2017, 07:51 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)