Rako Lighting

Thank you very much Andy. I updated and don’t seem to have the problem. Maybe it’s only an issue with HA OS? I run HA on docker.

Sorry to wade back in since the broken aync_get fix. But has anyone else tried to setup Rako and get the following in logs about not being able to start:

Error while setting up rako platform for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/rako/light.py", line 47, in async_setup_entry
    async for light in bridge.discover_lights(session):
  File "/usr/local/lib/python3.10/site-packages/python_rako/bridge.py", line 163, in discover_lights
    for light in self.get_lights_from_discovery_xml(rako_xml):
  File "/usr/local/lib/python3.10/site-packages/python_rako/bridge.py", line 198, in get_lights_from_discovery_xml
    room_id = int(room["@id"])
TypeError: string indices must be integers

I even asked ChatGPT for help and it stated:

Based on the error message, it seems that the code is trying to access a string using a non-integer index. Specifically, the line of code room_id = int(room["@id"]) is causing the error.

This suggests that the variable room is a string and not a dictionary or another type of object that can be indexed with a string. This could happen if the input data is not formatted as expected or if there is an issue with the code that is generating the input data.

However, that error is on the python_rako/bridge.py which I don’t know where that’s maintained or how to update that!

@loosleyandy Thanks, again for your hack of init.py after 2023.5.2. I have just upgraded to 2023.6.1 and implemented your fix - Life saver!

Sadly, it looks like the integration will need workarounds like this going forward. There are not enough rako users to generate devs who can take on the excellent work that @marengaz has done for us.

I’m having some renovations done and looking at Rako lighting. HA integration is quite important to me, so I wondered if anyone could advise on the current state of integrationans whether they’d recommend Rako for automation in general?

From above it seems like there are some issues with maintenance. I maintain an HA custom component so I’m not averse to getting my hands dirty with fixing things, but obviously it’d be better to have something well-supported if possible.

Thanks!

I have been using Rako lighting for 5 years and have been really impressed with how reliable it has been and the company have been very helpful with any issues, you can call and speak to a UK based techinician with no delays or waiting.

However, If I was starting from scratch I’m not sure I would use Rako throught the house. At the time I left some rooms with dumb lighting and since then I have used a variety of smart solutions in those rooms. The best I have found Samtech zigbee switches behind the switch panel and regular retractable switches. Rako is neater, the buttons look good and the lights fade on and off very nicely, but the cost difference per room is pretty significant. I guess it is worth it in the main rooms of the house but I’m happy to have a cheaper solution in the loos and cupboards. The beauty of Home Assistant is that different systems can work seamlessly together. I have some lamps for example that I hard wired with Rako at a cost of £200 each, In other rooms I have lamps with a £10 zigbee bulbs that work as well.

In terms of integrating Rako, there are two options, Rako2mqtt and Apple homekit controller. I’ve been using @marengaz’s excellent Rako2MQTT component for a couple of years and it is still rock solid despite not being under development.

The homekit controller needs the Rako RK-Hub and should work, I did test it with the old rako Cloud gateway and it worked fine but I decided to stick to Rako2MQTT.

In order to program Rako you need rasoft software which I remember was pretty expensive, they really expect installers to do that work for you. Rather than triggering Rako scenes with the physical buttons I have programmed some to trigger Home assistant Scenes using MQTT and Node Red.

Let me know if you need me to share any of the methods I have used.

I have a lot of Rako kit (see pic). It is 5 years old and I have found it to be very reliable. It is expensive to purchase and install and you need specialist help unless you like a very big challenge. Once set up and instructed in its use an end user can program the system with the Rasoft Pro software. It’s not that intuitive, though, so you need an installer who is willing to spend time giving you a tutorial.
The mobile app works well but I get the impression that not many updates are planned. In the app you have limited programming capabilities (i.e. Setting up scenes and assigning to buttons).
I do worry what might happen if Rako are bought out by a bigger company and the product goes end-of-life, because the circuit controller boards are specialist tech. Nobody else makes them.

The HA integration is good but not perfect. It works 99% of the time perfectly and glitches are usually fixed with a reload. I think that it’s no longer maintained.

In summary, its a safe bet… until it isn’t.

Thanks very much for the detailed responses! I’ll give it some thought.

1 Like

