UI7 - Saving Vera Alerts Configuration Prior to UI 7.19

[quote=“RichardTSchaefer”]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.[/quote]
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

@Spanners

Great idea … never thought of that …

Figured it out

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

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

Do you have any LUA or Startup LUA in scenes ?

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.

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 ?

Yes did that. Update message goes away. But then comes back after a bit.

I will try it again now using your exact sequence.

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.

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.

Something is messed up in your configuration …

Login via ssh
cd /etc/cmh-ludl
rm -i VeraAlert

Reboot (power cycle) your vera.
If it does not reload the Plugin files … Update the plugin manually.

I did as you suggested including rebooting the vera.

It looks like the plugin reloaded just fine. But the same error persists as before.

I see in the logs that apparently user data format changed leading to the current firmware version. Could that be a factor?

I’m still stuck here with no functioning VeraAlerts. Main vera is still hosed though MCV is trying to fix that. Months of backups and none of them work.

I do not know what to say … other than to remove all scenes (and startup LUA) and notifications … and start over.

Ok… Except… Am I talking to the wall?.. I have no scenes, no startup Lua… ONE z-device and ONE notification that I have added and removed at least a few times. Does the use case get any simpler? What am I looking for?

I would try to troubleshoot your code except that you encrypted it.

What?

Turn on debug … reload … and do a send alert from the editor … check the log file …

I’m back to being stuck.

Don’t get notifications updated when I go into VeraAlerts, but if I try to edit one I get the “Failed to save system configuration.” error on exit and sometimes a “Failed to save msgoverride” pop up in the VeraAlerts editor.

Disabling/Enabling notifications doesn’t resolve it.

Do you have other scenes with LUA code or startup LUA ?

Yes, but all the scenes are set up with VeraAlerts notifications so they should be getting encoded properly. I have 2 lines in startup LUA.

emoncode = require("EnergyMonitor")
emoncode.EnergyMonitorOnTimer()

You may have to remove the startup lua … let Vera alerts upgrade the scenes … then add the startup lua back later.

MCV software will only update one thing at a time … and fail if there are any other that are not updated.
Also Vera has the option for Scene Level LUA and Trigger Level LUA … the Vera Alerts will only only update the Scene Level Lua code.
So it may not work for you and you may need to wait for a MCV fix.