It works, sometimes for a couple of hours, but eventually goes offline.
I even deleted it from the Mi Home app, wondering if there was some kind of login conflict. The mi home app still sees the device when it goes offline in HA.
Restarting the plug fixes the problem, for a while. Should i try to update its firmware? I think its running a pretty old version.
Hey @syssi
Hoping you might also be able to help me too.
Here is an excerpt from my logs, hopefully with everything needed. It just repeats on and on for my v3 ‘enhanced plugs’
Running 0.97.1 but it’s been like this since I installed them a couple of months back
@LintHart Let’s try to fix this issue. Can you provide some additional logs? Could you additional provide a screenshot of the switch card? Flips the device between available and unavailable every 5 minutes or is you device unavailable and unusable forever?
Hey @syssi thanks for getting back to me what kind of additional logs would be helpful apart from the above? My problem it that the switches just constantly become unavailable. They’re not switches I regularly touch so I’m unsure if they’re really not working, I’m just really trying hard to get a stable system at the moment and this is just filling my logs with unfortunate messages.
I’ve recently removed 2/3 plugs to chill things out a bit as I wasn’t using them but for the one that is still active, I’m using a Lovelace entity lock so one one accidentally flick it off.
If you click on the entity (if it’s available). Could you provide a screenshot of the availability chart? More logs: Your previous posted log doesn’t show any malfunction. The periodic (re-)discovery is fine, the hexdump is a bit verbose (but normal, too). The “invalid json exception” is recovered properly by a retry.
I’ll have another poke around the logs. Maybe realistically I just need to remove error logging for these devices if it’s normal enough behaviour. In this screenshot it’s fine for a while and then just in the last couple of hours it goes nuts between available/unavailable every few mins
I have a Chuangmi Plug v3, and it has been having similar problem, the Plug would randomly get registered fine in HA one time and gone the next time.
After checking in the Mi Home app, I found that it is getting a different IP address from what I assigned in the Static DHCP at my router. At first I thought there is a rogue DHCP server I forgot to turn off somewhere in my network, so I checked and turns out there is none.
So I checked my router’s dnsmasq log, I discovered that this troll of a plug actually requests DHCP address using two different mac addresses.
In my router, I assigned its mac address 40:31:3c:d6:61:cb to IP address 192.168.8.15
In the Mi Home app it is listed as IP 192.168.8.27
Adding my old chuangmi.plug.m1 through Xiaomi (miio) integration from UI always finds it regularly but added device never shows up online for some reason, so I assumed it just adds some wrong device or something.
I toggled the advanced (add device manually), entered IP and token manually (got token using Xiaomi cloud tokens extractor) and we are back online baby!
As someone in some other thread said - I’m fairly sure I had it in the past and now it didn’t work, but apparently adding it manually fixes the issue.