Problem with UI5 and IP Cameras

I upgraded my Vera2 yesterday to UI5 - didn’t read carefully before clicking the link or I would have waited until it was official!

It was mostly working well. My mochad plugin and the Denon plugin which I have been working on with dfad1469 and zoot1612 were both slightly modified by Micasaverde and put into the app store. I didn’t try the Denon plugin but the mochad one wasn’t working. I’ll have to back port those changes to svn and maybe fix some existing bugs but glad that I have a head start on migrating the code to UI5.

My existing webcams were working, but I wanted to remove a webcam and add four new webcams. After I removed the webcam the new webcams did not work - it seems like my vera is missing D_DigitalSecurityCamera1.xml. It seems like vera might automatically remove “apps” that aren’t needed anymore when you remove a device, perhaps this file was removed when I deleted the existing webcam?

I had a second problem - I couldn’t add an IP camera if there was another webcam with the same IP address. I’ll verify this is a problem once I get IP cameras working again. I have several “IP cameras” that I made myself, they are embedded boxes running linux with multiple cameras with different urls - but the same web server. I could work around this but would be nice to see that fixed.

I decided to start with a blank slate so I performed a factory reset and z-wave reset of my vera. Figured UI5 was a good time to upgrade to 3.20 and start from scratch. Now I have exactly one device, an IP camera, and it isn’t working. Fortunately, for me vera is 100% for entertainment purposes and if it is down for a bit that is ok. :slight_smile:

It seems like vera is trying to download the needed files and can’t:
[size=8pt]
[font=courier]02 12/10/11 6:41:19.928 JobHandler_LuaUPnP::FetchMissingFiles need to download plugin 5 <0x400>
02 12/10/11 6:41:19.930 JobHandler_LuaUPnP::m_sMissingFile_set plugin <0x400>
01 12/10/11 6:41:19.947 Device_LuaUPnP::LoadDeviceDoc can’t load /etc/cmh-lu//D_DigitalSecurityCamera1.xml <0x400>
02 12/10/11 6:41:19.948 JobHandler_LuaUPnP::m_sMissingFile_set /etc/cmh-lu//D_DigitalSecurityCamera1.xml <0x400>
01 12/10/11 6:41:19.948 JobHandler_LuaUPnP::CreateDevice_LuaUPnP failed to load 3/D_DigitalSecurityCamera1.xml so device 3 is offline <0x400>
01 12/10/11 6:41:20.043 Device_LuaUPnP::CreateServices Aborting device 3 because the topmost device has no interface <0x400>
01 12/10/11 6:41:20.044 JobHandler_LuaUPnP::CreateAllServices failed to create 3 <0x400>
02 12/10/11 6:41:20.067 Device_Service::MatchupUpnpServices no upnp service for urn:micasaverde-com:serviceId:Camera1 <0x400>
01 12/10/11 6:41:20.069 Device_LuaUPnP::CreateImplementations Aborting 3 because it failed to load <0x400>
01 12/10/11 6:41:20.069 JobHandler_LuaUPnP::CreateAllImplementations failed to create 3 <0x400>
01 12/10/11 6:41:25.399 FileUtils::ReadURL 0/resp:404 size 1 https://cr1.mios.com/sync_camera?PK_AccessPoint=&HW_Key=&mac=&cat=2&device=3 <0x400>
02 12/10/11 6:41:25.402 IPCamera::SyncToCMS main response 404 url https://cr1.mios.com/sync_camera?PK_AccessPoint=&HW_Key=&mac=&cat=2&device=3 <0x400>
01 12/10/11 6:41:25.741 FileUtils::ReadURL 0/resp:404 size 1 https://cr2.mios.com/sync_camera?PK_AccessPoint=&HW_Key=&mac=&cat=2 <0x400>
02 12/10/11 6:41:25.847 JobHandler_LuaUPnP::StartUPnPServices starting with /etc/cmh-ludl/ / http://192.168.1.101:49451/luaupnp.xml <0x400>
09 12/10/11 6:41:25.886 JobHandler_LuaUPnP::Run device 3 room 0 type urn:schemas-upnp-org:device:DigitalSecurityCamera:1 id parent 0/0x7788b8 upnp: 0 <0x400>
03 12/10/11 6:41:25.905 JobHandler_LuaUPnP::Run ready 3 devices installation missing /etc/cmh-lu//D_DigitalSecurityCamera1.xml version 1.5.201 allow_evt: 1 allow_ud: 1 upnp 0 changed: 0 pMem 0x7c2000 start 7753728 diff: 380928 <0x400>
02 12/10/11 6:41:27.010 ZWaveJobHandler::SetDeviceStatus XXX2 0/0/0/0 LEAK this:286720 start:286720 to 0x815000 <0x803>
01 12/10/11 6:41:27.208 JobHandler_LuaUPnP::DownloadPlugin 5 failed to convert error -4: ERROR: no version relased for this pluginIz LEAK this:-278528 start:8192 to 0x7d1000 <0x402>
01 12/10/11 6:41:27.209 JobHandler_LuaUPnP::DownloadFiles new plugin 5 returned 0 <0x402>[/font][/size]

