deiger / AirCon

Scripts for controlling Air Conditioners, e.g. with HiSense modules.
GNU General Public License v3.0
216 stars 58 forks source link

Don`t work with AC Hisense #232

Open paskyecijano opened 1 year ago

paskyecijano commented 1 year ago

Hi,

When i configured the plugin with AC Hisense, i obtain the follow log

image image image

whats happends?

thanks

Home Assistant 2023.6.2 Supervisor 2023.06.2 Operating System 10.2 Frontend 20230608.0 - latest

icc-guerrero commented 1 year ago

There's some research right now related to this issue. Check https://github.com/deiger/AirCon/issues/160

paskyecijano commented 1 year ago

Thanks for answering but it's not the same error. My app is Hi-Smart AC and the module is w4e1

I have previously had this AC configured correctly and it worked fine, but I changed the password of the hisense app and from there I can't get it to work.

I have tried to put the previous pass but it does not work either.

I don't know what else to try

any ideas?

thank you

miguellobato84 commented 1 year ago

I'm having problems too.

Everything seems to be working, no errors raised neither in home assistant nor running the server from the cli.

When running the server, it just says:

curl -ik 'http://localhost:8888/hisense/command?property=t_power&value=ON'
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 23
Date: Mon, 19 Jun 2023 20:21:56 GMT
Server: Python/3.9 aiohttp/3.8.4

{"queued_commands": 50}

context:

some logs of the docker image (fresh start, removing device json)

Device Aire Acondicionado has:
                              IP address: 192.168.0.10
                              lanip_key: XXXXXXXXXXXXXXXXXXXXX==
                              lanip_key_id: 12345
D0619 20:29:31.054  selector_events.py:54] Using selector: EpollSelector
D0619 20:29:31.069  notifier.py:112] [KeepAlive] Sending POST http://192.168.0.10/local_reg.json {"local_reg": {"ip": "192.168.0.10", "notify": 1, "port": 1883, "uri": "/local_lan"}}
E0619 20:29:36.070  notifier.py:121] Failed to connect to 192.168.0.10, maybe it is offline?
D0619 20:29:38.072  notifier.py:112] [KeepAlive] Sending POST http://192.168.0.10/local_reg.json {"local_reg": {"ip": "192.168.0.10", "notify": 1, "port": 1883, "uri": "/local_lan"}}

D0619 20:29:48.819  notifier.py:112] [KeepAlive] Sending PUT http://192.168.0.10/local_reg.json {"local_reg": {"ip": "192.168.0.10", "notify": 1, "port": 1883, "uri": "/local_lan"}}

D0619 20:29:54.214  notifier.py:112] [KeepAlive] Sending PUT http://192.168.0.10/local_reg.json {"local_reg": {"ip": "192.168.0.10", "notify": 1, "port": 1883, "uri": "/local_lan"}}

D0619 20:29:54.403  notifier.py:112] [KeepAlive] Sending PUT http://192.168.0.10/local_reg.json {"local_reg": {"ip": "192.168.0.10", "notify": 1, "port": 1883, "uri": "/local_lan"}}

and same message again and again
FabioEight commented 1 year ago

I have this issue as well: https://github.com/deiger/AirCon/issues/130 The only workaround is to reconfigure the wireless on the ACs, reconnect them to the wireless network, stop the addons and remove the config on hisense folder. Restart the addon and it will retrieve the config and keys. I suppose this is something related to the wrong retrieval of keys.

miguellobato84 commented 1 year ago

Hi, I manage to solve the issue, it was a networking thingy.

I'm running the docker image, but wasn't exposing the port and the ip of the machine properly (not the AC, the machine where the docker is running). This machine has to be reachable from the AC.

{
  "app": [
    {
      "username": "EMAIL",
      "password": "PASS",
      "code": "oem-eu"
    }
  ],
  "mqtt_host": "HOME_ASSISTANT_IP",
  "mqtt_port": 1883,
  "mqtt_user": "hass",
  "mqtt_pass": "PASS",
  "port": 8888,
  "local_ip": "HOME_ASSISTANT_IP"
}

thanks

togume commented 1 year ago

Sorry to jump on this thread, but I'm also getting the same issues as @paskyecijano - the controls show up as "Unavailable." However, I'm also new to Home Assistant.

I'm confused by the MQTT part of the configuration. Does this add-on have it's own MQTT implementation? I tried installing Mosquito Broker and then the built in MQTT (pointing to mosquito mqtt), plus then this add on. That got both ACs to show up, but unusable.

Any ideas/thoughts welcome.

Update: got the controls to work! I was setting the port to 1883 instead of the example above of 8888. It's now working, but doing weird things:

Funny thing is that it's 20c right now, not below freezing...

image image

Any thoughts on this?