ArtemVladimirov / broadlinkac2mqtt

Control your broadlink-based air conditioner using Home Assistant
MIT License
86 stars 9 forks source link

AUX Delta 2 supported? #8

Closed tomycz closed 1 year ago

tomycz commented 1 year ago

Hi Artem! I have AUX Delta 2 climate (AUX ASW-H12C5C4 / JER3DI-B8-2), I set up with AC Freedom, and I configured your intergation: The climate info: IP: 192.168.1.49, MAC: EC:0B:AE:D3:AA:ED, Hostname: AC_SMT-d3-aa-ed

Firewall info: climate-firewall Src. address: 192.168.1.49:62551 Dst. Address: 52.2.9.65.95:1885 6(tcp)

Config file:

service:
  update_interval: 10 #Seconds
  log_level: error

mqtt:
  ## Use mqtts for SSL support
  broker: "mqtt://192.168.1.6:1883"
  user: mosquitto
  password: *****
  client_id: aircac2
  topic_prefix: aircon2
  auto_discovery_topic: homeassistant
  auto_discovery_topic_retain: true
  ## CA certificate in CRT format.
  # certificate_authority: "./config/cert/ca.crt"
  ## Don’t verify if the common name in the server certificate matches the value of broker
  # skip_cert_cn_check: true
  ## Authorization using client certificates
  # certificate_client: "./config/cert/client.crt"
  # key-client: "./config/cert/client.key"

devices:
  - ip: 192.168.1.49
    mac: ec0baed3aaed
    name: Nappali AC
    port: 62551

Looks like the climate communicate on the 62551 port, I tried it, but always get an error. Of course I tried the default 80 port too.

jún 05 20:32:32 xxx.xxx.net broadlinkac2mqtt[1590]: {"level":"error","error":"read udp 172.17.0.2:49144->192.168.1.49:62551: read: connection refused","input":{"Mac":"ec0baed3aaed"},"time":"2023-06-05T18:32:32Z","caller":"/go/src/broadlinkac/app/app/service/service.go:140","message":"failed to send command"}
jún 05 20:32:32 xxx.xxx.net broadlinkac2mqtt[1590]: {"level":"error","error":"read udp 172.17.0.2:49144->192.168.1.49:62551: read: connection refused","device":"ec0baed3aaed","time":"2023-06-05T18:32:32Z","caller":"/go/src/broadlinkac/app/main.go:170","message":"Failed to Auth device ec0baed3aaed. Reconnect in 3 seconds..."} 

Have you any advance to solve this? Thank you!

ArtemVladimirov commented 1 year ago

Hi. Your AC uses tcp. Unfortunately, my program only supports UDP. I don't have the necessary device to test TCP. You can send an authorization package between your air conditioner and AC Freedom. If the package structure is identical, and only the protocol is different, then support can be added without problems

Maximus48p commented 1 year ago

Having same issue with my AUX (AC1 - Freedom) AC. Running on docker as host.

I have connected the AC to my wifi successfully with the Freedom app and i have blocked the address 'smarthomecs.de' in my outgoing traffic by Adguard.

Executed the folllowing command:

# nmap -sU -p80,62551 192.168.1.34
Starting Nmap 7.94 ( https://nmap.org ) at 2023-06-14 13:39 CEST
Nmap scan report for 192.168.1.34
Host is up (0.40s latency).

PORT      STATE         SERVICE
80/udp    open|filtered http
62551/udp closed        unknown
MAC Address: EC:0B:AE:A6:80:4B (Hangzhou BroadLink Technology)

open|filtered

Nmap places ports in this state when it is unable to determine whether a port is open or filtered. This occurs for scan types in which open ports give no response. The lack of response could also mean that a packet filter dropped the probe or any response it elicited. So Nmap does not know for sure whether the port is open or being filtered. The UDP, IP protocol, FIN, NULL, and Xmas scans classify ports this way.

Still seems the port is blocked.... When i PING to the AC it is sometimes really slow

Any tips?

My logging

{"level":"info","time":"2023-06-14T14:00:35+02:00","caller":"/go/src/broadlinkac/app/main.go:202","message":"Got SIGTERM..."}
{"level":"debug","time":"2023-06-14T14:00:42+02:00","caller":"/go/src/broadlinkac/app/config/config.go:47","message":"Start reading a config file"}
{"level":"info","time":"2023-06-14T14:00:42+02:00","caller":"/go/src/broadlinkac/app/app/mqtt/mqtt.go:42","message":"Connected to MQTT"}
{"level":"error","error":"read udp 192.168.1.10:60903->192.168.1.34:80: i/o timeout","time":"2023-06-14T14:00:52+02:00","caller":"/go/src/broadlinkac/app/app/webClient/client.go:43","message":"Failed to read the response"}
{"level":"error","input":{"Command":101,"Payload":"RTRS5/ku2pWDRJMINe+abftpLcNwuQRDrFzWP7tTrfoIgUyn+M9BcQAyjlcMO4bJTQVwhEmjieKa4QRUNqBb3dwCwWGvEyXofhmw99HOBo0=","Mac":"ec0baea6804b"},"device":"ec0baea6804b","time":"2023-06-14T14:00:52+02:00","caller":"/go/src/broadlinkac/app/app/service/service.go:703","message":"failed to send a command"}
{"level":"error","error":"read udp 192.168.1.10:60903->192.168.1.34:80: i/o timeout","input":{"Mac":"ec0baea6804b"},"time":"2023-06-14T14:00:52+02:00","caller":"/go/src/broadlinkac/app/app/service/service.go:140","message":"failed to send command"}

:"error","error":"read udp 192.168.1.10:60903->192.168.1.34:80: i/o timeout","device":"ec0baea6804b","time":"2023-06-14T14:00:52+02:00","caller":"/go/src/broadlinkac/app/main.go:170","message":"Failed to Auth device ec0baea6804b. Reconnect in 3 seconds..."}