Coder Social home page Coder Social logo

openzwave / zwave2mqtt Goto Github PK

View Code? Open in Web Editor NEW
350.0 18.0 94.0 5.39 MB

Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue

License: MIT License

JavaScript 62.32% CSS 0.47% Vue 35.35% Shell 0.93% Dockerfile 0.39% EJS 0.54%
zwave mqtt openzwave gateway zwave2mqtt vue nodejs vuetify iot open-zwave

zwave2mqtt's Introduction

Zwave To MQTT

GitHub package.json version PRs Welcome MadeWithVueJs.com shield MIT Licence ci Docker Build GitHub All Releases Coverage Status Known Vulnerabilities Dependencies Status devDependencies Status Total alerts Language grade: JavaScript

Join channel

Buy Me A Coffee

dockeri.co

OpenZWave TO MQTT

Fully configurable Zwave to MQTT Gateway and Control Panel.

THIS PROJECT IS UNMAINTAINED. PLEASE CONSIDER MOVING TO Zwavejs

!! ATTENTION

After a discussion with Openzwave maintainer all issues related to OZW 1.4 will be ignored and automatically closed as it isn't supported anymore, please use OZW 1.6+

πŸ“– Table of contents

πŸ”Œ Installation

DOCKER πŸŽ‰ way

# Using volumes as persistence
docker run --rm -it -p 8091:8091 --device=/dev/ttyACM0 --mount source=zwave2mqtt,target=/usr/src/app/store robertslando/zwave2mqtt:latest

# Using local folder as persistence
mkdir store
docker run --rm -it -p 8091:8091 --device=/dev/ttyACM0 -v $(pwd)/store:/usr/src/app/store robertslando/zwave2mqtt:latest

# As a service
wget https://raw.githubusercontent.com/openzwave/zwave2mqtt/master/docker/docker-compose.yml
docker-compose up

Replace /dev/ttyACM0 with your serial device

For more info about docker check here

Kubernetes way

kubectl apply -k https://raw.githubusercontent.com/OpenZWave/Zwave2Mqtt/master/kustomization.yaml

You will almost certainly need to instead use this as a base, and then layer on top patches or resource customizations to your needs or just copy all the resources from the kubernetes resources directory of this repo