EDIT: Fixed some embarrassing typos. I apologize, this was posted before my morning coffee!

Did you realize that there are double slashes in a couple of lines:
01 12/10/11 6:41:19.947 Device_LuaUPnP::LoadDeviceDoc can’t load /etc/cmh-lu//D_DigitalSecurityCamera1.xml <0x400>

Maybe the Plugin Files need to be adjusted so that the path is correct again. Could that be? Are your files actually on the vera under luup files?

@chixxi, I did notice that, and I think it is just a typo in the error handling code? But thank you for taking a look!

“D_DigitalSecurityCamera1.xml” is not in “/etc/cmh-lu”. In fact, here are all Camera related files on my Vera:

[font=courier][size=8pt]root@MiOS_:/# find . | grep Camera
./etc/cmh-lu/S_Camera1.xml.lzo
./www/cmh/skins/default/icons/Ip_Camera.png
./www/cmh/images/intro/IP_Camera-ON.png
./www/cmh/json_update/D_DigitalSecurityCamera1.json
./www/cmh/json_update/D_DigitalGenericCamera.json
./mios/etc/cmh-lu/S_Camera1.xml.lzo
./mios/www/cmh/images/intro/IP_Camera-ON.png
./mios/www/cmh/json_update/D_DigitalGenericCamera.json
./mios/www/cmh/json_update/D_DigitalSecurityCamera1.json
./mios/www/cmh/skins/default/icons/Ip_Camera.png
./overlay/etc/cmh-lu/S_Camera1.xml.lzo
./overlay/www/cmh/skins/default/icons/Ip_Camera.png
./overlay/www/cmh/images/intro/IP_Camera-ON.png
./overlay/www/cmh/json_update/D_DigitalSecurityCamera1.json
./overlay/www/cmh/json_update/D_DigitalGenericCamera.json[/size][/font]

So I decided to revert to UI4 until UI5 became official, and I noticed that it became official right after I reverted. So I’m back to UI5.

After the UI5 reflash instead of having no D_DigitalSecurityCamera1.xml files I had two. There was one in /etc/cmh-lu and another in /etc/cmh-ludl.

I was also getting a lot of messages in my LuaUPnP log about being unable to download plugin 5. After a little digging on apps.mios.com it became apparent this was the IP camera plugin: MiOS Apps

I backed up and then removed the five files that were present in /etc/cmh-ludl. All but the “S_DigitalSecurityCameraStillImage1.xml.lzo” were present in /etc/cmh-lu/ as well.

[font=courier][size=8pt]-rw-r–r-- 1 root root 1183 Dec 10 12:48 D_DigitalSecurityCamera1.json.lzo
-rw-r–r-- 1 root root 464 Dec 10 12:48 D_DigitalSecurityCamera1.xml.lzo
-rw-r–r-- 1 root root 797 Dec 10 12:48 S_DigitalSecurityCameraSettings1.xml.lzo
-rw-r–r-- 1 root root 838 Dec 10 12:48 S_DigitalSecurityCameraStillImage1.xml.lzo
-rw-r–r-- 1 root root 231 Dec 10 12:48 S_PanTiltZoom1.xml.lzo[/size][/font]

After this things seemed to work better. I didn’t have any more messages about not being able to upgrade plugin 5 and my cameras now have a little picture on the dashboard.

