2.3 KiB
2.3 KiB
Migrating From Zwave2Mqtt
When migrating from Zwave2Mqtt there will be some breaking changes:
settings.json
are almost the same. You can easily export them from Z2M and import them in Z-Wave JS UI by using theExport
andImport
buttons in Settings tab. After importing them you only will have to edit some Z-Wave settings and all Gateway Values entries as now the value ids have changedscenes.json
need to be rewritten for the same reason as valueIds have changed. We suggest to manually recreate them using the UI and trash the old one- You cannot use the old OZW cache file but don't worry it will be automatically generated and the nodes names/locations will be restored from
nodes.json
file nodes.json
can be imported but you will have to manually edit it and delete all nodeshassDevices
as them will not work in the new implementation (alternatively instead of deleting you can manually convert them, see next steps)- Values ids unique strings have changed, in Z2M valueIds were identified by
<nodeId>/<commandClass>/<endpoint>/<index>
now they are<nodeId>/<commandClass>/<endpoint>/<property>/<propertyKey?>
whereproperty
andpropertyKey
(can be undefined) can be both numbers or strings based on the value. So essentially if you are using Home Assistant or MQTT functions all topics will change, here you can see how we have translated some valueids ofdevices.js
from the old format to the new one. - List values are no longer handled as
strings
but asnumbers
by default. For example to change a Thermostat Mode in Z2M you used to sendHeat
orOff
now you will need to send1
(Heat) or0
(Off). This will make it lot easier to handle list values - All bitmask values are now split in separated values and are booleans. The same for RGB colors, now all colors will be handled separately, there will be a valueId to control Red (0-255), another for Green (0-255) and so on... There is an open issue on Z-Wave JS to also create a valueId with the hex color string. Also now some values are split in
targetValue
andcurrentValue
, the first one is used to send commands the second one to see the actual state. This could seems tricky at first sight but there are some reasons behind this.