NodeJS or PKG version

  1. Firstly you need to install the Open-Zwave library on your system.

    cd ~
    git clone https://github.com/OpenZWave/open-zwave.git
    cd open-zwave && make && sudo make install
    sudo ldconfig
    export LD_LIBRARY_PATH=/usr/local/lib64
    sudo sed -i '$a LD_LIBRARY_PATH=/usr/local/lib64' /etc/environment

    For Raspberry check here

  2. Test the library: go to openzwave directory cd openzwave-* and run the command

    MinOZW /dev/ttyACM0

    replace /dev/ttyACM0 with the USB port where your controller is connected

  3. Now you can use the packaged version (you don't need NodeJS/npm installed) or clone this repo and build the project:

    • For the packaged version:

      cd ~
      mkdir Zwave2Mqtt
      cd Zwave2Mqtt
      # download latest version
      curl -s https://api.github.com/repos/OpenZWave/Zwave2Mqtt/releases/latest  \
      | grep "browser_download_url.*zip" \
      | cut -d : -f 2,3 \
      | tr -d \" \
      | wget -i -
      unzip zwave2mqtt-v*.zip
      ./zwave2mqtt
    • If you want to compile last code from github:

      git clone https://github.com/OpenZWave/Zwave2Mqtt
      cd Zwave2Mqtt
      npm install
      npm run build
      npm start
  4. Open the browser http://localhost:8091

Reverse Proxy Setup

If you need to setup ZWave To MQTT behind a reverse proxy that needs a subpath to work, take a look at the reverse proxy configuraiton docs.

πŸ€“ Development

Developers who wants to debug the application have to open 2 terminals.

In first terminal run npm run dev to start webpack-dev for front-end developing and hot reloading at http://localhost:8092 (THE PORT FOR DEVELOPING IS 8092)

In the second terminal run npm run dev:server to start the backend server with inspect and auto restart features (if you don't have nodemon installed: npm install -g nodemon)

To package the application run npm run pkg command and follow the steps

Developing against a different backend

By default running npm run dev:server will proxy the reequests to a backend listening on localhost on port 8091.

If you want to run the development frontend against a different backend you have the following environment variables that you can use to redirect to a different backend:

  • SERVER_HOST: [Default: 'localhost'] the hostname or IP of the backend server you want to use;
  • SERVER_PORT: [Default: '8091'] the port of the backend server you want to use;
  • SERVER_SSL: [Default: undefined] if set to a value it will use https/wss to connect to the backend;
  • SERVER_URL: [Default: use the other variables] the full URL for the backend API, IE: https://zwavetomqtt.home.net:8443/
  • SERVER_WS_URL: [Default: use the other variables] the full URL for the backend Socket, IE: wss://zwavetomqtt.home.net:8443/

πŸ”§ Usage

Firstly you need to open the browser at the link http://localhost:8091 and edit the settings for Zwave, MQTT and the Gateway.

Zwave

Zwave settings:

  • Serial port: The serial port where your controller is connected
  • Network key (Optional): Zwave network key if security is enabled. The correct format is "0xCA,0xFE,0xBA,0xBE,.... " (16 bytes total)
  • Logging: Enable/Disable Openzwave Library logging
  • Save configuration: Store zwave configuration in zwcfg_<homeHex>.xml and zwscene.xml files this is needed for persistent node information like node name and location
  • Poll interval: Interval in milliseconds between polls (should not be less than 1s per device)
  • Commands timeout: Seconds to wait before automatically stop inclusion/exclusion
  • Configuration Path: The path to Openzwave devices config db
  • Assume Awake: Assume Devices that support the Wakeup Class are awake when starting up OZW
  • Auto Update Config File: Auto update Zwave devices database
  • Hidden settings: advanced settings not visible to the user interface, you can edit these by setting in the settings.json
    • zwave.plugin defines a js script that will be included with the this context of the zwave client, for example you could set this to hack and include a hack.js in the root of the app with module.exports = zw => {zw.client.on("scan complete", () => console.log("scan complete")}
    • zwave.options overrides options passed to the zwave client see IConstructorParameters in the open-zwave docs. For detail for example zwave.options.options.EnforceSecureReception=true to drop insecure messages from devices that should be secure.

MQTT

Mqtt settings:

  • Name: A unique name that identify the Gateway.
  • Host: The url of the broker. Insert here the protocol if present, example: tls://localhost. Mqtt supports these protocols: mqtt, mqtts, tcp, tls, ws and wss
  • Port: Broker port
  • Reconnect period: Milliseconds between two reconnection tries
  • Prefix: The prefix where all values are published
  • QoS: Quality Of Service (check MQTT specs) of outgoing packets
  • Retain: The retain flag of outgoing packets
  • Clean: Sets the clean flag when connecting to the broker
  • Store: Enable/Disable persistent storage of packets (QoS > 0). If disabled in memory storage will be used but all packets stored in memory are lost in case of shutdowns or unexpected errors.
  • Allow self signed certs: When using encrypted protocols, set this to true to allow self signed certificates (WARNING this could expose you to man in the middle attacks)
  • Ca Cert and Key: Certificate Authority, Client Key and Client Certificate files required for secured connections (if broker requires valid certificates, this fields can be leave empty otherwise)
  • Auth: Enable this if broker requires auth. If so you need to enter also a valid username and password.

Gateway

Gateway settings:

  • Gateway type: This setting specify the logic used to publish Zwave Nodes Values in MQTT topics. At the moment there are 3 possible configuration, two are automatic (all values are published in a specific topic) and one needs to manually configure which values you want to publish to MQTT and what topic to use. For every gateway type you can set custom topic values, if gateway is not in 'configure manually' mode you can omit the topic of the values (the topic will depends on the gateway type) and use the table to set values you want to poll or if you want to scale them using post operation

    1. ValueId Topics: Automatically configured. The topic where zwave values are published will be:

      <mqtt_prefix>/<?node_location>/<node_id>/<class_id>/<instance>/<index>

      • mqtt_prefix: the prefix set in Mqtt Settings
      • node_location: location of the Zwave Node (optional, if not present will not be added to the topic)
      • node_id: the unique numerical id of the node in Zwave network
      • class_id: the numerical class id of the value
      • instance: the numerical value of value instance
      • index: the numerical index of the value
    2. Named Topics: Automatically configured. DEPRECATED After a discussion with Openzwave author lib we discourage users to use this configuration as we cannot ensure that value labels will be the same, they could change in future versions (and also they depends on localization added in OZW 1.6). You can find more info HERE

      The topic where zwave values are published will be:

      <mqtt_prefix>/<?node_location>/<node_name>/<class_name>/<?instance>/<value_label>

      • mqtt_prefix: the prefix set in Mqtt Settings
      • node_location: location of the Zwave Node (optional, if not present will not be added to the topic)
      • node_name: name of the node, if not set will be nodeID_<node_id>
      • class_name: the node class name corresponding to given class id or unknownClass_<class_id> if the class name is not found
      • ?instance: Used just with multi-instance devices. The main instance (1) will not have this part in the topic but other instances will have: instance_<instance_index>
      • value_label: the zwave value label (lower case and spaces are replaced with _)
    3. Configured Manually: Needs configuration. The topic where zwave values are published will be:

      <mqtt_prefix>/<?node_location>/<node_name>/<value_topic>

      • mqtt_prefix: the prefix set in Mqtt Settings
      • node_location: location of the Zwave Node (optional, if not present will not be added to the topic)
      • node_name: name of the node, if not set will be nodeID_<node_id>
      • value_topic: the topic you want to use for that value (take from gateway values table).
  • Payload type: The content of the payload when an update is published:

    • JSON Time-Value: The payload will be a JSON object like:

      {
        "time": 1548683523859,
        "value": 10
      }
    • Entire Zwave value Object The payload will contain all info of a value from Zwave network:

      {
        "value_id": "3-64-1-0",
        "node_id": 3,
        "class_id": 64,
        "type": "list",
        "genre": "user",
        "instance": 1,
        "index": 0,
        "label": "Mode",
        "units": "",
        "help": "",
        "read_only": false,
        "write_only": false,
        "min": 0,
        "max": 0,
        "is_polled": false,
        "values": ["Off", "Heat (Default)", "Cool", "Energy Heat"],
        "value": "Off"
      }
    • Just value: The payload will contain only the row Numeric/String value

  • Ignore status updates: Enable this to prevent gateway to send an MQTT message when a node changes its status (dead/sleep == false, alive == true)

  • Ignore location: Enable this to remove nodes location from topics

  • Send Zwave Events: Enable this to send all Zwave client events to MQTT. More info here

  • Send 'list' as integer: Zwave 'list' values are sent as list index instead of string values

  • Use nodes name instead of numeric nodeIDs: When gateway type is ValueId use this flag to force to use node names instead of node ids in topic.

  • ⭐Hass discovery⭐: Enable this to automatically create entities on Hass using MQTT autodiscovery (more about this here)

  • Discovery Prefix: The prefix to use to send MQTT discovery messages to HASS

Once finished press SAVE and gateway will start Zwave Network Scan, than go to 'Control Panel' section and wait until the scan is completed to check discovered devices and manage them.

Settings, scenes and Zwave configuration are stored in JSON/xml files under project store folder that you can easily import/export for backup purposes.

Special topics

  • Node status (true if node is ready false otherwise) will be published in:

<mqtt_prefix>/<?node_location>/<node_name>/status

  • Node events (value will be the event code) will be published in:

<mqtt_prefix>/<?node_location>/<node_name>/event

  • Scene events will be published in:

OZW 1.4:

<mqtt_prefix>/<?node_location>/<node_name>/scene/event (value will be the scene event code)

OZW 1.6: In OZW 1.6 scenes are treated like a valueID (so the topic depends on gateway configuration). For example if the command class is 91 (central_scene) and gateway uses valueid topics

<mqtt_prefix>/<?node_location>/<node_name>/91/1/1 (value published in payload will depend on gateway payload type)

Gateway values table

The Gateway values table can be used with all gateway types to customize specific values topic for each device type found in the network and do some operations with them. Each value has this properties:

  • Device: The device type. Once scan is complete, the gateway creates an array with all devices types found in the network. A device has a device_id that is unique, it is composed by this node properties: <manufacturerid>-<productid>-<producttype>.
  • Value: The value you want to customize
  • Device Class: If the value is a multilevel sensor, a binary sensor or a meter you can set a custom device_class to use with home assistant discovery. Check sensor and binary sensor
  • Topic: The topic to use for this value. It is the topic added after topic prefix, node name and location. If gateway type is different than Manual this can be leave blank and the value topic will be the one based on the gateway configuration chosen
  • Post operation: If you want to convert your value (eg. '/10' '/100' '*10' '*100')
  • Poll: Enable this to set the value enablePoll flag
  • Verify Changes: Used to verify changes of this values
  • Parse Send: Enable this to allow users to specify a custom function(value) to parse the value sent to MQTT. The function must be sync
  • Parse receive: Enable this to allow users to specify a custom function(value) to parse the value received via MQTT. The function must be sync

πŸ“ Nodes Management

Add a node

To add a node using the UI select the controller Action Add Node (inclusion), click send (:airplane:) button to enable the inclusion mode in your controller and enable the inclusion mode in your device to. Controller status will be waiting when inclusion has been successfully enabled on the controller and completed when the node has been successfully added. Wait few seconds and your node will be visible in the table once ready.

Remove a node

To add a node using the UI select the controller Action Remove Node (exclusion), click send (:airplane:) button to enable the exclusion mode in your controller and enable the exclusion mode in your device to. Controller status will be waiting when exclusion has been successfully enabled on the controller and completed when the node has been successfully removed. Wait few seconds and your node will be removed from the table.

Replace failed node

To replace a failed node from the UI you have to use the command Replace Failed Node, if everything is ok the controller will start inclusion mode and status will be Waiting, now enable inclusion on your device to add it to the network by replacing the failed one.

Remove a failed node

If a node is missing or marked as dead. There is a way to cleanup the controller by executing Remove Failed Node. This will forcebly delete the node from the controller. It can only succeed if:

  • Node has ben first marked as failed using Has node failed
  • Marked as Dead by the controller

Alive and Sleeping nodes cannot be deleted.

⭐ Features

  • Configurable Zwave to Mqtt Gateway
  • Home Assistant integration (beta)
  • Zwave Control Panel:
    • Nodes management: check all nodes discovered in the z-wave network, send/receive nodes values updates directly from the UI and send action to the nodes and controller for diagnostics and network heal
    • Custom Node naming and Location: Starting from v1.3.0 nodes name and location are stored in a JSON file named nodes.json. This because not all nodes have native support for naming and location features (#45). This change is back compatible with older versions of this package: on startup it will get all nodes names and location from the zwcfg_homeHEX.xml file (if present) and create the new nodes.json file based on that. This file can be imported/exported from the UI control panel with the import/export buttons placed on the top of nodes table, on the right of controller actions select.
    • Groups associations: create associations between nodes (also supports multi-instance associations, need to use last version of openzwave-shared)
    • Custom scenes management: (OpenZwave-Shared scenes management has actually some bugs and it's limited so I have made a custom scenes implementation that uses the same APIs but stores values in a JSON file that can be imported/exported and also allows to set a timeout to a value in a scene)
  • Log debug in UI
  • Mesh graph showing devices neighbors

πŸ€– Home Assistant integration (BETA)

At least Home Assistant >= 0.84 is required!

The easiest way to integrate Zwave2Mqtt with Home Assistant is by using MQTT discovery. This allows Zwave2Mqtt to automatically add devices to Home Assistant. To enable this feature remember to set the flag Hass Discovery in Gateway settings configuration.

ATTENTION: Hass updates often break Zwave2Mqtt device discovery. For this reason Zwave2Mqtt will try to be always compatible with latest hass version. Check the changelog before update!

To achieve the best possible integration (including MQTT discovery):

  • In your Zwave2Mqtt gateway settings enable Homeassistant discovery flag and enable the MQTT retain too. The retain flag for MQTT is suggested to be sure that, once discovered, each device get the last value published (otherwise you have to wait for a value change)

NB: Starting from version 4.0.0 the default Birth/Will topic is homeassistant/status in order to reflect defaults birth/will of Hass 0.113 th

  • In your Home Assistant configuration.yaml:
mqtt:
  discovery: true
  discovery_prefix: <your_discovery_prefix>
  broker: [YOUR MQTT BROKER] # Remove if you want to use builtin-in MQTT broker
  birth_message:
    topic: 'hass/status' # or homeassistant/status if z2m version >= 4.0.0
    payload: 'online'
  will_message:
    topic: 'hass/status' # or homeassistant/status if z2m version >= 4.0.0
    payload: 'offline'

Mind you that if you want to use the embedded broker of Home Assistant you have to follow this guide.

Zwave2Mqtt is expecting Home Assistant to send it's birth/will messages to hass/status (or homeassistant/status if z2m version >= 4.0.0). Be sure to add this to your configuration.yaml if you want Zwave2Mqtt to resend the cached values when Home Assistant restarts.

Zwave2Mqtt try to do its best to guess how to map devices from Zwave to HASS. At the moment it try to guess the device to generate based on zwave values command classes, index and units of the value. When the discovered device doesn't fit your needs you can you can set custom a device_class to values using Gateway value table.

Components management

To see the components that have been discovered by Zwave2Mqtt go to Control Panel UI, select a Node from the Nodes table then select the Node tab from tabs menu at the bottom of Nodes table. Now at the Bottom of the page, after Node values section you can find a new section called Home Assistant - Devices. Here you will see a table with all devices created for the selected node.

Hass Devices

ATTENTION Once edited the devices will loose all their customizations after a restart. To prevent this you can store the node hassDevices by pressing STORE button at the top of hass devices table. By pressing it the hassDevices will be stored in nodes.json file that can be imported/exported easily from control panel UI at the top of nodes table.

Rediscover Node

If you update node name/location you have to also rediscover values of this node as they may have wrong topics. To do this press on REDISCOVER NODE green button on top of Home Assistant - Devices table (check previous picture)

Edit existing component

If you select a device it's configuration will be displayed as a JSON object on the right. With the selected device you can edit it and send some actions:

  • Update: Update in-memory hass device configuration
  • Rediscover: Re-discover this device using the discoveryTopic and discovery_payload of the configuration
  • Delete: Delete the device from Hass entities of selected node

Add new component

If no device is selected you can manually insert a device JSON configuration. If the configuration is valid you can press the button Add to add it to devices. If the process complete successfully the device will be added to the Hass Devices table and you can now select it from the table and press on Rediscover to discover your custom device

Custom Components

At the moment auto discovery just creates components like sensor, cover binary_sensor and switch. For more complex components like climate and fan you need to provide a configuration. Components configurations are stored in hass/devices.js file. Here are contained all components that Zwave2MQTT needs to create for each Zwave device type. The key is the Zwave device unique id (<manufacturerid>-<productid>-<producttype>) the value is an array with all HASS components to create for that Zwave Device.

UPDATE: Starting from version 2.0.7 you can specify your custom devices configuration inside store/customDevices(.js|.json) file. This allows users that use Docker to create their custom hass devices configuration without the need to build a new container. If using .json format Zwave2Mqtt will watch for file changes and automatically load new components on runtime without need to restart the application.

ONCE YOU SUCCESSFULLY INTEGRATE NEW COMPONENTS PLEASE SEND A PR!

Identify the Device id

Starting from version 2.2.0 device id is shown on node tab of control panel before the inputs for update the node name and locations.

Before version 2.2.0 you can get the device id in this ways:

First (and easier) option is to add a random value in gateway values table for the desired device, the device id will be visible in first column of the table (Devices) between square brackets [<deviceID>] Device Name

Second option would be to retrieve it from here. Each device has Manufacturerid, product id and a product type in HEX format and needs to be converted in decimal:

<Manufacturer id="019b" name="ThermoFloor AS">
    <Product config="thermofloor/heatit021.xml" id="0001" name="Heatit Thermostat TF 021" type="0001"/>
    <Product config="thermofloor/heatit056.xml" id="0202" name="Heatit Thermostat TF 056" type="0003"/>
    <Product config="thermofloor/heatit-zdim.xml" id="2200" name="Heatit ZDim" type="0003"/>
</Manufacturer>

In this example, if we have choose Heatit Thermostat TF 056:

  • Manufacturer Id: 19b --> 411
  • Product Id: 202 --> 514
  • Product type: 3 --> 3

So in decimal format will become: 411-514-3. This is the device id of Heatit Thermostat TF 056

Thermostats

{
    "411-1-1":[
        { // Heatit Thermostat TF 021 (ThermoFloor AS)
            "type": "climate",
            "object_id": "thermostat",
            "values": ["64-1-0", "49-1-1", "67-1-1", "67-1-2"],
            "mode_map": {"off": "Off", "heat": "Heat (Default)", "cool": "Cool"},
            "setpoint_topic": { "Heat (Default)": "67-1-1", "Cool": "67-1-2" },
            "default_setpoint": "67-1-1",
            "discovery_payload": {
                "min_temp": 15,
                "max_temp": 30,
                "modes": ["off", "heat", "cool"],
                "mode_state_topic": "64-1-0",
                "mode_command_topic": true,
                "current_temperature_topic": "49-1-1",
                "current_temperature_template": "{{ value_json.value }}",
                "temperature_state_template": "{{ value_json.value }}",
                "temperature_command_topic": true
            }
        }
    ]
}
  • type: The hass MQTT component type
  • object_id: The unique id of this object (must be unique for the device)
  • values: Array of values used by this component
  • mode_map: Key-Value object where keys are MQTT Climate modes and values are the matching thermostat modes values
  • setpoint_topic: Key-Value object where keys are the modes of the Zwave thermostat and values are the matching setpoint value_id (use this if your thermostat has more than one setpoint)
  • default_setpoint: The default thermostat setpoint.
  • discovery_payload: The payload sent to hass to discover this device. Check here for a list with all supported options
    • min_temp/max_temp: Min/Max temperature of the thermostat
    • modes: Array of Hass Climate supported modes. Allowed values are [β€œauto”, β€œoff”, β€œcool”, β€œheat”, β€œdry”, β€œfan_only”]
    • mode_state_topic: value_id of mode value
    • current_temperature_topic: value_id of current temperature value
    • current_temperature_template/temperature_state_template: Template used to fetch the value from the MQTT payload
    • temperature_command_topic/mode_command_topic: If true this values are subscribed to this topics to send commands from Hass to change this values

Thermostats are most complex components to create, in this device example the setpoint topic changes based on the mode selected. Zwave2Mqtt handles the mode changes by updating the device discovery payload to match the correct setpoint based on the mode selected.

Fans

{ // GE 1724 Dimmer
    "type": "fan",
    "object_id": "dimmer",
    "values": ["38-1-0"],
    "discovery_payload": {
        "command_topic": "38-1-0",
        "speed_command_topic": "38-1-0",
        "speed_state_topic": "38-1-0",
        "state_topic": "38-1-0",
        "speeds": ["off", "low", "medium", "high"],
        "payload_low_speed": 24,
        "payload_medium_speed": 50,
        "payload_high_speed": 99,
        "payload_off": 0,
        "payload_on": 99,
        "state_value_template": "{% if (value_json.value | int) == 0 %} 0 {% else %} 99 {% endif %}",
        "speed_value_template": "{% if (value_json.value | int) == 25 %} 24 {% elif (value_json.value | int) == 51 %} 50 {% elif (value_json.value | int) == 99 %} 99 {% else %} 0 {% endif %}"
    }
}
  • type: The hass MQTT component type
  • object_id: The unique id of this object (must be unique for the device)
  • values: Array of values used by this component
  • discovery_payload: The payload sent to hass to discover this device. Check here for a list with all supported options
    • command_topic: The topic to send commands
    • state_topic: The topic to receive state updates
    • speed_command_topic: The topic used to send speed commands
    • state_value_template: The template used to set the value ON/OFF based on the payload received
    • speed_value_template: The template to use to set the speed ["off", "low", "medium", "high"] based on the payload received

Thermostats with Fans

The main template is like the thermostat template. The things to add are:

{ // GoControl GC-TBZ48 (Linear Nortek Security Control LLC)
    "type": "climate",
    "object_id": "thermostat",
    "values": [
        "49-1-1",
        "64-1-0",
        "66-1-0", // <-- add fan values
        "67-1-1",
        "67-1-2",
        "68-1-0" // <-- add fan values
    ],
    "fan_mode_map": { // <-- add fan modes map
        "on": "On",
        "auto": "Auto"
    },
    "mode_map": {
        "off": "Off",
        "heat": "Heat",
        "cool": "Cool",
        "auto": "Auto"
    },
    "setpoint_topic": {
        "Heat": "67-1-1",
        "Cool": "67-1-2"
    },
    "default_setpoint": "67-1-1",
    "discovery_payload": {
        "min_temp": 60,
        "max_temp": 85,
        "modes": [
            "off",
            "heat",
            "cool",
            "auto"
        ],
        "fan_modes": [ // <-- add fan supported modes
            "on",
            "auto"
        ],
        "action_topic": "66-1-0",
        "mode_state_topic": "64-1-0",
        "mode_command_topic": true,
        "current_temperature_topic": "49-1-1",
        "current_temperature_template": "{{ value_json.value }}",
        "temperature_state_template": "{{ value_json.value }}",
        "temperature_low_command_topic": true,
        "temperature_low_state_template": "{{ value_json.value }}",
        "temperature_high_command_topic": true,
        "temperature_high_state_template": "{{ value_json.value }}",
        "fan_mode_command_topic": true,
        "fan_mode_state_topic": "68-1-0" // <-- add fan state topic
    }
}

🎁 MQTT APIs

You have full access to all Openzwave-Shared APIs (and more) by simply using MQTT.

Zwave Events

If Send Zwave Events flag of Gateway settings section is enabled all Zwave events are published to MQTT. Here you can find a list with all available events

Topic

<mqtt_prefix>/_EVENTS_/ZWAVE_GATEWAY-<mqtt_name>/<event name>

Payload

{
  "data": [ "1.4.3319" ] // an array containing all args in order
}

Example

Topic

zwave2mqtt/_EVENTS/ZWAVE_GATEWAY-z2m/node_ready

Payload

{
  "data": [
    1,
    {
      "manufacturer": "AEON Labs",
      "manufacturerid": "0x0086",
      "product": "ZW090 Z-Stick Gen5 EU",
      "producttype": "0x0001",
      "productid": "0x005a",
      "type": "Static PC Controller",
      "name": "",
      "loc": ""
    }
  ]
}

Zwave APIs

To call a Zwave API you just need to publish a JSON object like:

{
  "args": [2, 1]
}

Where args is an array with the args used to call the api, the topic is:

<mqtt_prefix>/_CLIENTS/ZWAVE_GATEWAY-<mqtt_name>/api/<api_name>/set

The result will be published on the same topic without /set

Example: If I publish the previous json object to the topic

zwave/_CLIENTS/ZWAVE_GATEWAY-office/api/getAssociations/set

I will get this response (in the same topic without the suffix /set):

{
  "success": true,
  "message": "Success zwave api call",
  "result": [1]
}

result will contain the value returned from the API. In this example I will get an array with all node IDs that are associated to the group 1 (lifeline) of node 2.

Custom APIs

There are some custom apis that can be called that are not part of Zwave Client:

  • All Zwave Clients scenes management methods if preceeded by a _ will use the internal scenes management instead of OZW scenes:
    • _createScene
    • _removeScene
    • _setScenes
    • _getScenes
    • _sceneGetValues
    • _addSceneValue
    • _removeSceneValue
    • _activateScene
  • _setNodeName and _setNodeLocation will use internal nodes store to save nodes names/locations in a json file
  • refreshNeighborns: Returns an Array, the Array index is the nodeId, array value is an Array with all node neighborns
  • getNodes: Returns an array with all nodes in the network (and their info/valueids)
  • getInfo: Returns an object with:
    • homeid: homeId
    • name: homeId Hex
    • version: OpenZwave version
    • uptime: Seconds from when the app process is started. It's the result of process.uptime()
    • lastUpdate: Timestamp of latest event received from OZW
    • status: Client status. Could be: 'driverReady', 'connected', 'scanDone', 'driverFailed', 'closed'
    • cntStatus: Controller status received from ozw notifications controller command. If inclusion/exclusion is running it wold be Waiting

Set values

To write a value using MQTT you just need to send the value to set in the same topic where the value updates are published by adding the suffix /set to the topic (READONLY VALUES CANNOT BE WRITE).

Example with gateway configured with named topics:

If I publish the value 25.5 (also a payload with a JSON object with the value in value property is accepted) to the topic

zwave/office/nodeID_4/thermostat_setpoint/heating/set

I will set the Heating setpoint of the node with id 4 located in the office to 25.5. To check if the value has been successfully write just check when the value changes on the topic:

zwave/office/nodeID_4/thermostat_setpoint/heating

Broadcast

You can send broadcast values to all values with a specific suffix in the network.

Broadcast API is accessible from:

<mqtt_prefix>/_CLIENTS/ZWAVE_GATEWAY-<mqtt_name>/broadcast/<value_topic_suffix>/set

  • value_topic_suffix: the suffix of the topic of the value I want to control using broadcast.

It works like the set value API without the node name and location properties. If the API is correctly called the same payload of the request will be published to the topic without /set suffix.

Example of broadcast command (gateway configured as named topics):

zwave/_CLIENTS/ZWAVE_GATEWAY-test/broadcast/thermostat_setpoint/heating/set

Payload: 25.5

All nodes with command class thermostat_setpoint and value heating will be set to 25.5 and I will get the same value on the topic:

zwave/_CLIENTS/ZWAVE_GATEWAY-test/broadcast/thermostat_setpoint/heating

πŸ“· Screenshots

Settings

OpenZWave

Control Panel

Control Panel

Groups associations

Groups

Scenes

Scenes

Mesh

Mesh

Debug

Debug

Health check endpoints

/health: Returns 200 if both mqtt and zwave client are connected, 500 otherwise /health/mqtt: Returns 200 if mqtt client is connected, 500 otherwise /health/zwave: Returns 200 if zwave client is connected, 500 otherwise

Remember to add the header: Accept: text/plain to your request.

Example: curl localhost:8091/health/zwave -H "Accept: text/plain"

Environment variables

Note: Each one of the following environment variables corresponds to their respective options in the UI settings and options saved in the UI take presence over these environment variables.

  • OZW_NETWORK_KEY
  • OZW_SAVE_CONFIG
  • OZW_POLL_INTERVAL
  • OZW_AUTO_UPDATE_CONFIG
  • OZW_CONFIG_PATH
  • OZW_ASSUME_AWAKE

❓ FAQ

A: Why when I add a value to Gateway values table I don't see all my devices?

B: When adding values to the gateway values table it shows JUST ONE DEVICE FOR EACH TYPE. This is to make it easier and faster to setup your network as if you have a network with lot devices (light, light dimmers for example) you just need to add the values you want to bridge to mqtt (for a light it will always be just the switch to turn it on/off for exmple without all configuration values) and it will bridge those values for all the devices of that type (without configure the values one by one).

A: My device is X and has been discovered as Y, why?

B: Hass Discovery is not easy, zwave have many different devices with different values. To try to understand how to discover a specific value I have used this file that shows what kind of value is expeted based on value class and index. Unfortunally not all devices respect this specifications so for those cases I have created Hass Devices table where you can manually fix the discovery payload and than save it to make it persistent. I have also created a file /hass/devices.js where I place all devices specific values configuration, your contribution is needed there, so submit a PR with your files specification to help it grow.

πŸ™ Thanks

Thanks to this people for help with issues tracking and contributions:

πŸ“ TODOs

  • Better logging
  • Dockerize application
  • Package application with PKG
  • HASS integration, check zigbee2mqtt
  • Add unit test
  • JSON validator for settings and scenes
  • Better nodes status management using 'testNode'
  • Network graph to show neighbours using vue-d3-network

:bowtie: Author

Daniel Lando

Support me on Patreon ❀️

zwave2mqtt's People

Contributors

ahochsteger avatar alphatangoalpha avatar aretakisv avatar chilicheech avatar chrisns avatar colinharrington avatar cyclops1982 avatar darkbasic avatar dependabot-preview[bot] avatar dependabot[bot] avatar derrohrbach avatar dinth avatar djdd87 avatar fabio-torchetti avatar frago711 avatar idyedov avatar jasonsinclair5 avatar jshridha avatar lucguinchard avatar markferry avatar mattgruter avatar nervetattoo avatar ovenystas avatar papertigers avatar pdbogen avatar peter-vanpoucke avatar robertslando avatar robinvancauter avatar snyk-bot avatar varet80 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zwave2mqtt's Issues

[QUESTION] Copy HA xml file(s)?

Is it possible to copy (from HA installation) the two zwave configuration files to a fresh install on a rpi3b and not have to set everything up again?

Battery Powered devices marked as DEAD

Some battery powered devices like ZW100 MultiSensor 6 (AEON Labs) are detected as DEAD after stratup and do not have the type/product fields loaded. (zwcfg has the device with all the info)

Under settings -> zwave I have Assume Awake toggled disabled.

The only way for the device to show online is by manually waking it (physically) and sending a NIF request to the device. After that it will be correctly marked as sleeping

Invalid Network Key. Does not contain 16 Bytes - Contains 1

Hi,

First of all kudos on the software!

I've run into a snag whilst getting this up and running, working without a security key is fine however when trying to add one openzwave fails. What format should the key be in? I have tried the following in the text box yet each one fails:

0xE1, 0x40, 0xE5, 0x36, 0x2E, 0xD2, 0xC6, 0x42, 0x28, 0xB1, 0x07, 0xBF, 0x9B, 0x81, 0x4A, 0xDA

"0xE1, 0x40, 0xE5, 0x36, 0x2E, 0xD2, 0xC6, 0x42, 0x28, 0xB1, 0x07, 0xBF, 0x9B, 0x81, 0x4A, 0xDA"

[0xE1, 0x40, 0xE5, 0x36, 0x2E, 0xD2, 0xC6, 0x42, 0x28, 0xB1, 0x07, 0xBF, 0x9B, 0x81, 0x4A, 0xDA]

{0xE1, 0x40, 0xE5, 0x36, 0x2E, 0xD2, 0xC6, 0x42, 0x28, 0xB1, 0x07, 0xBF, 0x9B, 0x81, 0x4A, 0xDA}

'0xE1, 0x40, 0xE5, 0x36, 0x2E, 0xD2, 0xC6, 0x42, 0x28, 0xB1, 0x07, 0xBF, 0x9B, 0x81, 0x4A, 0xDA'

0xE1 0x40 0xE5 0x36 0x2E 0xD2 0xC6 0x42 0x28 0xB1 0x07 0xBF 0x9B 0x81 0x4A 0xDA

It seems to only capture the last byte and not the other 15. Error message:

zwave2mqtt | Initialising OpenZWave 1.4.3335 binary addon for Node.JS. zwave2mqtt | OpenZWave Security API is ENABLED zwave2mqtt | ZWave device db : /usr/local/etc/openzwave zwave2mqtt | User settings path : /opt/zwave2mqtt/source zwave2mqtt | Option Overrides : --Logging true --ConsoleOutput true --QueueLogLevel 8 --DriverMaxAttempts 3 --NetworkKey {0xE1, 0x40, 0xE5, 0x36, 0x2E, 0xD2, 0xC6, 0x42, 0x28, 0xB1, 0x07, 0xBF, 0x9B, 0x81, 0x4A, 0xDA} --SaveConfiguration true zwave2mqtt | 2019-02-05T09:07:48.338Z z2m:Zwave Connecting to /dev/ttyACM0 zwave2mqtt | 2019-02-05 09:07:48.342 Always, OpenZwave Version 1.4.3335 Starting Up zwave2mqtt | 2019-02-05 09:07:48.344 Info, Setting Up Provided Network Key for Secure Communications zwave2mqtt | 2019-02-05 09:07:48.345 Warning, Invalid Network Key. Does not contain 16 Bytes - Contains 1 zwave2mqtt | 2019-02-05 09:07:48.346 Warning, Raw Key: 0xDA} zwave2mqtt | 2019-02-05 09:07:48.347 Warning, Parsed Key: zwave2mqtt | 2019-02-05 09:07:48.348 Warning, 1) - 0xDA} zwave2mqtt | 2019-02-05 09:07:48.349 Error, Exception: Driver.cpp:6772 - 103 - Failed to Read Network Key

Thanks

Using openzwave 1.6 git build breaks nodes that are sleeping on startup

At startup they show as DEAD again.
startup

After the first checkin they show up correctly,... but the location and name get cleared. Node now shows as SLEEPING
after wakeup

The received data from the node gets send to mqtt without the name/location so node-red (in my case) does no longer matches on the mqtt messages.

If I try to set the name and location again, the node ends up in the REMVOED state. (It does not show up again after another checkin, restarting zwave2mqtt brings it back)
after update name/location

[Question] fgk-101 as doorbell not populating correctly

Hi,

I have recently moved over from HA zwave as I found that the constant reboots were messing up the network, one thing that I am missing however the ability to trip a fgk-101 device with a doorbell (found an article online) under HA it would change the status of the device from on to off and back again (about 10 times in a row), which I could then attach automation to trigger alerts etc..
Under zwave2mqtt I see that it nothing changes on the MQTT or zwave (webpage), however if I debug I see :

z2m:Zwave node event 15 0 +315ms
OpenZWave Detail, Node015, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x0f, 0x03, 0x20, 0x01, 0x00, 0xdf

OpenZWave Detail,
OpenZWave Info, Node015, Received Basic set from node 15: level=0. Sending event notification.
OpenZWave Detail, Node015, Notification: NodeEvent

z2m:Zwave node event 15 255 +179ms
OpenZWave Detail, Node015, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x0f, 0x03, 0x20, 0x01, 0xff, 0x20
OpenZWave Detail,

OpenZWave Info, Node015, Received Basic set from node 15: level=255. Sending event notification.

OpenZWave Detail, Node015, Notification: NodeEvent

So the zwave info it being sent and the level set from off to on when the doorbell goes.
My question is: what is the easiest / best way (might be two different options) to map this change either into MQTT or as a websocket / command to node-red?

Cheers

Neither software not documentation contains any default values or explanations

I am trying to - still not successful - setup this project.

I have the software compiled and running - but setting it up is almost impossible

Many of the settings are just blank fields.
What is the format of the network ID?
What poll interval should I use? I know little about z-wave - I have no idea if this should be 1 ms, or 10 ms, or 10000 ms. What is a good common sense default value? What is the minimum that will not make a zwave network collape?
What does the "Assume Awake" mean?

mqtt
What is a sensible reconnect interval?
What is the clean flag? What is recommended? Put a default and not a blank here

You can get this fixed easily in minutes by at least editing the documentation. And do not ask me to do it because I do not know the answers. I am totally confused

Question: Get current state from a node_id

Hi there.
I'm struggling with the api. I have set everything up and I can get all subscriptions on a topic. But when I start my own application I want to get the current value/state for a node.

I have tried to publish to this topic:
<prefix>/<?Location>/<node_name>/status or <prefix>/<?Location>/<node_name>/status/set
Where my prefix are set in my settings, and location is set to Kontor.

What am I missing here?

I'm kinda lost, so hope somebody could help me out :)

If this is the wrong place to publish questions I'm sorry.

Best Regards
Kjetil

Switch returns multiple conflicting changes

2019-03-09T14:04:28.547Z z2m:App Zwave api call: setValue [ 4, 37, 1, 0, false ]
2019-03-09T14:04:28.547Z z2m:Zwave Success zwave api call setValue
2019-03-09T14:04:28.702Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:true -> false
2019-03-09T14:04:28.724Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:false -> false
2019-03-09T14:04:30.424Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:false -> false
2019-03-09T14:04:35.068Z z2m:App Zwave api call: setValue [ 4, 37, 1, 0, true ]
2019-03-09T14:04:35.068Z z2m:Zwave Success zwave api call setValue
2019-03-09T14:04:35.131Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:false -> false
2019-03-09T14:04:35.204Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:false -> false
2019-03-09T14:04:35.274Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:false -> false
2019-03-09T14:04:39.431Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:false -> true
2019-03-09T14:04:47.767Z z2m:App Zwave api call: setValue [ 4, 37, 1, 0, false ]
2019-03-09T14:04:47.768Z z2m:Zwave Success zwave api call setValue
2019-03-09T14:04:47.962Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:true -> false
2019-03-09T14:04:52.424Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:false -> false
2019-03-09T14:04:59.582Z z2m:App Zwave api call: setValue [ 4, 37, 1, 0, true ]
2019-03-09T14:04:59.583Z z2m:Zwave Success zwave api call setValue
2019-03-09T14:04:59.692Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:false -> true
2019-03-09T14:05:04.472Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:true -> true
2019-03-09T14:05:04.514Z z2m:Zwave zwave node 4: changed: 37-1-0:Switch:true -> true

When using the toggle button on the UI it detects multie state changes. This is very hard to filter out on some MQTT clients as they also gets multiple changes.

Usually the first one is the correct one, but not always.

[feat] Publish scene event to MQTT

I'm trying to react to different button-presses on the NodOn Octan Remote.

When set to "Scene activation" it publishes scene events. OpenZWave correctly receives them and I was able to access these events within NodeRed (and the Open-Z-Wave-components).

I also see the events in the Zwave2Mqtt-log:

image

My request is that you publish those events to MQTT. I suggest a topic parallel to the status, like <prefix>/<nodeid>/scene

enablePoll / disablePoll does not update the is_polled flag of full zwave payload

While trying to solve #12 I was playing with enablePoll/disablePoll.

  • start zwave2mqtt with poll disabled for the value
  • send {"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]} to zwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/enablePoll/set
  • we now get the value every few seconds (frequency has no effect :()
    For the message received now this is the payload
{"value_id":"4-37-1-0","node_id":4,"class_id":37,"type":"bool","genre":"user","instance":1,"index":0,"label":"Switch","units":"","help":"","read_only":false,"write_only":false,"min":0,"max":0,"is_polled":false,"value":true}
  • (optionally disable poll again) send {"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]} to zwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/disablePoll/set

As you can see the polled message have is_polled set to false!

[Statement] MQTT auto discovery in HA

Hey,
So I have set up my lights how I like them now, I luckily don't have many so easy to manually setup the HA discovery in MQTT.
I wanted to share my findings so far, incase this sparks something, or (with a bit more time & learning) I might complete a pull request to get this automated.

So I have only looked at lights & switches, and for lights only the brightness of them.
For switches its pretty easy to setup with a template such as :
Saved to : homeassistant/switch/dining_room/config
{ "name": "In_wall_dining_room_switch", "state_topic": "zwave/Dining_Room/19/37/1/0", "command_topic": "zwave/_CLIENTS/ZWAVE_GATEWAY-Mos_mqtt/api/setValue/set", "availability_topic": "zwave/Dining_Room/19/status", "payload_on": "{ \"args\":[19,37,1,0,true]}", "payload_off": "{ \"args\":[19,37,1,0,false]}", "state_on": "true", "state_off": "false", "qos": 2, "retain": false, "payload_available": "true", "payload_not_available": "false", "unique_id": "dining_room_switch_111", "device": { "identifiers": "diningroomswitch111", "name": "in_wall_dining_room_switch", "sw_version": "1", "model": "Zwave", "manufacturer": "" } }

Lights get a little tricker, as annoyingly the payload on & payload off are supposed to match the state, which because I am using the API it does not...
{ "name": "In_wall_study_switch", "state_topic": "zwave/Study/21/37/1/0", "command_topic": "zwave/_CLIENTS/ZWAVE_GATEWAY-Mos_mqtt/api/setValue/set", "availability_topic": "zwave/Study/21/status", "brightness_command_topic": "zwave/Study/21/38/1/0/set", "brightness_state_topic": "zwave/Study/21/38/1/0", "payload_on": "{ \"args\":[21,37,1,0,true]}", "payload_off": "{ \"args\":[21,37,1,0,false]}", "state_value_template": "{% if value_json.value == true %}{ \"args\":[21,37,1,0,true]}{% else %}{ \"args\":[21,37,1,0,false]} {% endif %}", "brightness_scale": 99, "qos": 2, "retain": false, "payload_available": "true", "payload_not_available": "false", "unique_id": "study_switch_111", "on_command_type": "first", "device": { "identifiers": "inwallstudyswitch111", "name": "in_wall_study_switch", "sw_version": "1", "model": "Zwave", "manufacturer": "" } }

A couple of things to note:
HA throws no error if you miss the device, but you can't set an area for an entity without a device block.. so I added it.
the brightness scale depends on the switch, my nano dimmers accept 1 to 99, where as HA can provide any value to 255 I believe, so that limits that
On_command_type is set to first, as I was finding that for my dimmer if I sent the on / off and then the brightness something was happening where it would not changed, first made the brightness go first.

Anyways this is how I have manually set them up so that HA can be left running and I don't have to play around with the config & keep rebooting..

Protocol support in host url

Maybe I am missing something but passing in the host and port to the mqtt options.servers array inside lib/MqttClient.js doesn't seem to allow me to connect to a tls secured mosquitto broker.

If I manually change the code to be var client = mqtt.connect('tls://mqtt.example.com', options) then everything works as expected and a connection to the mqtt broker is established.

I have tried messing around with putting the url in the "Host url" section of the web UI and that results in connection failures that look like:

1556827963: New connection from 10.8.8.98 on port 8883.
1556827963: OpenSSL Error: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol
1556827963: Socket error on client <unknown>, disconnecting.

Request - Node Location

Hi,

Wondering whether a button to disable showing node_location in the topic even when present?

I like the node_location feature however if zwave2mqtt restarts then it needs to wait until the devices have woken up and synced it's status before it picks up the location again. Or maybe I'm missing something?

I have this running in docker so maybe there are persistent files I need to look out for.

Thanks

Rows per page uses node ID instead of counting items causing items to be hidden

I have been fighting to get a simple setup with an Aeotec stick and two sirens to work.
I moved them over from a Home Assistant installation and it used to be a larger installation

I tried to import the config and it was reported successful but I assumed it did not work because I could not see my 2 sirens.

So I removed them and added them and they are in the config. But no sign of them in the user interface - in the table of nodes. Until I by accident touch the header and the table sorted descending. Then I tried to click to see ALL instead of rows per page 10. Then all 3 nodes are visible

So the table of nodes and the feature of showing 10 at a time uses the node number. That is wrong. An Aeotec stick will keep on assigning higher numbers even when you remove older nodes. In my case my first node was in the upper 20s. And after having added and removed they became 30 and 31. I then tried to factory reset the stick and start all over. Then the nodes are 1,2,3 and shows normally. You should change the table showing feature so it shows the 10 first, Then the next 10, and next 10. Not by node ID buy by counting. People will have holdes in their node intervals so the tables will be strange with less than 10 in them otherwise and worst case people like me will not see any nodes

Container won't start for the second time

When I run sudo docker run --rm -it -p 8091:8091 --device=/dev/ttyAMA0 -v /var/lib/zwave2mqtt:/usr/src/app/store robertslando/zwave2mqtt:latest, configure everything and press CTRL-C.

It won't start the second time with this error message:

fs.js:1061
  return binding.unlink(pathModule._makeLong(path));
                 ^

Error: ENOENT: no such file or directory, unlink 'zwcfg_0xf5a134ce.xml'
    at Object.fs.unlinkSync (fs.js:1061:18)
    at fs.readdir.files.forEach.file (/snapshot/Zwave2Mqtt/lib/ZwaveClient.js:0:0)
    at Array.forEach (<anonymous>)
    at fs.readdir (/snapshot/Zwave2Mqtt/lib/ZwaveClient.js:0:0)
    at FSReqWrap.oncomplete (fs.js:135:15)
pi@zigzag:~ $ sudo docker run --rm -it -p 8091:8091 --device=/dev/ttyAMA0 -v /var/lib/zwave2mqtt:/usr/src/app/store robertslando/zwave2mqtt:latest

Any idea?

Reopening of serialport fails on settings save

2019-03-13T21:51:51.136Z z2m:Mqtt Error while publishing a value client disconnecting
2019-03-13T21:51:51.136Z z2m:Zwave node 1 ready: Z-Wave.Me - ZME_UZB1 USB Stick (Static PC Controller)
2019-03-13T21:51:51.137Z z2m:Mqtt Error while publishing a value client disconnecting
2019-03-13T21:51:51.137Z z2m:Zwave node 1 ready: Z-Wave.Me - ZME_UZB1 USB Stick (Static PC Controller)
2019-03-13T21:51:51.137Z z2m:Mqtt Error while publishing a value client disconnecting
2019-03-13T21:51:51.137Z z2m:Zwave node 1 ready: Z-Wave.Me - ZME_UZB1 USB Stick (Static PC Controller)
2019-03-13T21:51:51.137Z z2m:Zwave node 1 ready: Z-Wave.Me - ZME_UZB1 USB Stick (Static PC Controller)
/opt/zwave2mqtt/node_modules/nedb/lib/datastore.js:77
    if (err) { throw err; }
               ^

Error: ENOENT: no such file or directory, open '/opt/zwave2mqtt/store/mqtt/incoming~'

I restarted with the switch value with poll disabled under the gateway settings, I got this error.

How to access second channel on multi-zoned thermostat?

Hi,

I have a "SSR 302 2-zone Thermostat Receiver (Horstmann (Secure Meters))" (https://www.vesternet.com/mwdownloads/download/link/id/517/) which exposes two channels to switch on either the central heating or the hot water cylinder.

If I switch the "Mode" of value 3-64-2-0 using the web UI of Zwave2Mqtt, I see the following on the MQTT bus:

zwave/utility/heating/thermostat_mode/mode {"value_id":"3-64-2-0","node_id":3,"class_id":64,"type":"list","genre":"user","instance":2,"index":0,"label":"Mode","units":"","help":"","read_only":false,"write_only":false,"min":0,"max":0,"is_polled":false,"values":["Off","Heat"],"value":"Heat"}

And the 2nd channel of the thermostat activates as expected.

How can I use the gateway to toggle this? I have tried:

mosquitto_pub -t zwave/utility/heating/thermostat_mode/mode/set -m '{"value_id":"3-64-2-0","node_id":3,"class_id":64,"type":"list","genre":"user","instance":2,"index":0,"label":"Mode","units":"","help":"","read_only":false,"write_only":false,"min":0,"max":0,"is_polled":false,"values":["Off","Heat"],"value":"Heat"}'

But for some reason - that actually toggles channel 1 and not channel 2, resulting in the following output on the MQTT bus:

zwave/utility/heating/thermostat_mode/mode/set {"value_id":"3-64-2-0","node_id":3,"class_id":64,"type":"list","genre":"user","instance":2,"index":0,"label":"Mode","units":"","help":"","read_only":false,"write_only":false,"min":0,"max":0,"is_polled":false,"values":["Off","Heat"],"value":"Heat"}
zwave/utility/heating/thermostat_mode/mode {"value_id":"3-64-1-0","node_id":3,"class_id":64,"type":"list","genre":"user","instance":1,"index":0,"label":"Mode","units":"","help":"","read_only":false,"write_only":false,"min":0,"max":0,"is_polled":false,"values":["Off","Heat"],"value":"Heat"}

Note above, the value_id being set is 3-64-2-0 but the value being altered is 3-64-1-0 (i.e. the other channel).

Am I sending the wrong command to the MQTT gateway here?

Run on an embedded GL-MT300N-V2

I have some GL-MT300N-V2 laying around, small embedded devices that originally run openWRT - this units are fully flashable and should be fully capable as running as a server for zwave2mqtt with a flash image.

Anyone had any luck flashing a openWRT / GL-MT300N-V2 device with a basic linux imsage and run zwave2mqtt on it?

Would be an easy way to put a small factor zwave bridge in the house that is not a RPI

State change not being published

Hey,

I've got a door lock that reports it's battery state. I'm finding that while the zwave2mqtt Web interface is showing an updated battery state (93%), the mqtt topic it reports on is still showing the retained message of 100%, so it appears this change isn't being pushed to mqtt.

Any recommendations on what I could try to fix this?

Thanks, love this programme!

Zwcfg config file problems

Thanks for this great add-on. Very nice to see all the cool add-ons you created.

I tried to migrate from HA with Zwave with an Aeon Labs USB stick to this component. After configuring the basics I got the first nodes available in Zwave2Mqtt, but all the Zwave node information etc is empty because the add-on starts with a empty OpenZwave config.

I found the option to import an Zwave config file, so I uploaded my Zwcfg config file from the HA root directory but it looks that won't work. I don't see any difference.

After a few minutes a few of the 50 nodes I got have some Zwave node information. I give the Add-on a restart and after that all the node information was gone again.

So a few problems / suggestions for the manual:

  1. Why the Zwcfg file import doesn't work. I don't see any error or something. Maybe because of the 1.4 <---> 1.6 difference?
  2. Where in the add-on container is the local Zwcfg file located? I tried to find it but I can only find the /opt directory with the web application files but without the Zwcfg file.
  3. Make the Zwcfg persistent so after a restart not all the node information is gone
  4. An option to link an config file or something from outside the container inside would be great. So the config file could be on an central place instead of inside an add-on container.

[bug] Empty node type and product after adding new device

Version
Got this bug in version in the latest stable and the current head.

Steps:~
-add a new node
-Choosing in the UI the controller option "Add node", cancel the secure option
-Including the node by pressing the including option on the node
-The node is added successful

The new node is displayed in the list but with an empty type and product. It looks like there's no refresh or something.

When I look at the log I see all the information. In the UI all the entities and config option are available in the UI. Renaming the node in the UI are not displayed in the interface.

When I restart the application of docker container the type, product and new node name is displayed correctly.

Schermafbeelding 2019-07-13 om 12 37 37

Schermafbeelding 2019-07-13 om 12 37 58

Constant MQTT disconnect/reconnect.

I'm seeing a constant disconnect/reconnecting of the MQTT client. I'm running a mosquitto client on the same Raspberry pi that zwave2mqtt and HA are running on. My zwave2mqtt logs are filled with this:

2019-06-28T04:42:10.379Z z2m:Mqtt MQTT client reconnecting
2019-06-28T04:42:10.384Z z2m:Mqtt MQTT client closed
2019-06-28T04:42:15.389Z z2m:Mqtt MQTT client reconnecting
2019-06-28T04:42:15.393Z z2m:Mqtt MQTT client closed
2019-06-28T04:42:20.395Z z2m:Mqtt MQTT client reconnecting
2019-06-28T04:42:20.400Z z2m:Mqtt MQTT client closed

I'm fairly certain that the gateway isn't talking to the MQTT broker at all either. My zwave devices don't respond to injected messages, and the gateway doesn't seem to send out any messages when I trigger the devices. Is this a misconfiguration on my end, or a problem with the code? The auth details are correct, as are the URL and Port.

[Feature] Home Assistant integration

I see in your todo list that integration (discovery I assume) with home assistant is planned.

Can you tell me when you think to build this functionality?

I am already using zigbee2mqtt, so a big fan of mqtt and would be very happy if full integration with the device registry of home assistant is implemented for z-wave!

Battery Level reported incorrectly in UI and MQTT messages

<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">
    <Instance index="1" />
    <Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="100" />
</CommandClass>

One of my devices is battery powered and is zwave2mqtt is getting an incorrect Battery Level reading from COMMAND_CLASS_BATTERY.

On OpenHAB the device reads 100% with 2 fresh batteries and 50% with just one battery plugged in.

For zwave2mqtt the value is displayed as '0' in the interface and on the MQTT messages. When checking zwcfg.xml (because it also saves current values) it properly has the value set 100.

Correctly displays multiple group associations and suggestion for removing association for a dead child node

I've a device with a few associations. I got two problems with it:

  1. The interface does not display the entity names correctly because of the limited interface space. Now I can only see all the associations to open the zWave Log and look at the 'getAssociations' resultset
  2. Another problem is that the parent device has some associations with some dead child nodes and I can't remove that. I can only delete an association when that child node is in the node list, otherwise I can't choose it and got no option 'Remove'.

May be it's an option to display an dropdown with all the associations and when selection is made, display the option 'Remove'.

In the screenshot below, the Node 15 and 16 are dead. The other 4 associations are not displayed because of the limited space.
Schermafbeelding 2019-07-05 om 14 29 18

Settings does not load settings after a restart (on SmartOS/FreeBSD)

Error while retriving configuration, check console

Is displayed for a few seconds on the popup at the bottom.

  z2m:App Error: spawn udevadm ENOENT
  z2m:App     at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
  z2m:App     at onErrorNT (internal/child_process.js:362:16)
  z2m:App     at _combinedTickCallback (internal/process/next_tick.js:139:11)
  z2m:App     at process._tickCallback (internal/process/next_tick.js:181:9) +215ms

That might be to blame.

Crash after a few seconds on SmartOS/illumos

I found this project while googling for an issue building a node-red-ui-dashboard voor de openzwave stuff (which is a pain). This looked very promising and I got it installed OK.

After going through all the configuration steps and hitting save I had a hard crash. This happens again when restarting after a few seconds.

[root@amethyst /opt/Zwave2Mqtt]# npm start

> [email protected] start /opt/Zwave2Mqtt
> node bin/www

  z2m:Store scenes.json not found +0ms
  z2m:App Application path:/opt/Zwave2Mqtt +0ms
Initialising OpenZWave 1.4.3365 binary addon for Node.JS.
        OpenZWave Security API is ENABLED
        ZWave device db    : /opt/local/etc/openzwave
        User settings path : /opt/Zwave2Mqtt
        Option Overrides : --Logging true --ConsoleOutput true --QueueLogLevel 8 --DriverMaxAttempts 9999 --SaveConfiguration true --PollInterval 60000 --NetworkKey 0x58,0x50,0x3A,0x1C,0x0A,0xD7,0x66,0x6D,0x27,0x78,0x67,0x4C,0x1E,0xCB,0xC4,0x61
  z2m:Zwave Connecting to /dev/cua/0 +0ms
2019-03-03 13:22:11.659 Always, OpenZwave Version 1.4.3365 Starting Up
2019-03-03 13:22:11.660 Info, Setting Up Provided Network Key for Secure Communications
2019-03-03 13:22:11.660 Info, mgr,     Added driver for controller /dev/cua/0
2019-03-03 13:22:11.660 Info,   Opening controller /dev/cua/0
2019-03-03 13:22:11.660 Info, Trying to open serial port /dev/cua/0 (attempt 1)
2019-03-03 13:22:11.662 Info, Serial port /dev/cua/0 opened (attempt 1)
2019-03-03 13:22:11.662 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2019-03-03 13:22:11.662 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2019-03-03 13:22:11.662 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2019-03-03 13:22:11.662 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2019-03-03 13:22:11.662 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2019-03-03 13:22:11.662 Detail,
2019-03-03 13:22:11.662 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x15) - FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2019-03-03 13:22:11.665 Detail, contrlr,   Received: 0x01, 0x10, 0x01, 0x15, 0x5a, 0x2d, 0x57, 0x61, 0x76, 0x65, 0x20, 0x36, 0x2e, 0x30, 0x32, 0x00, 0x01, 0x92
2019-03-03 13:22:11.665 Detail,
2019-03-03 13:22:11.665 Info, contrlr, Received reply to FUNC_ID_ZW_GET_VERSION:
2019-03-03 13:22:11.665 Info, contrlr,     Static Controller library, version Z-Wave 6.02
2019-03-03 13:22:11.665 Detail, Node045,   Expected reply was received
2019-03-03 13:22:11.665 Detail, Node045,   Message transaction complete
2019-03-03 13:22:11.665 Detail,
2019-03-03 13:22:11.665 Detail, contrlr, Removing current message
2019-03-03 13:22:11.665 Detail,
2019-03-03 13:22:11.665 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x20) - FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2019-03-03 13:22:11.668 Detail, contrlr,   Received: 0x01, 0x08, 0x01, 0x20, 0xfc, 0x20, 0xd0, 0x90, 0x01, 0x4b
2019-03-03 13:22:11.668 Detail,
2019-03-03 13:22:11.668 Info, contrlr, Received reply to FUNC_ID_ZW_MEMORY_GET_ID. Home ID = 0xfc20d090.  Our node ID = 1
2019-03-03 13:22:11.668 Detail, Node032,   Expected reply was received
2019-03-03 13:22:11.668 Detail, Node032,   Message transaction complete
2019-03-03 13:22:11.668 Detail,
2019-03-03 13:22:11.668 Detail, contrlr, Removing current message
2019-03-03 13:22:11.668 Detail,
2019-03-03 13:22:11.668 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x05) - FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2019-03-03 13:22:11.670 Detail, contrlr,   Received: 0x01, 0x04, 0x01, 0x05, 0x1c, 0xe3
2019-03-03 13:22:11.670 Detail,
2019-03-03 13:22:11.670 Info, contrlr, Received reply to FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES:
2019-03-03 13:22:11.670 Info, contrlr,     There is a SUC ID Server (SIS) in this network.
2019-03-03 13:22:11.670 Info, contrlr,     The PC controller is an inclusion static update controller (SUC) and was the original primary before the SIS was added.
2019-03-03 13:22:11.670 Detail, Node227,   Expected reply was received
2019-03-03 13:22:11.670 Detail, Node227,   Message transaction complete
2019-03-03 13:22:11.670 Detail,
2019-03-03 13:22:11.670 Detail, contrlr, Removing current message
2019-03-03 13:22:11.670 Detail,
2019-03-03 13:22:11.670 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x07) - FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2019-03-03 13:22:11.674 Detail, contrlr,   Received: 0x01, 0x2b, 0x01, 0x07, 0x05, 0x24, 0x01, 0x15, 0x04, 0x00, 0x00, 0x01, 0xfe, 0x87, 0x7f, 0x88, 0xcf, 0x3f, 0xc0, 0x47, 0xfb, 0xdf, 0xfd, 0xe0, 0x67, 0x00, 0x80, 0x80, 0x00, 0x80, 0x86, 0x00, 0x00, 0x00, 0xe8, 0x73, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x60, 0x5a, 0x00, 0x6d
2019-03-03 13:22:11.674 Detail,
2019-03-03 13:22:11.674 Info, contrlr,  Received reply to FUNC_ID_SERIAL_API_GET_CAPABILITIES
2019-03-03 13:22:11.674 Info, contrlr,     Serial API Version:   5.36
2019-03-03 13:22:11.674 Info, contrlr,     Manufacturer ID:      0x0115
2019-03-03 13:22:11.674 Info, contrlr,     Product Type:         0x0400
2019-03-03 13:22:11.674 Info, contrlr,     Product ID:           0x0001
2019-03-03 13:22:11.674 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_RANDOM: 0x01, 0x04, 0x00, 0x1c, 0x20, 0xc7
2019-03-03 13:22:11.674 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_INIT_DATA: 0x01, 0x03, 0x00, 0x02, 0xfe
2019-03-03 13:22:11.674 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_SET_TIMEOUTS: 0x01, 0x05, 0x00, 0x06, 0x64, 0x0f, 0x97
2019-03-03 13:22:11.674 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION: 0x01, 0x07, 0x00, 0x03, 0x01, 0x02, 0x01, 0x00, 0xf9
2019-03-03 13:22:11.674 Detail, Node036,   Expected reply was received
2019-03-03 13:22:11.674 Detail, Node036,   Message transaction complete
2019-03-03 13:22:11.674 Detail,
2019-03-03 13:22:11.674 Detail, contrlr, Removing current message
2019-03-03 13:22:11.674 Detail,
2019-03-03 13:22:11.674 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x56) - FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2019-03-03 13:22:11.676 Detail, contrlr,   Received: 0x01, 0x04, 0x01, 0x56, 0x01, 0xad
2019-03-03 13:22:11.676 Detail,
2019-03-03 13:22:11.676 Info, contrlr, Received reply to GET_SUC_NODE_ID.  Node ID = 1
2019-03-03 13:22:11.676 Detail, Node173,   Expected reply was received
2019-03-03 13:22:11.676 Detail, Node173,   Message transaction complete
2019-03-03 13:22:11.676 Detail,
2019-03-03 13:22:11.676 Detail, contrlr, Removing current message
2019-03-03 13:22:11.676 Detail,
2019-03-03 13:22:11.677 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x1c) - FUNC_ID_ZW_GET_RANDOM: 0x01, 0x04, 0x00, 0x1c, 0x20, 0xc7
2019-03-03 13:22:11.734 Detail, contrlr,   Received: 0x01, 0x25, 0x01, 0x1c, 0x01, 0x20, 0x3d, 0x8c, 0x40, 0x51, 0x7b, 0x16, 0xaf, 0xf7, 0xe1, 0x16, 0xa5, 0x6b, 0x92, 0xc2, 0x32, 0x48, 0xdb, 0x7d, 0x27, 0x92, 0xc2, 0xc0, 0x14, 0x4e, 0xd6, 0x83, 0xab, 0x26, 0xb1, 0xcf, 0xc1, 0x26, 0x6a
2019-03-03 13:22:11.734 Detail,
2019-03-03 13:22:11.734 Info, contrlr, Received reply to FUNC_ID_ZW_GET_RANDOM: true
2019-03-03 13:22:11.734 Detail, Node032,   Expected reply was received
2019-03-03 13:22:11.734 Detail, Node032,   Message transaction complete
2019-03-03 13:22:11.734 Detail,
2019-03-03 13:22:11.734 Detail, contrlr, Removing current message
2019-03-03 13:22:11.734 Detail,
2019-03-03 13:22:11.734 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x02) - FUNC_ID_SERIAL_API_GET_INIT_DATA: 0x01, 0x03, 0x00, 0x02, 0xfe
  z2m:App Listening on port 8091 +0ms
  z2m:Mqtt MQTT client offline +0ms
  z2m:Mqtt MQTT client closed +1ms
