thomst08 / OctoLight

OctoLight with auto turn off and on
7 stars 3 forks source link

Installing but not showing in Octoprint #8

Closed noldomino closed 4 months ago

noldomino commented 4 months ago

Hi, I have a hard time installing OctoLight. Installation through plugin manager quite goes OK but after reboot OctoLight doesn't show up in the plugins list. "Quite OK" means status is "Successfully installed OctoLight-0.2.0" but "Plugin management log" pop-up shows "Install: Unknown" thus plugin name is missing. When installing from terminal - no difference. I have tried several times already (uninstall + install) with no result. Other plugins install just OK

Plugin management log Install Unknown: A restart is needed for the changes to take effect.

Terminal ~/oprint/bin/pip install "https://github.com/thomst08/OctoLight/archive/master.zip" Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting https://github.com/thomst08/OctoLight/archive/master.zip Downloading https://github.com/thomst08/OctoLight/archive/master.zip | 595.9 kB 3.3 MB/s 0:00:00 Preparing metadata (setup.py) ... done Requirement already satisfied: OctoPrint in ./oprint/lib/python3.9/site-packages (from OctoLight==0.2.0) (1.9.3) Requirement already satisfied: RPi.GPIO in ./oprint/lib/python3.9/site-packages (from OctoLight==0.2.0) (0.7.1) Requirement already satisfied: OctoPrint-FileCheck>=2021.2.23 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2021.2.23) Requirement already satisfied: OctoPrint-FirmwareCheck>=2021.10.11 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2021.10.11) Requirement already satisfied: OctoPrint-PiSupport>=2023.5.24 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2023.10.10) Requirement already satisfied: argon2-cffi<22,>=21.3.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (21.3.0) Requirement already satisfied: Babel<2.13,>=2.12.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.12.1) Requirement already satisfied: cachelib<0.11,>=0.10.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.10.2) Requirement already satisfied: Click<9,>=8.1.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (8.1.3) Requirement already satisfied: colorlog<7,>=6.7.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (6.7.0) Requirement already satisfied: emoji<3,>=2.2.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.8.0) Requirement already satisfied: feedparser<7,>=6.0.10 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (6.0.10) Requirement already satisfied: filetype<2,>=1.2.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.2.0) Requirement already satisfied: Flask-Assets<3,>=2.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.0) Requirement already satisfied: Flask-Babel<4,>=3.1.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (3.1.0) Requirement already satisfied: Flask-Login<0.7,>=0.6.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.6.2) Requirement already satisfied: Flask-Limiter<4,>=3.3.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (3.5.0) Requirement already satisfied: flask<2.3,>=2.2.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.2.5) Requirement already satisfied: frozendict<3,>=2.3.7 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.3.8) Requirement already satisfied: future<1,>=0.18.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.18.3) Requirement already satisfied: markdown<4,>=3.4.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (3.5) Requirement already satisfied: netaddr<0.9,>=0.8 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.8.0) Requirement already satisfied: netifaces<1,>=0.11 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.11.0) Requirement already satisfied: passlib<2,>=1.7.4 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.7.4) Requirement already satisfied: pathvalidate<3,>=2.5.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.5.2) Requirement already satisfied: pkginfo<2,>=1.9.6 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.9.6) Requirement already satisfied: psutil<6,>=5.9.4 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (5.9.5) Requirement already satisfied: pydantic==1.10.12 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.10.12) Requirement already satisfied: pylru<2,>=1.2.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.2.1) Requirement already satisfied: pyserial<4,>=3.5 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (3.5) Requirement already satisfied: PyYAML<7,>=6.0.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (6.0.1) Requirement already satisfied: requests<3,>=2.28.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.31.0) Requirement already satisfied: sarge==0.1.7.post1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.1.7.post1) Requirement already satisfied: semantic-version<3,>=2.10.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.10.0) Requirement already satisfied: sentry-sdk<2,>=1.19.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.31.0) Requirement already satisfied: tornado<7,>=6.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (6.2) Requirement already satisfied: watchdog<3,>=2.3.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.3.1) Requirement already satisfied: websocket-client<2,>=1.5.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.6.4) Requirement already satisfied: werkzeug<2.3,>=2.2.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2.2.3) Requirement already satisfied: wrapt<1.16,>=1.15 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.15.0) Requirement already satisfied: zeroconf==0.39.4 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.39.4) Requirement already satisfied: zipstream-ng<2.0.0,>=1.5.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.7.1) Requirement already satisfied: blinker<2,>=1.6.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (1.6.3) Requirement already satisfied: class-doc<0.3,>=0.2.6 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.2.6) Requirement already satisfied: regex in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (2022.9.13) Requirement already satisfied: unidecode in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.4.21) Requirement already satisfied: wheel in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoLight==0.2.0) (0.34.2) Requirement already satisfied: typing-extensions>=4.2.0 in ./oprint/lib/python3.9/site-packages (from pydantic==1.10.12->OctoPrint->OctoLight==0.2.0) (4.4.0) Requirement already satisfied: async-timeout>=4.0.1 in ./oprint/lib/python3.9/site-packages (from zeroconf==0.39.4->OctoPrint->OctoLight==0.2.0) (4.0.3) Requirement already satisfied: ifaddr>=0.1.7 in ./oprint/lib/python3.9/site-packages (from zeroconf==0.39.4->OctoPrint->OctoLight==0.2.0) (0.2.0) Requirement already satisfied: argon2-cffi-bindings in ./oprint/lib/python3.9/site-packages (from argon2-cffi<22,>=21.3.0->OctoPrint->OctoLight==0.2.0) (21.2.0) Requirement already satisfied: more-itertools>=5.0.0 in ./oprint/lib/python3.9/site-packages (from class-doc<0.3,>=0.2.6->OctoPrint->OctoLight==0.2.0) (10.1.0) Requirement already satisfied: sgmllib3k in ./oprint/lib/python3.9/site-packages (from feedparser<7,>=6.0.10->OctoPrint->OctoLight==0.2.0) (1.0.0) Requirement already satisfied: Jinja2>=3.0 in ./oprint/lib/python3.9/site-packages (from flask<2.3,>=2.2.3->OctoPrint->OctoLight==0.2.0) (3.1.2) Requirement already satisfied: itsdangerous>=2.0 in ./oprint/lib/python3.9/site-packages (from flask<2.3,>=2.2.3->OctoPrint->OctoLight==0.2.0) (2.1.2) Requirement already satisfied: importlib-metadata>=3.6.0 in ./oprint/lib/python3.9/site-packages (from flask<2.3,>=2.2.3->OctoPrint->OctoLight==0.2.0) (5.0.0) Requirement already satisfied: webassets>=2.0 in ./oprint/lib/python3.9/site-packages (from Flask-Assets<3,>=2.0->OctoPrint->OctoLight==0.2.0) (2.0) Requirement already satisfied: pytz>=2022.7 in ./oprint/lib/python3.9/site-packages (from Flask-Babel<4,>=3.1.0->OctoPrint->OctoLight==0.2.0) (2023.3.post1) Requirement already satisfied: limits>=2.8 in ./oprint/lib/python3.9/site-packages (from Flask-Limiter<4,>=3.3.0->OctoPrint->OctoLight==0.2.0) (3.6.0) Requirement already satisfied: ordered-set<5,>4 in ./oprint/lib/python3.9/site-packages (from Flask-Limiter<4,>=3.3.0->OctoPrint->OctoLight==0.2.0) (4.1.0) Requirement already satisfied: rich<14,>=12 in ./oprint/lib/python3.9/site-packages (from Flask-Limiter<4,>=3.3.0->OctoPrint->OctoLight==0.2.0) (12.6.0) Requirement already satisfied: charset-normalizer<4,>=2 in ./oprint/lib/python3.9/site-packages (from requests<3,>=2.28.2->OctoPrint->OctoLight==0.2.0) (2.1.1) Requirement already satisfied: idna<4,>=2.5 in ./oprint/lib/python3.9/site-packages (from requests<3,>=2.28.2->OctoPrint->OctoLight==0.2.0) (3.4) Requirement already satisfied: urllib3<3,>=1.21.1 in ./oprint/lib/python3.9/site-packages (from requests<3,>=2.28.2->OctoPrint->OctoLight==0.2.0) (1.26.18) Requirement already satisfied: certifi>=2017.4.17 in ./oprint/lib/python3.9/site-packages (from requests<3,>=2.28.2->OctoPrint->OctoLight==0.2.0) (2024.2.2) Requirement already satisfied: MarkupSafe>=2.1.1 in ./oprint/lib/python3.9/site-packages (from werkzeug<2.3,>=2.2.3->OctoPrint->OctoLight==0.2.0) (2.1.1) Requirement already satisfied: zipp>=0.5 in ./oprint/lib/python3.9/site-packages (from importlib-metadata>=3.6.0->flask<2.3,>=2.2.3->OctoPrint->OctoLight==0.2.0) (3.10.0) Requirement already satisfied: deprecated>=1.2 in ./oprint/lib/python3.9/site-packages (from limits>=2.8->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoLight==0.2.0) (1.2.13) Requirement already satisfied: importlib-resources>=1.3 in ./oprint/lib/python3.9/site-packages (from limits>=2.8->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoLight==0.2.0) (6.1.0) Requirement already satisfied: packaging<24,>=21 in ./oprint/lib/python3.9/site-packages (from limits>=2.8->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoLight==0.2.0) (21.3) Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in ./oprint/lib/python3.9/site-packages (from rich<14,>=12->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoLight==0.2.0) (0.9.1) Requirement already satisfied: pygments<3.0.0,>=2.6.0 in ./oprint/lib/python3.9/site-packages (from rich<14,>=12->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoLight==0.2.0) (2.13.0) Requirement already satisfied: cffi>=1.0.1 in ./oprint/lib/python3.9/site-packages (from argon2-cffi-bindings->argon2-cffi<22,>=21.3.0->OctoPrint->OctoLight==0.2.0) (1.15.1) Requirement already satisfied: pycparser in ./oprint/lib/python3.9/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi<22,>=21.3.0->OctoPrint->OctoLight==0.2.0) (2.21) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in ./oprint/lib/python3.9/site-packages (from packaging<24,>=21->limits>=2.8->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoLight==0.2.0) (3.0.9) Building wheels for collected packages: OctoLight Building wheel for OctoLight (setup.py) ... done Created wheel for OctoLight: filename=OctoLight-0.2.0-py2.py3-none-any.whl size=6686 sha256=ae40f7241db9029308e33f7f22a4ecdd7246bd8a0e6300b4aaab13323a606891 Stored in directory: /tmp/pip-ephem-wheel-cache-k134rpeo/wheels/59/e6/a3/2f1b7981cbb8aecca5ef96a665660631e73a96737a63a976bf Successfully built OctoLight Installing collected packages: OctoLight Successfully installed OctoLight-0.2.0

