项目作者: Edubits

项目描述 :
Publishes the status of devices to a MQTT topic and is able to set values based on subscribed topics.
高级语言: JavaScript
项目地址: git://github.com/Edubits/Zway-MQTT.git
创建时间: 2016-05-28T14:02:10Z
项目社区:https://github.com/Edubits/Zway-MQTT

开源协议:Apache License 2.0

下载


MQTT Z-Way HA module

Publishes the status of devices to a MQTT topic and is able to set
values based on subscribed topics.

It is possible to publish the status for single devices, or for devices
which are tagged. Per publication you can customize the topic and decide
if the message should be retained or not.

Installation

Make sure that the BaseModule is installed prior to installing this
module.

The preferred way of installing this module is via the “Zwave.me App Store”
available in 2.2.0 and higher. For stable module releases no access token is
required. If you want to test the latest pre-releases use ‘mqtt_beta’ as
app store access token.

For developers and users of older Z-Way versions installation via Git is
recommended.

  1. cd /opt/z-way-server/automation/userModules
  2. git clone https://github.com/Edubits/Zway-MQTT.git MQTT --branch latest

To update or install a specific version

  1. cd /opt/z-way-server/automation/userModules/MQTT
  2. git fetch --tags
  3. # For latest released version
  4. git checkout tags/latest
  5. # For a specific version
  6. git checkout tags/1.0
  7. # For development version
  8. git checkout -b master --track origin/master

Usage

Add an instance of the app through and fill in the details about your
MQTT broker. After this configure for which devices you want to publish
the status to MQTT. You can either configure this for a single device
or for all devices tagged with a certain tag at once.

Defining the publication topic

You can define the topic used for publication. It’s constructed from the
following parts:

  • Topic Prefix – The start of each topic
  • Topic – Per publication defined topic

In each of these you can use %deviceId%, %deviceName% and %roomName%
as variables. For example having Foo/bar as prefix and
%roomName%/%deviceName% as topic can result in a message published on the
topic Foo/bar/livingRoom/dimmer. Both %deviceName% and %roomName% will
be camelcased.

Interacting through MQTT

You can also publish to certain topics to interact with Z-Way. For this
the two postfixes are used:

  • Status postfix (default: status)
  • Set postfix (default: set)

Taking the same example as before, when you publish an empty message to
Foo/bar/livingRoom/dimmer/status the current value will be published
again. When you publish a value (for example on, off or 87) to
Foo/bar/livingRoom/dimmer/set the dimmer will be set to that level.

Acknowledgements

I want to thank @goodfield for finding and fixing a fully JavaScript
MQTTClient which I could use in this module as well. His module can be
found at https://github.com/goodfield/zway-mqtt.

License

Copyright 2019 Robin Eggenkamp - Edubits

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.