2019-03-03 13:22:11.832 Detail, contrlr,   Received: 0x01, 0x25, 0x01, 0x02, 0x06, 0x08, 0x1d, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xc4
2019-03-03 13:22:11.832 Detail,
2019-03-03 13:22:11.832 Info, mgr,     Driver with Home ID of 0xfc20d090 is now ready.
2019-03-03 13:22:11.832 Info,
2019-03-03 13:22:11.832 Info, contrlr, Received reply to FUNC_ID_SERIAL_API_GET_INIT_DATA:
2019-03-03 13:22:11.832 Info, contrlr,     Node 001 - New
2019-03-03 13:22:11.832 Detail, Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=None live=1
2019-03-03 13:22:11.832 Detail, Node001, QueryStage_ProtocolInfo
2019-03-03 13:22:11.832 Detail, Node001, Queuing (Query) Get Node Protocol Info (Node=1): 0x01, 0x04, 0x00, 0x41, 0x01, 0xbb
2019-03-03 13:22:11.832 Detail, Node001, Queuing (Query) Query Stage Complete (ProtocolInfo)
2019-03-03 13:22:11.832 Info, Node001, Initializing Node. New Node: false (false)
2019-03-03 13:22:11.832 Info, contrlr,     Node 002 - New
2019-03-03 13:22:11.833 Detail, Node002, AdvanceQueries queryPending=0 queryRetries=0 queryStage=None live=1
2019-03-03 13:22:11.833 Detail, Node002, QueryStage_ProtocolInfo
2019-03-03 13:22:11.833 Detail, Node002, Queuing (Query) Get Node Protocol Info (Node=2): 0x01, 0x04, 0x00, 0x41, 0x02, 0xb8
2019-03-03 13:22:11.833 Detail, Node002, Queuing (Query) Query Stage Complete (ProtocolInfo)
2019-03-03 13:22:11.833 Info, Node002, Initializing Node. New Node: false (false)
2019-03-03 13:22:11.833 Info, contrlr,     Node 004 - New
2019-03-03 13:22:11.833 Detail, Node004, AdvanceQueries queryPending=0 queryRetries=0 queryStage=None live=1
2019-03-03 13:22:11.833 Detail, Node004, QueryStage_ProtocolInfo
2019-03-03 13:22:11.833 Detail, Node004, Queuing (Query) Get Node Protocol Info (Node=4): 0x01, 0x04, 0x00, 0x41, 0x04, 0xbe
2019-03-03 13:22:11.833 Detail, Node004, Queuing (Query) Query Stage Complete (ProtocolInfo)
2019-03-03 13:22:11.833 Info, Node004, Initializing Node. New Node: false (false)
2019-03-03 13:22:11.833 Detail, Node008,   Expected reply was received
2019-03-03 13:22:11.833 Detail, Node008,   Message transaction complete
2019-03-03 13:22:11.833 Detail,
2019-03-03 13:22:11.833 Detail, contrlr, Removing current message
2019-03-03 13:22:11.833 Detail, Node001, Notification: DriverReady
2019-03-03 13:22:11.833 Detail, Node001, Notification: NodeNew
2019-03-03 13:22:11.833 Detail, Node001, Notification: NodeAdded
  z2m:Zwave Scanning network with homeid: 0xfc20d090 +176ms
