entrippy / OctoPrint-OctoHue

Illuminate your print job and signal its status using a Philips Hue lights.
GNU Affero General Public License v3.0
18 stars 4 forks source link

Octohue not showing in plugin manager #12

Closed gennacide closed 4 years ago

gennacide commented 4 years ago

I have tried installing and uninstalling via SSH using pip command.

It shows up when i do pip list but it will not show in octoprint GUI plugin manger....

I really would like this to work, any suggestions?

entrippy commented 4 years ago

Thats a strange one, lets see what we can figure out. Did you first try installing via the plugin manager in the gui? I assume there is no octohue at the left hand side of the settings menu? Do you see octohue mentioned in the octoprint log file? When you tried installing via pip, did you have octoprints virtualenv activated?

gennacide commented 4 years ago

Awesome. Thanks for helping!

Yes first attempt was through plugin manager. It seemed to get hung up on building wheels (or something...sorry I know some about this stuff but not enough haha). Waited for it to finish for like 20 minutes but it froze so I had to restart it.

Nope. No Octohue on left side of settings.

I haven’t checked the log file yet. I’ll do that when I get home. What specifically should I be looking for?

Not sure on octoprints virtualenv. How do I check that?

entrippy commented 4 years ago

ignore the virtualenv comment for now. let me check something when I finish work and come back to you.

gennacide commented 4 years ago

Ok cool thank you

entrippy commented 4 years ago

Jumped on to my octopi install.... So if you are using octoprints octopi image after you log in as pi via ssh you need to run source ~/oprint/bin/activate before using pip to manage any packages.

you could try reinstalling the package using pip install --upgrade --force-reinstall <package> or just removing it the same way and reinstalling via the plugin manager if you prefer.

gennacide commented 4 years ago

force reinstall returned:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple ERROR: Could not find a version that satisfies the requirement octohue (from versions: none) ERROR: No matching distribution found for octohue

So I then ran the uninstall command which executed successfully.

Rebooted

Installed via plugin manager and it still doesn't show.

entrippy commented 4 years ago

Can you run pip freeze --local and tell me if any of the following are missing? colormath decorator networkx numpy OctoHue qhue

Make sure you do this from within the virtualenv.

gennacide commented 4 years ago

I’m not sure how to run it in virtualenv. Can you please tell me how to do that?

entrippy commented 4 years ago

