Author Topic: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19  (Read 6216 times)

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10070
  • Karma: +761/-141
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #15 on: January 02, 2017, 01:15:49 pm »
this appears to be yet another Vera bug.
It seems you might need to encode things even if they do not need to be encoded.

You can force Vera Alerts to modify everything by going to settings ... then disable Notifications  ... exit ...
Then open again and enable notifications.

Offline Spanners

  • Full Member
  • ***
  • Posts: 248
  • Karma: +15/-5
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #16 on: January 02, 2017, 04:13:56 pm »
this appears to be yet another Vera bug.
It seems you might need to encode things even if they do not need to be encoded.

You can force Vera Alerts to modify everything by going to settings ... then disable Notifications  ... exit ...
Then open again and enable notifications.

Bingo!

Doing this cleared the saving configuration error and I was able to make changes to scenes, associations etc. if I made changes to a message override I had to repeat it, I guess veraalerts is still selectively encoding on single modification?

Any chance of a hotfix JS file with always encode set to validate the Vera bug?


Edit: can only create or modify scenes if they don't have a notification. Presumably due to selective encoding again.
« Last Edit: January 02, 2017, 04:34:57 pm by Spanners »

Offline Rodger3876

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #17 on: January 03, 2017, 07:06:42 pm »
Tried this process. It toke 4 tries to get Process Notification to uncheck? Now I can not get it to go back On? Frustrated & will wait and see what things look like in the Morn.

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10070
  • Karma: +761/-141
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #18 on: January 04, 2017, 06:40:39 am »
If you have any other scenes with LUA in them ... that are not part of a Notification ... then there is still a MCV bug.

The latest change to the Vera Scene API created a chicken and egg problem.
Vera works with scenes that had LUA that are PRE-API change.
However if you have any scene with LUA (And notifications are hidden scenes) than if you try to modify ANY scene  (Regular scene or standard scene) you have to modify ALL the scenes to use the new API .

Well my workaround only fixes the notification scenes. It forces all notification scenes to be converted to the new API in one shot. It does not fix NON notification scenes.

Vera is going to have to release a FIX for those that try to save data when you have scenes with LUA.
You may be able to fix this as follows:
1) Start with the lowest scene.
2) Edit any scene that has LUA. 
     Make a simple change to the LUA like add a space character somewhere ...
3)  Save the scene .. you will get an error.
4)  Keep doing this until you edit all of your scenes.

DO NOT refresh your browser during this time.


Offline Spanners

  • Full Member
  • ***
  • Posts: 248
  • Karma: +15/-5
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #19 on: January 04, 2017, 07:23:34 am »
Or put a notification on every scene and let VeraAlerts update them all.

This worked for me. :)

Offline Aaron

  • Hero Member
  • *****
  • Posts: 1985
  • Karma: +61/-193
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #20 on: January 04, 2017, 11:19:59 am »
If you have any other scenes with LUA in them ... that are not part of a Notification ... then there is still a MCV bug.

The latest change to the Vera Scene API created a chicken and egg problem.
Vera works with scenes that had LUA that are PRE-API change.
However if you have any scene with LUA (And notifications are hidden scenes) than if you try to modify ANY scene  (Regular scene or standard scene) you have to modify ALL the scenes to use the new API .

Well my workaround only fixes the notification scenes. It forces all notification scenes to be converted to the new API in one shot. It does not fix NON notification scenes.

Vera is going to have to release a FIX for those that try to save data when you have scenes with LUA.
You may be able to fix this as follows:
1) Start with the lowest scene.
2) Edit any scene that has LUA. 
     Make a simple change to the LUA like add a space character somewhere ...
3)  Save the scene .. you will get an error.
4)  Keep doing this until you edit all of your scenes.

DO NOT refresh your browser during this time.
Could this api problem be causing my LUA startup errors? I get them now and I never did on UI5. Log error says there is no 'end', on every one...  As I remove the code from the lowest to highest. Haven't done them all yet.

I may look at if there is a way to use PLEG to avoid Lua startup code in any of the scenes. I  basically have the scene check my custom PLEG scenes (which is tracked by multi switches) and if in certain modes, like vacation mode, the scene doesn't trigger.

Maybe I should have PLEG do the checks and simply disable the native vera scene instead?

Sent from my SM-G935T using Tapatalk


Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10070
  • Karma: +761/-141
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #21 on: January 04, 2017, 12:18:23 pm »
@Spanners

Great idea ... never thought of that ...

Offline Aaron

  • Hero Member
  • *****
  • Posts: 1985
  • Karma: +61/-193
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #22 on: January 04, 2017, 03:11:39 pm »
Figured it out
« Last Edit: January 05, 2017, 09:35:36 pm by Aaron »

