-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autodiscover MQTT and Nimly door lock #6046
Comments
Do you have only an homeassistant MQTT topic related to zigbee2MQTT? As for normal configuration you should have a zigbee2MQTT topic for state updates and an homeassistant topic for config topics. The state topic and config topic cannot be the same for Domoticz MQTT AD. Do you have other zigbee2mqtt devices in your setup? And if yes are they working normally? |
The config topics are: |
Your Zigbee2MQTT configuration seems not correct. Did you change anything in Zigbee2MQTT for topics? |
Yes, I had the wrong base_topic for MQTT.
Config for auto_lock under homeassistant/switch/0xf4ce3672e1a47d9c/switch_auto_relock:
State message under zigbee2mqtt/0xf4ce3672e1a47d9c:
|
I have a Nimly touch pro door lock, supported by zigbee2MQTT as Onesti Products AS easyCodeTouch_v1.
zigbee2MQTT is publishing a couple of sensors, a switch for auto lock on/off and locking on/off.
The general/text sensors created as devices are:
last_unlock_source
last_unlock_user
last_lock_source
last_lock_user
These are all working and updated by topics in mqtt.
The switches created are:
switch_auto_relock
lock
sound_volume
Auto lock and lock are working but they don't update their state, they always show as off/unlocked, sound volume does not work at all but is not important to me.
Config sent by zigbee2mqtt for lock:
{
"availability": [
{
"topic": "homeassistant/bridge/state"
}
],
"command_topic": "homeassistant/0xf4ce3672e1a47d9c/set",
"device": {
"identifiers": [
"zigbee2mqtt_0xf4ce3672e1a47d9c"
],
"manufacturer": "Onesti Products AS",
"model": "Zigbee module for EasyAccess code touch series (easyCodeTouch_v1)",
"name": "0xf4ce3672e1a47d9c",
"sw_version": "4.5.26",
"via_device": "zigbee2mqtt_bridge_0x4c5bb3fffed6bc38"
},
"json_attributes_topic": "homeassistant/0xf4ce3672e1a47d9c",
"name": null,
"object_id": "0xf4ce3672e1a47d9c",
"origin": {
"name": "Zigbee2MQTT",
"sw": "1.36.0",
"url": "https://www.zigbee2mqtt.io"
},
"state_locked": "LOCK",
"state_topic": "homeassistant/0xf4ce3672e1a47d9c",
"state_unlocked": "UNLOCK",
"unique_id": "0xf4ce3672e1a47d9c_lock_homeassistant",
"value_template": "{{ value_json.state }}"
}
Config sent by zigbee2mqtt for auto lock:
{
"availability": [
{
"topic": "homeassistant/bridge/state"
}
],
"command_topic": "homeassistant/0xf4ce3672e1a47d9c/set/auto_relock",
"device": {
"identifiers": [
"zigbee2mqtt_0xf4ce3672e1a47d9c"
],
"manufacturer": "Onesti Products AS",
"model": "Zigbee module for EasyAccess code touch series (easyCodeTouch_v1)",
"name": "0xf4ce3672e1a47d9c",
"sw_version": "4.5.26",
"via_device": "zigbee2mqtt_bridge_0x4c5bb3fffed6bc38"
},
"json_attributes_topic": "homeassistant/0xf4ce3672e1a47d9c",
"name": "Auto relock",
"object_id": "0xf4ce3672e1a47d9c_auto_relock",
"origin": {
"name": "Zigbee2MQTT",
"sw": "1.36.0",
"url": "https://www.zigbee2mqtt.io"
},
"payload_off": "false",
"payload_on": "true",
"state_topic": "homeassistant/0xf4ce3672e1a47d9c",
"unique_id": "0xf4ce3672e1a47d9c_switch_auto_relock_homeassistant",
"value_template": "{% if value_json.auto_relock %} true {% else %} false {% endif %}"
}
Topic sent by zigbee2mqtt to homeassistant/0xf4ce3672e1a47d9c:
{
"auto_relock": true,
"auto_relock_time": 1,
"battery": 100,
"last_lock_source": "self",
"last_lock_user": 0,
"last_unlock_source": "rfid",
"last_unlock_user": 3,
"last_used_pin_code": null,
"linkquality": 68,
"lock_state": "locked",
"pin_code": null,
"sound_volume": "high_volume",
"state": "LOCK",
"voltage": 4500
}
Log in Domoticz:
2024-03-27 18:40:09.069 MQTT: General/Text (0xf4ce3672e1a47d9c (Last lock source))
2024-03-27 18:40:09.071 MQTT: General/Custom Sensor (0xf4ce3672e1a47d9c (Last lock user))
2024-03-27 18:40:09.073 MQTT: General/Text (0xf4ce3672e1a47d9c (Last unlock source))
2024-03-27 18:40:09.075 MQTT: General/Custom Sensor (0xf4ce3672e1a47d9c (Last unlock user))
2024-03-27 18:40:09.076 MQTT: General/Text (0xf4ce3672e1a47d9c (Sound volume))
2024-03-27 18:40:09.085 Status: dzVents: Debug: Dumping domoticz data to /home/tipe/domoticz/scripts/dzVents/domoticzData.lua
2024-03-27 18:40:09.103 Status: dzVents: Debug: Processing device-adapter for 0xf4ce3672e1a47d9c (Last lock source): Text device
2024-03-27 18:40:09.103 Status: dzVents: Debug: dzVents version: 3.1.8
2024-03-27 18:40:09.103 Status: dzVents: Debug: Event triggers:
2024-03-27 18:40:09.103 Status: dzVents: Debug: - Device: 0xf4ce3672e1a47d9c (Last lock source)
2024-03-27 18:40:09.109 Status: LUA: Device based event fired on '0xf4ce3672e1a47d9c (Last lock source)', value 'self'
2024-03-27 18:40:09.125 Status: dzVents: Debug: Dumping domoticz data to /home/tipe/domoticz/scripts/dzVents/domoticzData.lua
2024-03-27 18:40:09.143 Status: dzVents: Debug: Processing device-adapter for 0xf4ce3672e1a47d9c (Last lock user): Custom sensor device adapter
2024-03-27 18:40:09.144 Status: dzVents: Debug: Processing device-adapter for 0xf4ce3672e1a47d9c (Last unlock source): Text device
2024-03-27 18:40:09.144 Status: dzVents: Debug: Processing device-adapter for 0xf4ce3672e1a47d9c (Last unlock user): Custom sensor device adapter
2024-03-27 18:40:09.144 Status: dzVents: Debug: dzVents version: 3.1.8
2024-03-27 18:40:09.144 Status: dzVents: Debug: Event triggers:
2024-03-27 18:40:09.144 Status: dzVents: Debug: - Device: 0xf4ce3672e1a47d9c (Last lock user)
2024-03-27 18:40:09.144 Status: dzVents: Debug: - Device: 0xf4ce3672e1a47d9c (Last unlock source)
2024-03-27 18:40:09.144 Status: dzVents: Debug: - Device: 0xf4ce3672e1a47d9c (Last unlock user)
2024-03-27 18:40:09.150 Status: LUA: Device based event fired on '0xf4ce3672e1a47d9c (Last lock user)', value '0'
2024-03-27 18:40:09.151 Status: LUA: Device based event fired on '0xf4ce3672e1a47d9c (Last unlock source)', value 'rfid'
2024-03-27 18:40:09.152 Status: LUA: Device based event fired on '0xf4ce3672e1a47d9c (Last unlock user)', value '3'
2024-03-27 18:40:09.152 Status: LUA: Device based event fired on '0xf4ce3672e1a47d9c (Last unlock user)_Utility', value '3.0'
In the UI for zigbee2MQTT you are able to operate the lock as expected.
Also there are no logs on the devices in Domotics, it would be nice to see history of unlocking/locking users.
The text was updated successfully, but these errors were encountered: