Bug Report on V2.1

Just encountered a bug which is that whenever one enters a polling map, and later decides to not use the polling map by leaving it blank, the “polling map” field turns into “undefined” upon exit and refresh of the page and the app stops polling iCloud altogether. I had to delete and reinstall the device from the app page to make it work again.

The other bug I posted elsewhere is also the the iCloud password does not get recognized if one uses a strong password which includes non alphabetical characters. iCloud accepts them, just not the app.

[quote=“anhman, post:1, topic:186810”]Just encountered a bug which is that whenever one enters a polling map, and later decides to not use the polling map by leaving it blank, the “polling map” field turns into “undefined” upon exit and refresh of the page and the app stops polling iCloud altogether. I had to delete and reinstall the device from the app page to make it work again.

The other bug I posted elsewhere is also the the iCloud password does not get recognized if one uses a strong password which includes non alphabetical characters. iCloud accepts them, just not the app.[/quote]

Thank you anhman , can you help me with a precise list of steps you follow to replicate that first bug, I need to replicate this and fix it

The second one, I know but I never found a way to make it work, seems the web services and the non alpha characters either in Phone name or user name / pwd are not working together , however I try to escape the characters…

[quote=“amg0, post:2, topic:186810”][quote=“anhman, post:1, topic:186810”]Just encountered a bug which is that whenever one enters a polling map, and later decides to not use the polling map by leaving it blank, the “polling map” field turns into “undefined” upon exit and refresh of the page and the app stops polling iCloud altogether. I had to delete and reinstall the device from the app page to make it work again.

The other bug I posted elsewhere is also the the iCloud password does not get recognized if one uses a strong password which includes non alphabetical characters. iCloud accepts them, just not the app.[/quote]

The second one, I know but I never found a way to make it work, seems the web services and the non alpha characters either in Phone name or user name / pwd are not working together , however I try to escape the characters…[/quote]

Bug REPRODUCED ! very stange. in fact this is a vera bug I suppose, I have confirmed that the plugin is calling the HTTP VERA API to set the variable “PollingMap” to “” as expected. The only strange thing the plugin does is to call this twice almost simultaneously and this is what I ll try to fix, but the end-result which is really a VERA bug is that it actually deletes the “PollingMap” Variable from the plugin. You can see that when you have the “undefined” showing up in the polling map and you try to go to the advanced Variable screen of UI7 you will not find the “PollingMap” variable anymore. That is absolutely not expected behavior as there is in fact no documented API to remove a variable from a plugin in any cases

to restore it, you do not have to uninstall/reinstall the pluging, I have confirmed that a single reload of the Luup engine is enough, just let it the time to reload then refresh the browser cache , and the “PollingMap” is there; the pluging code, at initialization time garantees that a missing variable is recreated with a default value so this what happens and after the restart you are back in business.

I will anyhow try to find a fix for this

[quote=“amg0, post:3, topic:186810”][quote=“amg0, post:2, topic:186810”][quote=“anhman, post:1, topic:186810”]Just encountered a bug which is that whenever one enters a polling map, and later decides to not use the polling map by leaving it blank, the “polling map” field turns into “undefined” upon exit and refresh of the page and the app stops polling iCloud altogether. I had to delete and reinstall the device from the app page to make it work again.

The other bug I posted elsewhere is also the the iCloud password does not get recognized if one uses a strong password which includes non alphabetical characters. iCloud accepts them, just not the app.[/quote]

The second one, I know but I never found a way to make it work, seems the web services and the non alpha characters either in Phone name or user name / pwd are not working together , however I try to escape the characters…[/quote]

Bug REPRODUCED ! very stange. in fact this is a vera bug I suppose, I have confirmed that the plugin is calling the HTTP VERA API to set the variable “PollingMap” to “” as expected. The only strange thing the plugin does is to call this twice almost simultaneously and this is what I ll try to fix, but the end-result which is really a VERA bug is that it actually deletes the “PollingMap” Variable from the plugin. You can see that when you have the “undefined” showing up in the polling map and you try to go to the advanced Variable screen of UI7 you will not find the “PollingMap” variable anymore. That is absolutely not expected behavior as there is in fact no documented API to remove a variable from a plugin in any cases

to restore it, you do not have to uninstall/reinstall the pluging, I have confirmed that a single reload of the Luup engine is enough, just let it the time to reload then refresh the browser cache , and the “PollingMap” is there; the pluging code, at initialization time garantees that a missing variable is recreated with a default value so this what happens and after the restart you are back in business.

I will anyhow try to find a fix for this[/quote]

Worse, I can now reproduce the issue just using UI7 , no javascript setting tab, not special code. Just following these steps (pdf attached ).
a LUA reload fixes the problem but still this is very cumbersome and I have not found a workaround yet. even a single space is not enough to prevent the variable from being removed.

[quote=“amg0, post:4, topic:186810”]Worse, I can now reproduce the issue just using UI7 , no javascript setting tab, not special code. Just following these steps (pdf attached ).
a LUA reload fixes the problem but still this is very cumbersome and I have not found a workaround yet. even a single space is not enough to prevent the variable from being removed.[/quote]

I raised the issue to VERA but in the mean time , that 2.2 beta version should avoid the problem ( with an ugly but effective workaround )
you can install by opening this URL in your browser and ignoring any error message, ( just give it time to download/install and reload LUUP then refresh your browser cache )
http://<your_ip_address>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=4686&Version=27062

Sorry I must not have been up while you were posting these. It is great that you figured these out though. It does seem like a Vera UI bug.

Thanks for the great work!

amg0,

