I've invest some time of integrating a the Zigbee2MQTT into Zway through the app MxMQTT Subscriber. Many thanks for @piet66 for his work so far.
Anyway after a long time of try and error, I really need some help on configure a switch with the subsciber.
Setting the state to on/off works through the MQTTExplorer and Zigbee2MQTT. My customizing issue must be in the subscriber app.
MQTT:
Value: {"child_lock":"UNLOCK","current":0,"energy":0,"indicator_mode":"off/on","linkquality":47,"power":0,"power_outage_memory":"off","state":"OFF","voltage":223}
Setting a new state over MQTT works with publish to topic:
topic: zigbee2mqtt/(S) Stecker1/set
value:
{
"state": "ON"
}
Configuration in subscriber app
General:
Prefix for Topics Sent Back to MQTT Broker: set
Suffix for Topics Sent Back to MQTT Broker:none
Alter Topics Sent Back to MQTT Broker: none
Create Virtual Devices for Single Topics :
- Topic: zigbee2mqtt/(S) Stecker1
icon: ../../../../../../smarthome/storage/img/icons/switch-off.png
conditional icon: valueObj.state.toString() === "ON" ? '../../../../../../smarthome/storage/img/icons/switch-on.png' : '../../../../../../smarthome/storage/img/icons/switch-off.png'
Create operable widget: true -> on-off switch
If I switch in the operable mode with the same customizing, the icons don't change, no value change comes up in this virtual device (in case of manual switching the device) and there is no update on the MQTT server after pressing the button in zway.
Please could you help me, solving this issue.
Many thanks
Heinrich