Skip to content

Latest commit

 

History

History
88 lines (73 loc) · 2.87 KB

File metadata and controls

88 lines (73 loc) · 2.87 KB

Control air conditioner in daichi cloud for homeassistant

The implementation is written using open information obtained through open repositories and web sites I don't have a goal to benefit from this software solution.

Air Conditioner

Features

  • Control general parameters like fans speed, mode, temperature, etc
  • Discovery devices and publish to MQTT
  • Receive commands Homeassistant from MQTT and execute by API
  • Enable silent mode
  • filter by buildings and devices
  • enable discovery interval setup

How to use from source

  1. Copy .env.example and set value
  2. DAICHI_USER='user@example.net' # you username in https://web.daichicloud.ru
  3. DAICHI_PASS='password1' # you password in https://web.daichicloud.ru
  4. MQTT_HOST=localhost # home assistant mqtt host
  5. MQTT_PORT=1883 # home assistant mqtt port
  6. MQTT_USER=admin # home assistant mqtt user
  7. MQTT_PASS=admin # home assistant mqtt pass
  8. APP_ENABLE_MUTE_SOUND=True # enable or disable silent mode
  9. APP_FILTER_BUILDINGS='Moscow' # Device only from building with name Moscow. Empty string, disable filter
  10. APP_FILTER_PLACES='Bed Room, Living Room' # Device only from place with one of name Bed Room, Living Room. Empty string, disable filter
  11. Install Python 3.12
  12. Install requirements pip install -r requirements.txt
  13. python main.py

How to use by docker

Docker Hub

https://hub.docker.com/repository/docker/alfss/homeassistant-daichi-cloud-climate-provider

docker-compose

Create docker-compose.yml file and .env file

version: '3.8'
services:
  daichi-cloud-climate:
    image: alfss/homeassistant-daichi-cloud-climate-provider:v1.1.0
    env_file:
      - .env
    restart: unless-stopped

MQTT Topics

  • Command = daichi_cloud_climate/device_id_{ID}/ac/+/set
  • State = daichi_cloud_climate/device_id_{ID}/ac/+/state
  • Discovery = homeassistant/climate/daichi_cloud_{ID}/climate/config

For local development

  1. docker-compose up -d
  2. open http://localhost:2000 3. user admin@example.com pass password123 4. create client account user=admin, password=admin
  3. brew install mqttui
  4. read mqttui -b mqtt://localhost:1900 --username admin --password admin
  5. publish mqttui -b mqtt://localhost:1900 --username admin --password admin publish test 23

For docker.io login

docker login docker.io

Release steps

make build_for_public
make print_tag
make publish_public

How to run in docker

docker run --rm \                                                                                                                             1 ↵
  -e DAICHI_USER='user@domain.net' \
  -e DAICHI_PASS='you_passwotd' \
  -e MQTT_HOST="MQTT-host" \
  -e MQTT_PORT="1900" \
  -e MQTT_USER="admin" \
  -e MQTT_PASS="admin" \
  -e APP_ENABLE_MUTE_SOUND="True" \
  alfss/homeassistant-daichi-cloud-climate-provider:v1.0.1