Closed kz6fittycent closed 10 months ago
Hi there - happy to help but this is very difficult to debug with the information provided. Can you tell me more about your environment and the steps you took to install? Things like:
Let me know
Some general troubleshooting advice would be:
jellyfish_lighting
folder under custom_components
)Sorry - I'm pretty new to HA, so I had to look a little further for how to obtain the logs. I think I've got the most relevant items above (updated initial comment).
Some general troubleshooting advice would be:
- Uninstall the integration (if done via HACS, first uninstall there. Then, ensure there is no
jellyfish_lighting
folder undercustom_components
)- Restart home assistant
- Re-install the component
- Try to configure the integration again
Yes I've performed this several time and it just will not work.
I need to state that I'm using the snap, although that should not induce any errors as other integrations work as expected.
Thanks for the info. It seems that the Python library this integration depends on (jellyfishlightspy
) is not being installed as expected. Not sure why that would be.... would you please search your logs for other lines containing "jellyfishlightspy" or "jellyfishlights-py" and send what you find?
I just tried installing the specific dependency locally and bet this is the error that's happening in your environment as well:
pip3 install jellyfishlights-py==0.7.0
ERROR: Could not find a version that satisfies the requirement 0.7.0 (from versions: none)
This is new... and very strange because 0.7.0 is definitely available and was previously working. I'll need to submit an issue for the maintainer of that repo to look at.
The good news is 0.7.0 is the latest version, so you should be able to just run this command as a workaround:
pip3 install jellyfishlights-py
I'm not familiar with how Snap works, but if it runs HA in a VM be sure to run that command within the HA container. Hope this works for you... I'll report back once the issue with the dependent library has been fixed
Well, unfortunately snaps are built as read-only
and run as a secured container, with minimal access to perform edits and additions to it (the container). I wouldn't be able to run a pip3
installation at all. Additionally, the snap cannot access the host os's directories, save those which are allowed by the snap developer.
Created related issue: https://github.com/vinenoobjelly/jellyfishlights-py/issues/8
Well, unfortunately snaps are built as
read-only
and run as a secured container, with minimal access to perform edits and additions to it (the container). I wouldn't be able to run apip3
installation at all. Additionally, the snap cannot access the host os's directories, save those which are allowed by the snap developer.
That's unfortunate. You are able to access HA's configuration.yaml
file, correct? If so you could try creating a shell command service by adding these lines to the file:
shell_command:
install_jellyfishlightspy: pip3 install jellyfishlights-py
Then:
That's a roundabout way of running a command within the container that should work. Alternatively you could try installing the package on the host machine and see if that works. Again, I'm not familiar with Snap so that might not work.
Though I just tried the pip command on another machine and it's working fine, so this may not be the problem in your environment. Would you please search your logs for lines containing "jellyfishlightspy" or "jellyfishlights-py" and post what you find?
nada. I didn't think the approach would work. Thanks for the help - maybe something will come of it in the future. I'm gonna go ahead and close this issue.
Hi,
I respond here. It's partly true that the environment is RO. There's also a "userland" where HACS will install dependencies in.
You can login to the shell:
sudo snap run --shell home-assistant-snap
Then go into the SNAP directory and enter the env:
cd $SNAP
source bin/activate
And now try to install the package, but I guess you have to do it with
python3 -m pip <package>
Thanks for responding @jmgiaever - This is the output from the commands you've provided here and in the other issue I opened on your repo:
python3 -m pip install jellyfishlights-py
Requirement already satisfied: jellyfishlights-py in /root/snap/home-assistant-snap/583/.local/lib/python3.11/site-packages (0.7.0)
Requirement already satisfied: websocket-client in ./lib/python3.11/site-packages (from jellyfishlights-py) (1.7.0)
Then I'm not sure what the problem can be. Do you have other things installed through HACS that work properly?
Oh yeah! Never had any failures before, so I wasn't sure what to do. So, I opened this ticket and the one with @jmgiaever since he maintains the home-assistant-snap
.
Everything seems to be in order with the snap package then.
Can log back into the shell again and activate the environment, then go into the Python interpreter (python3
) and run help("modules jellyfishlightspy")
Or just python3 -c 'help("modules jellyfishlightspy")
(install) root@$HOSTNAME:/snap/home-assistant-snap/583# python3
Python 3.11.7 (main, Dec 8 2023, 18:56:57) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> help("modules jellyfishlightspy")
Here is a list of modules whose name or summary contains 'jellyfishlightspy'.
If there are any, enter a module name to get more help.
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
WARNING:slixmpp.stringprep:Using slower stringprep, consider compiling the faster cython/libidn one.
Here's the output with the debugger switch mentioned:
>>> help("modules -Xfrozen_modules=off jellyfishlightspy")
Here is a list of modules whose name or summary contains '-Xfrozen_modules=off'.
If there are any, enter a module name to get more help.
Any ideas? This all rather ambiguous to me.
Hi,
I've verified that it is indeed available to the system. You can do that as well.
sudo snap run --shell home-assistant-snap
cd $SNAP
source bin/activate
python3
Then import the (deprecated) package
>>> import pkg_resources
and copy/paste the following
for package in sorted(["%s==%s" % (i.key, i.version) for i in pkg_resources.working_set]):
if 'jellyfishlights' in package:
print(package)
Hit enter and it should output: jellyfishlights-py==0.7.0
.
But I can seem to find anything that is exposed by that package.
I tried your propose commands @jmgiaever thanks. I'm still getting the same error as above:
Config flow could not be loaded: {"message":"Invalid handler specified"}
But I can seem to find anything that is exposed by that package.
.... which probably means there is an issue with that package.
@bdunn44 do you have any ideas? I know you opened an issue here. I'm honestly at a loss. I would love to get this integration working, and it seems we've got it narrowed down a little more. Has anything @jmgiaever has posted sparked any ideas for you?
Maybe you can create your own issue with them? He doesn't seem to have a problem, so it's best to get it from the source (you).
You can report it unrelated to this package. Report the bug as its documented in this thread.
I'll close this issue and see what happens upstream. Thanks both of you for the assistance.
Hey @kz6fittycent, just getting back online after vacation. Sorry I missed the action. Nothing here is really sparking any ideas.... the integration works fine in other environments and you're the first person to report an issue like this, so my best guess is it has something to do with the nuances of how Snap works, but tough to deduce anything beyond that. If you're able, it would be great to get full logs with debug enabled that cover the installation and configuration of the integration. Basically:
Wanted to let you know that we're in business with the latest release (v1.3.1)! I have a working Jellyfish integration!
That's great news! Glad to hear it
Version of the custom_component
1.2.0
Configuration
Home Assistant Version: 2023.9.3 HACS: 1.33.0 Jellyfish Integration Version 1.2.0
Describe the bug
A clear and concise description of what the bug is. I installed the integration via HACS Restarted HA Attempted to enable the integration and got the following error:
Config flow could not be loaded: {"message":"Invalid handler specified"}
The integration will not initiate after installation and attempting to activate it via HA GUI.
Debug log