Securing and stabilizing the Vera by taking it off the grid

It depends on the drift. I think the vera gets an ntp updates every few minutes already. I have been reading up on ntp and the drifts different machines have and how the different ntp services handle it. If you read some of my older posts, I found that the vera uses two recurring ntp services for long term updates and a third one at boot up which I cleaned up with my mod scripts. I am being a bit anal at the moment and am running testing on my simulator for which the system time is being handled by ubuntu 18.04.2 with a very fancy ntpd service. The more recent ntpd uses a complex algorithm to adjust drift instead of straight updating the time. It makes minor corrections every time it runs and I just set mine up to run once a minute so that the correction never hits 1s. I had chosen on my veramods to keep ntpclient instead of ntpd and I may change this based on what I just learned.

https://openwrt.org/docs/guide-user/services/ntp/client-server

I am trying to validate on my simulator first before deciding if I want to port it to the vera.

Oh yes it’s adjusttime vs settime (from ollllld memory). But if it’s getting an update every few minutes there’s no way in hell it should get out by a second. Ever.

C

That’s the theory yes… but in practice… I don’t know. The vera is special that way and this is just a hunch I want to make sure I eliminate this possibility.

1 Like

Well I have now proof that this is happening. Just got an exit code 0 tonight and the log shows this

01 06/23/19 23:59:05.266 e[31;1mAlarmManager::Run callback for alarm 0x8faee0 entry 0x1408b28 type 15 id 57768 param=(nil) entry->when: 1561359209 time: 1561359545 tnum: 1 slow 0 tardy 336e[0m <0x7ed80520>
03 06/23/19 23:59:05.267 JobHandler_LuaUPnP::Reload: TimeJump Critical 1 m_bCriticalOnly 0 dirty data 1 running 1 <0x7ed80520>

That’s over 5 minutes (assuming that’s epoch time stamp) . Barking

I forget did you ever set a cron to sync it to ntpd?

C

Obviously the system time is not off by 5min and verified this. This is due to the Alarm manager getting stuck it seems… I am still investigating

There are so many traps that reload the Luup engine that it’s very tricky to get them all. I managed to have from 2 days to 15 without reloads with no apparent differences. Memory seems to be better, so there are scripts somewhere reloading the engine under specific circumstances.

Indeed and I have scrubbed all the shell script in the firmware already to eliminate all of them (part of the veramods). The only ones left are within the luup engine itself and I am after this alarm thingy causing a time jump at the moment. I too have observed great variation with my record nearing 20 days. Hopefully 7.0.30 will fix more of these.

1 Like

Updating script in first post to correct a typo in the script.

Waking an old thread as I’m struggling with log uploads again.

I can’t for the life of me work out how I fixed it from this thread, but symptoms are that /etc/cmh/servers.conf has its log server entry owverwritten

/etc/hosts has a hard coded ip for that to my LAN FTP server:
192.168.70.250 oem-log3.mios.com

192.168.70.250 oem-log4.mios.com

ping oem-log3.mios.com
64 bytes from oem-log3.mios.com (192.168.70.250): icmp_req=1 ttl=64 time=0.381 ms

Using an ftp client I can log on to that ip with the user and pass in the servers.conf but…

Failed to upload file: /var/log/cmh/Init-NetworkMonitor.log_2019-12-01_18-09-11.gz

Failed to upload file: /var/log/cmh/InternetOk.log_2019-12-01_18-09-11.gz

Failed to upload file: /var/log/cmh/LuaUPnP.log_2019-12-01_18-09-11.gz

etc etc

Help?

C

Let me get this straight… are you trying to get the vera to upload these logs to another server?
Or are you trying to use the built in backup function to download your logs from a local server? Or are you uploading your log files to the mios servers? From your description, it sounds like the latter. I am not using the mios server and have disconnected from it a while ago (it was the point of this thread) but I am confused by your LAN ftp servers having a mios server address.

Sorry chap.
Trying to make Vera upload my logs to my personal FTP on site. This was the state before I upgraded to 7.30

The reason the Mios servers resolve to a local IP is that one of the fixes discussed was to edit /etc/hosts
Needed because somehow the host name (but not the user / pass) in servers.conf keeps getting overwritten…

Cheers

Fixed it I think. Nothing to do with DNS, but rather the limitations of the FTP server and its root folder. The issue is in /usr/bin/Rotate_Logs.sh:

curl -s -S -f --connect-timeout $CON_TIME --max-time $MAX_TIME -u “$ftpUser:$ftpPass” -T “$upLog” “ftp://$ftpServer/${pkap}/${pkap}_$(echo $upLog | awk -F ‘/’ ‘{print $NF }’)” 1>>$log_file 2>&1

I have to alter this to a path that makes sense…
C

Ahh… I see now. Thanks for clarifying. I am not sure this thread ever addressed FTP though so this is what got me confused. Good that you got it figured out.

The log upload is FTP. Let’s not go there!

C

@rafale77 I just upgraded to Firmware v.7.0.31 and followed your instructions to set up extroot again. I’ve been using Home Assistant in Docker on a Synology for a year to control zwave devices via the vera plus, and now i’m wondering how best to take the vera off the grid after the upgrade. Do these mods still work, or is there a better way? I see you have Nuke-Vera now, and I’m wondering if that might be the right path to turn the vera plus into a simple bridge for HA to use. Thanks so much for your efforts, and if you can point to me to any instructions, I’d be very grateful. All the best! Many thanks to you!

Sadly, @rafele77 got kicked off the Forum thus can no longer reply. He was our #1 contributor, so I hope someone equally knowledgeable and helpful can step up to fill his shoes! :frowning:

Dang @LibraSun that’s unfortunate. During “stay at home” orders, I decided to revisit my Vera/ HA configs for upgrades, and I may have ultimately “fixed something that wasn’t really broken”. I spent a couple of hours reading this forum, trying to catch up with all the changes in the last year, and it’s a lot to read (for sure). If anyone here can point me to instructions for running the Vera Plus off-grid, I’ll be eternally grateful. All the best.

1 Like

If you just use the zwave part, just block your Vera from accessing the internet using your firewall. This will work the same way.

Wait, what? How did @rafele77 get kicked off for spam? I have never seen a post with anything other than a fully reasoned and topical comment.

This site is now about 15% less useful and informative.

3 Likes

Thats insane hes one of the 3 best people here. Sorin must go.

2 Likes

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules