AnaviTechnology / anavi-docs

Documents for all ANAVI open source hardware products
http://anavi.technology/
64 stars 34 forks source link

Home Assistant integration #4

Closed CODeRUS closed 5 years ago

CODeRUS commented 5 years ago

Anyone successfully inegrated Anavi Light Controller with Home Assistant? Show me your magic please!

leon-anavi commented 5 years ago

Hi @CODeRUS,

There are different way and devices on which you can install Home Assistant. Below are the steps with Raspberry Pi and Hassbian, you can you the same approach and adapt it for other devices supported by Home Assistant:

sudo raspi-config
sudo curl -o /opt/hassbian/suites/install_mosquitto.sh https://raw.githubusercontent.com/ludeeus/Tools/master/hassbian-config/hotfix/install_mosquitto.sh && sudo hassbian-config install mosquitto
allow_anonymous true
sudo systemctl enable mosquitto.service
sudo systemctl start mosquitto.service
# MQTT Broker (aka Mosquitto)
mqtt:
  discovery: true
  broker: hassbian.local
  port: 1883

# ANAVI Light Controller
light:
  - platform: mqtt_json
    name: "ANAVI Light Controller"
    command_topic: "cmnd/DEVICEID/color"
    brightness: true
    rgb: true
sudo systemctl restart home-assistant@homeassistant.service

Best regards, Leon

CODeRUS commented 5 years ago

okay, this kinda works, but i'd suggest to change topics to cmnd/deviceid/power to follow common iot mqtt practices. also it would be cool if device send retained stats to stat/deviceid/power. i think i can make a pr.

leon-anavi commented 5 years ago

Cool, thank you for the feedback. It seems that you got it working so I am closing this particular issue.

The source code is here and GitHub pull requests are more than welcome :)

Thanks, Leon