!!!! NO LONGER IN ACTIVE DEVELOPMENT !!!!
SEE:
!!!! NO LONGER IN ACTIVE DEVELOPMENT !!!!
A component to attach Rako lights (via the Rako bridge) to an mqtt broker for use with home assistant. Rako bridge interaction guide.
Only tested with mosquitto
The docker container runs 2 processes
watcher
mode listens for the Rako bridge to broadcast change of state updates, then posts a home assistant compatible message to your mqtt brokercommander
mode subscribes to the home assistant command topic and upon receiving a message, posts a command to the Rako bridge via httpInstall the Home Assistant Portainer addon
On the 'Containers' view, click 'Add Container'
Name = rakomqtt
Image = marengaz/rakomqtt
in 'Advanced container settings' > 'Command & logging'
Command = ./start.sh --mqtt-host
in 'Advanced container settings' > 'Network'
Hostname =
Click the 'Deploy the container' button
The container should now launch and be viewable in the 'Containers' tab
There are a bunch of different ways to do this:
python3 -m rakomqtt.RakoBridge
Visit http://<RA-BRIDGE-IP>/rako.xml
.
This will present a list of all the rooms in your house along with their internal ids
Use the Home assistant mqtt light platform.
Rako room scenes 1,2,3,4,off are mapped to home assistant brightness levels 255,192,128,64,0 respectively (1 being the brightest, 4 being the dimmest).
- platform: mqtt
name: <name of the room>
schema: json
state_topic: "rako/room/<rako-room-id>"
command_topic: "rako/room/<rako-room-id>/set"
brightness: true
For example
- platform: mqtt
name: Hallway
schema: json
state_topic: "rako/room/42"
command_topic: "rako/room/42/set"
brightness: true
More granular control can be achieved with channel level commands.
NOTE: When lots of channels are changed at once, it's possible the Rako bridge will drop some commands leaving some channels unchanged.
NOTE: Rako's channel 0 in any room controls all the lights in that room
- platform: mqtt
name: <name of the room>
schema: json
state_topic: "rako/room/<rako-room-id>/channel/<rako-channel-id>"
command_topic: "rako/room/<rako-room-id>/channel/<rako-channel-id>/set"
brightness: true
For example
- platform: mqtt
name: Hallway Downlights
schema: json
state_topic: "rako/room/42/channel/1"
command_topic: "rako/room/42/channel/1/set"
brightness: true
SSH into your home assistant box and run this:
docker-compose -f docker-compose.yaml up -d --build
python -um rakomqtt