A few outstanding issues:

  1. I still can’t add a new camera that has the same ip address as an existing camera. I have to change the ip of the existing camera, add the new camera, and then change the ip of the first camera back.

  2. When manually adding a camera using the wizard it says “Or, if your camera is not on the list, paste the URL which returns a JPG file in the box below:”. I think this is really wants for IP address and not the URL. On the next page it asks the same dialog is repeated, however here I think it doesn’t want the entire IP just the part that follows the IP.

Glad my cameras are working again :slight_smile:

When did UI5 become official? I don’t see an upgrade when I check. Did I miss something or is this a mistake?

About five hours ago on Micasaverde’s Facebook page (Redirecting...) this was posted:

Vera2 owners, upgrade to UI5 here - http://cp.mios.com/firmware! Enjoy

With a Foscam I have a picture, but can no longer get my pan and tilt to work. I have a picture locally, remotely and via iVera iPhone app. I had pan and tilt with UI4

I also have multiple camera files. How do you access the directory to delete them

Thanks

@osmosis, I can tell you what I did but not if it is the right thing to do! I think in generally messing around with your vera on the command line is not a good idea - especially if you are not familiar with the linux command line. But that is your call.

You will notice I didn’t actually delete the files, I just moved them to another directory is case this didn’t work out. It is probably a good idea to grab a copy of “/etc” with scp, but I think that is what the Vera backup file is anyway.

You will need an ssh client. I use putty on windows (free) or the built in ssh on osx/linux. For windows the first line will be slightly different, you will need to read the putty help.

From a command line on your mac:

username$ ssh root@<vera_ip_address>

It will ask for a password which is the one on the bottom of the vera.

On the vera:

root@MiOS_:~# cd /etc/cmh-ludl
root@MiOS_:~# mkdir tmp
root@MiOS_:~# mv D_DigitalSecurityCamera1.json.lzo tmp
root@MiOS_:~# mv D_DigitalSecurityCamera1.xml.lzo tmp
root@MiOS_:~# mv S_DigitalSecurityCameraSettings1.xml.lzo tmp
root@MiOS_:~# mv S_DigitalSecurityCameraStillImage1.xml.lzo tmp
root@MiOS_:~# mv S_PanTiltZoom1.xml.lzo tmp

Now I can’t delete the camera. I click on the trash can and it errors with command failedinvalidplugin

You might want to try changing the device so Vera doesn’t think it is a camera?

For instance, under advanced:

device_type: urn:schemas-upnp-org:device:DimmableLight:1
device_file: D_DimmableLight1.xml

no idea if that will work but it is what I would try.

I have the same problem since the upgrade :frowning:

I am responsible for updating the plugins to be compatible with UI5. I tested most of them and they should work. What issues did you find with those two plugins?

Cameras don’t require a plugin anymore, because the files have been included in the “core” MiOS files. They are in /etc/cmh-lu.

I tested this and it works, but the cameras must be on different ports. Indeed, if you have 2 cameras with the same IP and on the same port, one of the camera devices is deleted.

We will look into this.

With the pre-228 UI5 plugins seemed to be working for me (I upgraded first with the vera3 page link that someone had posted, and then again when I realized that wasn’t the official UI5 for Vera2). I didn’t test them all but I did install the google weather plugin from the app store and it worked great. I should probably mention that at the time I already had a google weather device, so I ended up with two (one old one from the app install) but they both worked.

Now the google weather App doesn’t work for me. It doesn’t create any child devices or do anything. I can’t seem to get any plugin to work. To be fair I haven’t had much time the past few days so I haven’t tried very hard.

With the mochad plugin I get pages of this in my log:

[font=courier][size=8pt]01 12/12/11 20:58:30.997 luup_io_write NULL port 0x7ec268 size 1 <0x402>
01 12/12/11 20:58:30.999 luup_io_write NULL port 0x7ec268 size 1 <0x402>
01 12/12/11 20:58:31.031 luup_io_write NULL port 0x7ec268 size 1 <0x402>
01 12/12/11 20:58:31.032 luup_io_write NULL port 0x7ec268 size 1 <0x402>
01 12/12/11 20:58:31.033 luup_io_write NULL port 0x7ec268 size 1 <0x402>[/size][/font]

It seems like my “local ipPort = 1099” is being ignored in L_Mochad1.lua?

With the Denon plugin, in the GUI:

