Using a Vera Edge as a network-attached zwave device (skipping the vera software)

  1. Keep Vera as a “tcp dongle” with ser2net + socat or similar approach. This approach makes me worry from the network stability standpoint.

Any reason why you are worried? Which network are you talking about? The zwave network or the IP network? In any case, I don’t see it as being possibly the main source of problems. I ran this way for quite some time but eventually did something similar to your solution 2 because of how bricking prone the vera is. The only difference is that I did a network clone (backup and restore) from the vera to a usb dongle instead of a controller shift.

Any reason why you are worried? Which network are you talking about?

I’m talking about IP network. Not sure about the way ZWave JS is communicating with dongle. But it seems that it establishes a connection at startup and expects that the connection will be persistent. So that if the connection between Vera and JS server breaks for any reason, the only way to recover is to reboot JS server. This is doable as JS has a health check URI, but still unreliable as it could happen at the inappropriate moment.

I tried to keep Vera and ZWave JS running for a while and found that JS server goes to “Driver: read ETIMEDOUT” error after a random period of time.

The only difference is that I did a network clone (backup and restore) from the vera to a usb dongle instead of a controller shift.

This is a big difference I assume. I saw your post about that somewhere on the net. Unfortunately, I’ve “luckily” bought SiLabs UZB-7 dongle which has UART chip unsupported by Vera’s kernel, and NVE backup/restore through Z Wave PC Controller also doesn’t work (btw not sure this is a bulletproof method as NVE seems to contains z-wave calibration settings).

I’m using zwavejs2mqtt addon with usb stick, i have 2 vera’s at home but i think that you can’t use ser2net on home assistant os or i don’t know how to do it :slight_smile: if somebody found a way help is appreciated.

Sometimes i take out the usb stick from my nuc to pair faster some devices and when i plug it back in it resumes normal operation so you should not have a problem if it loses IP connection and reconect it should resume normal operation.

if somebody found a way help is appreciated.

You can set tcp socket directly at serial port configuration of zwave js. Just go to Settings > Zwave and put tcp://xxx.xxx.xxx.xxx:yyyy into Serial Port field. If you are using zwave js docker setup you also need to set up a port forwarding settings (“-p” option) when starting container.

Unfortunately, I can’t say it is stable configuration. As I mentioned before, zwave js brings me an error saying the driver is timed out sometimes and it doesn’t recover the connection by itself.

I saw that someone has already publish some changes regarding this at git repository. Looks like this changes are not build into official container.

thanks on the info, i will try it.

BTW, I found out that this is not an IP network issue. Disconnections caused by Vera reboots freequently after applying rafale77’s nuke patch.

@rafale77, @quasar66, can you tell me how to debug what causes this reboots? What logs do I have to look at to find the possible reasons?

That makes more sense. I suspect that ezlo has added some scripts which are running in the background in newer firmwares. As per their usual selves, they love love love rebooting stuff as a solution to everything. Can you SSH into your vera and run a >ps aux and post the output of it?

I ran mine under that script for 6 months without a reboot but this was a long time ago. I have since migrated to z-way… and gave away my veras…

@rafale77 thank you for your reply.

It rebootes exactly every 20 minutes, so there is some kind of watchdog for sure.

