Skip to content
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

Fix race condition with for reinitializing after MQTT reconnect #17891

Merged
merged 2 commits into from
Jun 7, 2023
Merged

Fix race condition with for reinitializing after MQTT reconnect #17891

merged 2 commits into from
Jun 7, 2023

Conversation

xconverge
Copy link
Contributor

@xconverge xconverge commented Jun 3, 2023

Fixes #9629

First related commit: 343ef7f
Second related commit that introduces the problem: 6314b86

@xconverge
Copy link
Contributor Author

I now see that this was specifically for a user who doesn't want repeat state updates

#9629 (comment)

So I am kind of unsure what the best option is here... You may be better equipped to understand the pros/cons of all of the attached issues and feedback and decide would be best

@Koenkk
Copy link
Owner

Koenkk commented Jun 3, 2023

Can you try with just the following change:

        logger.info('Connected to MQTT server');

        if (this.initialConnect) {
            await this.publishStateOnline();
        } else {
            this.republishRetainedTimer = setTimeout(() => {
                // Republish retained messages in case MQTT broker does not persist them.
                // https://github.com/Koenkk/zigbee2mqtt/issues/9629
                Object.values(this.retainedMessages).forEach((e) =>
                    this.publish(e.topic, e.payload, e.options, e.base, e.skipLog, e.skipReceive));
            }, 2000);
        }

        this.initialConnect = false;

@xconverge
Copy link
Contributor Author

xconverge commented Jun 3, 2023

Can you try with just the following change:

        logger.info('Connected to MQTT server');

        if (this.initialConnect) {
            await this.publishStateOnline();
        } else {
            this.republishRetainedTimer = setTimeout(() => {
                // Republish retained messages in case MQTT broker does not persist them.
                // https://github.com/Koenkk/zigbee2mqtt/issues/9629
                Object.values(this.retainedMessages).forEach((e) =>
                    this.publish(e.topic, e.payload, e.options, e.base, e.skipLog, e.skipReceive));
            }, 2000);
        }

        this.initialConnect = false;

Is that intended to be a direct revert of 6314b86 ?

It works for me and I will leave it running, but I thought this causes other problems that I saw in the related issue threads. Maybe those were unrelated problems/fixes though related to mqtt stability

@xconverge
Copy link
Contributor Author

@Koenkk I am leaving the tests as failures for now so you can assess the repurcussions of the change

Part of me thinks a config option for "republish_retained_messages_on_reconnect" with a default value of true might be a good idea, so then some people could disable it if they have persistent storage on their broker AND dont want duplicate messages

@Koenkk
Copy link
Owner

Koenkk commented Jun 5, 2023

I don't want to introduce this as an option since this goes quite deep into the working of Z2M/HA/MQTT.

I think we should go the safe route and always republish, if it works for you the following is an acceptable solution for me (feel free to update the PR if it works and I will merge it).

        logger.info('Connected to MQTT server');

        // Re-publish retained messages as broker might not persist them
        // https://github.com/Koenkk/zigbee2mqtt/issues/9629
        Object.values(this.retainedMessages).forEach((e) =>
            this.publish(e.topic, e.payload, e.options, e.base, e.skipLog, e.skipReceive));

        this.subscribe(`${settings.get().mqtt.base_topic}/#`);

@xconverge
Copy link
Contributor Author

I don't want to introduce this as an option since this goes quite deep into the working of Z2M/HA/MQTT.

I think we should go the safe route and always republish, if it works for you the following is an acceptable solution for me (feel free to update the PR if it works and I will merge it).

        logger.info('Connected to MQTT server');

        // Re-publish retained messages as broker might not persist them
        // https://github.com/Koenkk/zigbee2mqtt/issues/9629
        Object.values(this.retainedMessages).forEach((e) =>
            this.publish(e.topic, e.payload, e.options, e.base, e.skipLog, e.skipReceive));

        this.subscribe(`${settings.get().mqtt.base_topic}/#`);

It works for me, but what about someone like this #9629 (comment)

@Koenkk
Copy link
Owner

Koenkk commented Jun 6, 2023

Not ideal either indeed. What I don't understand is why bridge/state online is not republished by

