# Why turns device itself off?

**URL:** <https://community.homey.app/t/why-turns-device-itself-off/93290>\
**Category:** Questions & Help\
**Tags:** advancedflow\
**Created:** [October 31, 2023, 7:52am UTC](https://community.homey.app/t/why-turns-device-itself-off/93290 "2023-10-31T07:52:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![PoJa84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/poja84/32/114582_2.png) [@PoJa84](https://community.homey.app/u/PoJa84)\
**Post date:** [October 31, 2023, 7:52am UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/1 "2023-10-31T07:52:08Z")

</div>

I have an [Aqara smart plug](https://www.plugwise.com/product/aqara-plug-2/). I use it to turn off my floor-heating-pump at night, to save some power, and to monitor power usage.  
I have a advanced flow which turns it off at 11:00 Pm and turns it on at 4:00 am. The flow works fine, but sometimes i find the pump being turned off.

Looking in the log, it seams the plug turns itself off (see attached image below).  
The question is, why does it do this? Is it broken? How do i find out what the problem is?

At the moment, i have a flow which turns it on every 30 minutes, but that is nog a permanent solution.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/2/5214bf45daf3a1525e9627e365e7b62a8520d0a7.png)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [October 31, 2023, 8:01am UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/2 "2023-10-31T08:01:01Z")

</div>

> [@PoJa84](#):
>
> The question is, why does it do this? Is it broken? How do i find out what the problem is?

Do you have IKEA remotes (like the shortcut or on/off buttons)? These can cause issues with Aqara devices.

---

<div class="post-metadata">

**Author:** ![PoJa84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/poja84/32/114582_2.png) [@PoJa84](https://community.homey.app/u/PoJa84)\
**Post date:** [November 1, 2023, 7:42am UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/3 "2023-11-01T07:42:58Z")

</div>

Hey, thanks for your reply.

Yeah, i do have one of the on/off buttons. But i’m not sure if that is the problem, it seams to turn itself of, even if i don’t use the button.  
But _if_ the button is the problem, is there a fix?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [November 1, 2023, 7:44am UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/4 "2023-11-01T07:44:00Z")

</div>

If it’s not caused by pressing the button, it’s probably not the cause ☹

And besides, AFAIK it’s not possible to fix that issue on Homey if it _were_ the case.

---

<div class="post-metadata">

**Author:** ![PoJa84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/poja84/32/114582_2.png) [@PoJa84](https://community.homey.app/u/PoJa84)\
**Post date:** [November 1, 2023, 7:56am UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/5 "2023-11-01T07:56:53Z")

</div>

Shame. So ditch the remote or ditch aqara?

I’m going to try removing the battery for a while and see of that fixes the problem.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [November 1, 2023, 8:08am UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/6 "2023-11-01T08:08:22Z")

</div>

> [@PoJa84](#):
>
> So ditch the remote or ditch aqara?

Only if that’s actually the cause. Removing the battery is a good idea 👍🏻

---

<div class="post-metadata">

**Author:** ![pbruins84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pbruins84/32/74379_2.png) [@pbruins84](https://community.homey.app/u/pbruins84)\
**Post date:** [November 6, 2023, 12:20pm UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/7 "2023-11-06T12:20:38Z")

</div>

I can report similar behavior. I have i.a. 6 Aqara smart plugs, and a TRÅDFRI STYRBAR remote control. When I use the STYRBAR, sometimes 1 of the Aqara smart plugs turns off. It’s random if it happens or not, and also random which smart plug turns off. It’s never more than 1 smart plug that turns off. It also overrides the “Always-on” setting of the plugs in Homey. So I’m getting a replacement for the TRÅDFRI STYRBAR.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [November 6, 2023, 12:22pm UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/8 "2023-11-06T12:22:02Z")

</div>

> [@pbruins84](#):
>
> So I’m getting a replacement for the TRÅDFRI STYRBAR.

I assume you mean a remote from another brand and not a different STYRBAR?

---

<div class="post-metadata">

**Author:** ![pbruins84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pbruins84/32/74379_2.png) [@pbruins84](https://community.homey.app/u/pbruins84)\
**Post date:** [November 6, 2023, 1:35pm UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/9 "2023-11-06T13:35:05Z")

</div>

> [@robertklep](#):
>
> I assume you mean a remote from another brand and not a different STYRBAR?

Yes, from another brand. I don’t know which one yet.

---

<div class="post-metadata">

**Author:** ![PoJa84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/poja84/32/114582_2.png) [@PoJa84](https://community.homey.app/u/PoJa84)\
**Post date:** [January 11, 2024, 1:14pm UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/10 "2024-01-11T13:14:59Z")

</div>

I’m using these now.  
They work perfectly, also integrate seamless with my existing wall switches.

[https://www.robbshop.nl/draadloze-zigbee-schakelaar-met-2-knoppen](https://www.robbshop.nl/draadloze-zigbee-schakelaar-met-2-knoppen)

---

<div class="post-metadata">

**Author:** ![Valentin\_Ciopei](https://avatars.discourse-cdn.com/v4/letter/v/6bbea6/32.png) [@Valentin\_Ciopei](https://community.homey.app/u/Valentin_Ciopei)\
**Post date:** [February 9, 2024, 10:21pm UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/11 "2024-02-09T22:21:16Z")

</div>

I just discovered that my Ikea remote turns of one of the aqara plugs.  
What in the …is this?  
How can this happen?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 10, 2024, 1:34am UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/12 "2024-02-10T01:34:06Z")

</div>

The Styrbar (in default configuration) sends commands to a fixed Zigbee group, and the Aqara switch (in default configuration) happens to listen to that same group. So at least one of the two devices has to be thrown out of that group, which unfortunately is not possible with Homey.

Source:

> [@Aqara Smart Plug zomaar aan](https://community.homey.app/t/aqara-smart-plug-zomaar-aan/93200/9):
>
> De Styrbar stuurt (in standaard configuratie) opdrachten naar een vaste Zigbee groep, en de Aqara schakelaar (in standaard configuratie) luistert toevallig naar diezelfde groep. Minstens één van de twee apparaten moet dus uit die groep gegooid worden, wat helaas niet mogelijk is met Homey.

---

<div class="post-metadata">

**Author:** ![Valentin\_Ciopei](https://avatars.discourse-cdn.com/v4/letter/v/6bbea6/32.png) [@Valentin\_Ciopei](https://community.homey.app/u/Valentin_Ciopei)\
**Post date:** [February 10, 2024, 2:11pm UTC](https://community.homey.app/t/why-turns-device-itself-off/93290/13 "2024-02-10T14:11:19Z")

</div>

I managed to downgrade the plugs using this guide:

> <https://github.com/Koenkk/zigbee2mqtt/issues/13903>
>
> \### What happened?
> 
> I've executed OTA firmware update on the Xiaomi Aqara plug (…SP-EUC01). Old fw version: 09-22-2020. New version came from zigb222mqtt OTA location, version 20211206.
> 
> \`\`\`
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: lumi.plug.maeu01: unknown key dateCode with value 09-22-2020
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: lumi.plug.maeu01: unknown key swBuildId with value undefined
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: lumi.plug.maeu01: Processed data into payload {}
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: Updating to latest '0x54ef441000157f54' (lumi.plug.maeu01)
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: Using endpoint '1'
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: Received Zigbee message from 'plug\_002', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":32,"imageType":24,"manufacturerCode":4447}' from endpoint 1 with groupID 0
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: Got OTA request '{"fieldControl":0,"manufacturerCode":4447,"imageType":24,"fileVersion":32}'
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: ZigbeeOTA: downloaded main index
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: getNewImage for '0x54ef441000157f54', meta {"fileVersion":41,"fileSize":273278,"url":"https://github.com/Koenkk/zigbee-OTA/raw/master/images/Xiaomi/20211209165104\_OTA\_lumi.plug.maeu01\_0.0.0\_0041\_20211206\_0C22EC.ota","sha512":"3d5567a29eb7d4bacaaf823c47b66a700fb1e7b935b1d547673bcacb2ff4efacb7780e8caf72dc80f0ac942c1ec1f6964bf67cfacba359d38132b7bcfe80133b"}
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:30: ZigbeeOTA: downloading firmware image from https://github.com/Koenkk/zigbee-OTA/raw/master/images/Xiaomi/20211209165104\_OTA\_lumi.plug.maeu01\_0.0.0\_0041\_20211206\_0C22EC.ota
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:31: OTA update checksum validation succeeded for '0x54ef441000157f54'
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:31: getNewImage for '0x54ef441000157f54', image header {"otaUpgradeFileIdentifier":{"type":"Buffer","data":\[30,241,238,11\]},"otaHeaderVersion":256,"otaHeaderLength":56,"otaHeaderFieldControl":0,"manufacturerCode":4447,"imageType":24,"fileVersion":41,"zigbeeStackVersion":2,"otaHeaderString":"ROUTERX-----JN5180--ENCRYPTED000","totalImageSize":273278}
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:31: Got new image for '0x54ef441000157f54'
> 2022-09-01.13-13-03/log.txt:debug 2022-09-07 08:54:31: Starting upgrade
> \`\`\`
> The upgrade completed without problems.
> 
> After that update, whenever I press the button on any IKEA E1812 or E1743, the plug toggles its state which is really undesired. It happens only when the button is connected to that plug (routed via it). Repairing the button using another router helps for a moment but as the network reconfigures itself, the buttons are again routed via the plug, so random buttons start to turn that router plug on and off. Since that plug is not solely a router but provides power to my home office, this is very annoying and made the device unusable. It didn't brick it, but the functionality became useless.
> 
> This is in the logs when I press an unrelated button routed through the plug, and switching it:
> 
> \`\`\`
> debug 2022-09-07 16:09:48: Received Zigbee message from 'switch\_006', type 'commandOn', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0
> info 2022-09-07 16:09:48: MQTT publish: topic 'zigbee2mqtt/switch\_006', payload '{"action":"on","battery":87,"linkquality":47,"update":{"state":"idle"},"update\_available":null}'
> info 2022-09-07 16:09:48: MQTT publish: topic 'zigbee2mqtt/switch\_006', payload '{"action":"","battery":87,"linkquality":47,"update":{"state":"idle"},"update\_available":null}'
> info 2022-09-07 16:09:48: MQTT publish: topic 'zigbee2mqtt/switch\_006/action', payload 'on'
> debug 2022-09-07 16:09:48: Received Zigbee message from '0x54ef441000157f54', type 'attributeReport', cluster 'genOnOff', data '{"245":128283218,"onOff":1}' from endpoint 1 with groupID 0
> info 2022-09-07 16:09:48: MQTT publish: topic 'zigbee2mqtt/0x54ef441000157f54', payload '{"consumer\_connected":false,"consumption":0,"current":0,"device\_temperature":27,"energy":0,"linkquality":47,"power":0,"power\_outage\_count":0,"power\_outage\_memory":true,"state":"ON","update":{"state":null},"update\_available":null,"voltage":229}'
> \`\`\`
> 
> I accidentally realized that these ghost switches work when zigbee2mqtt is down, ie. the plug works in a binding manner with all switching devices that are routed through it. In the meantime sensors routed through it work fine. It seems like when the firmware got upgraded to the one on the OTA server, it makes the plug and all routed switches like binded devices. It may be that the firmware is corrupt, but I have found no way to roll back. I've tried to unbind the switches that are routed through the plug via zigbee2mqtt GUI. The unbind gives a success message but the faulty behaviour remains.
> 
> Apparently happened to ohers but not too much traffic in that thread: https://community.home-assistant.io/t/aqara-plug-sp-euc01-lumi-plug-maeu01-toggles-without-reason/451671/2
> 
> \### What did you expect to happen?
> 
> After the firmware upgrade the device behaviour is identical and can be switched by binded devices or via zigbee2mqtt.
> 
> \### How to reproduce it (minimal and precise)
> 
> 1. Get a Xiaomi Aquara plug with original firmware (mine was 09-22-2020).
> 2. OTA upgrade via zigbee2mqtt.
> 3. Make a few switches route through it in a zigbee network. I used the following:
> IKEA | E1812 | 20210727 | 2.3.080
> IKEA | E1743 | 20210722 | 2.3.079
> 5. Toggle the switch.
> 6. Observe that it will toggle the status of the plug.
> 
> \### Zigbee2MQTT version
> 
> 1.27.2
> 
> \### Adapter firmware version
> 
> 20220219
> 
> \### Adapter
> 
> Slaesh CC2652RB
> 
> \### Debug log
> 
> \_No response\_

For now I didn’t notice any issues.
