Rako Lighting

That is amazing news, thank you for all your hard work. If you need any help with testing I’m very happy to volunteer. What does config flow ad discovery mean? Any way of getting access to the Rako switches states and the ability to use them as entities?

‘config flow’ means you’ll be able to set up the integration in the ui in the integrations page:
https://your-hass/config/integrations

‘discovery’ means hass can auto detect what lights are attached to your bridge and auto add them as entities.

the combination of both means no yaml

rako state in home assistant:
i haven’t coded this bit yet, but the rako bridge wasnt really designed very well.

  1. it holds a cache of what state it ‘thinks’ the lights are, rather than checking with the light controller for the actual state. the best i can do is check the bridge’s cache.
  2. i think the cache stores either room scene (1,2,3,4 on the wall plate) or channel level (fade up or down) rather than both.

not totally sure how to make this work yet, but i should be able to make the same estimations that the rako app does, because it uses the same protocol as im using.

Excellent, I appreciate all the hard work you have put in. Do you have the Rako Cloud Gateway? does that give more info about the status of devices?

Rako Cloud Gateway - nope. not sure

1 Like

Hi just new to the HA party and have a house full of Rako gear with a Rako bridge (ie not the new Rako hub or the Rako cloud gateway).

Struggling a bit to get the existing integration to work - I can get the container running in Portainer but then what. I had expected to enter the IP address of my Rako bridge somewhere but that doesn’t seem to be in the steps unless I missed it.

What Rako bridge device are you using? Just the regular one or the one that integrates with Alexa etc?

Great to see you’re working on native/core Rako integration. I’d be very happy to get involved in testing that if it helps.

I had the same interpretation as you from the Rako integration docs about how feedback works - does seem a bit shortsighted of them but I guess it is 15+ year old design.

What Rako bridge device are you using? Just the regular one or the one that integrates with Alexa etc?

It uses the regular Rako Bridge that controls yoru lights not the Rako Cloud Gateway that integrates with Alexa

Did you see the notes I wrote after I got it working?

It explains there what you need to put into your configuration.yaml

Hi Peter. Thanks for coming back so quick. I had seen that but couldn’t figure out why nothing was happening. Figured it out tonight though. There were a couple of issues - a rogue “Schema” instead of “schema” in the yaml file and an issue with Mosquitto user setup. All working now.

Back on the status updates on Rako lights…

I noticed yesterday that when the playroom lights were turned on at the switch the status of the light in HA correctly changed which doesn’t happen with my other lights. I realised this is because the playroom Rako switch directly turns the light in and off as opposed to triggering a scene in in Rako. Most other rooms, the switch activates a scene, even if the scene is ‘set the light at 100%’.

I’m tempted to reprogram Rako so the first button in each room (what most people use) is a simple switch so that HA gets the right state.

PR for this Integration is out and ready for review https://github.com/home-assistant/core/pull/45915

The aim of this pr is to get feature parity with the rako app, so if you notice anything that the app can do that this home assistant integration can’t, let me know!

If you have some time and wanna test it out and give feedback before it’s merged, please:

  • download the zip of my code
  • unzip and grab the directory at homeassistant/components/rako
  • put that directory on your home assistant server at <config_dir>/custom_components/rako (i use the VS code addon)
  • Reboot home assistant
  • put rako: in your configuration.yaml
  • Reboot home assistant
  • go to configuration > integrations > add > rako and everything should auto discover

If you’re already running rakomqtt, then you’ll have to stop that pod, otherwise there will be a port clash. Your mqtt broker can obvs stay running though

Debug logging can be enabled by amending your configuration.yaml to look like this (reboot after adding it):

logger:
  default: info
  logs:
    homeassistant.components.rako: debug
    python_rako: debug

in the configuration > logs page you will have to click ‘Load Full Home Assistant Log’ and search for ‘rako’.

Let me know your findings!

1 Like

I’ll have a try this weekend, thank you for doing this!

As you know I have been using your old method. Should i remove all the lights from the configuration.yaml file first?

I assume the entity names will remain as before so all the automations and node red flows should carry on working?

As you know I have been using your old method. Should i remove all the lights from the configuration.yaml file first?