this.republishRetainedTimer = setTimeout(() => {
since this is also a retained message.

I propose to revert 6314b86 in this PR. If @jeroen85 can check whether #13382 is back I will debug this.

@jeroen85
Copy link

jeroen85 commented Jun 6, 2023

If @jeroen85 can check whether #13382 is back I will debug this.

No problem, please let me know what/when to test :-)

@xconverge
Copy link
Contributor Author

Ok, sounds good @Koenkk, updated the tests that go with that commit/change. Let me know if you want me to do further testing as well or if you want to take the reins/ownership on this. I am at least setup to do further testing and make any changes necessary but you have a better idea of all of the constraints

@Koenkk Koenkk changed the base branch from master to dev June 7, 2023 07:15
@Koenkk Koenkk enabled auto-merge (squash) June 7, 2023 07:15
@Koenkk Koenkk disabled auto-merge June 7, 2023 07:15
@Koenkk Koenkk merged commit c12bedb into Koenkk:dev Jun 7, 2023
@Koenkk
Copy link
Owner

Koenkk commented Jun 7, 2023

@jeroen85 please check if #13382 is back with the latest dev branch, if yes provide me the debug logging.

See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging.

@jeroen85
Copy link

jeroen85 commented Jun 7, 2023

Unfortunately, the issue is back in the dev release.
Can easily reproduce by stopping and then starting the MQTT server (docker).

As a double check; the current stable release works as expected.

Zigbee2MQTT:debug 2023-06-07 11:57:21: Received MQTT message on 'homeassistant/status' with data 'offline'
Zigbee2MQTT:debug 2023-06-07 11:57:21: Received MQTT message on 'homeassistant/status' with data 'offline'
Zigbee2MQTT:error 2023-06-07 11:57:22: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:23: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:24: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:warn  2023-06-07 11:57:24: Failed to ping '3D Printer' (attempt 1/1, Read 0x540f57fffefdd6f5/1 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 10381 - 1 - 45 - 0 - 1 after 10000ms))
Zigbee2MQTT:error 2023-06-07 11:57:25: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:26: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:27: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 11:57:27: Active device '3D Printer' was last seen '1285.13' minutes ago.
Zigbee2MQTT:error 2023-06-07 11:57:28: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:28: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 11:57:29: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 11:57:29: Received Zigbee message from 'Wasmachine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":235}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 11:57:29: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 11:57:29: Cannot send message: topic: 'zigbee2mqtt/Wasmachine', payload: '{"current":0,"energy":330.8,"indicator_mode":"off/on","linkquality":36,"power":0,"power_outage_memory":"restore","state":"ON","voltage":235}
Zigbee2MQTT:error 2023-06-07 11:57:30: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:31: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:warn  2023-06-07 11:57:31: Failed to ping '0xa4c13888fcaa392f' (attempt 1/1, Read 0xa4c13888fcaa392f/1 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Data request failed with error: 'No network route' (205)))
Zigbee2MQTT:error 2023-06-07 11:57:32: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:33: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:34: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 11:57:34: Active device '0xa4c13888fcaa392f' was last seen '166940.18' minutes ago.
Zigbee2MQTT:error 2023-06-07 11:57:35: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:36: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:37: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:38: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:38: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 11:57:39: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 11:57:39: Received Zigbee message from 'Wasmachine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":235}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 11:57:39: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 11:57:39: Cannot send message: topic: 'zigbee2mqtt/Wasmachine', payload: '{"current":0,"energy":330.8,"indicator_mode":"off/on","linkquality":40,"power":0,"power_outage_memory":"restore","state":"ON","voltage":235}
Zigbee2MQTT:error 2023-06-07 11:57:40: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:41: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:42: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:43: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:44: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 11:57:48: MQTT error: read ECONNRESET
Zigbee2MQTT:error 2023-06-07 11:57:48: Not connected to MQTT server!
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received Zigbee message from 'Kastlicht', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":238}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 11:57:49: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 11:57:49: Cannot send message: topic: 'zigbee2mqtt/Kastlicht', payload: '{"child_lock":"UNLOCK","current":0,"energy":46.78,"indicator_mode":"off/on","linkquality":91,"power":0,"power_outage_memory":"restore","state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":null,"voltage":238}
Zigbee2MQTT:info  2023-06-07 11:57:49: Connected to MQTT server
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/bridge/config' with data '{"commit":"unknown","coordinator":{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"},"log_level":"info","network":{"channel":11,"extendedPanID":"0x00124b0024c1724d","panID":6754},"permit_join":true,"version":"1.26.0"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/Radiator/availability' with data 'online'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/0x00158d000632e4d5/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/0x00158d00075db11a/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/0x90fd9ffffe6fb7b5/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/0x000d6ffffe036d12/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/0x00158d000544186a/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/Schakelaar kast woonkamer/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/Schakelaar nachtkastje Donja/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/Spare_plug_1/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'zigbee2mqtt/Coordinator/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x385b44fffe369eeb/action/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Smart knob/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x385b44fffe369eeb"],"manufacturer":"TuYa","model":"Smart knob (ERS-10TZBVK-AA)","name":"Smart knob"},"enabled_by_default":true,"icon":"mdi:gesture-double-tap","name":"Smart knob action","state_topic":"zigbee2mqtt/Smart knob","unique_id":"0x385b44fffe369eeb_action_zigbee2mqtt","value_template":"{{ value_json.action }}"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x385b44fffe369eeb/action_step_size/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Smart knob/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x385b44fffe369eeb"],"manufacturer":"TuYa","model":"Smart knob (ERS-10TZBVK-AA)","name":"Smart knob"},"enabled_by_default":true,"name":"Smart knob action step size","state_topic":"zigbee2mqtt/Smart knob","unique_id":"0x385b44fffe369eeb_action_step_size_zigbee2mqtt","value_template":"{{ value_json.action_step_size }}"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x385b44fffe369eeb/action_transition_time/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Smart knob/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x385b44fffe369eeb"],"manufacturer":"TuYa","model":"Smart knob (ERS-10TZBVK-AA)","name":"Smart knob"},"enabled_by_default":true,"name":"Smart knob action transition time","state_topic":"zigbee2mqtt/Smart knob","unique_id":"0x385b44fffe369eeb_action_transition_time_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.action_transition_time }}"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x385b44fffe369eeb/action_rate/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Smart knob/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x385b44fffe369eeb"],"manufacturer":"TuYa","model":"Smart knob (ERS-10TZBVK-AA)","name":"Smart knob"},"enabled_by_default":true,"name":"Smart knob action rate","state_topic":"zigbee2mqtt/Smart knob","unique_id":"0x385b44fffe369eeb_action_rate_zigbee2mqtt","value_template":"{{ value_json.action_rate }}"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x385b44fffe369eeb/battery/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Smart knob/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x385b44fffe369eeb"],"manufacturer":"TuYa","model":"Smart knob (ERS-10TZBVK-AA)","name":"Smart knob"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"Smart knob battery","state_class":"measurement","state_topic":"zigbee2mqtt/Smart knob","unique_id":"0x385b44fffe369eeb_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x385b44fffe369eeb/operation_mode/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Smart knob/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x385b44fffe369eeb"],"manufacturer":"TuYa","model":"Smart knob (ERS-10TZBVK-AA)","name":"Smart knob"},"enabled_by_default":false,"entity_category":"config","icon":"mdi:tune","name":"Smart knob operation mode","state_topic":"zigbee2mqtt/Smart knob","unique_id":"0x385b44fffe369eeb_operation_mode_zigbee2mqtt","value_template":"{{ value_json.operation_mode }}"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x385b44fffe369eeb/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Smart knob/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x385b44fffe369eeb"],"manufacturer":"TuYa","model":"Smart knob (ERS-10TZBVK-AA)","name":"Smart knob"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"Smart knob linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/Smart knob","unique_id":"0x385b44fffe369eeb_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x84ba20fffe2eae0f/battery/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Slaapkamer schakelaar Donja/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x84ba20fffe2eae0f"],"manufacturer":"IKEA","model":"TRADFRI ON/OFF switch (E1743)","name":"Slaapkamer schakelaar Donja","sw_version":"2.3.079"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"Slaapkamer schakelaar Donja battery","state_class":"measurement","state_topic":"zigbee2mqtt/Slaapkamer schakelaar Donja","unique_id":"0x84ba20fffe2eae0f_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x84ba20fffe2eae0f/action/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Slaapkamer schakelaar Donja/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x84ba20fffe2eae0f"],"manufacturer":"IKEA","model":"TRADFRI ON/OFF switch (E1743)","name":"Slaapkamer schakelaar Donja","sw_version":"2.3.079"},"enabled_by_default":true,"icon":"mdi:gesture-double-tap","name":"Slaapkamer schakelaar Donja action","state_topic":"zigbee2mqtt/Slaapkamer schakelaar Donja","unique_id":"0x84ba20fffe2eae0f_action_zigbee2mqtt","value_template":"{{ value_json.action }}"}'
Zigbee2MQTT:debug 2023-06-07 11:57:49: Received MQTT message on 'homeassistant/sensor/0x84ba20fffe2eae0f/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Slaapkamer schakelaar Donja/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x84ba20fffe2eae0f"],"manufacturer":"IKEA","model":"TRADFRI ON/OFF switch (E1743)","name":"Slaapkamer schakelaar Donja","sw_version":"2.3.079"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"Slaapkamer schakelaar Donja linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/Slaapkamer schakelaar Donja","unique_id":"0x84ba20fffe2eae0f_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
[cut few hundreds of similar messages "Received MQTT message on 'homeassistant/"]
Zigbee2MQTT:debug 2023-06-07 11:57:50: Received Zigbee message from 'Wasmachine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":234}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2023-06-07 11:57:50: MQTT publish: topic 'zigbee2mqtt/Wasmachine', payload '{"current":0,"energy":330.8,"indicator_mode":"off/on","linkquality":40,"power":0,"power_outage_memory":"restore","state":"ON","voltage":234}'
Zigbee2MQTT:debug 2023-06-07 11:57:54: Received Zigbee message from 'Vaatwasser', type 'attributeReport', cluster 'genBasic', data '{"65506":31,"65508":0,"appVersion":67}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2023-06-07 11:57:55: Received MQTT message on 'homeassistant/status' with data 'online'
Zigbee2MQTT:debug 2023-06-07 11:57:55: Received MQTT message on 'homeassistant/status' with data 'online'
Zigbee2MQTT:debug 2023-06-07 11:57:59: Received Zigbee message from 'Slaapkamer Go Jeroen', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":16785410,"imageType":288,"manufacturerCode":4107}' from endpoint 11 with groupID 0
Zigbee2MQTT:debug 2023-06-07 11:57:59: Device 'Slaapkamer Go Jeroen' requested OTA
Zigbee2MQTT:debug 2023-06-07 11:57:59: Check if update available for '0x001788010c5e3310' (7602031P7)
Zigbee2MQTT:debug 2023-06-07 11:57:59: ZigbeeOTA: downloaded main index
Zigbee2MQTT:debug 2023-06-07 11:57:59: Is new image available for '0x001788010c5e3310', current '{"fieldControl":0,"manufacturerCode":4107,"imageType":288,"fileVersion":16785410}', latest meta '{"fileVersion":16785410,"fileSize":386628,"url":"https://otau.meethue.com/storage/ZGB_100B_0120/85a46316-db06-48c5-ac7d-e43c315bf743/100B-0120-01002002-ConfLightBLE-PortableV3-EFR32MG21.zigbee","sha512":"3f4704f3d5ef1bf7542f75e9dda2763f2d76eb9b6f46516ee75cc17f47f5c4012c77b8cfa4e56fb00867e4c98937221f7b51736fb0557308cf550c5d6635089f"}'
Zigbee2MQTT:debug 2023-06-07 11:57:59: Update available for '0x001788010c5e3310': NO
Zigbee2MQTT:info  2023-06-07 11:57:59: MQTT publish: topic 'zigbee2mqtt/Slaapkamer Go Jeroen', payload '{"brightness":5,"color":{"x":0.5267,"y":0.4133},"color_mode":"color_temp","color_temp":500,"linkquality":76,"power_on_behavior":"previous","state":"OFF","update":{"installed_version":16785410,"latest_version":16785410,"state":"idle"},"update_available":null}'
Zigbee2MQTT:debug 2023-06-07 11:57:59: Responded to OTA request of 'Slaapkamer Go Jeroen' with 'NO_IMAGE_AVAILABLE'
Zigbee2MQTT:debug 2023-06-07 11:58:00: Received Zigbee message from 'Wasmachine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":235}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2023-06-07 11:58:00: MQTT publish: topic 'zigbee2mqtt/Wasmachine', payload '{"current":0,"energy":330.8,"indicator_mode":"off/on","linkquality":40,"power":0,"power_outage_memory":"restore","state":"ON","voltage":235}'
Zigbee2MQTT:debug 2023-06-07 11:58:09: Received Zigbee message from 'Kastlicht', type 'attributeReport', cluster 'genBasic', data '{"65506":31,"65508":0,"appVersion":69}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2023-06-07 11:58:10: Received Zigbee message from 'Wasmachine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":235}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2023-06-07 11:58:10: MQTT publish: topic 'zigbee2mqtt/Wasmachine', payload '{"current":0,"energy":330.8,"indicator_mode":"off/on","linkquality":36,"power":0,"power_outage_memory":"restore","state":"ON","voltage":235}'
Zigbee2MQTT:debug 2023-06-07 11:58:19: Received Zigbee message from 'Kastlicht', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":238}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2023-06-07 11:58:19: MQTT publish: topic 'zigbee2mqtt/Kastlicht', payload '{"child_lock":"UNLOCK","current":0,"energy":46.78,"indicator_mode":"off/on","linkquality":91,"power":0,"power_outage_memory":"restore","state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":null,"voltage":238}'
Zigbee2MQTT:debug 2023-06-07 11:58:20: Received Zigbee message from 'Wasmachine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":235}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2023-06-07 11:58:20: MQTT publish: topic 'zigbee2mqtt/Wasmachine', payload '{"current":0,"energy":330.8,"indicator_mode":"off/on","linkquality":36,"power":0,"power_outage_memory":"restore","state":"ON","voltage":235}'
Zigbee2MQTT:info  2023-06-07 11:58:25: MQTT publish: topic 'zigbee2mqtt/0x847127fffe9eb858', payload '{"battery":80,"boost_heating":"OFF","boost_heating_countdown":0,"boost_heating_countdown_time_set":300,"child_lock":"UNLOCK","current_heating_setpoint":5,"eco_mode":"OFF","eco_temperature":20,"linkquality":131,"local_temperature":20,"local_temperature_calibration":0,"max_temperature":45,"min_temperature":5,"position":0,"preset":"manual","programming_mode":"06:00/20°C  11:30/21°C  13:30/22°C  17:30/23°C  06:00/24°C  12:00/23°C  14:30/22°C  17:30/21°C  06:00/19°C  12:30/20°C  14:30/21°C  18:30/20°C","running_state":"idle","system_mode":"heat","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":null,"valve_state":"CLOSED","window":"CLOSED","window_detection":"OFF"}'
Zigbee2MQTT:info  2023-06-07 11:58:25: MQTT publish: topic 'zigbee2mqtt/Smart knob', payload '{"action":null,"action_rate":null,"action_step_size":null,"action_transition_time":null,"battery":89,"brightness":255,"linkquality":25,"operation_mode":"command","voltage":2900}'

