Tripped Sensor Lua Code Help!!

Totally lost ???

I just followed everything here is stated to make the ping sensor work in a luup code.
But nothing will work.

Now I have used this code :

[sub]local lul_tmp = luup.variable_get(“urn:schemas-micasaverde-com:serviceId:SecuritySensor1”,“Tripped”,62)

if (lul_tmp==“0”)

then luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{newTargetValue=“0”},61)
end[/sub]

And still no result.

Is there some misspelt into my code , or just something other …?

Many Thanks for you’re help.
Marco

urn:micasaverde-com:serviceId:SecuritySensor1

Totally confused.
I hope someone is able to help me … ???

I use this code :
[sub]local lul_tmp = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”,“Tripped”,62)

if (lul_tmp==“0”)

then local lul_tmp1 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”,“Tripped”,63)

if (lul_tmp1==“0”)

then luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{newTargetValue=“0”},61)

end

end[/sub]

When both pc running at the office are powered down , the ping sensor is not tripped.
When I run the scene manual , the switch will go off . So I will assume the scene is working.

I have added a timer , witch is running every hour to check the pc’s are not running any more and will switch off the printers. ( like i tested manual ) .

This will not working :o :o

Can you please point me into the right direction …?
Many thanks in advance

best regards,
Marco

[quote=“mversluis, post:23, topic:167050”]Totally confused.
I hope someone is able to help me … ???

I use this code :
[sub]local lul_tmp = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”,“Tripped”,62)

if (lul_tmp==“0”)

then local lul_tmp1 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”,“Tripped”,63)

if (lul_tmp1==“0”)

then luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{newTargetValue=“0”},61)

end

end[/sub]

When both pc running at the office are powered down , the ping sensor is not tripped.
When I run the scene manual , the switch will go off . So I will assume the scene is working.

I have added a timer , witch is running every hour to check the pc’s are not running any more and will switch off the printers. ( like i tested manual ) .

This will not working :o :o

Can you please point me into the right direction …?
Many thanks in advance

best regards,
Marco[/quote]
@mversluis
If you are still following this thread, triggering a scene was a problem for many people until @pepebel4 came up with the json code add for the D_PingSensor.xml

Have you ever checked that codesnippet was in your xml?