these will not continue to work without the rakomqtt pod, but they will also not conflict, so you can leave them there if you want.

I assume the entity names will remain as before so all the automations and node red flows should carry on working?

your current entity names are arbitrarily defined by you in the config yaml. the entity ids for this new integration are autogenerated based on whatever they are named on the rako bridge.

1 Like

Great, thank you, I’m happy to say I mostly kept the same names as the Rako Bridge, but looks like I’ll need to do some updating.

I think I have done it all correctly…

But

Any ideas?

teeny error i didn’t see on my dev machine, because i never set up everything from a blank slate! nice catch!

i have now set up everything from scratch on a different machine and didnt find any more bugs.

here’s the fix i made to __init__.py which you can replicate on your side - https://github.com/home-assistant/core/pull/45589/commits/440d38b2c80ce2668d0e8cb513ad3cbd1d3749ef

Thanks for continuing to develop this. I have installed as described but hitting an error when trying to connect to the bridge.

  • I can connect and send commands using telnet on default port. I’ve closed all telnet sessions.
  • It was working using the rakomqtt in portainer linked to mqtt broker. I’ve stopped that service though.
  • It works using the iphone app but I’ve closed the app.
  • I haven’t got rasoft running.

I found Rako at configuration > integrations > add integration

It prompts with the correct autopopulated bridge and port details, but then fails to connect to bridge.

I added the logger section above but nothing appearing in /config/home-assistant.log

Any thoughts?

Thanks
Richard

Hi Marengaz,

I managed to get it installed and mostly working correctly but there was a problem with the ui-lovelace. When I turned a light on or off, the state would not correctly update. I mostly use a combination of regular entities card and Custom Slider Entity Row, eg

type: entities
title: Floor 0
entities:
  - type: section
    label: Kitchen
  - type: 'custom:slider-entity-row'
    entity: light.kitchen_lh_downlights
    name: Left
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.kitchen_rh_downlights
    name: Right
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.kitchen_pelmet
    name: Pelmet
    hide_when_off: true
    toggle: true
  - type: section
    label: Family Room
  - type: 'custom:slider-entity-row'
    entity: light.family_room_downlights
    name: Ceiling
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.family_room_pendant
    name: Pendant
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.family_room_tiffany
    name: Tiffany Lamp
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.family_room_reading_lamp
    name: Reading Lamp
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.family_room_picture_lamp
    name: Picture Lamp
    hide_when_off: true
    toggle: true
  - type: section
    label: Dining Room
  - type: 'custom:slider-entity-row'
    entity: light.dining_room
    hide_when_off: true
    toggle: true
  - type: section
    label: Store Rooms
  - type: 'custom:slider-entity-row'
    entity: light.lower_hallway
    name: Lower Hall Way
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.boot_room
    name: Boot Room
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.plant_room
    name: Plant Room
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.pantry
    name: Pantry
    hide_when_off: true
    toggle: true
  - type: 'custom:slider-entity-row'
    entity: light.wine_cellar
    name: Wine Cellar
    hide_when_off: true
    toggle: true

The light would turn off the button pops back to the on position.

I have had to restore to the old method to keep my wife happy but I’ll be able to test further at the weekend

hey pete - good to hear you got the integration set up ok.

with the lovelace dash, maybe you can create an autogenerated dash alongside your custom one, just to make sure the behaviour is the same?

can you also add the debug logging config to your configuration file and let me know what you see when you hit wall plate switches vs hitting the same switch in hass? in the ‘logs’ page you will have to click ‘Load Full Home Assistant Log’ and search for ‘rako’

1 Like

hey richard - thanks for taking the time to test this out!

did you reboot after adding the debug logging config? im not sure if this is necessary, but i think it is?
in the ‘logs’ page you will have to click ‘Load Full Home Assistant Log’ and search for ‘rako’.

this ‘cannot connect’ error may arise when the rako xml is not parsable. please can you send me your rako.xml? it can be found here: http://<your_bridge_ip>/rako.xml

Will do, may have to wait for the weekend

No problem - really hope I can get it working.

I’ve sent you a couple of direct messages with the result of the “rako” log search and the xml file.