@Koenkk
Copy link
Owner

Koenkk commented Jun 7, 2023

@jeroen85 how are you running z2m? (I want you to make some local changes to the code)

@jeroen85
Copy link

jeroen85 commented Jun 7, 2023

Docker container on my Synology NAS

@xconverge
Copy link
Contributor Author

xconverge commented Jun 7, 2023

The behavior we want is totally contradictory isn't it? I feel like an option that defaults to true that @jeroen85 can opt out of is the only solution here... Likewise they could be the outlier and update their logic if we decide it's just how it should work... Up to you @Koenkk

Edit: I mixed up users

@xconverge xconverge deleted the fixReinitializeOnConnectCancellingTimer branch June 7, 2023 14:30
@Koenkk
Copy link
Owner

Koenkk commented Jun 7, 2023

@jeroen85 can you do the following:

  • enter the z2m docker container by executing docker exec -it Z2M_CONTAINER_ID sh
  • vi /app/dist/mqtt.js
  • make the following changes:
            this.republishRetainedTimer = setTimeout(() => {
                // Republish retained messages in case MQTT broker does not persist them.
                // https://github.com/Koenkk/zigbee2mqtt/issues/9629
                logger_1.default.error('DEBUG: PUBLISHING RETAINED MESSAGES: ' + this.retainedMessages['zigbee2mqtt/bridge/state']); // <-- add this line
                Object.values(this.retainedMessages).forEach((e) => this.publish(e.topic, e.payload, e.options, e.base, e.skipLog, e.skipReceive));
            }, 2000);
if (this.republishRetainedTimer && topic == `${settings.get().mqtt.base_topic}/bridge/state`) {
            logger_1.default.error('DEBUG: CLEARING RETAINED MESSAGES TIMER ' + topic + ' ' + message); // <-- add this line
            clearTimeout(this.republishRetainedTimer);
            this.republishRetainedTimer = null;
        }
  • save and execute exit
  • docker restart Z2M_CONTAINER_ID
  • provide me the logging again

@xconverge
Copy link
Contributor Author

xconverge commented Jun 7, 2023

I don't think that @jeroen85 is having the problem you think they are having. They DONT want these retained messages on reconnect if I understand correctly? I and others in the referenced issues DO want the retained messages on reconnect. I don't see a way to infer that from the z2m side of things. I could be overly confused here...

Edit: I mixed up users

@Koenkk
Copy link
Owner

Koenkk commented Jun 7, 2023

@xconverge from my understanding, the problem that @jeroen85 is having is that the entities in HA stay unavailable after MQTT reconnect, this is because zigbee2mqtt/bridge/state online is not published for some reason.

@xconverge
Copy link
Contributor Author

Yea sorry I got the user mixed up. I will bow out now sorry for the confusion

@jeroen85
Copy link

jeroen85 commented Jun 7, 2023

Terrible program (vi), but I managed to make the changes.

Only DEBUG: CLEARING RETAINED MESSAGES TIMER shows up.

