deiger / AirCon

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

TaoTronics Humidifier not recognized in HA add-on #96

Open YankoIvanov opened 3 years ago

YankoIvanov commented 3 years ago

Hi and thank you for putting this together and maintaining it! If I can get it to work with my two TaoTronics humidifiers, it would be fantastic! I'm hitting trouble getting them recognized as humidifiers in home assistant.

Here's my setup:

Here is my addon config:

log_level: DEBUG
mqtt_host: <ip-redacted>
mqtt_user: <user-redacted>
mqtt_pass: '<pass-redacted>'
port: 1883
app:
  - username: <user-redacted>
    password: <user-redacted>
    code: huihe-us

And here is an example MQTT messages (2):

Message 179 received on hisense_ac/LWT at 10:13 AM:
offline
QoS: 0 - Retain: false
Message 178 received on homeassistant/climate/001cc24e2ed8/hvac/config at 10:13 AM:
{
    "name": "Master",
    "unique_id": "<mac-redacted>",
    "device": {
        "identifiers": [
            "hisense_ac_<mac-redacted>"
        ],
        "manufacturer": "Hisense (huihe-us)",
        "model": "0001-0401-0001",
        "name": "Master",
        "sw_version": "ADA 1.4.3-beta ameba 2018-03-28 19:20:06 8f40fe89d"
    },
    "availability": [
        {
            "topic": "hisense_ac/LWT"
        },
        {
            "topic": "hisense_ac/<mac-redacted>/available/status"
        }
    ],
    "precision": 1,
    "temperature_unit": "F",
    "current_temperature_topic": "hisense_ac/<mac-redacted>/temp/status",
    "power_command_topic": "hisense_ac/<mac-redacted>/switch/command",
    "power_state_topic": "hisense_ac/<mac-redacted>/switch/status"
}
QoS: 0 - Retain: false

Any thoughts on what's going on?

YankoIvanov commented 3 years ago

Also, I did notice this error in the addon log, not sure what's causing it:

D0430 11:04:10.828  selector_events.py:58] Using selector: EpollSelector
D0430 11:04:10.860  notifier.py:112] [KeepAlive] Sending POST http://<IP-REDACTED>/local_reg.json {"local_reg": {"ip": "<IP-REDACTED>", "notify": 1, "port": 1883, "uri": "/local_lan"}}
D0430 11:04:10.864  notifier.py:112] [KeepAlive] Sending POST http://<IP-REDACTED>/local_reg.json {"local_reg": {"ip": "<IP-REDACTED>", "notify": 1, "port": 1883, "uri": "/local_lan"}}
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/app/aircon/__main__.py", line 304, in <module>
    asyncio.run(run(parsed_args))
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "/app/aircon/__main__.py", line 253, in run
    query_status_worker(devices), notifier.start(session))
  File "/app/aircon/__main__.py", line 153, in setup_and_run_http_server
    await site.start()
  File "/usr/local/lib/python3.7/site-packages/aiohttp-3.7.4-py3.7-linux-aarch64.egg/aiohttp/web_runner.py", line 128, in start
    reuse_port=self._reuse_port,
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1389, in create_server
    % (sa, err.strerror.lower())) from None
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 1883): address already in use
YankoIvanov commented 3 years ago

@deiger , wondering if you had some ideas on this. (I went through https://github.com/deiger/AirCon/issues/7, but I'm not sure what I'm doing wrong setting it up).