I have another one for you and it might also be more of a vera bug but I encounter it only when I have the iPhone locator installed:
Whenever I try to create a user association on a completely unrelated device, the luup engine reloads as soon as I tick the checkmark.
The problem is that during the process, all of a sudden all of the virtual devices (like the 3 extra sensors of the 4 in 1 Aeon sensor or devices created by other apps like system monitor) all go through two crash:

  1. They lose their room assignment at their first crash and I see “iPhonelocator: no device in iCloud account” (something like that)
  2. They completely disappear after the second reload of the lump engine and I see at the top in blue then “iphonelocator: Resetting Zwave network”
    Luckily it does not completely reset the network, it just wipes out all the virtual devices.

So now before I set associations, I have to remove the iPhone Locator device, run my association steps and install the iPhone locator device back. It resolves the problem.
Would you know why the app would want to reset the Zwave network? It seems like it is the steps which wipes out all the virtual devices. It is quite annoying but luckily I use backups…

[quote=“anhman, post:7, topic:186810”]amg0,

I have another one for you and it might also be more of a vera bug but I encounter it only when I have the iPhone locator installed:
Whenever I try to create a user association on a completely unrelated device, the luup engine reloads as soon as I tick the checkmark.
The problem is that during the process, all of a sudden all of the virtual devices (like the 3 extra sensors of the 4 in 1 Aeon sensor or devices created by other apps like system monitor) all go through two crash:

  1. They lose their room assignment at their first crash and I see “iPhonelocator: no device in iCloud account” (something like that)
  2. They completely disappear after the second reload of the lump engine and I see at the top in blue then “iphonelocator: Resetting Zwave network”
    Luckily it does not completely reset the network, it just wipes out all the virtual devices.

So now before I set associations, I have to remove the iPhone Locator device, run my association steps and install the iPhone locator device back. It resolves the problem.
Would you know why the app would want to reset the Zwave network? It seems like it is the steps which wipes out all the virtual devices. It is quite annoying but luckily I use backups…[/quote]

I can guarantee you that iPhone locator is not touching anything about zwave nor is it trying to reset it at any point. All it does is to create child devices if you configured more than one iDevice per iCloud account, and in that case , and only if a change was made, it may trigger a reload of luup because this is how Vera works when you add child devices. Do you have more than one iDevice monitored for one given iCloud account ? If so you could try to have only one to see if that happens again. Maybe setting the association triggers the luup reload but I can’t see how it could have some side effects on iPhone locator. You should try deal with Vera support for this one and analyze the logs. You are on which version of UK firmware?

It doesn’t make much sense I know but I tried it again and it does it every time.
I only have one device monitored. iPhone Locator is not what is causing the Luup reload, changing or setting device associations does it. The only odd thing is during the reload of the Luup it resets or wipes out a lot of things which I don’t understand. The message from the vera always starts with “iPhone Locator: no device configured” followed by “iPhone Locator: no device on iCloud account” and then “iPhone Locator:resetting Zwave network”. I think it does at least 3 Luup reload in the process with the last one wiping out all of the virtual devices.
I am seriously suspecting a bug the UI7 (I run 1.7.541 on my veralite). I did the same thing with the iPhone Locator device removed and it doesn’t reset the Zwave network. At least I found a work around.

PS: Just upgraded to 2.3. Thanks for the release!

The thing that puzzles me most is that " no device on iCloud account" is one of my messages, but nowhere do I ever write “resetting Zwave network” in my code so I can only suspect this resetting Zwave network is happening at a time where iPhoneLocator thread is active ( busy restarting or calling iCloud or whatever ).
but this is indeed a very strange behavior which I cannot explain right now. will give it some more thoughts…

[quote=“amg0, post:5, topic:186810”][quote=“amg0, post:4, topic:186810”]Worse, I can now reproduce the issue just using UI7 , no javascript setting tab, not special code. Just following these steps (pdf attached ).
a LUA reload fixes the problem but still this is very cumbersome and I have not found a workaround yet. even a single space is not enough to prevent the variable from being removed.[/quote]

I raised the issue to VERA but in the mean time , that 2.2 beta version should avoid the problem ( with an ugly but effective workaround )
you can install by opening this URL in your browser and ignoring any error message, ( just give it time to download/install and reload LUUP then refresh your browser cache )
http://<your_ip_address>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=4686&Version=27062
[/quote]

I got the answer from VERA, apparently it is a known issue since UI4 UI5. if you set an empty value to a variable ( but it seems to be dependant on the fact the variable is the last one on the device ) , then it will remove the variable from the device.

It is really weird:

[ul][li]http:///port_3480/data_request?id=lu_variableset&DeviceNum=nnn&serviceId=urn%3Aupnp-org%3AserviceId%3AIPhoneLocator1&Variable=PollingMap&Value= will delete the variable [/li]
[li]http:///port_3480/data_request?id=lu_variableset&DeviceNum=nnn&serviceId=urn%3Aupnp-org%3AserviceId%3AIPhoneLocator1&Variable=PollingMap&Value=_ will restore it to a simple ‘_’ value which is my workaround. the javascript Settings tab will not display the _ so that user does not really see this, but in the advance variable list, you will find a _ in the PollingMap variable.[/li][/ul]

so the workaround I have implemented in V2.3 ( on the store MiOS Apps ) will remain
I have seen other plugin ( like the DayNight one ) impacted as well by this. I was losing the DayOffset variable.
I reproduced this issue on the latest UI7.0.6

Thanks! I have installed both 2.3 and 7.0.6.
Glad that the workaround works.
I learned something today!