Zigbee2MQTT:debug 2023-06-07 18:32:37: Received MQTT message on 'homeassistant/status' with data 'offline'
Zigbee2MQTT:debug 2023-06-07 18:32:37: Received MQTT message on 'homeassistant/status' with data 'offline'
Zigbee2MQTT:error 2023-06-07 18:32:38: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 18:32:39: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:warn  2023-06-07 18:32:39: Failed to ping '3D Printer' (attempt 1/1, Read 0x540f57fffefdd6f5/1 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 10381 - 1 - 12 - 0 - 1 after 10000ms))
Zigbee2MQTT:error 2023-06-07 18:32:40: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 18:32:41: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 18:32:42: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 18:32:42: Active device '3D Printer' was last seen '1680.37' minutes ago.
Zigbee2MQTT:error 2023-06-07 18:32:43: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 18:32:44: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 18:32:45: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 18:32:46: Not connected to MQTT server!
Zigbee2MQTT:warn  2023-06-07 18:32:46: Failed to ping '0xa4c13888fcaa392f' (attempt 1/1, Read 0xa4c13888fcaa392f/1 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Data request failed with error: 'No network route' (205)))
Zigbee2MQTT:error 2023-06-07 18:32:46: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 18:32:46: Received Zigbee message from 'Wasmachine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":230}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 18:32:46: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 18:32:46: Cannot send message: topic: 'zigbee2mqtt/Wasmachine', payload: '{"current":0,"energy":331.51,"indicator_mode":"off/on","linkquality":51,"power":0,"power_outage_memory":"restore","state":"ON","voltage":230}
Zigbee2MQTT:error 2023-06-07 18:32:47: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 18:32:47: Received Zigbee message from 'Wasmachine', type 'read', cluster 'genTime', data '["localTime"]' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 18:32:48: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 18:32:49: Active device '0xa4c13888fcaa392f' was last seen '167335.42' minutes ago.
Zigbee2MQTT:error 2023-06-07 18:32:49: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 18:32:50: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 18:32:51: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 18:32:52: Received Zigbee message from 'Vaatwasser', type 'attributeReport', cluster 'haElectricalMeasurement', data '{"rmsCurrent":405}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 18:32:52: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 18:32:52: Cannot send message: topic: 'zigbee2mqtt/Vaatwasser', payload: '{"child_lock":"UNLOCK","current":0.41,"energy":189.6,"indicator_mode":"off/on","linkquality":65,"power":49,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":null,"voltage":230}
Zigbee2MQTT:error 2023-06-07 18:32:52: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 18:32:55: Received Zigbee message from 'Vaatwasser', type 'attributeReport', cluster 'haElectricalMeasurement', data '{"activePower":17}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 18:32:55: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 18:32:55: Cannot send message: topic: 'zigbee2mqtt/Vaatwasser', payload: '{"child_lock":"UNLOCK","current":0.41,"energy":189.6,"indicator_mode":"off/on","linkquality":65,"power":17,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":null,"voltage":230}
Zigbee2MQTT:error 2023-06-07 18:32:56: Not connected to MQTT server!
Zigbee2MQTT:debug 2023-06-07 18:32:56: Received Zigbee message from 'Kastlicht', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":233}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 18:32:56: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 18:32:56: Cannot send message: topic: 'zigbee2mqtt/Kastlicht', payload: '{"child_lock":"UNLOCK","current":0,"energy":46.78,"indicator_mode":"off/on","linkquality":94,"power":0,"power_outage_memory":"restore","state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":null,"voltage":233}
Zigbee2MQTT:debug 2023-06-07 18:32:57: Received Zigbee message from 'Wasmachine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":230}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 18:32:57: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 18:32:57: Cannot send message: topic: 'zigbee2mqtt/Wasmachine', payload: '{"current":0,"energy":331.51,"indicator_mode":"off/on","linkquality":47,"power":0,"power_outage_memory":"restore","state":"ON","voltage":230}
Zigbee2MQTT:debug 2023-06-07 18:32:58: Received Zigbee message from 'Vaatwasser', type 'attributeReport', cluster 'haElectricalMeasurement', data '{"rmsCurrent":167}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 18:32:58: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 18:32:58: Cannot send message: topic: 'zigbee2mqtt/Vaatwasser', payload: '{"child_lock":"UNLOCK","current":0.17,"energy":189.6,"indicator_mode":"off/on","linkquality":65,"power":17,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":null,"voltage":230}
Zigbee2MQTT:info  2023-06-07 18:33:00: Connected to MQTT server
Zigbee2MQTT:error 2023-06-07 18:33:00: DEBUG: CLEARING RETAINED MESSAGES TIMER
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/bridge/config' with data '{"commit":"unknown","coordinator":{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"},"log_level":"info","network":{"channel":11,"extendedPanID":"0x00124b0024c1724d","panID":6754},"permit_join":true,"version":"1.26.0"}'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/Radiator/availability' with data 'online'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/0x00158d000632e4d5/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/0x00158d00075db11a/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/0x90fd9ffffe6fb7b5/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/0x000d6ffffe036d12/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/0x00158d000544186a/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/Schakelaar kast woonkamer/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/Schakelaar nachtkastje Donja/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/Spare_plug_1/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 18:33:00: Received MQTT message on 'zigbee2mqtt/Coordinator/availability' with data '{"state":"offline"}'

@Koenkk
Copy link
Owner

Koenkk commented Jun 7, 2023

Is the issue fixed when removing 'clearTimeout(this.republishRetainedTimer);'?

@jeroen85
Copy link

jeroen85 commented Jun 7, 2023

Yes

Zigbee2MQTT:debug 2023-06-07 19:16:19: Received MQTT message on 'homeassistant/status' with data 'offline'
Zigbee2MQTT:debug 2023-06-07 19:16:19: Received MQTT message on 'homeassistant/status' with data 'offline'
Zigbee2MQTT:debug 2023-06-07 19:16:19: Active device 'RPi Octoprint' was last seen '1723.99' minutes ago.
Zigbee2MQTT:error 2023-06-07 19:16:20: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 19:16:21: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 19:16:22: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 19:16:23: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 19:16:24: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 19:16:25: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 19:16:26: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 19:16:27: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:error 2023-06-07 19:16:27: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 19:16:28: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:debug 2023-06-07 19:16:28: Received Zigbee message from 'Wasmachine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":233}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 19:16:28: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 19:16:28: Cannot send message: topic: 'zigbee2mqtt/Wasmachine', payload: '{"current":0,"energy":331.51,"indicator_mode":"off/on","linkquality":58,"power":0,"power_outage_memory":"restore","state":"ON","voltage":233}
Zigbee2MQTT:debug 2023-06-07 19:16:28: Received Zigbee message from 'Vaatwasser', type 'attributeReport', cluster 'haElectricalMeasurement', data '{"rmsCurrent":228}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 19:16:28: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 19:16:28: Cannot send message: topic: 'zigbee2mqtt/Vaatwasser', payload: '{"child_lock":"UNLOCK","current":0.23,"energy":189.78,"indicator_mode":"off/on","linkquality":61,"power":19,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":null,"voltage":231}
Zigbee2MQTT:error 2023-06-07 19:16:29: MQTT error: connect ECONNREFUSED 192.168.2.1:1883
Zigbee2MQTT:warn  2023-06-07 19:16:31: Failed to ping '3D Printer' (attempt 1/1, Read 0x540f57fffefdd6f5/1 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 10381 - 1 - 12 - 0 - 1 after 10000ms))
Zigbee2MQTT:error 2023-06-07 19:16:33: MQTT error: read ECONNRESET
Zigbee2MQTT:info  2023-06-07 19:16:34: Connected to MQTT server
Zigbee2MQTT:error 2023-06-07 19:16:34: DEBUG: CLEARING RETAINED MESSAGES TIMER
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/bridge/config' with data '{"commit":"unknown","coordinator":{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"},"log_level":"info","network":{"channel":11,"extendedPanID":"0x00124b0024c1724d","panID":6754},"permit_join":true,"version":"1.26.0"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/Radiator/availability' with data 'online'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/0x00158d000632e4d5/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/0x00158d00075db11a/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/0x90fd9ffffe6fb7b5/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/0x000d6ffffe036d12/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/0x00158d000544186a/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/Schakelaar kast woonkamer/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/Schakelaar nachtkastje Donja/availability' with data '{"state":"online"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/Spare_plug_1/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'zigbee2mqtt/Coordinator/availability' with data '{"state":"offline"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'homeassistant/sensor/0x385b44fffe369eeb/action/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Smart knob/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x385b44fffe369eeb"],"manufacturer":"TuYa","model":"Smart knob (ERS-10TZBVK-AA)","name":"Smart knob"},"enabled_by_default":true,"icon":"mdi:gesture-double-tap","name":"Smart knob action","state_topic":"zigbee2mqtt/Smart knob","unique_id":"0x385b44fffe369eeb_action_zigbee2mqtt","value_template":"{{ value_json.action }}"}'
Zigbee2MQTT:debug 2023-06-07 19:16:34: Received MQTT message on 'homeassistant/sensor/0x385b44fffe369eeb/action_step_size/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/Smart knob/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x385b44fffe369eeb"],"manufacturer":"TuYa","model":"Smart knob (ERS-10TZBVK-AA)","name":"Smart knob"},"enabled_by_default":true,"name":"Smart knob action step size","state_topic":"zigbee2mqtt/Smart knob","unique_id":"0x385b44fffe369eeb_action_step_size_zigbee2mqtt","value_template":"{{ value_json.action_step_size }}"}'
Zigbee2MQTT:debug 2023-06-07 19:16:35: Active device '3D Printer' was last seen '1724.25' minutes ago.
Zigbee2MQTT:debug 2023-06-07 19:16:35: Received Zigbee message from 'Vaatwasser', type 'attributeReport', cluster 'haElectricalMeasurement', data '{"rmsCurrent":170}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2023-06-07 19:16:35: MQTT publish: topic 'zigbee2mqtt/Vaatwasser', payload '{"child_lock":"UNLOCK","current":0.17,"energy":189.78,"indicator_mode":"off/on","linkquality":80,"power":19,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":"idle"},"update_available":null,"voltage":231}'
Zigbee2MQTT:error 2023-06-07 19:16:36: DEBUG: PUBLISHING RETAINED MESSAGES: [object Object]
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/0x847127fffe9eb858/availability', payload '{"state":"offline"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Smart knob/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Rookmelder overloop/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Slaapkamer schakelaar Donja/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Slaapkamer D&J plafond /availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Repeater/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Dimmer Switch Woonkamer/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Plankje/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Buitendeur/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Olifant/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Kastlicht/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Vaatwasser/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Wasmachine/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Kamerdeur Luke/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/RPi Octoprint/availability', payload '{"state":"offline"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/3D Printer/availability', payload '{"state":"offline"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Eettafel rechts/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Eettafel links/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Hue Tap Keuken/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Schakelaar kastdeur/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Regensensor/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Rookmelder meterkast/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Rookmelder eettafel /availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Rookmelder gang/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Rookmelder garage/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Slaapkamer Go Jeroen/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Slaapkamer Go Donja/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/TRV Woonkamer/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/TRV Keuken/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Dimmer switch slaapkamer D&J/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Rookmelder voorzolder/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Rookmelder zolder/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/0xa4c13888fcaa392f/availability', payload '{"state":"offline"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Woonkamer/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Keukentafel/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/Slaapkamer J&D/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'zigbee2mqtt/901/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 19:16:36: MQTT publish: topic 'homeassistant/sensor/0x847127fffe9eb858/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/0x847127fffe9eb858/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x847127fffe9eb858"],"manufacturer":"Moes","model":"Thermostatic radiator valve (BRT-100-TRV)","name":"0x847127fffe9eb858"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"0x847127fffe9eb858 battery","state_class":"measurement","state_topic":"zigbee2mqtt/0x847127fffe9eb858","unique_id":"0x847127fffe9eb858_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'

@Koenkk
Copy link
Owner

Koenkk commented Jun 7, 2023

I updated #17891 (comment) , can you provide the log with those changes?

@jeroen85
Copy link

jeroen85 commented Jun 7, 2023

I kept the 'clearTimeout(this.republishRetainedTimer);' out.

Zigbee2MQTT:error 2023-06-07 19:40:23: DEBUG: CLEARING RETAINED MESSAGES TIMER zigbee2mqtt/bridge/state {"state":"offline"}
Zigbee2MQTT:error 2023-06-07 19:40:25: DEBUG: PUBLISHING RETAINED MESSAGES: [object Object]

@Koenkk
Copy link
Owner

Koenkk commented Jun 7, 2023

@xconverge could you also apply these changes and provide me the debug logging for your case?

@xconverge
Copy link
Contributor Author

@jeroen85 just a hint but I prefer to do this instead of use vi in the container itself for my own sanity 😆

docker cp zigbee2mqtt:/app/dist/mqtt.js .
<edit with preferred editor vim or nano>
docker cp mqtt.js zigbee2mqtt:/app/dist/mqtt.js

I see both messages, I am guessing the 2 seconds is not sufficient and maybe @jeroen85 has more going on from a cpu standpoint? Mine get published right away though

Zigbee2MQTT:error 2023-06-07 11:30:25: MQTT error: connect ECONNREFUSED xxx.xxx.xxx.xxx:1883
Zigbee2MQTT:error 2023-06-07 11:30:26: MQTT error: connect ECONNREFUSED xxx.xxx.xxx.xxx1883
Zigbee2MQTT:error 2023-06-07 11:30:27: MQTT error: connect ECONNREFUSED xxx.xxx.xxx.xxx:1883
Zigbee2MQTT:debug 2023-06-07 11:30:28: Received Zigbee message from 'switch_modem', type 'attributeReport', cluster 'seMetering', data '{"instantaneousDemand":49}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 11:30:28: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 11:30:28: Cannot send message: topic: 'zigbee2mqtt/switch_modem', payload: '{"energy":11.96,"linkquality":168,"power":4.9,"state":"ON"}
Zigbee2MQTT:debug 2023-06-07 11:30:33: Received Zigbee message from 'switch_modem', type 'attributeReport', cluster 'seMetering', data '{"instantaneousDemand":49}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-06-07 11:30:33: Not connected to MQTT server!
Zigbee2MQTT:error 2023-06-07 11:30:33: Cannot send message: topic: 'zigbee2mqtt/switch_modem', payload: '{"energy":11.96,"linkquality":168,"power":4.9,"state":"ON"}
Zigbee2MQTT:error 2023-06-07 11:30:35: Not connected to MQTT server!
Zigbee2MQTT:info  2023-06-07 11:30:36: Connected to MQTT server
Zigbee2MQTT:debug 2023-06-07 11:30:37: Received Zigbee message from 'temp_garage', type 'attributeReport', cluster 'msTemperatureMeasurement', data '{"measuredValue":1855}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2023-06-07 11:30:37: MQTT publish: topic 'zigbee2mqtt/temp_garage', payload '{"battery":61.5,"humidity":69.31,"linkquality":180,"temperature":18.55,"voltage":2900}'
Zigbee2MQTT:error 2023-06-07 11:30:38: DEBUG: PUBLISHING RETAINED MESSAGES: [object Object]
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/leak_kitchen/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/switch_modem/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/leak_garage/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/switch_espresso/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/deadbolt_back/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/leak_bathroom/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/deadbolt_front/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/temp_upstairs/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/button_stairs/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/switch_livingroom_purifier/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/switch_printer/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/switch_cattoy/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/switch_water_valve/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/switch_sean_office_behind_door/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'zigbee2mqtt/temp_garage/availability', payload '{"state":"online"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3ad73/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_kitchen/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3ad73"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_kitchen","sw_version":"3000-0001"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"leak_kitchen_battery","state_class":"measurement","state_topic":"zigbee2mqtt/leak_kitchen","unique_id":"0x00158d0006d3ad73_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x00158d0006d3ad73/water_leak/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_kitchen/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3ad73"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_kitchen","sw_version":"3000-0001"},"device_class":"moisture","name":"leak_kitchen_water_leak","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/leak_kitchen","unique_id":"0x00158d0006d3ad73_water_leak_zigbee2mqtt","value_template":"{{ value_json.water_leak }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x00158d0006d3ad73/battery_low/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_kitchen/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3ad73"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_kitchen","sw_version":"3000-0001"},"device_class":"battery","entity_category":"diagnostic","name":"leak_kitchen_battery_low","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/leak_kitchen","unique_id":"0x00158d0006d3ad73_battery_low_zigbee2mqtt","value_template":"{{ value_json.battery_low }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3ad73/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_kitchen/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3ad73"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_kitchen","sw_version":"3000-0001"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"leak_kitchen_voltage","state_class":"measurement","state_topic":"zigbee2mqtt/leak_kitchen","unique_id":"0x00158d0006d3ad73_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3ad73/device_temperature/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_kitchen/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3ad73"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_kitchen","sw_version":"3000-0001"},"device_class":"temperature","enabled_by_default":true,"entity_category":"diagnostic","name":"leak_kitchen_device_temperature","state_class":"measurement","state_topic":"zigbee2mqtt/leak_kitchen","unique_id":"0x00158d0006d3ad73_device_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.device_temperature }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3ad73/power_outage_count/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_kitchen/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3ad73"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_kitchen","sw_version":"3000-0001"},"enabled_by_default":true,"name":"leak_kitchen_power_outage_count","state_topic":"zigbee2mqtt/leak_kitchen","unique_id":"0x00158d0006d3ad73_power_outage_count_zigbee2mqtt","value_template":"{{ value_json.power_outage_count }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3ad73/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_kitchen/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3ad73"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_kitchen","sw_version":"3000-0001"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"leak_kitchen_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/leak_kitchen","unique_id":"0x00158d0006d3ad73_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/switch/0xb0ce1814036bc0da/switch/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_modem/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_modem/set","device":{"identifiers":["zigbee2mqtt_0xb0ce1814036bc0da"],"manufacturer":"Sengled","model":"Smart plug with energy tracker (E1C-NB7)","name":"switch_modem"},"name":"switch_modem","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/switch_modem","unique_id":"0xb0ce1814036bc0da_switch_zigbee2mqtt","value_template":"{{ value_json.state }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0xb0ce1814036bc0da/power/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_modem/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0xb0ce1814036bc0da"],"manufacturer":"Sengled","model":"Smart plug with energy tracker (E1C-NB7)","name":"switch_modem"},"device_class":"power","enabled_by_default":true,"entity_category":"diagnostic","name":"switch_modem_power","state_class":"measurement","state_topic":"zigbee2mqtt/switch_modem","unique_id":"0xb0ce1814036bc0da_power_zigbee2mqtt","unit_of_measurement":"W","value_template":"{{ value_json.power }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0xb0ce1814036bc0da/energy/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_modem/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0xb0ce1814036bc0da"],"manufacturer":"Sengled","model":"Smart plug with energy tracker (E1C-NB7)","name":"switch_modem"},"device_class":"energy","enabled_by_default":true,"name":"switch_modem_energy","state_class":"total_increasing","state_topic":"zigbee2mqtt/switch_modem","unique_id":"0xb0ce1814036bc0da_energy_zigbee2mqtt","unit_of_measurement":"kWh","value_template":"{{ value_json.energy }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0xb0ce1814036bc0da/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_modem/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0xb0ce1814036bc0da"],"manufacturer":"Sengled","model":"Smart plug with energy tracker (E1C-NB7)","name":"switch_modem"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"switch_modem_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/switch_modem","unique_id":"0xb0ce1814036bc0da_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3addb/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3addb"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_garage","sw_version":"3000-0001"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"leak_garage_battery","state_class":"measurement","state_topic":"zigbee2mqtt/leak_garage","unique_id":"0x00158d0006d3addb_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x00158d0006d3addb/water_leak/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3addb"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_garage","sw_version":"3000-0001"},"device_class":"moisture","name":"leak_garage_water_leak","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/leak_garage","unique_id":"0x00158d0006d3addb_water_leak_zigbee2mqtt","value_template":"{{ value_json.water_leak }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x00158d0006d3addb/battery_low/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3addb"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_garage","sw_version":"3000-0001"},"device_class":"battery","entity_category":"diagnostic","name":"leak_garage_battery_low","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/leak_garage","unique_id":"0x00158d0006d3addb_battery_low_zigbee2mqtt","value_template":"{{ value_json.battery_low }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3addb/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3addb"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_garage","sw_version":"3000-0001"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"leak_garage_voltage","state_class":"measurement","state_topic":"zigbee2mqtt/leak_garage","unique_id":"0x00158d0006d3addb_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3addb/device_temperature/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3addb"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_garage","sw_version":"3000-0001"},"device_class":"temperature","enabled_by_default":true,"entity_category":"diagnostic","name":"leak_garage_device_temperature","state_class":"measurement","state_topic":"zigbee2mqtt/leak_garage","unique_id":"0x00158d0006d3addb_device_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.device_temperature }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3addb/power_outage_count/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3addb"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_garage","sw_version":"3000-0001"},"enabled_by_default":true,"name":"leak_garage_power_outage_count","state_topic":"zigbee2mqtt/leak_garage","unique_id":"0x00158d0006d3addb_power_outage_count_zigbee2mqtt","value_template":"{{ value_json.power_outage_count }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d3addb/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d3addb"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_garage","sw_version":"3000-0001"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"leak_garage_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/leak_garage","unique_id":"0x00158d0006d3addb_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x70ac08fffeebe2d5/power/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_espresso/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x70ac08fffeebe2d5"],"manufacturer":"Innr","model":"Smart plug (SP 234)","name":"switch_espresso","sw_version":"3.1"},"device_class":"power","enabled_by_default":true,"entity_category":"diagnostic","name":"switch_espresso_power","state_class":"measurement","state_topic":"zigbee2mqtt/switch_espresso","unique_id":"0x70ac08fffeebe2d5_power_zigbee2mqtt","unit_of_measurement":"W","value_template":"{{ value_json.power }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x70ac08fffeebe2d5/current/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_espresso/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x70ac08fffeebe2d5"],"manufacturer":"Innr","model":"Smart plug (SP 234)","name":"switch_espresso","sw_version":"3.1"},"device_class":"current","enabled_by_default":false,"entity_category":"diagnostic","name":"switch_espresso_current","state_class":"measurement","state_topic":"zigbee2mqtt/switch_espresso","unique_id":"0x70ac08fffeebe2d5_current_zigbee2mqtt","unit_of_measurement":"A","value_template":"{{ value_json.current }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x70ac08fffeebe2d5/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_espresso/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x70ac08fffeebe2d5"],"manufacturer":"Innr","model":"Smart plug (SP 234)","name":"switch_espresso","sw_version":"3.1"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"switch_espresso_voltage","state_class":"measurement","state_topic":"zigbee2mqtt/switch_espresso","unique_id":"0x70ac08fffeebe2d5_voltage_zigbee2mqtt","unit_of_measurement":"V","value_template":"{{ value_json.voltage }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/switch/0x70ac08fffeebe2d5/switch/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_espresso/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_espresso/set","device":{"identifiers":["zigbee2mqtt_0x70ac08fffeebe2d5"],"manufacturer":"Innr","model":"Smart plug (SP 234)","name":"switch_espresso","sw_version":"3.1"},"name":"switch_espresso","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/switch_espresso","unique_id":"0x70ac08fffeebe2d5_switch_zigbee2mqtt","value_template":"{{ value_json.state }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x70ac08fffeebe2d5/energy/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_espresso/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x70ac08fffeebe2d5"],"manufacturer":"Innr","model":"Smart plug (SP 234)","name":"switch_espresso","sw_version":"3.1"},"device_class":"energy","enabled_by_default":true,"name":"switch_espresso_energy","state_class":"total_increasing","state_topic":"zigbee2mqtt/switch_espresso","unique_id":"0x70ac08fffeebe2d5_energy_zigbee2mqtt","unit_of_measurement":"kWh","value_template":"{{ value_json.energy }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x70ac08fffeebe2d5/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_espresso/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x70ac08fffeebe2d5"],"manufacturer":"Innr","model":"Smart plug (SP 234)","name":"switch_espresso","sw_version":"3.1"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"switch_espresso_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/switch_espresso","unique_id":"0x70ac08fffeebe2d5_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x70ac08fffeebe2d5/update_state/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_espresso/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x70ac08fffeebe2d5"],"manufacturer":"Innr","model":"Smart plug (SP 234)","name":"switch_espresso","sw_version":"3.1"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:update","name":"switch_espresso_update_state","state_topic":"zigbee2mqtt/switch_espresso","unique_id":"0x70ac08fffeebe2d5_update_state_zigbee2mqtt","value_template":"{{ value_json['update']['state'] }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x70ac08fffeebe2d5/update_available/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_espresso/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x70ac08fffeebe2d5"],"manufacturer":"Innr","model":"Smart plug (SP 234)","name":"switch_espresso","sw_version":"3.1"},"device_class":"update","enabled_by_default":false,"entity_category":"diagnostic","name":"switch_espresso_update_available","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/switch_espresso","unique_id":"0x70ac08fffeebe2d5_update_available_zigbee2mqtt","value_template":"{{ value_json['update']['state'] == \"available\" }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/update/0x70ac08fffeebe2d5/update/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_espresso/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/bridge/request/device/ota_update/update","device":{"identifiers":["zigbee2mqtt_0x70ac08fffeebe2d5"],"manufacturer":"Innr","model":"Smart plug (SP 234)","name":"switch_espresso","sw_version":"3.1"},"device_class":"firmware","entity_picture":"https://github.com/Koenkk/zigbee2mqtt/raw/master/images/logo.png","latest_version_template":"{{ value_json['update']['latest_version'] }}","latest_version_topic":"zigbee2mqtt/switch_espresso","name":"switch_espresso","payload_install":"{\"id\": \"0x70ac08fffeebe2d5\"}","state_topic":"zigbee2mqtt/switch_espresso","unique_id":"0x70ac08fffeebe2d5_update_zigbee2mqtt","value_template":"{{ value_json['update']['installed_version'] }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00067968af/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_back/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00067968af"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_back"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"deadbolt_back_battery","state_class":"measurement","state_topic":"zigbee2mqtt/deadbolt_back","unique_id":"0x00158d00067968af_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x00158d00067968af/contact/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_back/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00067968af"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_back"},"device_class":"door","name":"deadbolt_back_contact","payload_off":true,"payload_on":false,"state_topic":"zigbee2mqtt/deadbolt_back","unique_id":"0x00158d00067968af_contact_zigbee2mqtt","value_template":"{{ value_json.contact }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00067968af/device_temperature/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_back/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00067968af"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_back"},"device_class":"temperature","enabled_by_default":true,"entity_category":"diagnostic","name":"deadbolt_back_device_temperature","state_class":"measurement","state_topic":"zigbee2mqtt/deadbolt_back","unique_id":"0x00158d00067968af_device_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.device_temperature }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00067968af/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_back/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00067968af"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_back"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"deadbolt_back_voltage","state_class":"measurement","state_topic":"zigbee2mqtt/deadbolt_back","unique_id":"0x00158d00067968af_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00067968af/power_outage_count/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_back/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00067968af"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_back"},"enabled_by_default":true,"name":"deadbolt_back_power_outage_count","state_topic":"zigbee2mqtt/deadbolt_back","unique_id":"0x00158d00067968af_power_outage_count_zigbee2mqtt","value_template":"{{ value_json.power_outage_count }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00067968af/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_back/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00067968af"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_back"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"deadbolt_back_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/deadbolt_back","unique_id":"0x00158d00067968af_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d2dbf4/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_bathroom/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d2dbf4"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_bathroom","sw_version":"3000-0001"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"leak_bathroom_battery","state_class":"measurement","state_topic":"zigbee2mqtt/leak_bathroom","unique_id":"0x00158d0006d2dbf4_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x00158d0006d2dbf4/water_leak/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_bathroom/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d2dbf4"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_bathroom","sw_version":"3000-0001"},"device_class":"moisture","name":"leak_bathroom_water_leak","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/leak_bathroom","unique_id":"0x00158d0006d2dbf4_water_leak_zigbee2mqtt","value_template":"{{ value_json.water_leak }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x00158d0006d2dbf4/battery_low/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_bathroom/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d2dbf4"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_bathroom","sw_version":"3000-0001"},"device_class":"battery","entity_category":"diagnostic","name":"leak_bathroom_battery_low","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/leak_bathroom","unique_id":"0x00158d0006d2dbf4_battery_low_zigbee2mqtt","value_template":"{{ value_json.battery_low }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d2dbf4/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_bathroom/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d2dbf4"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_bathroom","sw_version":"3000-0001"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"leak_bathroom_voltage","state_class":"measurement","state_topic":"zigbee2mqtt/leak_bathroom","unique_id":"0x00158d0006d2dbf4_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d2dbf4/device_temperature/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_bathroom/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d2dbf4"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_bathroom","sw_version":"3000-0001"},"device_class":"temperature","enabled_by_default":true,"entity_category":"diagnostic","name":"leak_bathroom_device_temperature","state_class":"measurement","state_topic":"zigbee2mqtt/leak_bathroom","unique_id":"0x00158d0006d2dbf4_device_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.device_temperature }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d2dbf4/power_outage_count/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_bathroom/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d2dbf4"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_bathroom","sw_version":"3000-0001"},"enabled_by_default":true,"name":"leak_bathroom_power_outage_count","state_topic":"zigbee2mqtt/leak_bathroom","unique_id":"0x00158d0006d2dbf4_power_outage_count_zigbee2mqtt","value_template":"{{ value_json.power_outage_count }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006d2dbf4/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/leak_bathroom/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006d2dbf4"],"manufacturer":"Xiaomi","model":"Aqara water leak sensor (SJCGQ11LM)","name":"leak_bathroom","sw_version":"3000-0001"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"leak_bathroom_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/leak_bathroom","unique_id":"0x00158d0006d2dbf4_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006796173/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_front/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006796173"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_front","sw_version":"3000-0001"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"deadbolt_front_battery","state_class":"measurement","state_topic":"zigbee2mqtt/deadbolt_front","unique_id":"0x00158d0006796173_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x00158d0006796173/contact/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_front/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006796173"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_front","sw_version":"3000-0001"},"device_class":"door","name":"deadbolt_front_contact","payload_off":true,"payload_on":false,"state_topic":"zigbee2mqtt/deadbolt_front","unique_id":"0x00158d0006796173_contact_zigbee2mqtt","value_template":"{{ value_json.contact }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006796173/device_temperature/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_front/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006796173"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_front","sw_version":"3000-0001"},"device_class":"temperature","enabled_by_default":true,"entity_category":"diagnostic","name":"deadbolt_front_device_temperature","state_class":"measurement","state_topic":"zigbee2mqtt/deadbolt_front","unique_id":"0x00158d0006796173_device_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.device_temperature }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006796173/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_front/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006796173"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_front","sw_version":"3000-0001"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"deadbolt_front_voltage","state_class":"measurement","state_topic":"zigbee2mqtt/deadbolt_front","unique_id":"0x00158d0006796173_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006796173/power_outage_count/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_front/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006796173"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_front","sw_version":"3000-0001"},"enabled_by_default":true,"name":"deadbolt_front_power_outage_count","state_topic":"zigbee2mqtt/deadbolt_front","unique_id":"0x00158d0006796173_power_outage_count_zigbee2mqtt","value_template":"{{ value_json.power_outage_count }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d0006796173/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/deadbolt_front/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d0006796173"],"manufacturer":"Xiaomi","model":"Aqara door & window contact sensor (MCCGQ11LM)","name":"deadbolt_front","sw_version":"3000-0001"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"deadbolt_front_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/deadbolt_front","unique_id":"0x00158d0006796173_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b0022671b28/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_upstairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b0022671b28"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_upstairs"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"temp_upstairs_battery","state_class":"measurement","state_topic":"zigbee2mqtt/temp_upstairs","unique_id":"0x00124b0022671b28_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b0022671b28/temperature/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_upstairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b0022671b28"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_upstairs"},"device_class":"temperature","enabled_by_default":true,"name":"temp_upstairs_temperature","state_class":"measurement","state_topic":"zigbee2mqtt/temp_upstairs","unique_id":"0x00124b0022671b28_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.temperature }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b0022671b28/humidity/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_upstairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b0022671b28"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_upstairs"},"device_class":"humidity","enabled_by_default":true,"name":"temp_upstairs_humidity","state_class":"measurement","state_topic":"zigbee2mqtt/temp_upstairs","unique_id":"0x00124b0022671b28_humidity_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.humidity }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b0022671b28/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_upstairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b0022671b28"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_upstairs"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"temp_upstairs_voltage","state_class":"measurement","state_topic":"zigbee2mqtt/temp_upstairs","unique_id":"0x00124b0022671b28_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b0022671b28/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_upstairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b0022671b28"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_upstairs"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"temp_upstairs_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/temp_upstairs","unique_id":"0x00124b0022671b28_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00029014e0/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/button_stairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00029014e0"],"manufacturer":"Xiaomi","model":"Aqara wireless switch (WXKG11LM)","name":"button_stairs","sw_version":"3000-0001"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"button_stairs_battery","state_class":"measurement","state_topic":"zigbee2mqtt/button_stairs","unique_id":"0x00158d00029014e0_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00029014e0/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/button_stairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00029014e0"],"manufacturer":"Xiaomi","model":"Aqara wireless switch (WXKG11LM)","name":"button_stairs","sw_version":"3000-0001"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"button_stairs_voltage","state_class":"measurement","state_topic":"zigbee2mqtt/button_stairs","unique_id":"0x00158d00029014e0_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00029014e0/device_temperature/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/button_stairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00029014e0"],"manufacturer":"Xiaomi","model":"Aqara wireless switch (WXKG11LM)","name":"button_stairs","sw_version":"3000-0001"},"device_class":"temperature","enabled_by_default":true,"entity_category":"diagnostic","name":"button_stairs_device_temperature","state_class":"measurement","state_topic":"zigbee2mqtt/button_stairs","unique_id":"0x00158d00029014e0_device_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.device_temperature }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00029014e0/power_outage_count/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/button_stairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00029014e0"],"manufacturer":"Xiaomi","model":"Aqara wireless switch (WXKG11LM)","name":"button_stairs","sw_version":"3000-0001"},"enabled_by_default":true,"name":"button_stairs_power_outage_count","state_topic":"zigbee2mqtt/button_stairs","unique_id":"0x00158d00029014e0_power_outage_count_zigbee2mqtt","value_template":"{{ value_json.power_outage_count }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00158d00029014e0/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/button_stairs/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00158d00029014e0"],"manufacturer":"Xiaomi","model":"Aqara wireless switch (WXKG11LM)","name":"button_stairs","sw_version":"3000-0001"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"button_stairs_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/button_stairs","unique_id":"0x00158d00029014e0_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/switch/0xb0ce1814036b9f7d/switch/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_livingroom_purifier/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_livingroom_purifier/set","device":{"identifiers":["zigbee2mqtt_0xb0ce1814036b9f7d"],"manufacturer":"Sengled","model":"Smart plug with energy tracker (E1C-NB7)","name":"switch_livingroom_purifier"},"name":"switch_livingroom_purifier","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/switch_livingroom_purifier","unique_id":"0xb0ce1814036b9f7d_switch_zigbee2mqtt","value_template":"{{ value_json.state }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0xb0ce1814036b9f7d/power/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_livingroom_purifier/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0xb0ce1814036b9f7d"],"manufacturer":"Sengled","model":"Smart plug with energy tracker (E1C-NB7)","name":"switch_livingroom_purifier"},"device_class":"power","enabled_by_default":true,"entity_category":"diagnostic","name":"switch_livingroom_purifier_power","state_class":"measurement","state_topic":"zigbee2mqtt/switch_livingroom_purifier","unique_id":"0xb0ce1814036b9f7d_power_zigbee2mqtt","unit_of_measurement":"W","value_template":"{{ value_json.power }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0xb0ce1814036b9f7d/energy/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_livingroom_purifier/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0xb0ce1814036b9f7d"],"manufacturer":"Sengled","model":"Smart plug with energy tracker (E1C-NB7)","name":"switch_livingroom_purifier"},"device_class":"energy","enabled_by_default":true,"name":"switch_livingroom_purifier_energy","state_class":"total_increasing","state_topic":"zigbee2mqtt/switch_livingroom_purifier","unique_id":"0xb0ce1814036b9f7d_energy_zigbee2mqtt","unit_of_measurement":"kWh","value_template":"{{ value_json.energy }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0xb0ce1814036b9f7d/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_livingroom_purifier/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0xb0ce1814036b9f7d"],"manufacturer":"Sengled","model":"Smart plug with energy tracker (E1C-NB7)","name":"switch_livingroom_purifier"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"switch_livingroom_purifier_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/switch_livingroom_purifier","unique_id":"0xb0ce1814036b9f7d_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/switch/0x5c0272fffea9e96a/switch/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_printer/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_printer/set","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e96a"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_printer","sw_version":"2.7"},"name":"switch_printer","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/switch_printer","unique_id":"0x5c0272fffea9e96a_switch_zigbee2mqtt","value_template":"{{ value_json.state }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x5c0272fffea9e96a/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_printer/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e96a"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_printer","sw_version":"2.7"},"enabled_by_default":false,"entity_category":"config","icon":"mdi:power-settings","name":"switch_printer_power_on_behavior","state_topic":"zigbee2mqtt/switch_printer","unique_id":"0x5c0272fffea9e96a_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/select/0x5c0272fffea9e96a/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_printer/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_printer/set/power_on_behavior","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e96a"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_printer","sw_version":"2.7"},"entity_category":"config","icon":"mdi:power-settings","name":"switch_printer_power_on_behavior","options":["off","on","toggle","previous"],"state_topic":"zigbee2mqtt/switch_printer","unique_id":"0x5c0272fffea9e96a_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x5c0272fffea9e96a/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_printer/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e96a"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_printer","sw_version":"2.7"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"switch_printer_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/switch_printer","unique_id":"0x5c0272fffea9e96a_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x5c0272fffea9e96a/update_state/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_printer/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e96a"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_printer","sw_version":"2.7"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:update","name":"switch_printer_update_state","state_topic":"zigbee2mqtt/switch_printer","unique_id":"0x5c0272fffea9e96a_update_state_zigbee2mqtt","value_template":"{{ value_json['update']['state'] }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x5c0272fffea9e96a/update_available/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_printer/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e96a"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_printer","sw_version":"2.7"},"device_class":"update","enabled_by_default":false,"entity_category":"diagnostic","name":"switch_printer_update_available","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/switch_printer","unique_id":"0x5c0272fffea9e96a_update_available_zigbee2mqtt","value_template":"{{ value_json['update']['state'] == \"available\" }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/update/0x5c0272fffea9e96a/update/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_printer/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/bridge/request/device/ota_update/update","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e96a"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_printer","sw_version":"2.7"},"device_class":"firmware","entity_picture":"https://github.com/Koenkk/zigbee2mqtt/raw/master/images/logo.png","latest_version_template":"{{ value_json['update']['latest_version'] }}","latest_version_topic":"zigbee2mqtt/switch_printer","name":"switch_printer","payload_install":"{\"id\": \"0x5c0272fffea9e96a\"}","state_topic":"zigbee2mqtt/switch_printer","unique_id":"0x5c0272fffea9e96a_update_zigbee2mqtt","value_template":"{{ value_json['update']['installed_version'] }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/switch/0x5c0272fffea9e7d8/switch/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_cattoy/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_cattoy/set","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e7d8"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_cattoy","sw_version":"2.7"},"name":"switch_cattoy","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/switch_cattoy","unique_id":"0x5c0272fffea9e7d8_switch_zigbee2mqtt","value_template":"{{ value_json.state }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x5c0272fffea9e7d8/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_cattoy/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e7d8"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_cattoy","sw_version":"2.7"},"enabled_by_default":false,"entity_category":"config","icon":"mdi:power-settings","name":"switch_cattoy_power_on_behavior","state_topic":"zigbee2mqtt/switch_cattoy","unique_id":"0x5c0272fffea9e7d8_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/select/0x5c0272fffea9e7d8/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_cattoy/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_cattoy/set/power_on_behavior","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e7d8"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_cattoy","sw_version":"2.7"},"entity_category":"config","icon":"mdi:power-settings","name":"switch_cattoy_power_on_behavior","options":["off","on","toggle","previous"],"state_topic":"zigbee2mqtt/switch_cattoy","unique_id":"0x5c0272fffea9e7d8_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x5c0272fffea9e7d8/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_cattoy/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e7d8"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_cattoy","sw_version":"2.7"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"switch_cattoy_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/switch_cattoy","unique_id":"0x5c0272fffea9e7d8_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x5c0272fffea9e7d8/update_state/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_cattoy/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e7d8"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_cattoy","sw_version":"2.7"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:update","name":"switch_cattoy_update_state","state_topic":"zigbee2mqtt/switch_cattoy","unique_id":"0x5c0272fffea9e7d8_update_state_zigbee2mqtt","value_template":"{{ value_json['update']['state'] }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x5c0272fffea9e7d8/update_available/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_cattoy/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e7d8"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_cattoy","sw_version":"2.7"},"device_class":"update","enabled_by_default":false,"entity_category":"diagnostic","name":"switch_cattoy_update_available","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/switch_cattoy","unique_id":"0x5c0272fffea9e7d8_update_available_zigbee2mqtt","value_template":"{{ value_json['update']['state'] == \"available\" }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/update/0x5c0272fffea9e7d8/update/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_cattoy/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/bridge/request/device/ota_update/update","device":{"identifiers":["zigbee2mqtt_0x5c0272fffea9e7d8"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_cattoy","sw_version":"2.7"},"device_class":"firmware","entity_picture":"https://github.com/Koenkk/zigbee2mqtt/raw/master/images/logo.png","latest_version_template":"{{ value_json['update']['latest_version'] }}","latest_version_topic":"zigbee2mqtt/switch_cattoy","name":"switch_cattoy","payload_install":"{\"id\": \"0x5c0272fffea9e7d8\"}","state_topic":"zigbee2mqtt/switch_cattoy","unique_id":"0x5c0272fffea9e7d8_update_zigbee2mqtt","value_template":"{{ value_json['update']['installed_version'] }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/switch/0xb4e3f9fffe3577b7/switch/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_water_valve/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_water_valve/set","device":{"identifiers":["zigbee2mqtt_0xb4e3f9fffe3577b7"],"manufacturer":"TuYa","model":"1 gang switch (TS0001)","name":"switch_water_valve"},"name":"switch_water_valve","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/switch_water_valve","unique_id":"0xb4e3f9fffe3577b7_switch_zigbee2mqtt","value_template":"{{ value_json.state }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0xb4e3f9fffe3577b7/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_water_valve/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0xb4e3f9fffe3577b7"],"manufacturer":"TuYa","model":"1 gang switch (TS0001)","name":"switch_water_valve"},"enabled_by_default":false,"entity_category":"config","icon":"mdi:power-settings","name":"switch_water_valve_power_on_behavior","state_topic":"zigbee2mqtt/switch_water_valve","unique_id":"0xb4e3f9fffe3577b7_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/select/0xb4e3f9fffe3577b7/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_water_valve/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_water_valve/set/power_on_behavior","device":{"identifiers":["zigbee2mqtt_0xb4e3f9fffe3577b7"],"manufacturer":"TuYa","model":"1 gang switch (TS0001)","name":"switch_water_valve"},"entity_category":"config","icon":"mdi:power-settings","name":"switch_water_valve_power_on_behavior","options":["off","previous","on"],"state_topic":"zigbee2mqtt/switch_water_valve","unique_id":"0xb4e3f9fffe3577b7_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0xb4e3f9fffe3577b7/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_water_valve/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0xb4e3f9fffe3577b7"],"manufacturer":"TuYa","model":"1 gang switch (TS0001)","name":"switch_water_valve"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"switch_water_valve_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/switch_water_valve","unique_id":"0xb4e3f9fffe3577b7_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/switch/0x60a423fffebd4de2/switch/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_sean_office_behind_door/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_sean_office_behind_door/set","device":{"identifiers":["zigbee2mqtt_0x60a423fffebd4de2"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_sean_office_behind_door","sw_version":"2.7"},"name":"switch_sean_office_behind_door","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/switch_sean_office_behind_door","unique_id":"0x60a423fffebd4de2_switch_zigbee2mqtt","value_template":"{{ value_json.state }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x60a423fffebd4de2/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_sean_office_behind_door/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x60a423fffebd4de2"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_sean_office_behind_door","sw_version":"2.7"},"enabled_by_default":false,"entity_category":"config","icon":"mdi:power-settings","name":"switch_sean_office_behind_door_power_on_behavior","state_topic":"zigbee2mqtt/switch_sean_office_behind_door","unique_id":"0x60a423fffebd4de2_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/select/0x60a423fffebd4de2/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_sean_office_behind_door/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/switch_sean_office_behind_door/set/power_on_behavior","device":{"identifiers":["zigbee2mqtt_0x60a423fffebd4de2"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_sean_office_behind_door","sw_version":"2.7"},"entity_category":"config","icon":"mdi:power-settings","name":"switch_sean_office_behind_door_power_on_behavior","options":["off","on","toggle","previous"],"state_topic":"zigbee2mqtt/switch_sean_office_behind_door","unique_id":"0x60a423fffebd4de2_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x60a423fffebd4de2/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_sean_office_behind_door/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x60a423fffebd4de2"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_sean_office_behind_door","sw_version":"2.7"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"switch_sean_office_behind_door_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/switch_sean_office_behind_door","unique_id":"0x60a423fffebd4de2_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x60a423fffebd4de2/update_state/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_sean_office_behind_door/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x60a423fffebd4de2"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_sean_office_behind_door","sw_version":"2.7"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:update","name":"switch_sean_office_behind_door_update_state","state_topic":"zigbee2mqtt/switch_sean_office_behind_door","unique_id":"0x60a423fffebd4de2_update_state_zigbee2mqtt","value_template":"{{ value_json['update']['state'] }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/binary_sensor/0x60a423fffebd4de2/update_available/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_sean_office_behind_door/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x60a423fffebd4de2"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_sean_office_behind_door","sw_version":"2.7"},"device_class":"update","enabled_by_default":false,"entity_category":"diagnostic","name":"switch_sean_office_behind_door_update_available","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/switch_sean_office_behind_door","unique_id":"0x60a423fffebd4de2_update_available_zigbee2mqtt","value_template":"{{ value_json['update']['state'] == \"available\" }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/update/0x60a423fffebd4de2/update/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/switch_sean_office_behind_door/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/bridge/request/device/ota_update/update","device":{"identifiers":["zigbee2mqtt_0x60a423fffebd4de2"],"manufacturer":"Innr","model":"Smart plug (SP 224)","name":"switch_sean_office_behind_door","sw_version":"2.7"},"device_class":"firmware","entity_picture":"https://github.com/Koenkk/zigbee2mqtt/raw/master/images/logo.png","latest_version_template":"{{ value_json['update']['latest_version'] }}","latest_version_topic":"zigbee2mqtt/switch_sean_office_behind_door","name":"switch_sean_office_behind_door","payload_install":"{\"id\": \"0x60a423fffebd4de2\"}","state_topic":"zigbee2mqtt/switch_sean_office_behind_door","unique_id":"0x60a423fffebd4de2_update_zigbee2mqtt","value_template":"{{ value_json['update']['installed_version'] }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b00226cc598/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b00226cc598"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_garage"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"temp_garage_battery","state_class":"measurement","state_topic":"zigbee2mqtt/temp_garage","unique_id":"0x00124b00226cc598_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b00226cc598/temperature/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b00226cc598"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_garage"},"device_class":"temperature","enabled_by_default":true,"name":"temp_garage_temperature","state_class":"measurement","state_topic":"zigbee2mqtt/temp_garage","unique_id":"0x00124b00226cc598_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.temperature }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b00226cc598/humidity/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b00226cc598"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_garage"},"device_class":"humidity","enabled_by_default":true,"name":"temp_garage_humidity","state_class":"measurement","state_topic":"zigbee2mqtt/temp_garage","unique_id":"0x00124b00226cc598_humidity_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.humidity }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b00226cc598/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b00226cc598"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_garage"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"temp_garage_voltage","state_class":"measurement","state_topic":"zigbee2mqtt/temp_garage","unique_id":"0x00124b00226cc598_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
Zigbee2MQTT:info  2023-06-07 11:30:38: MQTT publish: topic 'homeassistant/sensor/0x00124b00226cc598/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/temp_garage/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x00124b00226cc598"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor (SNZB-02)","name":"temp_garage"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"temp_garage_linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/temp_garage","unique_id":"0x00124b00226cc598_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Zigbee2MQTT:error 2023-06-07 11:30:38: DEBUG: CLEARING RETAINED MESSAGES TIMER zigbee2mqtt/bridge/state {"state":"online"}

Koenkk added a commit that referenced this pull request Jun 7, 2023
@Koenkk
Copy link
Owner

Koenkk commented Jun 7, 2023

@xconverge can you try the fix from #17951 ? (@jeroen85 for you there is no need to test this one)

@xconverge
Copy link
Contributor Author

Works for me

Koenkk added a commit that referenced this pull request Jun 8, 2023
* fix(ignore): Better fix for #17891

* remove onlythis
@Koenkk
Copy link
Owner

Koenkk commented Jun 8, 2023

Great!

@jeroen85 just to be sure, can you check if the latest-dev works fine for you?

@jeroen85
Copy link

jeroen85 commented Jun 8, 2023

Checked, it works as expected :-) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants