How to access Lights.py in Virtual Box

Hello to all,

I am running HA on Virtual Box and i have a cheap LED controller that i would like to be able to control. This is the one: https://www.amazon.de/gp/product/B08T64NR4G/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&th=1

I have found another post mentioning that you can use flux/magic Home to control this.

However, the light doesn’t perform well as you can change the color and brightness, turn it off but then it doesn’t turn on again. While searching how to fix this, i stumbled upon this post mentioning that you need to replace the Lights.py and it should work: Flux Led/MagicLight don't work since few updated - #4 by lockey4

My problem is, how do i access the Lights.py considering that the set up is on Virtual Box?

Thank you very much
Kind Regards
Michael

Did you install the Add-on Terminal & SSH? You can also configure SAMBA ad have access to the config directory.

Hello,

I installed Samba but this gives access to the supervisor folder and i cannot find the file i am looking for. I also installed Terminal & SSH but didn’t work for me…

Can you maybe help with SAMBA which seems to be working? What is the path to the file please?

Thanks
M

I use linux. I mount the directory in my desktop directory by adding this to fstab

//192.168.1.161/config /home/jonny/ha_config cifs uid=0,credentials=/home/jonny/.haconfig,iocharset=utf8,vers=3.0,noperm 0 0

Are you running windows?

Yes i run windows… So with Samba enabled, i type \ipaddress\ in the file explorer and i do get access but only to the following directories:

addons
backup
config
media
share
ssl

Many of them are empty and i cannot find the Lights.py in any of them. Just to also say, the add-on works mentions in the documentation that access is given in the above directories so it works as intented.

Thanks again for the help!

Don’t mess with the HA installation self, which will be overwritten at your next update.

  1. Copy https://github.com/home-assistant/core/tree/dev/homeassistant/components/flux_led to your custom_component folder
  2. Edit hte manifest.json to add a “version” tag, e.g. "version" = "2021.10"
  3. Do the wanted modifications.

The flux_led integration from your custom component will “override” the builtin one.

Hello Chris,

That did the trick!!! I created a custom_components folder in the config (which i had access via SAMBA) and placed the following file found on github: https://github.com/CorneliousJD/Flux_LED

Now the light strip in the aquarium stays on and i can control it!

Thank you both for your inputs! One problem less :slight_smile:
Kind Regards
M

The integration got a major overhaul in 2021.11. Hopefully you’ll be able to use the new version when it’s released

Hello, it still works for me…