Xiaomi Mi Smart Socket Enchanced Edition

Hi guys!

Is it possible to use this (https://www.gizmochina.com/2018/03/06/xiaomi-launched-mi-smart-socket-enhanced-edition-priced-¥79-12/ with HA? If yes, how? I can use all my xiaomi devices with HA, except these sockets…

Thx.

Same question here. It “feels” as though integration is similar to Xiaomi Philips light, hoping code owner (@syssi ?) can add this…
Happy to help troubleshoot / test if needed as I have just received one

I would like to implement the device if you provide some support/testing. At first the output of miioclio device --ip IP --token TOKEN info would be interesting.

Can you remind me where I can find that program?
Running in docker and miioclio is not recognised

Just tried npm install -g miio and that didn’t help.
Tried miio discover` however and got that:

Device ID: 125719709
Model info: Unknown
Address: 192.168.0.55
Token: ???
Support: Unknown
pip3 install python-miio

You’ve extract the token with one of the known methods. It’s required for calling the “info” method. The mDNS name of the device would be interesting, too.

Thanks, still can’t run miioclio?
Currently redoing an unencrypted backup of my iPhone. Should then have the token

Sorry still can’t use miioclio…
However, Zmodel comes up as chuangmi.plug.v3 from the ios backup
The socket allows control over the mains socket and/or the set of USB sockets. It also provides power consumption:

This model is already supported cp. Xiaomi Chuangmi Wifi Plug v3 goes "Unavailable" after 5 minutes

But I assume your hardware has a newer firmware with a different command set. Sorry there was a typo at my first post. The tool is called:

miiocli device --ip IP --token TOKEN info

Thanks
Here’s the output

Model: chuangmi.plug.v3
Hardware version: ESP8266
Firmware version: 1.3.9_0005

I also just saw the Xiaomi Smart WiFi Socket and Smart Power Strip integration (went straight to Xiaomi Socket which is via Aqara)… Looks like I need my bed now.
Apologies for the trouble.
One question though: would it be possible to add power consumption which doesn’t appear to be present?

Could you try to identify the property which provides the power consumption?

# Does 
miiocli device --ip IP --token TOKEN get_power "[]"
# return something?

Please enable the debug output of the HA component + underlying library:

# configuration.yaml
logger:
  default: warn
  logs:
    homeassistant.components.xiaomi_miio.switch: debug
    miio: debug

You should see requests and responses of the device now. Please provide the log. I’m interested in the “get_prop” request & response and the “get_power” call.

ok I’m defo going to bed now
image

:man_facepalming:
Sorry for wasting your time.

@gamerhun21
Can you mark this as closed please?

Perfect and good night! :slight_smile: