smartphone/text UI does not show sensor status

just installed a new door sensor and when i go into the smartphone or basic text interface it does not show the status of the sensor… is this normal?

i sure hope not… the whole reason behind the sensor was to make sure my garage door was closed after I left the house…

You’re correct, it doesn’t display the Sensor’s current status (red/green) like the full UI does. A number of the Device types dont have a full rendition in the mobile interface, at least not on part with their “Dashboard” counterparts.

On the positive side, they provide the source iPhone.lua file, and it can be edited to add this capability with a few lines of code. I did this back in the 8xx series Luup releases as I wanted to test my code (which generates Loads of MotionSensor1 Child Devices).

I haven’t ported it up since then, as I now just run the “full” interface on my iPhone. It’s a lot slower, but it has the full functionality.

Are you running the full interface locally and remotely or just locally within your own wifi network? I would find findvera.com very clumsy over a small screen (double scroll bars) and 3g connection.

Locally, over WiFi. I do this to “test” the status of various Alarm behaviours where I often have to be away from the computer (to activate the Alarm, Leave the house etc)

Yes, the embedded IFRAME in the HTML of the Findvera.com version is a PITA. There are ways (after login) to get just the “Control” component to come up full frame, using a Desktop browser, but I don’t think that’s possible with the iPhone.

Take a crack at the L_sPhoneUI.lua, it’s downloadable via the Vera URL:

http://192.168.x.x/cgi-bin/cmh/view_upnp_file.sh?file=L_sPhoneUI.lua.lzo

Sub in your Vera’s IP, and then do a View-Source on what comes down.

It’s basically this part that needs tweaking:

[code]function lug_sPhoneRequest_sensor(lul_device,lul_description)
local lul_Armed = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”,“Armed”,lul_device)

if( lul_Armed~="1") then
	status_arm=''
	status_bypass='_h'
else
	status_arm='_h'
	status_bypass=''
end	

return '<img src="/cmh/iphone_file/icons/security.gif" alt="" width="44" height="43" align="absmiddle" class="icon" />' .. lul_description .. '<br>\n' ..
	'<a href="data_request?id=lu_variableset&DeviceNum=' .. tostring(lul_device) .. '&serviceId=urn:micasaverde-com:serviceId:SecuritySensor1&Variable=Armed&Value=1&time=' .. tostring(os.clock()) .. '"><img src="/cmh/iphone_file/buttons/arm' .. status_arm .. '.gif" alt="" border="0"/></a> ' ..
	'<a href="data_request?id=lr_sPhone_action&room=' .. luup.devices[tonumber(lul_device)].room_num .. '&device=' .. tostring(lul_device) .. '&service=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=SetVariable&DeviceNum=' .. tostring(lul_device) .. '&Service=urn:micasaverde-com:serviceId:SecuritySensor1&Variable=Armed&Value=0&time=' .. tostring(os.clock()) .. '"><img src="/cmh/iphone_file/buttons/bypass' .. status_bypass .. '.gif" alt="" border="0"/></a> '

end

[/code]

with a few more calls to [tt]luup.variable_get()[/tt] to get the value of “[tt]Tripped[/tt]”, and then a snippet of HTML to display the status.

I was using relative URL’s like:

[tt] /cmh/images/red_circle.gif[/tt] AND;
[tt] /cmh/images/green_circle.gif[/tt]

for the circles, as these resolve correctly on the FindVera.com service as well as locally.

I’m more interested in the sensor temp, light showing up as well, especially temp with my Fortrezz and 3-in-1 sensors

-Eric
http://www.MyHomeServer.com

@B0SST0N
Did you try making changes to the file to get the MotionSensor’s to showup with their current status (“Tripped”) indicators?

@myhomeserver
There are other sections of the [tt]L_sPhoneUI.lua[/tt] file that handle the other components, have you attempted to edit those?

Not yet, been really busy with “real” work, haven’t had much time to take a look at it. This is on my vera task list though… trying to add my leviton scene controllers took up to much of my free time this weekend…