delfick / photons

Python3.6+ asyncio framework for interacting with LIFX devices
https://photons.delfick.com
MIT License
73 stars 6 forks source link

Update lifx.yml when using Home Assistant addon #118

Closed pimw1 closed 1 year ago

pimw1 commented 1 year ago

Hi,

I've been using Photons for quite a while now, and i'm very happy with it. Thank you for all the awesomeness!

I've a question: I would like to update some stuff in lifx.yml to enable hardcoded_discovery. In the past, i was perfectly able to do so when i was running photons docker addon from a home assistant supervised installation.

Recently, i switched over to Home Asssistant OS, which is blocking access to docker volumes. Therefore, i'm now unable to update the lifx.yml.

Perhaps, for a future update, it would be cool to expose this as a confing option of home assistant. image

Any idea/suggestion how i could manage this, would be more than welcome.

delfick commented 1 year ago

Hello,

that does sound like a fairly reasonable security measure they've introduced tbh.

@Djelibeybi, do you have any ideas of what we could do here?

On Sat, 12 Nov 2022, 5:29 am pimw1, @.***> wrote:

Hi,

I've been using Photons for quite a while know, and i'm very happy with it. Thank you for all the awesomeness!

I've a question: I would like to update some stuff in lifx.yml to enable hardcoded_discovery. In the past, i was perfectly able to do so when i was running photons docker addon from a home assistant supervised installation.

Recently, i switched over to Home Asssistant OS, which is blocking access to docker volumes. Therefore, i'm now unable to update the lifx.yml.

Perhaps, for a future update, it'swould be cool to expose this as a confing option of home assistant. [image: image] https://user-images.githubusercontent.com/74881023/201404656-a7737bc9-78bd-4505-b4ed-b7b4778faa91.png

Any idea/suggestion how i could manage this, would me more than welcome.

— Reply to this email directly, view it on GitHub https://github.com/delfick/photons/issues/118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2V5L2EH3FZVM4UKUBJBDWH2GCDANCNFSM6AAAAAAR52WWX4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Djelibeybi commented 1 year ago

My Photons Conductor addon already does this: https://github.com/Djelibeybi/hassio-addons/tree/main/photons-interactor

I had every intention of merging my changes into this addon, but have to admit that I completely forgot until I read this issue.

pimw1 commented 1 year ago

Ooh wow, that would be nice!

Djelibeybi commented 1 year ago

I'll try and find some time this weekend to submit a PR with the extra config bits I added.

delfick commented 1 year ago

that looks very cool. I actually have time to have a look this weekend. I'll see if I can steal from you and replace my photons hassio plugin with this s6 thing you got going here.

On Sat, 12 Nov 2022, 7:08 am Avi Miller, @.***> wrote:

To be honest, I don't use Photons Interactor these days, so my addon was slated to be archived soon. I'll try and find some time this weekend to submit a PR with the extra config bits I added.

— Reply to this email directly, view it on GitHub https://github.com/delfick/photons/issues/118#issuecomment-1312153885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2V5J3JSRGJIRFXXOIQ4LWH2RUVANCNFSM6AAAAAAR52WWX4 . You are receiving this because you commented.Message ID: @.***>

delfick commented 1 year ago

well that was pain and I gave up on having prebuilt images cause the thing that is recommended to build hassio addons is beyond me and making an addon for hassio is not the friendliest of activities.

But I have updated https://github.com/delfick/photons-homeassistant such that it will build the docker image on installation and allow you to put lifx.yml in the shared config folder

So doing something like using the samba plugin to get access to config and then placing a photons/lifx.yml in there. Do tell me if that works @pimw1

pimw1 commented 1 year ago

Thank you! The build seemed to be stuck at first, possibly because i did not create a photons/lifx.yml file first? After doing that, the build did start correctly, and i can see from the logs that it did use my lifx.yml file. After playing a bit (rebuilding -> start , rebuilding -> start), i did got stuck again during building (it never finishes). Restarting home assistant + supervisor did the trick, and i saw that it actually was actually build and started.

So, the building of the image seems a bit buggy. But the good overall news is: once its running, it's running as expected.

Djelibeybi commented 1 year ago

Don't leave the web page while it's building: if you do, the Supervisor cancels the build.

delfick commented 1 year ago

I blame homeassistant on that. Perhaps it's more that it takes longer than you expect?

It doesn't need the file to exist to work (well, it didn't when I tried it)

Glad you got it to work!

On Mon, 21 Nov 2022, 9:35 am pimw1, @.***> wrote:

Thank you! The build seemed to be stuck at first, possibly because i did not create a photons/lifx.yml file first? After doing that, the build did start correctly, and i can see from the logs that it did use my lifx.yml file. After playing a bit (rebuilding -> start , rebuilding -> start), i did got stuck again during building (it never finishes). Restarting home assistant + supervisor did the trick, and i saw that it actually was actually build and started.

So, the building of the image seems a bit buggy. But the good overall news is: once its running, it's running as expected.

— Reply to this email directly, view it on GitHub https://github.com/delfick/photons/issues/118#issuecomment-1321262233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2V5OKJ3T3UKJQC5JBDT3WJKRTTANCNFSM6AAAAAAR52WWX4 . You are receiving this because you commented.Message ID: @.***>

delfick commented 1 year ago

also, you don't need to rebuild if you change lifx.yml, only need to restart it.

On Mon, 21 Nov 2022, 9:41 am Avi Miller, @.***> wrote:

Don't leave the web page while it's building: if you do, the Supervisor cancels the build.

— Reply to this email directly, view it on GitHub https://github.com/delfick/photons/issues/118#issuecomment-1321263573, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2V5MHUR6G6DTKUIXIJD3WJKSK3ANCNFSM6AAAAAAR52WWX4 . You are receiving this because you commented.Message ID: @.***>

pimw1 commented 1 year ago

Aah good to know! And yes, it might be that the build just takes long to build.