Creating my own ZWave network: Unterschied zwischen den Versionen
Dl8rds (Diskussion | Beiträge) (→Software) |
Dl8rds (Diskussion | Beiträge) |
||
Zeile 144: | Zeile 144: | ||
make[1]: Für das Ziel „default“ ist nichts zu tun. | make[1]: Für das Ziel „default“ ist nichts zu tun. | ||
make[1]: Verzeichnis „/root/git/open-zwave/cpp/examples/MinOZW“ wird verlassen | make[1]: Verzeichnis „/root/git/open-zwave/cpp/examples/MinOZW“ wird verlassen | ||
+ | |||
+ | === Give me more === | ||
+ | |||
+ | Links: | ||
+ | * https://lickthesalt.com/2016/04/11/compiling-open-zwave-control-panel-on-a-raspberry-pi-3/comment-page-1/#comment-70175 | ||
+ | * https://community.home-assistant.io/t/using-the-ozwcp-web-application/12659 | ||
+ | * https://www.reddit.com/r/homeassistant/comments/522n6x/manually_install_home_assistant_with_openzwave/ | ||
+ | * https://thefrinkiac7.wordpress.com/linux-stuff/build-open-zwave-control-panel-on-a-raspberry-pi/ | ||
+ | * http://thomasloughlin.com/z-wave-controller-setup-on-my-raspberry-pi/ |
Version vom 10. August 2018, 10:42 Uhr
Inhaltsverzeichnis
1 Background
I have been experimenting with ZWave devices a long time. There are two ZWave controllers I have cast my eye on:
- The Vera Lite http://getvera.com/controllers/veralite/
- VERA PLUS Smart Home Gateway: https://zwave-smarthome.de/shop/vera-plus-smart-home-gateway/
The prior was using a very weak CPU, was very slow, so I decided against it. The latter, oh yes, It got fucked up. And I bricked it, more or less.
The reason was that the device wanted to install an upgrade imge. As always, upgrades are good. So I triggered the upgrade. Unfortunately the upgrade (legacy, standard Vera firmware from the vendor, directly, no tinkering) was corrupt, returning the Vera into a state where it would not react any more. No more. Period. Not even a reset was possible. Nothing.
Whenever I am getting angry, I want to find out if there is a way in. Maybe a serial interface?
So if you take a Dremel like me and try to open the case, it's quite difficult... You easily cut the case in a way so that you won't be able to reassemble it. :-)
2 Next Attempt
Since I got really angry about having a useless Vera, I decided to build my own.
Initially I wanted to use the round hole for a radar detection unit, but since the optical image motion detection was good enough, I decided to use it for the ZWave pairing button.
2.1 Software
2.2 Basic Open ZWave Installation
I am using a standard Respberry Pi Raspbian GNU/Linux 9. And I have intalles OpenZWave according to the following instruction:
https://github.com/OpenZWave/python-openzwave
The following
pyozw_check -i -d /dev/ttyAMA0
gives me:
2018-08-07 16:49:29.812 Always, *************************************************************************** 2018-08-07 16:49:29.812 Always, ********************* Cumulative Network Statistics ********************* 2018-08-07 16:49:29.812 Always, *** General 2018-08-07 16:49:29.812 Always, Driver run time: . . . 0 days, 0 hours, 0 minutes 2018-08-07 16:49:29.812 Always, Frames processed: . . . . . . . . . . . . . . . . . . . . 8 2018-08-07 16:49:29.812 Always, Total messages successfully received: . . . . . . . . . . 8 2018-08-07 16:49:29.813 Always, Total Messages successfully sent: . . . . . . . . . . . . 9 2018-08-07 16:49:29.813 Always, ACKs received from controller: . . . . . . . . . . . . . 9 2018-08-07 16:49:29.813 Always, *** Errors 2018-08-07 16:49:29.813 Always, Unsolicited messages received while waiting for ACK: . . 0 2018-08-07 16:49:29.813 Always, Reads aborted due to timeouts: . . . . . . . . . . . . . 0 2018-08-07 16:49:29.813 Always, Bad checksum errors: . . . . . . . . . . . . . . . . . . 0 2018-08-07 16:49:29.814 Always, CANs received from controller: . . . . . . . . . . . . . 0 2018-08-07 16:49:29.814 Always, NAKs received from controller: . . . . . . . . . . . . . 0 2018-08-07 16:49:29.814 Always, Out of frame data flow errors: . . . . . . . . . . . . . 0 2018-08-07 16:49:29.814 Always, Messages retransmitted: . . . . . . . . . . . . . . . . . 0 2018-08-07 16:49:29.814 Always, Messages dropped and not delivered: . . . . . . . . . . . 0 2018-08-07 16:49:29.814 Always, ***************************************************************************
The following
pyozw_check -l -d /dev/ttyAMA0 -t 60
gives me:
------------------------------------------------------------------------------- Define options for device /dev/ttyAMA0 Start network Wait for network (60s) Network is ready ------------------------------------------------------------------------------- Controller capabilities : set(['primaryController']) Controller node capabilities : set(['primaryController', 'beaming', 'listening']) Nodes in network : 1 Driver statistics : {'retries': 0L, 'readCnt': 8L, 'readAborts': 0L, 'routedbusy': 0L, 'ACKCnt': 9L, 'OOFCnt': 0L, 'noack': 0L, 'broadcastWriteCnt': 8L, 'callbacks': 0L, 'writeCnt': 9L, 'badChecksum': 0L, 'nondelivery': 0L, 'CANCnt': 0L, 'NAKCnt': 0L, 'netbusy': 0L, 'SOFCnt': 8L, 'broadcastReadCnt': 0L, 'badroutes': 0L, 'ACKWaiting': 0L, 'dropped': 0L} ------------------------------------------------------------ 1 - Name : ( Location : ) 1 - Ready : True / Awake : True / Failed : False 1 - Manufacturer : Z-Wave.Me ( id : 0x0147 ) 1 - Product : RaZberry Controller ( id : 0x0003 / type : 0x0002 ) 1 - Version : 4 / Secured : False / Zwave+ : False 1 - Command classes : set(['COMMAND_CLASS_NO_OPERATION', 'COMMAND_CLASS_BASIC']) 1 - Capabilities : set(['primaryController', 'beaming', 'listening']) 1 - Neigbors : set([]) / Power level : None 1 - Is sleeping : False / Can wake-up : False / Battery level : None
This looks good.
2.3 Some More
I am following the recommendations here:
https://github.com/mozilla-iot/wiki/wiki/Installing-OpenZWave
Make sure you have some prerequisites:
apt-get install pkg-config
Then let's start:
$ cd $ git clone https://github.com/OpenZWave/open-zwave.git $ cd open-zwave $ CFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 make && sudo CFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 make install
and it will end with:
Building Scene.o Building Utils.o Building Driver.o Building ZWSecurity.o Building Group.o Building Node.o Building Manager.o Building Msg.o Building Notification.o Creating vers.cpp Building vers.o Linking Static Library Linking Shared Library Making ozw_config file make[1]: Verzeichnis „/root/git/open-zwave/cpp/build“ wird verlassen LDFLAGS="" CPPFLAGS="" make -C /root/git/open-zwave/cpp/examples/MinOZW/ - make[1]: Verzeichnis „/root/git/open-zwave/cpp/examples/MinOZW“ wird betreten Building Main.o Linking /root/git/open-zwave/.lib/MinOZW g++ -o /root/git/open-zwave/.lib/MinOZW /root/git/open-zwave/.lib/Main.o /root/git/open-zwave/libopenzwave.so -pthread Creating Temporary Shell Launch Script make[1]: Verzeichnis „/root/git/open-zwave/cpp/examples/MinOZW“ wird verlassen LDFLAGS="" CPPFLAGS="" make -C /root/git/open-zwave/cpp/build/ - make[1]: Verzeichnis „/root/git/open-zwave/cpp/build“ wird betreten Building OpenZWave Version 1.4-3155-ga27c2645-dirty make[1]: Verzeichnis „/root/git/open-zwave/cpp/build“ wird verlassen LDFLAGS="" CPPFLAGS="" make -C /root/git/open-zwave/cpp/examples/MinOZW/ - make[1]: Verzeichnis „/root/git/open-zwave/cpp/examples/MinOZW“ wird betreten make[1]: Für das Ziel „default“ ist nichts zu tun. make[1]: Verzeichnis „/root/git/open-zwave/cpp/examples/MinOZW“ wird verlassen
2.4 Give me more
Links:
- https://lickthesalt.com/2016/04/11/compiling-open-zwave-control-panel-on-a-raspberry-pi-3/comment-page-1/#comment-70175
- https://community.home-assistant.io/t/using-the-ozwcp-web-application/12659
- https://www.reddit.com/r/homeassistant/comments/522n6x/manually_install_home_assistant_with_openzwave/
- https://thefrinkiac7.wordpress.com/linux-stuff/build-open-zwave-control-panel-on-a-raspberry-pi/
- http://thomasloughlin.com/z-wave-controller-setup-on-my-raspberry-pi/