mduran80 / daikin_madoka

Home Assistant custom component integration for the BRC1H thermostat (madoka)
MIT License
49 stars 13 forks source link

(Docker) HA 2022.8 not working with madoka #17

Closed BeFygo closed 2 years ago

BeFygo commented 2 years ago

Hi, first of all I want to thank you!

I would like to mention that the madoka integration with docker image Home Assistant 2022.8 doesn't work.

At first sight running the "pip install pymadoka" command in the image fixes this. I guess it has something to do with the new bluetooth integration from HA.

I downgraded back to HA 2022.7 and am looking into running this fine integration indepentent (docker) and linking it with HA by MQTT, but have yet to find the right information to do so.

raypanggh commented 2 years ago

Also happens on HassOS, not just Docker HA.

mduran80 commented 2 years ago

Fixed in the latest version of pymadoka library. There was a dependency conflict with HA Core because pymadoka had pinned the version to a previous one (bleak used to fail but works now). Please update your custom_component manifest.json and set pymadoka version dependency to 0.2.5.

BeFygo commented 2 years ago

Fixed in the latest version of pymadoka library. There was a dependency conflict with HA Core because pymadoka had pinned the version to a previous one (bleak used to fail but works now). Please update your custom_component manifest.json and set pymadoka version dependency to 0.2.5.

That did the trick. Awesome work!!

BeFygo commented 2 years ago

I made succes with creating a docker image with pymadoka working. Following 'mduran80' tutorial for setting up MQTT manually in console. It still had some bugs like MQTT not refreshing data and sending outdated date over MQTT, I have not found out how to "SET" data with the right response.

But for those who are interested, below the code i used:

Dockerfile: `

Deriving the latest base image

FROM ubuntu:20.04

ENV TZ="Europe/Brussels"

RUN echo 'tzdata tzdata/Areas select Europe' | debconf-set-selections RUN echo 'tzdata tzdata/Zones/Europe select Brussels' | debconf-set-selections RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y tzdata

RUN apt-get update RUN apt-get install python3 -y RUN apt-get install python3-pip -y RUN apt-get install vim -y

RUN apt-get install bluez -y

RUN apt-get -y autoclean a RUN apt-get -y autoremove

RUN mkdir /app

WORKDIR /home/user/apps/madoka

RUN pip install click RUN pip install bleak RUN pip install PyYAML RUN pip install asyncio-mqtt RUN pip install pymadoka

CMD instruction should be used to run the software

contained by your image, along with any arguments.

ENTRYPOINT ["tail", "-f", "/dev/null"] CMD [ "/bin/bash"]

`

MQTT config: ` mqtt: host: "your mqtt IP" port: 1883 username: "username" password: "some password" ssl: False root_topic: "/madoka" # Default root topic is /madoka

OPERATION_MODE_TOPIC = "operation_mode"

POWER_STATE_TOPIC = "power_state"

FAN_SPEED_TOPIC = "fan_speed"

SET_POINT_TOPIC = "set_point"

AVAILABLE_TOPIC = "available"

daemon: update_interval: 30 # Query the device at this: set at 30 because a lower value causes instability

`