Did you installed the lua-code from Nodon’s tutorial and changed parameter 3 to 1?
yes, but it doesn’t work…
Try button 4 (LastSceneID 40) after you have change the lua-code/scene accordingly and let us know.
i was able to configure only the button 4, if i change “40” value into “30” and use the third button, it doesn’t work anymore.
i tried the following lua code also:
luup.call_delay('scene_controller',1)
function scene_controller()
local lastSceneID = luup.variable_get("urn:micasaverde-com:serviceId:SceneController1","LastSceneID",199)
if (lastSceneID == "40") then
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = "18"}, 0)
elseif (lastSceneID == "30") then
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = "19"}, 0)
end
end
Same problem for me, for which reason I contacted NodOn and still waiting for their reply.
Meanwhile I configured the four buttons in PLEG and it works smoothly. Alternatively you could use the watch function in AltUI to configure the 4 buttons.
ok, thank you…but I hope that it will work properly soon
[quote=“Kullematz, post:25, topic:188671”]Same problem for me, for which reason I contacted NodOn and still waiting for their reply.
Meanwhile I configured the four buttons in PLEG and it works smoothly. Alternatively you could use the watch function in AltUI to configure the 4 buttons.[/quote]
Ciao.
I have Nodon Soft Remote and Vera Edge 1.7.1569
Following instructions for scene activation with Lua code the result was only 2 buttons work.
So I decide the PLEG solution. I set as trigger:
t1 Nodon-Remote: scene number 0 is activated
t2 Nodon-Remote: scene number 1 is activated
t3 Nodon-Remote: scene number 3 is activated
t4 Nodon-Remote: scene number 2 is activated
t5 Nodon-Remote: scene number 22 is activated
t6 Nodon-Remote: scene number 23 is activated
but only scene number 0,1,2,3 are working for button ? in this mode:
0= single press
1= hold press
2= double press
3= hold release
but I’m not able to assign the other buttons.
Of course, According to the Octan Remote User Guide, below the inputs
-
Number: 3
-
Data size: 1 byte hex
-
Value: 1 (Scene Activation Mode)
are set.
Thank you in advance for your suggestions
It was not my intention to use scenes in my configuration, therfore I simply check the LastSceneIDs under the Properties Tab and define the actions depending on the condition of the LastSceneID (e.g. p1==10, p1==20…).
in addition to check the LastSceneId value you must check the sl_sceneActivated value also, this value is the trigger that you can set during scene creation.
The problem is that if you set only “A scene is activated Which scene number: 0” your device triggers only for button 4.
When you create a scene, you must set all possible trigger values (see attachment):
0 for button 4
2 for button 2
3 for button 3
4 for button 1
Doing this, triggers are all in “or” condition, so your device is always triggered when you push any button! now the lua code works and you can use elseif expressions to include all cases.
I have the same problem.
Here is my Lua:
luup.call_delay(‘scene_controller’,1)
function scene_controller()
local lastSceneID = luup.variable_get(“urn:micasaverde-com:serviceId:SceneController1”,“LastSceneID”,192)
if (lastSceneID == “10”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”, {SceneNum =“29”}, 0)
elseif (lastSceneID == “20”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”, {SceneNum =“26”}, 0)
elseif (lastSceneID == “30”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”, {SceneNum =“13”}, 0)
elseif (lastSceneID == “40”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”, {SceneNum =“16”}, 0)
end
end
Problem is all buttons (1,2,3 and 4) trigger the same scene.
First all buttons triggered scene 26.
Then suddenly it changed so that all buttons triggerd scene 16.
I do not understand what is happening :-\
did you created all the triggers as i posted before?
My code works perfectly but I have a big issue, when a other scene run on my VeraEdge my last scene Nodon run also.
Any idea ?
Thx
local SalonSwitch = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”,“Status”,21)
local lightLevelSalon = luup.variable_get(“urn:upnp-org:serviceId:Dimming1”, “LoadLevelStatus”, 113)
local SaMSwitch = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”,“Status”,23)
local lightLevelSaM1 = luup.variable_get(“urn:upnp-org:serviceId:Dimming1”, “LoadLevelStatus”, 108)
local VoletPorte = luup.variable_get(“urn:upnp-org:serviceId:Dimming1”, “LoadLevelStatus”, 15)
luup.call_delay(‘scene_controller’,1)
function scene_controller()
local LastSceneID = luup.variable_get(“urn:micasaverde-com:serviceId:SceneController1”,“LastSceneID”,131)
if (LastSceneID == "10") then
if (SalonSwitch == "0") then
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"}, 21)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 113)
end
if (SalonSwitch == "1") then
if ((tonumber(lightLevelSalon) >= 0) and (tonumber(lightLevelSalon) <= 24))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 113)
end
if ((tonumber(lightLevelSalon) >= 25) and (tonumber(lightLevelSalon) <= 49))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "50"}, 113)
end
if ((tonumber(lightLevelSalon) >= 50) and (tonumber(lightLevelSalon) <= 74))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "75"}, 113)
end
if ((tonumber(lightLevelSalon) >= 75) and (tonumber(lightLevelSalon) <= 100))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, 113)
end
end
end
if (LastSceneID == "20") then
if (SaMSwitch == "0") then
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"}, 23)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 108)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 110)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 112)
end
if (SaMSwitch == "1") then
if ((tonumber(lightLevelSaM1) >= 0) and (tonumber(lightLevelSaM1) <= 24))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 108)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 110)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 112)
end
if ((tonumber(lightLevelSaM1) >= 25) and (tonumber(lightLevelSaM1) <= 49))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "50"}, 108)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "50"}, 110)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "50"}, 112)
end
if ((tonumber(lightLevelSaM1) >= 50) and (tonumber(lightLevelSaM1) <= 74))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "75"}, 108)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "75"}, 110)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "75"}, 112)
end
if ((tonumber(lightLevelSaM1) >= 75) and (tonumber(lightLevelSaM1) <= 100))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, 108)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, 110)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, 112)
end
end
end
if (LastSceneID == "40") then
if (SaMSwitch == "0") then
return false
end
if (SaMSwitch == "1") then
if ((tonumber(lightLevelSaM1) >= 0) and (tonumber(lightLevelSaM1) <= 25))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "0"}, 108)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "0"}, 110)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "0"}, 112)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "0"}, 23)
end
if ((tonumber(lightLevelSaM1) >= 26) and (tonumber(lightLevelSaM1) <= 50))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 108)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 110)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 112)
end
if ((tonumber(lightLevelSaM1) >= 51) and (tonumber(lightLevelSaM1) <= 75))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "50"}, 108)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "50"}, 110)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "50"}, 112)
end
if ((tonumber(lightLevelSaM1) >= 76) and (tonumber(lightLevelSaM1) <= 100))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "75"}, 108)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "75"}, 110)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "75"}, 112)
end
end
end
if (LastSceneID == "30") then
if (SalonSwitch == "0") then
return false
end
if (SalonSwitch == "1") then
if ((tonumber(lightLevelSalon) >= 0) and (tonumber(lightLevelSalon) <= 25))then
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "0"}, 21)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "0"}, 113)
end
if ((tonumber(lightLevelSalon) >= 26) and (tonumber(lightLevelSalon) <= 50))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "25"}, 113)
end
if ((tonumber(lightLevelSalon) >= 51) and (tonumber(lightLevelSalon) <= 75))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "50"}, 113)
end
if ((tonumber(lightLevelSalon) >= 76) and (tonumber(lightLevelSalon) <= 100))then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "75"}, 113)
end
end
end
if (LastSceneID == "13") then
if (VoletPorte == "0") then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, 15)
end
if (VoletPorte == "100") then
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "0"}, 15)
end
end
end
I’m trying to use the NodOn Octan with my Vera 2 running 1.5.673. I’ve set parameter 3 to 1 and I’m writing the LastSceneID to a variable container so I can see what codes are being returned. I don’t use PLEG so I just have a scene triggered by scene 0 from the Octan and LuuP code to select the scenes I want based on the returned code.
Buttons 2,3,4 all seem to work fine and return the appropriated codes depending on short, double, long press and release. However button 1 does not seem to return any code or even trigger the scene ( whether a short, double or long press/release) . Looking at the LuaUPnP logs the correct codes seem to be generated when the various buttons are pressed but if I look at the event log (via Event watcher) buttons 2-4 generate sl_SceneActivated=0 whereas button 1 produces sl_SceneActivated=1. It does not seem to matter what sequence of buttons I push.
Can anyone shed any light on why sl_SceneActivated returns a different value for button 1 and is there a work around?
Ok, after some further research on the forum regarding sl_SceneActivated - I realised that (for whatever reason) this can return a number of values depending on the button sequence. So after adding additional triggers for scenes 1,3,4 it now triggers and returns the expected value when button #1 is short, double or long pressed. Does not seem to detect release but I can manage without that for the moment.