Comments (7)
For those finding this issue, the new pub call after the fix is now:
mosquitto_pub -t zwave/utility/heating/thermostat_mode/instance_2/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"}'
or, more minimally (given that the instance, index and value label are part of the topic):
mosquitto_pub -t zwave/utility/heating/thermostat_mode/instance_2/mode/set -m '{"value":"Heat"}'
from zwave2mqtt.
I've investigate a little, and the issue seems to be in Gateway.js
here:
function onWriteRequest(parts, payload){
var value = this.topicValues[parts.join('/')];
if(value){
payload = parsePayload(payload, value, value.conf, this.config)
this.zwave.writeValue(value, payload);
}
}
It seems that for the topic (utility/heating/thermostat_mode/mode
in this case) only one value is stored in the this.topicValues
which is the value for channel 1. So when setting channel 2, it is being routed to channel 1.
Could it be that the gateway only supports one value per topic currently?
from zwave2mqtt.
I am still quite new to ZWave, however I'm happy to look at creating a PR to resolve this issue if the maintainers could offer me a little guidance on their preferred approach.
from zwave2mqtt.
As a workaround, I have realised I can do
mosquitto_pub -t zwave/_CLIENTS/ZWAVE_GATEWAY-fluoron/api/setValue/set -m '{"args":[ { "node_id": 3, "class_id": 64, "instance": 1, "index": 0 }, "Heat" ] }'
and
mosquitto_pub -t zwave/_CLIENTS/ZWAVE_GATEWAY-fluoron/api/setValue/set -m '{"args":[ { "node_id": 3, "class_id": 64, "instance": 2, "index": 0 }, "Heat" ] }'
to control the two channels independently.
from zwave2mqtt.
Hi @tul, thanks for your issue!
It seems that for the topic (utility/heating/thermostat_mode/mode in this case) only one value is stored in the this.topicValues which is the value for channel 1. So when setting channel 2, it is being routed to channel 1.
This is correct and I will try to fix this. As workaround you can send a raw api request like you did or add two values on gateway values tables (Go to the web UI under Settings at the end and click on new value
. Here you can select values from devices and choose a custom topic for them :)
from zwave2mqtt.
@tul Could you check if it works now? 😃 I have also updated Readme:
- Named Topics: Automatically configured. 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 corrisponding 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 `_`)
from zwave2mqtt.
Hi @robertsLando - yes your fix has worked great, thanks very much for the quick response!
from zwave2mqtt.
Related Issues (20)
- I have integrated a Schlage FE599 and having MQTT issues HOT 3
- [question] Scenes from z-wave.me zme_wcd2 HOT 8
- [question] Webinterface missing after update HOT 8
- [bug] FGWPE FGWPF wrong instant consumption HOT 5
- [feat] Add support for '/' in MQTT prefix HOT 4
- [question] cannot get zwave2mqtt to save changes HOT 6
- no zwave updates is sent to mqtt HOT 8
- [question] Append-mode for zwave logging HOT 5
- [question] Does zwave2mqtt support symlinks? HOT 13
- MQTT retain setting per item in Gateway config [feat] HOT 3
- FGBS001 status changed not relayed to MQTT HOT 3
- Device discovery and enumeration differs from Zwave SDK PC Controller HOT 7
- devices doesn't appear on home assistant?[question] HOT 13
- [question] Lights status not updated when changed physically HOT 7
- [bug] Adding assocations does not seem to work HOT 1
- [question] Availability state not set in HA HOT 3
- Mesh not drawn correctly when removed node is part of mesh [bug] HOT 4
- OpenZwave newer Versions in Docker Image [question] [featurerequest] HOT 2
- [question] Danfoss LC13 not discovering all values HOT 1
- [question] Run privileged necessary? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zwave2mqtt.