Using the same process mentioned in my last message yesterday ( using the octopi process cos I'm assuming that is your setup ).

  1. SSH in as pi
  2. source ~/oprint/bin/activate
  3. pip freeze --local

Just in case this makes your life easier in the long run. A simplified explanation of virtualenv is that it is a way that you can use python with a environment that is configured specifically for the purpose you have in mind. When you run the source ~/oprint/bin/activate command you are setting all the environment variable of your shell session to use a python environment dedicated to octoprint. This will use a specific version of python and pip, and python modules in a location that is not part of the general operating environment. if you use pip in this virtualenv, it will see all of octoprints components, if you don't use the virtual env pip wont see octoprint, and any module you install will not be seen by octoprint.

gennacide commented 4 years ago

got it! thank you for taking the time to explain it to me.

so here is what came back when i did pip freeze --local

all of the ones you listed are there.

pi@octopi:~ $ source ~/oprint/bin/activate (oprint) pi@octopi:~ $ pip freeze --local DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support argh==0.26.2 awesome-slugify==1.6.5 Babel==2.7.0 backoff==1.10.0 backports-abc==0.5 blinker==1.4 cachelib==0.1 certifi==2019.9.11 chainmap==1.0.3 chardet==3.0.4 Click==7.0 colormath==3.0.0 contextlib2==0.6.0.post1 decorator==4.4.1 emoji==0.5.4 feedparser==5.2.1 filetype==1.0.5 Flask==0.10.1 Flask-Assets==0.12 Flask-Babel==0.12.2 Flask-Login==0.2.11 Flask-Principal==0.4.0 frozendict==1.2 future==0.17.1 futures==3.2.0 idna==2.8 itsdangerous==1.1.0 Jinja2==2.8.1 Markdown==3.0.1 MarkupSafe==1.1.1 monotonic==1.5 netaddr==0.7.19 netifaces==0.10.9 networkx==2.2 numpy==1.16.6 OctoHue==0.3.1 OctoPrint==1.3.12 OctoPrint-Anywhere==1.0.21 OctoPrint-CuraEngineLegacy==1.0.2 OctoPrint-EEprom-Marlin==1.2.1 OctoPrint-FirmwareUpdater==1.6.1 OctoPrint-Gcodebar==0.1.5 OctoPrint-IFTTT==1.2.1 pathtools==0.1.2 picamera==1.13 pkg-resources==0.0.0 pkginfo==1.5.0.1 psutil==5.6.3 pyasn1==0.4.7 pybonjour==1.1.1 pylru==1.2.0 pyserial==3.4 pytz==2019.3 PyYAML==5.1.2 qhue==1.0.12 raven==6.10.0 regex==2019.8.19 requests==2.22.0 rsa==4.0 sarge==0.1.5.post0 scandir==1.10.0 semantic-version==2.6.0 sentry-sdk==0.7.7 singledispatch==3.4.0.3 six==1.12.0 tornado==4.5.3 TouchUI==0.3.13 typing==3.7.4.1 Unidecode==0.4.21 urllib3==1.25.6 watchdog==0.9.0 webassets==0.12.1 websocket-client==0.56.0 Werkzeug==0.15.6 wrapt==1.11.2

entrippy commented 4 years ago

thanks for that, so it believes the module is installed. We need to look at two things next.... octoprint logs, and install logs.... Can you give the me output of grep -i octohue ~/.octoprint/logs/octoprint.log I'm also interested in the full output from the module install, if you could uninstall the module via pip once more, and then when you reinstall via the plugin manager, send me the complete output?

Sorry about the back and forth, I think I need to make a troubleshooting template to help people populate help requests.

gennacide commented 4 years ago

pi@octopi:~ $ grep -i octohue ~/.octoprint/logs/octoprint.log Binary file /home/pi/.octoprint/logs/octoprint.log matches

Installing plugin "OctoHue" from https://github.com/entrippy/OctoPrint-OctoHue/archive/master.zip... /home/pi/oprint/bin/python2 -m pip --disable-pip-version-check install https://github.com/entrippy/OctoPrint-OctoHue/archive/master.zip --no-cache-dir Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting https://github.com/entrippy/OctoPrint-OctoHue/archive/master.zip Downloading https://github.com/entrippy/OctoPrint-OctoHue/archive/master.zip Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages (from OctoHue==0.3.1) (1.3.12) Requirement already satisfied: colormath in /home/pi/oprint/lib/python2.7/site-packages (from OctoHue==0.3.1) (3.0.0) Requirement already satisfied: qhue in /home/pi/oprint/lib/python2.7/site-packages (from OctoHue==0.3.1) (1.0.12) Requirement already satisfied: awesome-slugify<1.7,>=1.6.5 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (1.6.5) Requirement already satisfied: Flask-Babel<0.13,>=0.12 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.12.2) Requirement already satisfied: cachelib<0.2,>=0.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.1) Requirement already satisfied: future<0.18,>=0.17.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.17.1) Requirement already satisfied: requests<3,>=2.21.0 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (2.22.0) Requirement already satisfied: netifaces<0.11,>=0.10.9 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.10.9) Requirement already satisfied: rsa<5,>=4.0 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (4.0) Requirement already satisfied: Click<8,>=7 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (7.0) Requirement already satisfied: chainmap<1.1,>=1.0.3 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (1.0.3) Requirement already satisfied: pylru<1.3,>=1.2 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (1.2.0) Requirement already satisfied: monotonic<1.6,>=1.5 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (1.5) Requirement already satisfied: werkzeug<0.16,>=0.15.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.15.6) Requirement already satisfied: Flask-Principal<0.5,>=0.4 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.4.0) Requirement already satisfied: pyserial<3.5,>=3.4 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (3.4) Requirement already satisfied: futures<3.3,>=3.2 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (3.2.0) Requirement already satisfied: emoji<0.6,>=0.5.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.5.4) Requirement already satisfied: Flask-Assets<0.13,>=0.12 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.12) Requirement already satisfied: wrapt<1.12,>=1.11.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (1.11.2) Requirement already satisfied: tornado==4.5.3 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (4.5.3) Requirement already satisfied: websocket-client<0.57,>=0.56 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.56.0) Requirement already satisfied: pkginfo<1.6,>=1.5.0.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (1.5.0.1) Requirement already satisfied: frozendict<1.3,>=1.2 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (1.2) Requirement already satisfied: typing<4,>=3.6.6 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (3.7.4.1) Requirement already satisfied: netaddr<0.8,>=0.7.19 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.7.19) Requirement already satisfied: semantic-version<2.7,>=2.6 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (2.6.0) Requirement already satisfied: sarge==0.1.5post0 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.1.5.post0) Requirement already satisfied: Jinja2<2.9,>=2.8.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (2.8.1) Requirement already satisfied: psutil<5.7,>=5.6.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (5.6.3) Requirement already satisfied: watchdog<0.10,>=0.9.0 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.9.0) Requirement already satisfied: regex!=2018.11.6 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (2019.8.19) Requirement already satisfied: sentry-sdk==0.7.7 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.7.7) Requirement already satisfied: Flask-Login<0.3,>=0.2.11 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.2.11) Requirement already satisfied: filetype<2,>=1.0.5 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (1.0.5) Requirement already satisfied: markdown<3.1,>=3.0 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (3.0.1) Requirement already satisfied: flask<0.11,>=0.10.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (0.10.1) Requirement already satisfied: scandir<1.11,>=1.10 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (1.10.0) Requirement already satisfied: PyYAML<6,>=5.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (5.1.2) Requirement already satisfied: feedparser<5.3,>=5.2.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint->OctoHue==0.3.1) (5.2.1) Requirement already satisfied: Unidecode<0.05,>=0.04.14 in /home/pi/oprint/lib/python2.7/site-packages (from awesome-slugify<1.7,>=1.6.5->OctoPrint->OctoHue==0.3.1) (0.4.21) Requirement already satisfied: Babel>=2.3 in /home/pi/oprint/lib/python2.7/site-packages (from Flask-Babel<0.13,>=0.12->OctoPrint->OctoHue==0.3.1) (2.7.0) Requirement already satisfied: idna<2.9,>=2.5 in /home/pi/oprint/lib/python2.7/site-packages (from requests<3,>=2.21.0->OctoPrint->OctoHue==0.3.1) (2.8) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/pi/oprint/lib/python2.7/site-packages (from requests<3,>=2.21.0->OctoPrint->OctoHue==0.3.1) (3.0.4) Requirement already satisfied: certifi>=2017.4.17 in /home/pi/oprint/lib/python2.7/site-packages (from requests<3,>=2.21.0->OctoPrint->OctoHue==0.3.1) (2019.9.11) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/pi/oprint/lib/python2.7/site-packages (from requests<3,>=2.21.0->OctoPrint->OctoHue==0.3.1) (1.25.6) Requirement already satisfied: pyasn1>=0.1.3 in /home/pi/oprint/lib/python2.7/site-packages (from rsa<5,>=4.0->OctoPrint->OctoHue==0.3.1) (0.4.7) Requirement already satisfied: blinker in /home/pi/oprint/lib/python2.7/site-packages (from Flask-Principal<0.5,>=0.4->OctoPrint->OctoHue==0.3.1) (1.4) Requirement already satisfied: webassets>=0.11.1 in /home/pi/oprint/lib/python2.7/site-packages (from Flask-Assets<0.13,>=0.12->OctoPrint->OctoHue==0.3.1) (0.12.1) Requirement already satisfied: backports-abc>=0.4 in /home/pi/oprint/lib/python2.7/site-packages (from tornado==4.5.3->OctoPrint->OctoHue==0.3.1) (0.5) Requirement already satisfied: singledispatch in /home/pi/oprint/lib/python2.7/site-packages (from tornado==4.5.3->OctoPrint->OctoHue==0.3.1) (3.4.0.3) Requirement already satisfied: six in /home/pi/oprint/lib/python2.7/site-packages (from websocket-client<0.57,>=0.56->OctoPrint->OctoHue==0.3.1) (1.12.0) Requirement already satisfied: MarkupSafe in /home/pi/oprint/lib/python2.7/site-packages (from Jinja2<2.9,>=2.8.1->OctoPrint->OctoHue==0.3.1) (1.1.1) Requirement already satisfied: pathtools>=0.1.1 in /home/pi/oprint/lib/python2.7/site-packages (from watchdog<0.10,>=0.9.0->OctoPrint->OctoHue==0.3.1) (0.1.2) Requirement already satisfied: argh>=0.24.1 in /home/pi/oprint/lib/python2.7/site-packages (from watchdog<0.10,>=0.9.0->OctoPrint->OctoHue==0.3.1) (0.26.2) Requirement already satisfied: itsdangerous>=0.21 in /home/pi/oprint/lib/python2.7/site-packages (from flask<0.11,>=0.10.1->OctoPrint->OctoHue==0.3.1) (1.1.0) Requirement already satisfied: pytz>=2015.7 in /home/pi/oprint/lib/python2.7/site-packages (from Babel>=2.3->Flask-Babel<0.13,>=0.12->OctoPrint->OctoHue==0.3.1) (2019.3) Building wheels for collected packages: OctoHue Building wheel for OctoHue (setup.py): started Building wheel for OctoHue (setup.py): finished with status 'done' Created wheel for OctoHue: filename=OctoHue-0.3.1-cp27-none-any.whl size=17694 sha256=92015f24fa0489965b77097e6e0dc8e8fe4b84e5bf68f27eea0a7ee6b00b2413 Stored in directory: /tmp/pip-ephem-wheel-cache-EiNOZ9/wheels/46/f2/fb/51acee70373b9fbf14a335aec8c2e8a76c145b0c0e6e2bf8cc Successfully built OctoHue Installing collected packages: OctoHue Successfully installed OctoHue-0.3.1 Done!

No problem! Thanks for being so responsive!

entrippy commented 4 years ago

Ok, given your comment in the other thread about numpy timing out on install I'd like to try reinstalling that. Depending on the dependencies, this might mean that octohue, and colormath need to be reinstalled as well. You'll need to do this from within the virtualenv (log in as pi... source ~/.oprint/bin/activate The following link gives some details on how to force reinstalls https://stackoverflow.com/questions/19548957/can-i-force-pip-to-reinstall-the-current-version

If we have no luck with this lets try and set up some time when we're both free to try and go over things via chat and or a desktop share (or something) so I can try to figure it out once and for all.

Also, lastly, just out of curiosity, what kind of raspberry pi are you using? pi 3, zero w? I was reading online that numpy can be slow compiling on some pi's. While we haven't confirmed if this is the cause I'm trying to see if there is a common trend that I can identify and then find a workaround to ensure smooth sailing on installs

gennacide commented 4 years ago

ok ill give that a try.

its a pi 3 b+

I work from home so whenever is good for you I can do a chat/screen share.

how do I do that without publicly posting my email? haha

gennacide commented 4 years ago

also, now when i try to force reinstall, it gives me an error.

(oprint) pi@octopi:~ $ pip install --upgrade --force-reinstall octohue

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple

ERROR: Could not find a version that satisfies the requirement octohue (from versions: none) ERROR: No matching distribution found for octohue

entrippy commented 4 years ago

oh... on that last one change it to pip install --upgrade --force-reinstall https://github.com/entrippy/OctoPrint-OctoHue/archive/master.zip

gennacide commented 4 years ago

THAT FIXED IT!!!!!!!!!!!! THANK YOU!!!!!

entrippy commented 4 years ago

Glad I could help.... Enjoy and happy to hear any feedback or features requests you might have.

gennacide commented 4 years ago

will do!