Offline Rodger3876

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #23 on: January 05, 2017, 09:04:35 pm »
I put Notifications in all my Scenes, It took several attempts but got it done. I still had problems making changes to Vera Alerts? After Letting it sit over nite (24hrs) Every thing seems to be OK Tonight. I have been able to make changes & they hold & system has smoothed out. Thanks

Offline dklinkman

  • Full Member
  • ***
  • Posts: 129
  • Karma: +1/-0
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #24 on: January 08, 2017, 10:02:06 pm »
This seems the most relevant thread for my problem.  Hope so.  Late Nov / Dec I started having problems with VeraAlerts on my main Vera 3.  Usually I could open the configuration and save and it would start working again.  Come Jan it isn't working at all.  In the process of forcing a firmware upgrade at MCV request I hosed my system.  Still working that out.

So I switched to my backup Vera 3.  Very simple config.  Just one Z-Wave device (a switch) and some virtual devices.  Firmware 1.7.902, VeraAlerts 7.21.  No scenes, no startup Lua.  One device like I said.

Within AltUI I added a notification to the switch to notify when switched on.  In the notification I selected my id to be notified (vs default).  So far so good.

Under VeraAlerts clicked edit.  Checked all the settings.  Made a simple message override for the notification.  The report is attached to this post.

I tested and verified that alerts are working when initiated manually.  But the alert from the notification is never sent.  This is what I was seeing on the other Vera also where I have 90+ alerts configured.

I also notice that when I go into the edit message overrides, it will often say '1 device notification updated'.  Even when there were no updates.  In fact there have been no updates since I created that single notification.  I saw this behavior on the other Vera also.  When I close and then reopen the edit, that message is gone.  But not long after it is back.  I've tried the various remedies suggest in this thread bit no change.  I've restarted Vera more than once to make sure I am not hitting the 20 message limit (on this Vera, the other one is licensed).

So I'm happy I've been able to replicate the problem in a simple environment.  But I'm stuck.  I've turned on verbose logging and thankfully there's not much going on in this Vera but even so I'm not seeing any standout errors.  But I don't know what to look for,

Hopefully Richard or someone can offer suggestions for what to look for or what to do to fix.

Thanks   --David
VeraPlus, UI7, ALTUI on Chrome, Lots of devices and plugins including MQTT and MySensors.  Also playing around with openLuup

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10070
  • Karma: +761/-141
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #25 on: January 09, 2017, 06:22:12 am »
Do you have any LUA or Startup LUA in scenes ?

Offline dklinkman

  • Full Member
  • ***
  • Posts: 129
  • Karma: +1/-0
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #26 on: January 09, 2017, 06:30:22 pm »
None.  I was careful to verify that on the original unit also.  On the second unit I am running with just a single switch and notification, and no scenes, and I verified no startup Lua.

Attached below is the configuration of the entire Vera.  The PLEG is unconfigured as is the PLTS.
VeraPlus, UI7, ALTUI on Chrome, Lots of devices and plugins including MQTT and MySensors.  Also playing around with openLuup

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10070
  • Karma: +761/-141
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #27 on: January 09, 2017, 07:13:42 pm »
Did you try:

1) In Vera Alerts Settings, Disable Notifications
2) Reload Vera ...  Refresh Browser
3) Enable Notifications
4) Reload Vera ... Refresh Browser
5) Go into Vera Alert Settings ... do you seen any updates needed ?

Offline dklinkman

  • Full Member
  • ***
  • Posts: 129
  • Karma: +1/-0
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #28 on: January 09, 2017, 07:15:26 pm »
Yes did that.  Update message goes away.  But then comes back after a bit.

I will try it again now using your exact sequence.
VeraPlus, UI7, ALTUI on Chrome, Lots of devices and plugins including MQTT and MySensors.  Also playing around with openLuup

Offline dklinkman

  • Full Member
  • ***
  • Posts: 129
  • Karma: +1/-0
Re: UI7 - Saving Vera Alerts Configuration Prior to UI 7.19
« Reply #29 on: January 09, 2017, 07:22:31 pm »
Ok, haven't noticed this before.  I went back to UI7 to try your sequence just have AltUI out of the picture.  I usually work in AltUI when possible.

When I click the Edit tab under VeraAlerts I get the following error message on the screen.  Screenshot below also.

Code: [Select]
Error executing function vaInit(): Cannot read property 'Init' of undefined
Under AltUI the edit panel appears and I can alter settings just fine.  Though that update message does come back.
VeraPlus, UI7, ALTUI on Chrome, Lots of devices and plugins including MQTT and MySensors.  Also playing around with openLuup