Denon Receiver (AVR) via RS232/Ethernet [11] : Lua Engine Failed to Load

And the log:

[size=8pt][font=courier]02 12/12/11 21:09:48.788 JobHandler_LuaUPnP::StartPlugins Energy STARTED <0x400>
01 12/12/11 21:09:48.854 LuaInterface::LoadCode: [string “local socket = require(“socket”)…”]:384: ‘=’ expected near ‘SInputSelection1_InputSelection1_Input1_run’ <0x400>
01 12/12/11 21:09:49.042 Device_Interface::CreateLuaInterface 11 failed to start engine <0x400>
02 12/12/11 21:09:49.205 JobHandler_LuaUPnP::StartUPnPServices starting with /etc/cmh-ludl/ / http://192.168.1.101:49451/luaupnp.xml <0x400>
09 12/12/11 21:09:49.334 JobHandler_LuaUPnP::Run device 11 Denon Receiver (AVR) via RS232/Ethernet room 0 type urn:schemas-denon-com:device:receiver:1 id parent 0/0x7a1ae8 upnp: 0 <0x400>[/font][/size]

The “local socket = require(“socket”)” is the first line in the Denon Lua file.

After hours of not being able to remove a camera. I assigned a camera to a parent and was finally able to delete it. However I am back to square 0 as I now have no camera and it can no longer find the camera. The camera was running fine for 6 months with UI4 and now broken by the update. I have rebooted the vera, rebooted the camera. Restarted everything electronic in the house with no joy. I also have multiple copies of the same file name when I go to apps - develop LUUP files. Is there any way to remove the extra files? The only good thing is that I do not have to go to the Gym this week as I have gone up two flights of stairs, down two flights and then back up 4 flights more times than I can count. My hope that - just one more restart - would fix it never materialized. The cam is a Foscam, which was using the modified XML file for pan and tilt, all of which worked fine.

Same problem here :frowning:
I have deleted all my cameras with your tips, but now i can’t add cameras anymore :confused:

Sometimes i can see the message download plugin 7 and download plugin 188. I don’t know what plugin it is, but Vera is very slow with theses messages.

@osmosis, you are seeing two copies because there is a copy in /etc/cmh-lu and another in /etc/cmh-ludl. From what I understand if you go and “download” the files in Vera you will download the ones in /etc/cmh-ludl. Also, those are the ones that Vera is probably using now, but you want to Vera to use the ones in /etc/cmh-lu which are the official / newer copies that come with UI5. I would probably download a copy of the files through vera (as a backup) and then follow my instructions in reply #8 on this thread to remove the copy in /etc/cmh-ludl.

@cedriclocqueneux, plugin #7 is the pluggin for the Panasonic IP Camera with Pan/Tilt/Zoom (MiOS Apps) and plugin #188 is the SQ Remote iPhone (MiOS Apps).

My best guess is that these are plugins which have not yet been updated to UI5 but Vera is trying to download the UI5 updated versions? For me, with plugin #5, removing the plugin related files from /etc/cmh-ludl got rid of the message. Hopefully someone else can chime in with a solution that doesn’t involve ssh’ing into Vera?

When upgrading from UI4 to UI5 all the existing plugins are updated from apps.mios.com. But in UI5, the Generic IP Camera Plugin doesn’t exist anymore, so when MiOS tries to update it, it can’t find it, that’s why you see that error. Uninstalling the camera plugin should fix this.

Ok. But the plugin is not in the installed apps list, so how can we uninstall it ? It seems that the only solution is to delete some files with ssh connection, but what files ?

Use this code to delete the camera files. Go to Apps >> Develop Apps >> Test Luup Code (Lua) and run the code.

local PATH = "/etc/cmh-ludl/"
local FILES = { "S_DigitalSecurityCameraSettings1.xml.lzo", "S_DigitalSecurityCameraStillImage1.xml.lzo", "S_PanTiltZoom1.xml.lzo",
                "D_DigitalSecurityCamera1.json.lzo", "D_DigitalSecurityCamera1.xml.lzo", "I_PanasonicPTZ.xml.lzo" }

for i, fileName in ipairs(FILES) do
    local file = PATH..fileName
    os.execute("rm "..file)
    luup.log("Deleted '"..file.."' (file "..i.."/"..#FILES..").")
end