`~/oprint/bin/python -m pip list Package Version

anyio 4.3.0 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 async-timeout 4.0.3 awesome-slugify 1.6.5 Babel 2.12.1 backoff 2.2.1 backports.csv 1.0.7 Bed-Visualizer 1.1.1 BGCode 0.2.0 blinker 1.6.3 bme680 1.1.1 bson 0.5.10 cachelib 0.10.2 certifi 2024.2.2 cffi 1.15.1 charset-normalizer 2.1.1 class-doc 0.2.6 click 8.1.3 colorlog 6.7.0 colorzero 2.0 commonmark 0.9.1 Deprecated 1.2.13 DisplayLayerProgress 1.28.0 dnspython 2.6.1 EasyProcess 1.1 Emergency-stop-simplified 0.1.1 emoji 2.8.0 exceptiongroup 1.2.0 feedparser 6.0.10 file-read-backwards 3.0.0 filetype 1.2.0 Flask 2.2.5 Flask-Assets 2.0 flask-babel 3.1.0 Flask-Limiter 3.5.0 Flask-Login 0.6.2 frozendict 2.3.8 future 0.18.3 GPIO-FAN-Controller 0.3.1 GPIO-Status 0.2.1 gpiozero 1.6.2 h11 0.14.0 httpcore 1.0.4 httpx 0.25.2 idna 3.4 ifaddr 0.2.0 importlib-metadata 5.0.0 importlib-resources 6.1.0 itsdangerous 2.1.2 Jinja2 3.1.2 limits 3.6.0 Markdown 3.5 MarkupSafe 2.1.1 more-itertools 10.1.0 netaddr 0.8.0 netifaces 0.11.0 OctoBuddy 1.0.5 OctoDash-Companion 0.0.8rc4 OctoEverywhere 3.2.1 octoflatbuffers 2.0.5 Octolapse 0.4.5 OctoLight 0.2.0 OctoPrint 1.9.3 OctoPrint-BedCooldown 0.6.0 OctoPrint-BetterHeaterTimeout 1.3.0 OctoPrint-BLTouch 0.3.4 OctoPrint-Cancelobject 0.5.0 OctoPrint-Dashboard 1.19.10 OctoPrint-Enclosure 4.13.2 OctoPrint-ExcludeRegionPlugin 0.3.2 OctoPrint-FilamentManager 1.9.1 OctoPrint-FileCheck 2021.2.23 OctoPrint-FirmwareCheck 2021.10.11 OctoPrint-FirmwareUpdater 1.14.0 OctoPrint-GCodeSystemCommands 1.0.1 OctoPrint-GpioControl 1.0.8 OctoPrint-Nozzle-Filament-Validator 2.0.5 OctoPrint-Obico 2.4.10 OctoPrint-PiSupport 2023.10.10 OctoPrint-PrintTimeGenius 2.3.2 OctoPrint-PSUControl 1.0.6 OctoPrint-PSUControl-RPiGPIO 1.0.4 OctoPrint-Resource-Monitor 0.3.15 OctoPrint-SimpleEmergencyStop 1.0.5 OctoPrint-SlicerEstimator 1.6.4 OctoPrint-SpoolManager 1.7.3 OctoPrint-TemperatureFailsafe 0.2.3 OctoPrint-Tempsgraph 0.3.7 OctoPrint-TPLinkSmartplug 1.0.3 OctoRelay 4.1.0 ordered-set 4.1.0 packaging 21.3 passlib 1.7.4 pathvalidate 2.5.2 peewee 3.17.1 picamerab 1.13b1 pillow 10.2.0 pip 24.0 pkg_resources 0.0.0 pkginfo 1.9.6 psutil 5.9.5 pyasn1 0.5.1 pybgcode 0.2.0 pycparser 2.21 pydantic 1.10.12 Pygments 2.13.0 pylru 1.2.1 pyparsing 3.0.9 pypng 0.20220715.0 pyserial 3.5 python-dateutil 2.9.0.post0 python-periphery 2.4.1 pytz 2023.3.post1 PyYAML 6.0.1 qrcode 7.4.2 regex 2022.9.13 requests 2.31.0 rich 12.6.0 RPi.bme280 0.2.4 RPi.GPIO 0.7.1 rpi_hardware_pwm 0.2.2 rsa 4.9 sarge 0.1.7.post1 semantic-version 2.10.0 sentry-sdk 1.31.0 setuptools 44.1.1 sgmllib3k 1.0.0 six 1.16.0 Slicer-Thumbnails 1.0.7 smbus 1.1.post2 smbus2 0.4.3 sniffio 1.3.1 SQLAlchemy 1.1.18 Top-Temp 0.0.2.3 tornado 6.2 typing_extensions 4.4.0 UI-Customizer 0.1.9.91 Unidecode 0.4.21 uptime 3.0.1 uritools 2.1.1 urllib3 1.26.18 watchdog 2.3.1 webassets 2.0 websocket-client 1.6.4 Werkzeug 2.2.3 wheel 0.34.2 wrapt 1.15.0 zeroconf 0.39.4 zipp 3.10.0 zipstream-ng 1.7.1`

