I’m newbie in Vera & Z-Wave and i have few questions
I create network which contains of lights(fgs 221, schneider modules), switches(fgs 221, aeon smart switch), aeon sensors( 4 in 1, door sensor), everspring st814
if ( tonumber(hum) > 35 ) then
return true
else
return false
end
[/code]
On dashboard i have humidity at 22 %. I logged to Vera2 by SSH and i have error like this
LuaInterface::CallFunction-3 Scene 5 failed [string “function scene_5()…”]:4: attempt to compare number with nil <0x803>
Polling by vera doesn’t work properly. Sometimes i have wait few hours to update temp on dashboard. I don’t know how vera manage but i think that someone did it very wrong - few devices and delays grows rapidly.
This is a device type not a service ID needed by the luup.variable_get method.
You can use the Program Logic Event Generator plugin to allow you to access Vera triggers and Device variables without having to learn LUUP and how all the uPNP names for service variables work.
[hr]
PLEG Input:
Using device Property, Select the appropriate humidity device current humidity value using menu selection. Give it a name like Humidity
PLEG Condition: HighHumidity = Humidity >35
PLEG Action:
for condition HighHumidity add what ever commands you need.
There should be some hints here on the forum. You have to configure parameters 6, 7 and/or 8 I believe. These are mentioned in the instructions for the device. See also this post perhaps.
I have one more question - how can i get proper serviceID? There is no serviceID in Advanced tab? In my Vera 2 I searched everything and I found in Mios Developers tab Luup files when there are xml files connected with particular devices - but when i use serviceID’s from them i get errors like this one before:
LuaInterface::CallFunction-3 Scene 5 failed [string "function scene_5()..."]:4: attempt to compare number with nil <0x803>
I have one more question ;D I have mono-stable switch and i want make it bi-stable by luup code. In scene i make event turn on by switching mono-stable button connected with fibaro fgs221. Light bulb is connected with another fgs 221 ( in network device 32). I don’t use luup.variable_get because vera don’t update is enough often to relay on variable status from advanced tab. So i poll it first to get proper status, but it don’t update either.
i have another question - how works events to start scene ? if i set running scene by button (option device is turn on or off) it have to be pushed during time of scene?
thanks Brientim, strange effect. If lamp if turn off, i push button - no effect. When turn it on from dashboard and then push button lamp turn off as it should. Conlusion is simple - there are two possibilities - command from luup script doesn’t effect in polling or polling in this way doesen’t update lamp status
local device = 20
local Svs = “urn:upnp-org:serviceId:SwitchPower1” local luup.call_action(Svs, “Poll”, {}, device)
local light_status = luup.variable_get(Svs,“Status”,device)
local args = {newTargetValue = tostring((tonumber(light_status) + 1) % 2)}
luup.call_action(Svs, “SetTarget”, args, device)
[/code][/quote]
i’m not sure but i got errors when after calling a function i declared some variables - it could be a problem but my not sure if other issues had influence on this
my code :
local device = 32
local light_status = {}
local Svs = "urn:upnp-org:serviceId:SwitchPower1"
luup.call_action(Svs,"Poll",{},device)
light_status = luup.variable_get(Svs,"Status",device)
if (light_status == "0") then
luup.call_action(Svs,"SetTarget",{newTargetValue = "1"},device)
else
luup.call_action(Svs,"SetTarget",{newTargetValue = "0"},device)
end
it works pretty slow by vera 2 - unfortunately this is bad way to make mono-stable switch bi-stable
Best Home Automation shopping experience. Shop at Ezlo!