liaan / broadlink_ac_mqtt

Broadlink Air Conditioners to mqtt
MIT License
102 stars 44 forks source link

unsupported operand type(s) for +: 'NoneType' and 'int' #99

Closed infernix closed 1 year ago

infernix commented 2 years ago

I'm running this with an AUX AC on a raspberry pi, and when I reboot it, this log line (unsupported operand type(s) for +: 'NoneType' and 'int') is generated several hundred times per second (about 180MB of it in about 10 minutes).

I think it happens when the network, mosquitto or HASS isn't up yet. Here's my config FWIW:

service:
    daemon_mode: True
    update_interval: 10
    self_discovery: False
    force_update: True

mqtt:
    host: 192.168.2.2
    port: 1883
    client_id: broadlinkac
    user: REDACTED
    passwd: REDACTED
    topic_prefix: /aircon
    auto_discovery_topic: homeassistant
    auto_discovery_topic_retain: False
    discovery: False

##Devices
devices:
- ip: 192.168.2.14
  mac: c8f74291b0a6
  name: Guesthouse
  port: 80

I've worked around it by putting both mosquitto and homeassistant in the After= service config for its systemd unit. I'm using the docker version btw.

oopiicaa commented 2 years ago

In my case, I had to set self_discovery to true to avoid this issue.

liaan commented 1 year ago

I'm running this with an AUX AC on a raspberry pi, and when I reboot it, this log line (unsupported operand type(s) for +: 'NoneType' and 'int') is generated several hundred times per second (about 180MB of it in about 10 minutes).

I think it happens when the network, mosquitto or HASS isn't up yet. Here's my config FWIW:

service:
    daemon_mode: True
    update_interval: 10
    self_discovery: False
    force_update: True

mqtt:
    host: 192.168.2.2
    port: 1883
    client_id: broadlinkac
    user: REDACTED
    passwd: REDACTED
    topic_prefix: /aircon
    auto_discovery_topic: homeassistant
    auto_discovery_topic_retain: False
    discovery: False

##Devices
devices:
- ip: 192.168.2.14
  mac: c8f74291b0a6
  name: Guesthouse
  port: 80

I've worked around it by putting both mosquitto and homeassistant in the After= service config for its systemd unit. I'm using the docker version btw.

mmmm

do you run it as service? i just have cron that runs every minute, so it won't trigger for at least 1 minute after pi booted.. not had any issues (touch wood)