Software and hardware:

Other info Octoprint is standard installation from image. Installed under different user (not pi)

thomst08 commented 4 months ago

Hey @noldomino, Thanks for reaching out, I have had a look, setup a new install of OctoPi on a test Pi. Installing OctoLight form here works fine, my guess currently is there is some kind of conflict with another plugin (which one or if this is the case, I'm not sure). However, I have gone over the install and found an error being generated due to a missing import, I have corrected this and released a new version, can you please try installing OctoLight again and let me know the result. If it does fail, can you please send me a copy of your octoprint.log file.

noldomino commented 4 months ago

Hi @thomst08 Thank you for fast reaction. Unfortunately nothing changed. I uninstalled some unnecessary plugins and tried one more time - again without result. I attach log. octoprint.log

noldomino commented 4 months ago

UPDATE: I've disabled all 3rd party plugins and OctoLight just appeared after restart. Then I enabled plugins one-by-one checking when OctoLight dissapears again. I've found it is OctoRelay. Maybe it is due to the fact OctoRelay is based on OctoLight? Anyway disabling OctoRelay alows for OctoLight operation.

PS. There seems to be a secondary conflict with "GPIO Fan Controller". After OctoLight is enabled GPIO Fan Controller can't be enabled.

thomst08 commented 4 months ago

Thanks for testing, you've found the conflict, excellent work.

I will look at the code for both these and figure out why there's a conflict and make the nessery changes, I'll let you know when it's corrected. (this might take a little while as I'll need some spare time)

noldomino commented 4 months ago

Thanks. Wish you all the best!

thomst08 commented 4 months ago

I have had a quick look and found the root cause, this seems to be an issue with different plugins. OctoRelay is setting the GPIO mode, this mode is in BCM, OctoLight however uses BOARD mode. In short, the difference is board mode allows the selecting of the pin number, while BCM selects the GPIO number, this is controlled by the chip on the Pi your using.

I will look at making OctoLight smart enough to use the other mode if it detects it has been switched, hopefully this resolves this issue in the future and allows it to be more compatible with other plugins if necessary. This will also be why "GPIO Fan Controller" was having issues, it would have changed its pin number.

thomst08 commented 4 months ago

Hey @noldomino, I have gone ahead and worked out a solution, I have setup OctoLight to check if a GPIO mode is set by another plugin, if it has, it will add a note to the settings and no longer crash. Please install the latest version and you should be good to go. Because of the mode switch, you will need to enter the GPIO number instead of the pin number, when you are the settings, you should see a info icon that will take you to a website to find the correct number (this is a copy of OctoRelay, so it should be right)

Let me know if you still have any issues and thank you for your log, that was very helpful.

noldomino commented 4 months ago

Hi @thomst08 I have tested and indeed it is working fully properly now. Thank you.