2019-03-03 13:22:11.834 Detail, Node002, Notification: NodeNew
2019-03-03 13:22:11.834 Detail, Node002, Notification: NodeAdded
2019-03-03 13:22:11.834 Detail, Node004, Notification: NodeNew
2019-03-03 13:22:11.834 Detail, Node004, Notification: NodeAdded
2019-03-03 13:22:11.834 Detail,
2019-03-03 13:22:11.834 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x06) - FUNC_ID_SERIAL_API_SET_TIMEOUTS: 0x01, 0x05, 0x00, 0x06, 0x64, 0x0f, 0x97
  z2m:Zwave Node added 1 +1ms
  z2m:Zwave Node added 2 +0ms
  z2m:Zwave Node added 4 +0ms
2019-03-03 13:22:11.836 Detail, contrlr,   Received: 0x01, 0x05, 0x01, 0x06, 0x64, 0x0f, 0x96
2019-03-03 13:22:11.836 Detail,
2019-03-03 13:22:11.836 Info, contrlr, Received reply to FUNC_ID_SERIAL_API_SET_TIMEOUTS
2019-03-03 13:22:11.836 Detail, Node015,   Expected reply was received
2019-03-03 13:22:11.836 Detail, Node015,   Message transaction complete
2019-03-03 13:22:11.836 Detail,
2019-03-03 13:22:11.836 Detail, contrlr, Removing current message
2019-03-03 13:22:11.836 Detail,
2019-03-03 13:22:11.836 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x00) - FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION: 0x01, 0x07, 0x00, 0x03, 0x01, 0x02, 0x01, 0x00, 0xf9
2019-03-03 13:22:11.837 Detail, contrlr, Removing current message
2019-03-03 13:22:11.837 Detail,
2019-03-03 13:22:11.837 Info, Node001, Sending (Query) message (Callback ID=0x00, Expected Reply=0x41) - Get Node Protocol Info (Node=1): 0x01, 0x04, 0x00, 0x41, 0x01, 0xbb
2019-03-03 13:22:11.845 Detail, Node001,   Received: 0x01, 0x09, 0x01, 0x41, 0xd3, 0x16, 0x01, 0x02, 0x02, 0x01, 0x73
2019-03-03 13:22:11.845 Detail,
2019-03-03 13:22:11.845 Info, Node001, Received reply to FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO
2019-03-03 13:22:11.845 Info, Node001,   Protocol Info for Node 1:
2019-03-03 13:22:11.845 Info, Node001,     Listening     = true
2019-03-03 13:22:11.845 Info, Node001,     Beaming       = true
2019-03-03 13:22:11.845 Info, Node001,     Routing       = true
2019-03-03 13:22:11.845 Info, Node001,     Max Baud Rate = 40000
2019-03-03 13:22:11.845 Info, Node001,     Version       = 4
2019-03-03 13:22:11.845 Info, Node001,     Security      = false
2019-03-03 13:22:11.849 Info, Node001,   Basic device class    (0x02) - Static Controller
2019-03-03 13:22:11.849 Info, Node001,   Generic device Class  (0x02) - Static Controller
2019-03-03 13:22:11.849 Info, Node001,   Specific device class (0x01) - Static PC Controller
2019-03-03 13:22:11.849 Info, Node001,     COMMAND_CLASS_BASIC is not mapped
2019-03-03 13:22:11.849 Info, Node001,   Mandatory Command Classes for Node 1:
2019-03-03 13:22:11.849 Info, Node001,     None
2019-03-03 13:22:11.850 Info, Node001,   Mandatory Command Classes controlled by Node 1:
2019-03-03 13:22:11.850 Info, Node001,     COMMAND_CLASS_BASIC
2019-03-03 13:22:11.850 Detail, Node022,   Expected reply was received
2019-03-03 13:22:11.850 Detail, Node022,   Message transaction complete
2019-03-03 13:22:11.850 Detail,
2019-03-03 13:22:11.850 Detail, Node001, Removing current message
2019-03-03 13:22:11.850 Detail, Node001, Notification: NodeProtocolInfo
2019-03-03 13:22:11.850 Detail, Node001, Notification: ValueAdded
2019-03-03 13:22:11.850 Detail, Node001, Query Stage Complete (ProtocolInfo)
2019-03-03 13:22:11.850 Detail, Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Probe live=1
2019-03-03 13:22:11.850 Detail, Node001, QueryStage_Probe
2019-03-03 13:22:11.851 Detail, Node001, QueryStage_WakeUp
2019-03-03 13:22:11.851 Detail, Node001, QueryStage_ManufacturerSpecific1
2019-03-03 13:22:11.851 Detail, Node001, Load Controller Manufacturer Specific Config
  z2m:Zwave ValueAdded: 1-32-1-0 Basic +17ms
