Showing posts with label zwave. Show all posts
Showing posts with label zwave. Show all posts

Saturday, July 31, 2021

Separate Zwave gateway or hub with MQTT integration to Home Assistant

This post is based on the excellent tutorial found here.

I want to run my Zwave stick from another RPi than my HA installation and want all the data to become available within HA through MQTT.

In short, these are the major steps to take:

  1. Ensure you have a running HA & MQTT setup, mine are separate Docker images
  2. Check that your Zwave stick is being found on the RPi
  3. Install Docker on your RPi
  4. Install ZWavejs2MQTT
  5. Start your Docker image
  6. Configure Zwave
  7. Do a discovery and check whether your stick and potentially 1 or more Zwave sensors or actors are being found
  8. Configure MQTT (disable the Gateway functionality in this step)
  9. Configure the Gateway (enable the functionality again)
  10. Check within HA if a new entity for MQTT has been found, with your sensors or actors

Tuesday, December 13, 2016

Testing a basic Zwave setup for the first time

I have myself ordered a Zwave.me USB stick and an Aeotec MultiSensor 6 to start building my sensor network at home. There are a few tools out there to get you started with Zwave on a Raspberry Pi, or see my howto. But the issue I had was that I was not able to see the technical configuration of my hardware devices. There is a script called api_help.py that comes with the python_openzwave library, that I have slightly modified so that it prints the useful information in a friendly way.

Output:
pi@raspberrypi:~/git/python_openzwave $ python3 api_demo.py
------------------------------------------------------------
------------------------------------------------------------
Memory use : 14.61328125 Mo
INFO:openzwave:Start Openzwave network.
------------------------------------------------------------
Waiting for network awaked :
------------------------------------------------------------
.INFO:openzwave:Driver ready using library Static Controller version Z-Wave 4.05
INFO:openzwave:home_id 0x00000000, controller node id is 1
......... done
------------------------------------------------------------
Memory use : 15.96484375 Mo
------------------------------------------------------------
Use openzwave library : 1.4.2272
Use python library : 0.3.1
Use ZWave library : Static Controller version Z-Wave 4.05
Network home id : 0x00000000
Controller node id : 1
Controller node version : 4
Nodes in network : 2
------------------------------------------------------------
Waiting for network ready :
------------------------------------------------------------
 done in 10 seconds
Memory use : 15.96484375 Mo
------------------------------------------------------------
Controller capabilities : {'primaryController'}
Controller node capabilities :
{'primaryController', 'listening', 'beaming'}
Nodes in network : 2
Driver statistics :
{   'ACKCnt': 22,
    'ACKWaiting': 3,
    'CANCnt': 3,
    'NAKCnt': 0,
    'OOFCnt': 0,
    'SOFCnt': 44,
    'badChecksum': 0,
    'badroutes': 0,
    'broadcastReadCnt': 0,
    'broadcastWriteCnt': 12,
    'callbacks': 0,
    'dropped': 0,
    'netbusy': 0,
    'noack': 0,
    'nondelivery': 0,
    'readAborts': 0,
    'readCnt': 44,
    'retries': 3,
    'routedbusy': 0,
    'writeCnt': 25}
------------------------------------------------------------
New node: Node 1
   ---------
Node 1 - Name :
Node 1 - Manufacturer name / id : Z-Wave.Me / 0x0115
Node 1 - Product name / id / type : ZME_UZB1 USB Stick / 0x0001 / 0x0400
Node 1 - Version : 4
Node 1 - Command classes :
{'COMMAND_CLASS_NO_OPERATION', 'COMMAND_CLASS_BASIC'}
Node 1 - Capabilities : {'primaryController', 'listening', 'beaming'}
Node 1 - Neigbors : {2}