Code Monkey home page Code Monkey logo

Comments (18)

Uptobillion avatar Uptobillion commented on August 11, 2024 1

acpartner.v3

from xiaomi_airconditioningcompanion.

hsie avatar hsie commented on August 11, 2024 1

Hi, thanks and I now get the command from the wireshark, and while when I tried to send the command to the ac partner via Packet Sender, it doesn't work, just wonder how can I send the command directly via ubuntu, as I think the reason behind may be caused by token.

Attached are json files that I saved from turning on/off the power, file 1& 2 are got from turning on, while file 3 & 4 are for turning off.

I am not sure why it sent 2 udp packets every time when turning on or off.

Thanks in advance!

ac.zip

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

Which hardware version of the device do you own?

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

ref. rytilahti/python-miio#337

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

At the moment I'm not aware of a miIO command to toggle the internal relay.

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

@hsie The data is encrypted. Could you provide your token, too?

cp. https://github.com/rytilahti/python-miio/blob/master/miio/protocol.py
cp. https://github.com/rytilahti/python-miio/blob/master/miio/device.py#L259-L260

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

Could you try these commands?

miiocli device --ip DEVIP --token DEVTOKEN raw_command toggle_plug '["on"]'
miiocli device --ip DEVIP --token DEVTOKEN raw_command toggle_plug '["off"]'

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

This should provide the state of the socket

miiocli device --ip DEVIP --token DEVTOKEN raw_command get_device_prop '["lumi.0", "plug_state"]'

My acpartner.v2 returns an error here:

$ miiocli device --ip 192.168.130.83 --token acf23c57a96e37d7a007ac484c1dca63 raw_command get_device_prop '["lumi.0", "plug_state"]'                                                            
Running command raw_command                                                                                                                                                                                                                    
Error: {'code': -30001, 'message': 'Resp invalid json.'}

I assume it works fine for the acpartner.v3.

from xiaomi_airconditioningcompanion.

hsie avatar hsie commented on August 11, 2024

you are really great! it works now.

and one more question, how to use the command line in the switch template? so that I can setup a switch, thanks again for your kindness!

from xiaomi_airconditioningcompanion.

hsie avatar hsie commented on August 11, 2024

the token for this ac partner is 203dca9dfd709524ab7d6fd22f026257

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

Could you provide the output of this command:

miiocli device --ip DEVIP --token DEVTOKEN raw_command get_device_prop '["lumi.0", "plug_state"]'

I want to make sure we can retrieve the current state.

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

I will extend the component as far as the new version of python-miio is released.

from xiaomi_airconditioningcompanion.

hsie avatar hsie commented on August 11, 2024

the output is as below.

root@hp:~# miiocli device --ip 192.168.2.35 --token 203dca9dfd709524ab7d6fd22f026257 raw_command get_device_prop '["lumi.0", "plug_state"]'
Running command raw_command
['off']

from xiaomi_airconditioningcompanion.

mouth4war avatar mouth4war commented on August 11, 2024

@syssi Do we need to update the custom component to make switch entity_id available? HNY!

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

I haven't implemented the feature yet.

from xiaomi_airconditioningcompanion.

syssi avatar syssi commented on August 11, 2024

I've extended this custom component: https://github.com/syssi/xiaomiplug/

# configuration.yaml

switch:
  - platform: xiaomi_miio
    name: AC Partner V3 Socket
    host: 192.168.130.59
    token: b7c4a758c251955d2c24b1d9e41ce47d
    model: lumi.acpartner.v3

from xiaomi_airconditioningcompanion.

hsie avatar hsie commented on August 11, 2024

thanks so much for your work!

from xiaomi_airconditioningcompanion.

vcheng99 avatar vcheng99 commented on August 11, 2024

thanks for the work, that's what I wanted.

but I got this error:
Configuration invalid
Check config
Invalid config for [switch.xiaomi_miio]: value is not allowed for dictionary value @ data['model']. Got 'lumi.acpartner.v3'. (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.xiaomi_miio/

I am using HA 0.88.2
put switch.py under config\custom_components\xiaomi_miio
switch:

  • platform: xiaomi_miio
    name: AC Partner V3 Socket Living Room
    host: 192.168.30.94
    token: e6485a97d3fcbc123508db716708fae8
    model: lumi.acpartner.v3

please help

from xiaomi_airconditioningcompanion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.