2019-03-03 13:22:11.867 Detail, Node001, QueryStage_NodePlusInfo
2019-03-03 13:22:11.867 Detail, Node001, QueryStage_SecurityReport
2019-03-03 13:22:11.867 Detail, Node001, QueryStage_ManufacturerSpecific2
2019-03-03 13:22:11.867 Detail, Node001, QueryStage_Versions
2019-03-03 13:22:11.867 Detail, Node001, QueryStage_Instances
2019-03-03 13:22:11.867 Info, Node001, Essential node queries are complete
2019-03-03 13:22:11.867 Detail, Node001, QueryStage_Static
2019-03-03 13:22:11.867 Detail, Node001, QueryStage_Associations
2019-03-03 13:22:11.867 Detail, Node001, QueryStage_Neighbors
2019-03-03 13:22:11.867 Detail, Requesting routing info (neighbor list) for Node 1
2019-03-03 13:22:11.867 Detail, Node001, Queuing (Command) Get Routing Info (Node=1): 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x03, 0x7a
2019-03-03 13:22:11.867 Detail, Node001, Queuing (Query) Query Stage Complete (Neighbors)
2019-03-03 13:22:11.867 Detail, Node001, Notification: EssentialNodeQueriesComplete
2019-03-03 13:22:11.867 Detail,
2019-03-03 13:22:11.867 Info, Node001, Sending (Command) message (Callback ID=0x00, Expected Reply=0x80) - Get Routing Info (Node=1): 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x03, 0x7a
2019-03-03 13:22:11.871 Detail, Node001,   Received: 0x01, 0x20, 0x01, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56
2019-03-03 13:22:11.871 Detail,
2019-03-03 13:22:11.871 Info, Node001, Received reply to FUNC_ID_ZW_GET_ROUTING_INFO
2019-03-03 13:22:11.872 Info, Node001,     Neighbors of this node are:
2019-03-03 13:22:11.872 Info, Node001,     Node 4
2019-03-03 13:22:11.872 Detail,   Expected reply was received
2019-03-03 13:22:11.872 Detail,   Message transaction complete
2019-03-03 13:22:11.872 Detail,
2019-03-03 13:22:11.872 Detail, Node001, Removing current message
2019-03-03 13:22:11.872 Detail,
2019-03-03 13:22:11.872 Info, Node002, Sending (Query) message (Callback ID=0x00, Expected Reply=0x41) - Get Node Protocol Info (Node=2): 0x01, 0x04, 0x00, 0x41, 0x02, 0xb8
2019-03-03 13:22:11.875 Detail, Node002,   Received: 0x01, 0x09, 0x01, 0x41, 0xd3, 0x9c, 0x01, 0x04, 0x21, 0x01, 0xdc
2019-03-03 13:22:11.875 Detail,
2019-03-03 13:22:11.875 Info, Node002, Received reply to FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO
2019-03-03 13:22:11.875 Info, Node002,   Protocol Info for Node 2:
2019-03-03 13:22:11.875 Info, Node002,     Listening     = true
2019-03-03 13:22:11.875 Info, Node002,     Beaming       = true
2019-03-03 13:22:11.875 Info, Node002,     Routing       = true
2019-03-03 13:22:11.875 Info, Node002,     Max Baud Rate = 40000
2019-03-03 13:22:11.875 Info, Node002,     Version       = 4
2019-03-03 13:22:11.875 Info, Node002,     Security      = false
2019-03-03 13:22:11.875 Info, Node002,   Basic device class    (0x04) - Routing Slave
2019-03-03 13:22:11.875 Info, Node002,   Generic device Class  (0x21) - Multilevel Sensor
2019-03-03 13:22:11.875 Info, Node002,   Specific device class (0x01) - Routing Multilevel Sensor
2019-03-03 13:22:11.875 Info, Node002,     COMMAND_CLASS_BASIC will be mapped to COMMAND_CLASS_SENSOR_MULTILEVEL
2019-03-03 13:22:11.875 Info, Node002,   Mandatory Command Classes for Node 2:
2019-03-03 13:22:11.875 Info, Node002,     COMMAND_CLASS_SENSOR_MULTILEVEL
2019-03-03 13:22:11.875 Info, Node002,   Mandatory Command Classes controlled by Node 2:
2019-03-03 13:22:11.875 Info, Node002,     COMMAND_CLASS_BASIC
2019-03-03 13:22:11.875 Detail, Node156,   Expected reply was received
2019-03-03 13:22:11.875 Detail, Node156,   Message transaction complete
2019-03-03 13:22:11.875 Detail,
2019-03-03 13:22:11.875 Detail, Node002, Removing current message
2019-03-03 13:22:11.875 Detail, Node002, Notification: NodeProtocolInfo
2019-03-03 13:22:11.875 Detail, Node002, Query Stage Complete (ProtocolInfo)
2019-03-03 13:22:11.875 Detail, Node002, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Probe live=1
2019-03-03 13:22:11.875 Detail, Node002, QueryStage_Probe
2019-03-03 13:22:11.875 Info, Node002, NoOperation::Set - Routing=true
2019-03-03 13:22:11.875 Detail, Node002, Queuing (NoOp) NoOperation_Set (Node=2): 0x01, 0x09, 0x00, 0x13, 0x02, 0x02, 0x00, 0x00, 0x25, 0x0a, 0xca
2019-03-03 13:22:11.875 Detail, Node002, Queuing (Query) Query Stage Complete (Probe)
2019-03-03 13:22:11.875 Detail,
2019-03-03 13:22:11.875 Info, Node002, Sending (NoOp) message (Callback ID=0x0a, Expected Reply=0x13) - NoOperation_Set (Node=2): 0x01, 0x09, 0x00, 0x13, 0x02, 0x02, 0x00, 0x00, 0x25, 0x0a, 0xca
2019-03-03 13:22:11.883 Detail, Node002,   Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2019-03-03 13:22:11.883 Detail, Node002,   ZW_SEND_DATA delivered to Z-Wave stack
  z2m:App New connection LvkjHajX3keecGb7AAAA +2s
  z2m:Mqtt MQTT client reconnecting +1s
  z2m:Mqtt MQTT client closed +3ms
  z2m:Mqtt MQTT client reconnecting +2s
  z2m:Mqtt MQTT client closed +1ms
  z2m:Mqtt MQTT client reconnecting +2s
  z2m:Mqtt MQTT client closed +1ms
