ArtemVladimirov / broadlinkac2mqtt

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

Mac is incorrect even though it is correct #45

Closed saaruni1000 closed 2 months ago

saaruni1000 commented 2 months ago

Hello, I have an air conditioner which uses Broadlink and I used this add-on with it. I updated the add-on a few minutes ago and now it crashes with the error "wrong mac" even though I double and triple checked it is the correct one. Any fix for this bug?

ArtemVladimirov commented 2 months ago

Hi! Please, show logs

ArtemVladimirov commented 2 months ago

I have the same error :)

ArtemVladimirov commented 2 months ago

To fix please add temperature_unit: C to your device config.

saaruni1000 commented 2 months ago

Here are the logs:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
{"time":"2024-04-09T20:54:03.186156408Z","level":"INFO","source":{"function":"github.com/ArtemVladimirov/broadlinkac2mqtt/config.NewConfig","file":"/app/broadlinkac2mqtt/config/config.go","line":50},"msg":"Start reading a config file"}
{"time":"2024-04-09T20:54:03.186514797Z","level":"ERROR","source":{"function":"main.NewApp","file":"/app/broadlinkac2mqtt/main.go","line":91},"msg":"mac is incorrect","device":"a043b0df6562"}
{"time":"2024-04-09T20:54:03.186537883Z","level":"ERROR","source":{"function":"main.main","file":"/app/broadlinkac2mqtt/main.go","line":236},"msg":"failed to get a new App","err":"unknown temperature unit"}
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

And my config file:

service:
  update_interval: 10
  log_level: error
mqtt:
  broker: mqtt://192.168.1.10:1883
  user: admin
  password: password
  client_id: aircon
  topic_prefix: aircon
  auto_discovery_topic: homeassistant
  auto_discovery_topic_retain: false
  certificate_authority: ca.crt
  skip_cert_cn_check: true
  certificate_client: client.crt
  key-client: client.key
devices:
  - ip: 192.168.68.51
    mac: a043b0df6562
    name: Living Room Air Con
    port: 80
    temperature_unit: C
saaruni1000 commented 2 months ago

To fix please add temperature_unit: C to your device config.

I tried doing that, to no avail :( Added my log+config file

FatalSunrise commented 2 months ago

I also tried to add: temperature_unit: C, but same errors. Mac is incorrect even though it is not and also i get "unknown temperature unit".

ArtemVladimirov commented 2 months ago

I found the bug in the library. Please try v1.5.2

FatalSunrise commented 2 months ago

It started with v1.5.2. Thank you.

ArtemVladimirov commented 2 months ago

hm... i found another bug....

ArtemVladimirov commented 2 months ago

temperature 0.0

FatalSunrise commented 2 months ago

yes, have that also. Older version on another computer works fine and shows temp.

ArtemVladimirov commented 2 months ago

should be fixed in 1.5.3 )))

FatalSunrise commented 2 months ago

As far as I see it's working now. Thank you!

saaruni1000 commented 2 months ago

Didn't have much time in the morning but it seems to work now :) I have some problem in the mousqitto add-on but this is unrelated to this add-on xD Thanks a lot!