bstuff / haier-ac-remote

72 stars 15 forks source link

Home Assistant plugin #1

Open JMuffin opened 4 years ago

JMuffin commented 4 years ago

Is there any possibility that you will do it as HA custom repo in future?

bstuff commented 4 years ago

Hi!

Correct me if I'm wrong, HA plugins are written in Python. So someone must implement remote in python and write a plugin. I am not a python specialist, sorry.

JMuffin commented 4 years ago

You're right. Hoped you know how to do it. I'll ask on HA forum/support ;)

stravinci commented 4 years ago

@bstuff it is possible to get from you some example hex data commands? I see some hexes in your code but without language knowledge it is hard to build finally hex for example "turn on" action.

bstuff commented 4 years ago

@bstuff it is possible to get from you some example hex data commands? I see some hexes in your code but without language knowledge it is hard to build finally hex for example "turn on" action.

https://github.com/bstuff/haier-ac-remote/blob/master/packages/haier-ac-remote/src/__tests__/__snapshots__/commands.test.ts.snap

and here is how they composed: https://github.com/bstuff/haier-ac-remote/blob/master/packages/haier-ac-remote/src/lib/commands.ts

stravinci commented 4 years ago

Hi, thanks for preparing it. We talk at Telegram, so you know that my Hailer Flexis Plus with build-in WiFi doesn't work with your code. I sniffed android app and there I see another packets.

cloudwalker87 commented 4 years ago

@stravinci I have the same model as you have. Although not as tech savvy as you guys, I'd be very interesting when you've been able to get this to work for the flexis plus

stravinci commented 4 years ago

@cloudwalker87 if you wrote here then you have HA. I'm using BroadLink RM3 mini via HA to control my Haier AC's. It is not ideal solution but I have no time to implement WiFi implementation.

olegshilov commented 3 years ago

Hi everyone. I suggest we can create a CLI tool to send commands to the device. And then use this CLI tool from Home Assistant integration with [pyhon-nodejs](https://github.com/markfinger/python-nodejs) bindings.

Sentient2k7 commented 1 month ago

@bstuff hope you are well.

I am trying to implement this for my Home Assistant instance and was wondering if you could provide some info on the correct commands to send and in what order?

I am able to read the status from my device and parse the temperatures, swing modes etc but have been unable to get it to accept a command - but it does return status replies when i send something. Just not sure what the status replies mean :)

As an example (I have bolded the frame type).. When I connect I get two status blocks

FF FF 12 40 00 00 00 00 00 04 0F 5A 00 00 00 00 00 00 00 00 BF 0A 33 FF FF 2A 40 00 00 00 00 00 06 6D 01 07 0C 02 00 02 01 00 07 00 00 2D 00 41 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6E BE E3

I then send the off command 00 00 27 14 ... .. FF FF 0A 00 00 00 00 00 00 01 4D 03 5B

and get a reply of FF FF 0A 40 00 00 00 00 00 03 00 00 4D E3 E1

But the AC doesnt beep or turn off.

Update: Sending 'hello' seems to return a frametype=2 status that is similar to frametype=6. It is able to be parsed to get the current status of the device.

Sending 'init' seems to return a frametype=0x74 and some additional data I don't recognize.

Sending 'off' seems to return a frametype=3 as above.

I have tried sending hello+init+off, init+off, hello+off and just off - same result everytime as per the update.