2019-03-03 13:22:17.580 Detail, Node002,   Received: 0x01, 0x18, 0x00, 0x13, 0x0a, 0x01, 0x02, 0x3a, 0x00, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x01, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0x04, 0x02, 0xb0
2019-03-03 13:22:17.580 Detail, Node002,   ZW_SEND_DATA Request with callback ID 0x0a received (expected 0x0a)
2019-03-03 13:22:17.580 Info, Node002, WARNING: ZW_SEND_DATA failed. No ACK received - device may be asleep.
2019-03-03 13:22:17.580 Warning, Node002, WARNING: Device is not a sleeping node.
2019-03-03 13:22:17.580 Info, Node002, QueryStageRetry stage Probe requested stage Probe max 3 retries 0 pending 1
2019-03-03 13:22:17.580 Detail, Node001,   Expected callbackId was received
2019-03-03 13:22:17.580 Detail, Node001,   Expected reply was received
2019-03-03 13:22:17.580 Detail, Node001,   Message transaction complete
2019-03-03 13:22:17.580 Detail,
2019-03-03 13:22:17.580 Detail, Node002, Removing current message
2019-03-03 13:22:17.580 Detail, Node002, Notification: Notification - NoOperation
2019-03-03 13:22:17.581 Detail,
2019-03-03 13:22:17.581 Info, Node004, Sending (Query) message (Callback ID=0x00, Expected Reply=0x41) - Get Node Protocol Info (Node=4): 0x01, 0x04, 0x00, 0x41, 0x04, 0xbe
  z2m:Zwave Notification from node 2: Notification - NoOperation (2) +6s
