Author Topic: Bug Report on V2.1  (Read 3135 times)

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1247
  • Karma: +62/-23
Bug Report on V2.1
« on: April 08, 2015, 09:58:51 am »
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.
« Last Edit: April 08, 2015, 10:01:11 am by anhman »
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3027
  • Karma: +204/-8
Re: Bug Report on V2.1
« Reply #1 on: April 10, 2015, 05:10:01 am »
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.

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...

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3027
  • Karma: +204/-8
Re: Bug Report on V2.1
« Reply #2 on: April 10, 2015, 09:33:57 am »
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.

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...

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

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3027
  • Karma: +204/-8
Re: Bug Report on V2.1
« Reply #3 on: April 10, 2015, 11:37:27 am »
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.

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...

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

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.




Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3027
  • Karma: +204/-8
Re: Bug Report on V2.1
« Reply #4 on: April 10, 2015, 01:27:42 pm »
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.

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
« Last Edit: April 10, 2015, 01:37:14 pm by amg0 »

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1247
  • Karma: +62/-23
Re: Bug Report on V2.1
« Reply #5 on: April 11, 2015, 11:19:08 am »
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!
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1247
  • Karma: +62/-23
Re: Bug Report on V2.1
« Reply #6 on: April 12, 2015, 12:48:48 am »
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...
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3027
  • Karma: +204/-8
Re: Bug Report on V2.1
« Reply #7 on: April 12, 2015, 02:05:11 am »
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...

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?



Offline rafale77

  • Hero Member
  • *****
  • Posts: 1247
  • Karma: +62/-23
Re: Bug Report on V2.1
« Reply #8 on: April 14, 2015, 01:19:35 am »
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!
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3027
  • Karma: +204/-8
Re: Bug Report on V2.1
« Reply #9 on: April 14, 2015, 02:05:59 am »
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...

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3027
  • Karma: +204/-8
Re: Bug Report on V2.1
« Reply #10 on: April 15, 2015, 12:08:05 pm »
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.

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


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:
  • http://<yourip>/port_3480/data_request?id=lu_variableset&DeviceNum=nnn&serviceId=urn%3Aupnp-org%3AserviceId%3AIPhoneLocator1&Variable=PollingMap&Value=    will delete the variable
  • http://<yourip>/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.

so the workaround I have implemented in V2.3 ( on the store http://apps.mios.com/plugin.php?id=4686 ) 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



Offline rafale77

  • Hero Member
  • *****
  • Posts: 1247
  • Karma: +62/-23
Re: Bug Report on V2.1
« Reply #11 on: April 15, 2015, 06:49:41 pm »
Thanks! I have installed both 2.3 and 7.0.6.
Glad that the workaround works.
I learned something today!

openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!