Here is my ps output:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  2.1  0.2   1440   664 ?        Ss   20:02   0:03 /sbin/procd
root         2  0.0  0.0      0     0 ?        S    20:02   0:00 [kthreadd]
root         3  0.1  0.0      0     0 ?        S    20:02   0:00 [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S    20:02   0:00 [kworker/0:0]
root         5  0.0  0.0      0     0 ?        S<   20:02   0:00 [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        S    20:02   0:00 [kworker/u4:0]
root         7  2.0  0.0      0     0 ?        S    20:02   0:03 [migration/0]
root         8  0.0  0.0      0     0 ?        S    20:02   0:00 [rcu_bh]
root         9  0.8  0.0      0     0 ?        S    20:02   0:01 [rcu_sched]
root        10  0.1  0.0      0     0 ?        S    20:02   0:00 [watchdog/0]
root        11  0.3  0.0      0     0 ?        S    20:02   0:00 [watchdog/1]
root        12  0.4  0.0      0     0 ?        S    20:02   0:00 [migration/1]
root        13  0.1  0.0      0     0 ?        S    20:02   0:00 [ksoftirqd/1]
root        14  0.0  0.0      0     0 ?        S    20:02   0:00 [kworker/1:0]
root        15  0.0  0.0      0     0 ?        S<   20:02   0:00 [kworker/1:0H]
root        16  0.0  0.0      0     0 ?        S<   20:02   0:00 [khelper]
root        17  0.0  0.0      0     0 ?        S    20:02   0:00 [kworker/u4:1]
root        95  0.0  0.0      0     0 ?        S<   20:02   0:00 [writeback]
root        97  0.0  0.0      0     0 ?        S<   20:02   0:00 [bioset]
root        99  0.0  0.0      0     0 ?        S<   20:02   0:00 [kblockd]
root       107  0.1  0.0      0     0 ?        S    20:02   0:00 [khubd]
root       117  0.7  0.0      0     0 ?        S    20:02   0:01 [kworker/1:1]
root       136  1.7  0.0      0     0 ?        S    20:02   0:02 [kworker/0:1]
root       141  0.0  0.0      0     0 ?        S    20:02   0:00 [khungtaskd]
root       142  0.0  0.0      0     0 ?        S    20:02   0:00 [kswapd0]
root       143  0.0  0.0      0     0 ?        SN   20:02   0:00 [ksmd]
root       144  0.0  0.0      0     0 ?        S    20:02   0:00 [fsnotify_mark]
root       145  0.0  0.0      0     0 ?        S<   20:02   0:00 [cifsiod]
root       146  0.0  0.0      0     0 ?        S<   20:02   0:00 [crypto]
root       267  0.0  0.0      0     0 ?        S<   20:02   0:00 [krfcommd]
root       271  0.0  0.0      0     0 ?        S<   20:02   0:00 [deferwq]
root       283  0.0  0.0      0     0 ?        S    20:02   0:00 [jfsIO]
root       284  0.0  0.0      0     0 ?        S    20:02   0:00 [jfsCommit]
root       285  0.0  0.0      0     0 ?        S    20:02   0:00 [jfsCommit]
root       286  0.0  0.0      0     0 ?        S    20:02   0:00 [jfsSync]
root       306  0.0  0.0      0     0 ?        S<   20:02   0:00 [kworker/1:1H]
root       347  2.6  0.0      0     0 ?        SN   20:02   0:03 [jffs2_gcd_mtd7]
root       491  0.0  0.0    896    88 ?        S    20:02   0:00 /sbin/ubusd
root       600  0.0  0.0    768    76 ttyS1    Ss+  20:02   0:00 /sbin/askfirst /bin/ash --login
root      1155  0.0  0.0      0     0 ?        S<   20:02   0:00 [rpciod]
root      1195  0.0  0.0      0     0 ?        S<   20:02   0:00 [nfsiod]
root      1253  0.0  0.0      0     0 ?        S<   20:02   0:00 [kworker/u5:0]
root      1254  0.0  0.0      0     0 ?        S<   20:02   0:00 [hci0]
root      1255  0.0  0.0      0     0 ?        S<   20:02   0:00 [hci0]
root      1258  0.0  0.0      0     0 ?        S<   20:02   0:00 [kworker/u5:1]
root      1435  9.3  0.0      0     0 ?        SN   20:02   0:11 [jffs2_gcd_mtd10]
root      1583  0.0  0.0      0     0 ?        S    20:02   0:00 [kworker/0:2]
root      1637  0.1  0.2   1300   616 ?        S    20:02   0:00 /sbin/logd -S 256
root      1643  0.3  0.2   3680   624 ?        S    20:02   0:00 /usr/bin/btn -c /etc/config/button.ini -d
root      1732  0.1  0.3   1624   780 ?        S    20:02   0:00 /sbin/netifd
root      1743  0.0  0.0      0     0 ?        S<   20:02   0:00 [kworker/0:1H]
root      1849  4.9  0.0      0     0 ?        SN   20:02   0:05 [jffs2_gcd_mtd11]
root      2079  0.0  0.1   1772   372 ?        S    20:02   0:00 udhcpc -p /var/run/udhcpc-br-wan.pid -s /lib/ne
root      2466  0.0  0.1   1776   368 ?        S    20:02   0:00 /usr/sbin/crond -f -c /etc/crontabs -l 5
root      2603  0.0  0.1   1772   368 ?        S    20:02   0:00 /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org 1.o
root      2609  0.0  0.1   1784   496 ?        S    20:02   0:00 /bin/sh /usr/bin/StreamingTunnelsManager.sh
root      2636  0.0  0.1   1768   364 ?        S    20:02   0:00 /bin/sh /usr/bin/Start_LuaUPnP.sh
root      2642  0.0  0.0   1764   116 ?        S    20:02   0:00 sleep 120
root      2797  0.0  0.1    816   304 ?        S    20:02   0:00 odhcp6c -s /lib/netifd/dhcpv6.script -P0 -t120
root      2881  0.0  0.1   1104   300 ?        Ss   20:02   0:00 /usr/sbin/ntpclient -c 6 -i 600 -s -l -D -p 123
nobody    2996  0.0  0.1    960   332 ?        S    20:02   0:00 /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf -k
root      3158  0.0  0.1   1456   364 ?        S    20:03   0:00 /usr/sbin/dropbear -F -P /var/run/dropbear.1.pi
root      3283  0.0  0.0    848    80 ?        S    20:03   0:00 ser2net
root      3285  0.0  0.0   1764   116 ?        S    20:03   0:00 sleep 60
root      3286  0.5  0.2   1476   556 ?        Rs   20:03   0:00 /usr/sbin/dropbear -F -P /var/run/dropbear.1.pi
root      3330  0.2  0.2   1788   536 pts/0    Ss   20:04   0:00 -ash
root      3336  0.0  0.1   1296   332 pts/0    R+   20:04   0:00 ps -aux

These two should not be there. I forgot a bit now but the nukevera script should have eliminated them. Try to edit these two files by adding “exit 0” at the beginning of the file or look into these two files to see if they call for a reboot and comment out these lines.

No, that’s not them. Start_LuaUPnP was actually modified by nukevera, but I added sleep before exit afterwards. StreamingTunnelsManager is not modified and I tried to add exit at the beginning and killed the process, but it doesn’t help.

There’s something else…

I’ve killed crond (just editing /etc/crontab wasn’t enought as some process restores it after reboot). Uptime increased, still watching…

I used something like this to monitor socat / home assistant. This could be changed to monitor zwave js and socat so when connection drops to vera, everything gets restarted

→ see files in https://github.com/vladbabii/homeassistant-socat/tree/master/runwatch, just put run.sh in cron

I’m now testing a vera edge with ser2net and zwave2mqtt in docker. It works fine, except if the edge restarts the zwave2mqtt does not automatically reconnect. I’m looking now for possibly a setting I missed, but that’s the last part of the puzzle i need to solve.

Vera edge with ser2net connected via network to zwave2mqtt running in docker inside lxc inside proxmox (inception anyone? :slight_smile: ) using a single zwave device for testing for now.

Set zwave led (if ser2net is on) and service led (if a connection to sern2et is ongoing)

This uses port 7676 for zwave. Change to your port…

#!/bin/sh
COUNT=$( netstat -a | grep -i listen | grep -i "0.0.0.0:7676" | wc -l )
if [ "$COUNT" == "0" ] ; then
  /usr/bin/set_led.sh off zwave
else
  /usr/bin/set_led.sh on zwave
fi

COUNT=$( netstat -tenp | grep "ser2net" | grep "7676" | wc -l )
if [ "$COUNT" == "0" ] ; then
  /usr/bin/set_led.sh off service
else
  /usr/bin/set_led.sh on service
fi

Check ser2net is started on port 7676 and restart it if needed

#!/bin/sh
COUNT=$( netstat -a | grep -i listen | grep -i "0.0.0.0:7676" | wc -l )
echo "Found $COUNT lines of port :7676"
if [ "$COUNT" == "0" ] ; then
  echo "Starting... :7676"
  ser2net -C "7676:raw:0:/dev/ttyS0:115200 8DATABITS NONE 1STOPBIT"
else
  echo "Already started :7676"
fi

This method also works with zwave2mqtt (tested it about 2 months ago but forgot to post here)

Has anyone figured out how to utilize the Bluetooth in VeraPlus?

Hello, I would like to use Home Assistant (HA) instead of the Vera Lite or Edge, which are becoming obsolete. The only thing is that Alexa works quite well with the Vera, but I believe that sooner or later, Ezlo will remove that functionality. There haven’t been any firmware updates for a while, so I’m wondering if it’s still possible to use a Vera with HA, as discussed in a previous post. Is it easily reversible in case it doesn’t work for me and I need to go back to the Vera? I’m thinking of using the “rafaale nukevera.sh” script, but I suspect that despite a reboot, it may still leave some traces. So, to return to the original state, can we still access the interface to create a backup of the Vera? Thank you for the information. Also, for HA, how can I use socat because things might have changed over time?

1 Like

Stop tinkering with that obsolete sh#t. Ditch the Vera, buy a zwave stick and re-pair everything. It’s a black hole for a while but after that there’s only light! Jeez, It’s been a while since I have thought about Vera, it popped up since I ever replied this topic.

It was a hate-love with Vera… I started Domotica with it but since I have HA I never looked back :hear_no_evil::heart_eyes::+1:

1 Like