2019-03-03 13:22:17.583 Detail, Node004,   Received: 0x01, 0x09, 0x01, 0x41, 0xd3, 0x9c, 0x01, 0x04, 0x10, 0x01, 0xed
2019-03-03 13:22:17.583 Detail,
2019-03-03 13:22:17.583 Info, Node004, Received reply to FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO
2019-03-03 13:22:17.583 Info, Node004,   Protocol Info for Node 4:
2019-03-03 13:22:17.583 Info, Node004,     Listening     = true
2019-03-03 13:22:17.583 Info, Node004,     Beaming       = true
2019-03-03 13:22:17.583 Info, Node004,     Routing       = true
2019-03-03 13:22:17.583 Info, Node004,     Max Baud Rate = 40000
2019-03-03 13:22:17.583 Info, Node004,     Version       = 4
2019-03-03 13:22:17.583 Info, Node004,     Security      = false
2019-03-03 13:22:17.583 Info, Node004,   Basic device class    (0x04) - Routing Slave
2019-03-03 13:22:17.583 Info, Node004,   Generic device Class  (0x10) - Binary Switch
2019-03-03 13:22:17.583 Info, Node004,   Specific device class (0x01) - Binary Power Switch
2019-03-03 13:22:17.584 Info, Node004,     COMMAND_CLASS_BASIC will be mapped to COMMAND_CLASS_SWITCH_BINARY
2019-03-03 13:22:17.584 Info, Node004,   Mandatory Command Classes for Node 4:
2019-03-03 13:22:17.584 Info, Node004,     COMMAND_CLASS_BASIC
2019-03-03 13:22:17.584 Info, Node004,     COMMAND_CLASS_SWITCH_BINARY
2019-03-03 13:22:17.584 Info, Node004,     COMMAND_CLASS_SWITCH_ALL
2019-03-03 13:22:17.584 Info, Node004,   Mandatory Command Classes controlled by Node 4:
2019-03-03 13:22:17.584 Info, Node004,     None
2019-03-03 13:22:17.584 Detail, Node156,   Expected reply was received
2019-03-03 13:22:17.584 Detail, Node156,   Message transaction complete
2019-03-03 13:22:17.584 Detail,
2019-03-03 13:22:17.584 Detail, Node004, Removing current message
2019-03-03 13:22:17.584 Detail, Node004, Notification: NodeProtocolInfo
2019-03-03 13:22:17.584 Detail, Node004, Notification: ValueAdded
2019-03-03 13:22:17.584 Detail, Node004, Notification: ValueAdded
2019-03-03 13:22:17.584 Detail, Node004, Query Stage Complete (ProtocolInfo)
2019-03-03 13:22:17.584 Detail, Node004, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Probe live=1
2019-03-03 13:22:17.584 Detail, Node004, QueryStage_Probe
2019-03-03 13:22:17.584 Info, Node004, NoOperation::Set - Routing=true
2019-03-03 13:22:17.584 Detail, Node004, Queuing (NoOp) NoOperation_Set (Node=4): 0x01, 0x09, 0x00, 0x13, 0x04, 0x02, 0x00, 0x00, 0x25, 0x0b, 0xcd
2019-03-03 13:22:17.584 Detail, Node004, Queuing (Query) Query Stage Complete (Probe)
2019-03-03 13:22:17.584 Detail,
2019-03-03 13:22:17.584 Info, Node004, Sending (NoOp) message (Callback ID=0x0b, Expected Reply=0x13) - NoOperation_Set (Node=4): 0x01, 0x09, 0x00, 0x13, 0x04, 0x02, 0x00, 0x00, 0x25, 0x0b, 0xcd
  z2m:Zwave ValueAdded: 4-37-1-0 Switch +3ms
  z2m:Zwave ValueAdded: 4-39-1-0 Switch All +0ms
