I’m trying to get a PUSH Message to my iPhone when i get home.
I’ve installed the ping plugin and have set it up to respond to my iPhones ip address. This then trips the virtual sensor which now exists in my Vera 2 and works great. iPhone wifi on sensor tripped, iPhone wifi off sensor goes back to armed state.
I’ve the created a scene to respond to the virtual sensor and added the following lua code in the appropriate section of that scene
–iPhone
local lul_tmp = luup.variable_get(“urn:schemas-micasaverde-com:device:MotionSensor:1”,“Status”,30)
I am also trying to use the ping sensor.
I have it working, but do not really see how to use it in an event.
I can schedule a 1 minute timer, this works good.
But I would like to have something to happen ‘immediately’; not having to verify every minute (that delay is too big).
When creating a new scene; the ‘ping sensor device’ is not listed in the device list when selecting to add an event.
Adding this line enables the device to be selected when creating a scene.
Hope that works out for you too.
Tested this evening; works perfect! When I come home in the evening with my iPad; my home welcomes
me with turning on the lights:) Cheaper then a motion sensor (taken into account you already have an iphone/ipad )
Can someone point me into the right direction. I really appropriate it.
I have create 2 ping sensors and 2 scenes. Ip adresses are stated to the computers at our office.
When the ping sensor is tripped ( this mean the computer is turn on) , a event is trigger and will enable the printers and heating at the office. This works really good.
Now I want a step further. When both pc’s are not used and turned off I want to shut even shut down the printers.
So would it be possible to create a luup code witch is checking both computers at the office of there are present at the network. When both are not present( i will amuse the are powered off ) then send a off command to the printers.
something like this :
-ping sensor 1 is not tripped AND -ping sensor 2 is not tripped
Then power off printers.
else
local lul_tmp = luup.variable_get(“urn:schemas-micasaverde-com:serviceId:MotionSensor:1”,“Status”,2)
if (lul_tmp==“Tripped”) then goto end
else “Power down printers”
Can you help me please into the right direction.
I have read you’re post ( before you pointed me) and i don’t get this.
Normally when you have a device , the have a 1 device type and 1 service ID
What I suspect would be something like this :
[sub]local lul_tmp = luup.variable_get(“urn:schemas-micasaverde-com:serviceId:MotionSensor1”,“Status”,62)[/sub]
Normally, yes, but that’s a degenerate case. Imagine a remote-controlled power board, with three individually-controllable appliance switches in it. One device, three on-off services. Each service would have a “Status” variable, so how would your program get the status of switch #3?
The way it’s done is that each switch has its own Service ID. Same Service type, different Service ID:
Switch 1: Service type urn:schemas-upnp-org:service:SwitchPower:1, Service ID urn:upnp-org:serviceId:SwitchPower1
Switch 2: Service type urn:schemas-upnp-org:service:SwitchPower:1, Service ID urn:upnp-org:serviceId:SwitchPower2
Switch 3: Service type urn:schemas-upnp-org:service:SwitchPower:1, Service ID urn:upnp-org:serviceId:SwitchPower3
That’s why you need to provide the Service ID of the variable that you’re interested in. If you like, you can think of the ServiceID and VariableName as a two-part primary key. Both are needed to get or set a variable uniquely.
Go back to the Advanced tab in UI4 and hover the mouse pointer over the variable name (“Status”). Up pops some hover text. That’s the service ID, and it’s needed to query or set that variable’s value.
[quote=“mversluis, post:17, topic:167050”]Only looking for the “hover text” and there is nothing pops up within a text in the advance screen.
(see picture).[/quote]
Scroll to the bottom where the true Luup variables are. Put the mouse pointer right on top of one of the words on the left.
This may be browser-dependent; I am using Firefox 3.6.
Thanks for pointed me that way. [sub]( Its a little mess code , there are 3 or 4 different serviceid used for the pingsensor)[/sub]
I will need to have the Tripped variable and that will use SecuritySensor1
Other question , to check of I will get the way of work :
[System variable] [serviceId] [status],[Device id]
local lul_tmp = luup.variable_get(“urn:schemas-micasaverde-com:serviceId:SecuritySensor1”,“Tripped”,62)
Is This correct :
Tripped return a value with the current state of te device.
with error levels can those have :
0 = sensor not tripped
1= sensor Tripped
Am I correct …?
What about “Status” , with values will be return by that funtion ?
What about “Armed” , with value will be return by that …?