I have an extensive Rako install which I planned myself and installed with the help of an electrician as part of a complete rewire. I have found the hardware to be high quality and reliable - the dimmers are smooth and work well. The cost is high to the extent that I ended up sourcing from ebay. I do think I would go down this route again even knowing that I could replace with Shelly (or other) products for a much lower cost. I like that I can fall back on the switches and native Rako controls. I recently swapped out some Shelly RGBW controllers (excellent) with Rako ones I got cheaply because I wanted to keep the Rako ecosystem whole.

As has been mentioned Rako support is excellent - they know their products and go above-and-beyond to help. The Rakosoft software is fine for configuration once you understand how the system works. The Rako native app is also ok and reliable but won’t win any prizes. The product line continues to evolve and improve which gives the impression that they will be around in the future.

I use Rako with HA via the custom integration written by marengaz. This works but I am acutely aware that it may not unless someone else picks up ongoing maintenance. When it works the response is instant and I have PIRs and other automations triggering the Rako lights. However there are also times when it doesn’t work and I end up reloading. I suspect there may be a challenge integrating with the Rako bridge which sits with Rako - I am not sure their bridge is always correct when it reports the status of a Rako control such as a dimmer. The native app does seem to handle this better than the HA integration and I haven’t got to the bottom of why and can’t afford the time now to debug.

Tom

I’ve got rako in several rooms and really like it - as others have said it’s rick solid and does a great job.

I’ve tried to get it working with HA but so far drawn a blank.

What you can do very easily though is use the http interface of the rako hub to set scenes so depending on what you want to do you might well be able to use that to control via HA. I can’t see current levels with this but I can easily set scenes, turn off etc.

I just have buttons on my dashboard which set the various scenes I want:

1 Like

Happy to help if you want to more complete solution?

Do you have the bridge that allows apple homekit and Alexa control?

1 Like

That would be great!

Yep, I’ve got one of get new bridges so my lights all show in HomeKit

OK, I am away on hioliday at the moment so will give you a few pointers.

I think you have two options

  1. Use the homekit integration . I believe you may have to remove Rako from your apple homekit and then it will be discovered by the Home assistant integration where you can use the apple homekit credentials. This should then bring in all your lights as devices and entities. You can then share them back to Apple Homekit using homekit bridge. I think it is best to remove them from other smart hubs like Alexa or Google and add them directly from Home Assistant.

  2. Use RakotoMQTT which still works despite it not being under development. I wrote a beginners guide when I was trying to get it working. if you use this method I can try to give you some tips depending on your current set up.

Thanks for taking the time here - really appreciate it (especially when you’re away!)

I tried the HomeKit method at first but just couldn’t get it to link for some reason.

Will try the mqtt version but am using HA on a raspberry pi so not sure if the issues there might get in the way… will report back!

For the homelink method, did you use the key that is on the back of the rako hub?

I’m not sure what the problem is supposed to be with a Raspberry pi, definitely worth a try.

I’ve just fully moved to HA and been getting my Rako working with the Rako2MQTT integration. Does anyone know if there is anyway to configure a power on level for the lights?

Yes, when you configure the mqqt for the light, add
brightness: true

image

Hi, my attempted install of the hacs-rako integration is failing
I’ve cloned the files at github /boshjosh1918/hacs-rako/ to a folder created in the HA install on my pi /homeassistant/custom_components/rako
When I add the integration and click on the link within HA
image
i get the error " Error Config flow could not be loaded: {“message”:“Handler does not support user”}"
I’ve tried this with and without “rako:” in the configuration.yaml file
This is within a relatively fresh HA installation where everything else is working fine
Any idea what I’m doing wrong please?

This is the first I have heard of that HACs integration. I get the same error. The only ways I have found to get Rako to work with HA are the ones mentioned here here Rako Lighting - #172 by ShawWellPete

Hello,

Sorry for any confusion. boshjosh1918/hacs-rako was a clone of some code I found in a Home Assistant pull request/issue. I only cloned it to make it easier for me to install with HACS and test on my installation.

It never worked for me. Even though I am familiar with Rako’s web API, I have no experience with Home assistant Integrations. I had no idea how I would even start to fix it.

In the end I just decided to use the simple HTTP Request module over Rako’s local API as it seemed like an easier option. I can send you what I did in my configuration.yank if you want.

EDIT: I got the repositories mixed up. boshjosh1918/hacs-rako is just a shell of an integration I began working on but was never able to finish. It doesn’t work because most of the functionality isn’t there.

Thanks for clarifying Josh, I’d be interested to see what you did with http request. I still used rakmqtt as described above but keen to learn other options.