2019-03-03 13:22:17.592 Detail, Node004,   Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2019-03-03 13:22:17.592 Detail, Node004,   ZW_SEND_DATA delivered to Z-Wave stack
2019-03-03 13:22:17.616 Detail, Node004,   Received: 0x01, 0x18, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x02, 0x00, 0xb0, 0x7f, 0x7f, 0x7f, 0x7f, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x4d
2019-03-03 13:22:17.616 Detail, Node004,   ZW_SEND_DATA Request with callback ID 0x0b received (expected 0x0b)
2019-03-03 13:22:17.616 Info, Node004, Request RTT 32 Average Request RTT 32
2019-03-03 13:22:17.616 Detail,   Expected callbackId was received
2019-03-03 13:22:17.616 Detail,   Expected reply was received
2019-03-03 13:22:17.617 Detail,   Message transaction complete
2019-03-03 13:22:17.617 Detail,
2019-03-03 13:22:17.617 Detail, Node004, Removing current message
2019-03-03 13:22:17.617 Detail, Node004, Notification: Notification - NoOperation
2019-03-03 13:22:17.617 Detail, Node001, Query Stage Complete (Neighbors)
2019-03-03 13:22:17.617 Detail, Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Session live=1
2019-03-03 13:22:17.617 Detail, Node001, QueryStage_Session
2019-03-03 13:22:17.617 Detail, Node001, QueryStage_Dynamic
2019-03-03 13:22:17.617 Detail, Node001, QueryStage_Configuration
2019-03-03 13:22:17.617 Detail, Node001, QueryStage_Complete
2019-03-03 13:22:17.617 Warning, CheckCompletedNodeQueries m_allNodesQueried=0 m_awakeNodesQueried=0
2019-03-03 13:22:17.617 Warning, CheckCompletedNodeQueries all=0, deadFound=0 sleepingOnly=0
2019-03-03 13:22:17.617 Detail, Node001, Notification: NodeQueriesComplete
2019-03-03 13:22:17.617 Detail, Node002, Query Stage Complete (Probe)
2019-03-03 13:22:17.617 Detail, Node002, AdvanceQueries queryPending=0 queryRetries=1 queryStage=Probe live=1
2019-03-03 13:22:17.617 Detail, Node002, QueryStage_Probe
2019-03-03 13:22:17.617 Info, Node002, NoOperation::Set - Routing=true
2019-03-03 13:22:17.617 Detail, Node002, Queuing (NoOp) NoOperation_Set (Node=2): 0x01, 0x09, 0x00, 0x13, 0x02, 0x02, 0x00, 0x00, 0x25, 0x0c, 0xcc
2019-03-03 13:22:17.617 Detail, Node002, Queuing (Query) Query Stage Complete (Probe)
2019-03-03 13:22:17.617 Detail,
2019-03-03 13:22:17.617 Info, Node002, Sending (NoOp) message (Callback ID=0x0c, Expected Reply=0x13) - NoOperation_Set (Node=2): 0x01, 0x09, 0x00, 0x13, 0x02, 0x02, 0x00, 0x00, 0x25, 0x0c, 0xcc
  z2m:Zwave Notification from node 4: Notification - NoOperation (2) +32ms
/opt/Zwave2Mqtt/lib/Gateway.js:76
  var values = this.config.values.filter(v => v.device == node.device_id);
                                  ^

TypeError: Cannot read property 'filter' of undefined
    at Gateway.onValueChanged (/opt/Zwave2Mqtt/lib/Gateway.js:76:35)
    at emitThree (events.js:136:13)
    at ZwaveClient.emit (events.js:217:7)
    at ZwaveClient.nodeReady (/opt/Zwave2Mqtt/lib/ZwaveClient.js:305:14)
    at emitTwo (events.js:126:13)
    at OZW.emit (events.js:214:7)
2019-03-03 13:22:17.624 Detail, Node002,   Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2019-03-03 13:22:17.624 Detail, Node002,   ZW_SEND_DATA delivered to Z-Wave stack
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-03T13_22_17_805Z-debug.log
[root@amethyst /opt/Zwave2Mqtt]# cat /root/.npm/_logs/2019-03-03T13_22_17_805Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/opt/local/bin/node', '/opt/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /opt/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/Zwave2Mqtt/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/opt/local/sbin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin
9 verbose lifecycle [email protected]~start: CWD: /opt/Zwave2Mqtt
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node bin/www' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node bin/www`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:915:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /opt/Zwave2Mqtt
16 verbose SunOS 5.11
17 verbose argv "/opt/local/bin/node" "/opt/local/bin/npm" "start"
18 verbose node v8.12.0
19 verbose npm  v6.8.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node bin/www`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

How to remove a failed node completely?

Is there a way to remove a failed node?

I've tried modifying the xml file both while the server is up and down but doesn't make a difference. Can't see an option for it unless I'm missing something.

Thanks

No device options visibleon USB Dongle (ZWave Plus USB Dongle)

Hi there, great work! I've checked the git version yesterday with a ZWave Plus USB Dongle.
The device is recognized & after about 15 minutes all known ZWave devices appear in the webinterface.

When I select the USB Dongle there a no options under user, config, etc. So I'm not able to add devices, remove devices, etc

Cannot rebuild [email protected]

I have issues installing the npm packages with OpenZwave2Mqtt version 1.1.3.

root@83e2f7f43730:/opt$ npm install [email protected]

> [email protected] preinstall /opt/node_modules/openzwave-shared
> node lib/install-ozw.js


> [email protected] install /opt/node_modules/openzwave-shared
> node-gyp rebuild

Illegal option -p
nm: 'a.out': No such file
gyp: Call to 'ldconfig -p | grep 'libopenzwave.so ' | awk '{print $4}' | xargs nm -g --demangle |grep OpenZWave::Value::GetTypeNameFromEnum | wc -l' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.9.125-linuxkit
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/node_modules/openzwave-shared
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-07-03T09_31_19_381Z-debug.log

I have uploaded the logfile to my gist: https://gist.github.com/rgruyters/28825da79ee6ad479f134e9b14f71015

I don't have any issues when I install version 1.4.8 of openzwave-shared.

Is this a known issue?

Start inclusion in secure mode

It doesn't look posible to start a secure inclusion via the control panel, it should be the same as regular inclusion but passing 'true' as the first argument.

Menu always expands on click

You can collapse the menu by clicking on the little 3 strip icon in the header.
This is great if the screen space available is small (say a small tablet), tapping a menu icon will expand the menu again.

Ideally it should remain collapsed until the header is clicked again.

Question: Launching at Boot

Sorry for a possible Linux noob question. How would I automatically launch Zwave2Mqtt at boot? I'm trying to create a systemd service, but issues with references to file dependencies, etc.

Support user defined aliases instead of numeric IDs in ValueId gateway type

I see the argument against using names for the value classes (localisation, subject to change, etc.). However, it would be great if nodes could still be named. Those arguments do not apply to node names as they are specified manually in the UI.

This would help tremendously with moving/replacing z-wave devices.

Currently the options are /33/112/1/90, requiring downstream consumers to keep track of Node IDs, or /door5/sensor_binary/sensor, where sensor_binary and sensor are not guaranteed to be stable since they come from an external library. If we had a hybrid option like /door5/112/1/90, then consumers do not need to know which node ID to use, but they can still use constant IDs for the value.

Does not reattach to controller after softreset

After sending a softreset command the USB device gets briefly detached and reattached.
This results in zwave2mqtt talking to a no longer valid fd? for the serial device. Restart zwave2mqtt fixes this.

Reopening the device after sending a softreset should have the same effect.

docker

Hi

when I run docker run --rm -it -p 8091:8091 --device=/dev/ttyACM1 --mount source=zwave2mqtt,target=/usr/src/app/store robertslando/zwave2mqtt:latest

the I can't reach the mqtt server running on same server at docker.. just get timeout connectig

Web page connection - 302 error code

After the success install, I'm connect on the web service : http://myLocalIP:8091

But, my client notify me than the page is not redirected correctly.

In the backend, I have this message :

  z2m:Store settings.json not found +0ms
  z2m:Store scenes.json not found +109ms
  z2m:App Application path:/usr/src/app +0ms
  z2m:Gateway Gateway needs both MQTT and Zwave Configuration to work +0ms
  z2m:App Listening on port 8091 +0ms
  z2m:App Error: Not Found
  z2m:App     at /snapshot/Zwave2Mqtt/app.js:0:0
  z2m:App     at Layer.handle [as handle_request] (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/layer.js:95:5)
  z2m:App     at trim_prefix (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:317:13)
  z2m:App     at /snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:284:7
  z2m:App     at Function.process_params (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:335:12)
  z2m:App     at next (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:275:10)
  z2m:App     at cors (/snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:188:7)
  z2m:App     at /snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:224:17
  z2m:App     at originCallback (/snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:214:15)
  z2m:App     at /snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:219:13
  z2m:App     at optionsCallback (/snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:199:9)
  z2m:App     at corsMiddleware (/snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:204:7)
  z2m:App     at Layer.handle [as handle_request] (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/layer.js:95:5)
  z2m:App     at trim_prefix (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:317:13)
  z2m:App     at /snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:284:7
  z2m:App     at Function.process_params (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:335:12) +9s
GET / 302 163.416 ms - 46
  z2m:App Error: Not Found
  z2m:App     at /snapshot/Zwave2Mqtt/app.js:0:0
  z2m:App     at Layer.handle [as handle_request] (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/layer.js:95:5)
...
...
...
  z2m:App Error: Not Found
  z2m:App     at /snapshot/Zwave2Mqtt/app.js:0:0
  z2m:App     at Layer.handle [as handle_request] (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/layer.js:95:5)
  z2m:App     at trim_prefix (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:317:13)
  z2m:App     at /snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:284:7
  z2m:App     at Function.process_params (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:335:12)
  z2m:App     at next (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:275:10)
  z2m:App     at cors (/snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:188:7)
  z2m:App     at /snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:224:17
  z2m:App     at originCallback (/snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:214:15)
  z2m:App     at /snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:219:13
  z2m:App     at optionsCallback (/snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:199:9)
  z2m:App     at corsMiddleware (/snapshot/Zwave2Mqtt/node_modules/cors/lib/index.js:204:7)
  z2m:App     at Layer.handle [as handle_request] (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/layer.js:95:5)
  z2m:App     at trim_prefix (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:317:13)
  z2m:App     at /snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:284:7
  z2m:App     at Function.process_params (/snapshot/Zwave2Mqtt/node_modules/express/lib/router/index.js:335:12) +64ms
GET / 302 39.646 ms - 46

To inform, I use one Raspberry pi 0w with raspbian-strech. I have try your dockers images, the classic install and build my own docker image (with arm32v6/alpine).

Thanks a lot for your help !

UI Toggle buttons (for Switches) does a weird state dance when toggled

I have a outlet device that has an on/off switch exposed in the user settings.

Changing the stay from On -> Off (or Off -> On) will make the toggle switch position, but immediately go back to the previous position. (It also sends the zwave command to the device). The device them responds with the new state making the toggle go to the correct state.

It would be nice that the button stays at the new position and maybe is disabled for a second (or until a new update is received - which ever comes first I guess).

Device DB not working

I’d love to move over to this, but if I start afresh, it doesn’t pull any device information (docker). I’ve tried pulling over the folder structure of the device db and pointing at that, but everything is unrecognised.

If I feed it an existing zwcfg from hass, it works.

Am I doing something wrong?

Set row number per page

Is it possible to change the default rows per page to something else?
The default appears to be 10, however i prefer 50 or All (50 does not exist), so wondered if there was a config setting to change the default or some JS that can force it to change?

[Question] Properties polling

Telling the truth I do not completele understand how properties polling is implemented in openzwave right now, but it will be very good to have different settings per property for polling.

Two types of devices at my setup are: danfoss thermostat and MCO CO2 sensor.
First devices is almost always in sleep mode, second one is always on. Danfoss thermostat wakes up from time to time and pushes current temp settings. CO2 sensor automatically pushes sensor value change is more then 50ppm....

But it's not good. For CO2 device is would be much better to have possibility to poll it's value periodically (i.e. get value each 10 seconds) and for danfoss thermostat it would be very good to have possibility to adjust it's clock - this is more complicated. You should listen on 'wake up' event, imediatelly poll for clock values and send new time in case there is a big difference - this steps should be done before device will go to sleep again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.