n3bojs4 / octoprint-LCD1602

15 stars 12 forks source link

Doesn't work (Can't find plugin in Installed Plugins, and no information is at my LCD) #2

Closed exetico closed 5 years ago

exetico commented 5 years ago

After the plugin is installed, i can't find it - or options for it. If i try to select "Install" again, OctoPrint reports that the plugin is already installed and running reinstallation, instead of a standard installation.

No information is shown on my I2C-LCD.

I'm on the latest version of OctoPrint, and i've tried to reboot both the Pi and OctiPrint.

I'm on a Pi 3 and wires mounted like i normally do.

Are you able to help me out? Let me know if you need anything else.

Here is some more details:

2019-02-06 15:22:25,326 - octoprint.server - INFO - Intermediary server started
2019-02-06 15:22:25,327 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2019-02-06 15:22:26,004 - octoprint.plugin.core - ERROR - Error loading plugin LCD1602
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
    instance = imp.load_module(key, f, filename, description)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_LCD1602/__init__.py", line 6, in <module>
    from RPLCD.i2c import CharLCD
  File "/home/pi/oprint/local/lib/python2.7/site-packages/RPLCD/i2c.py", line 29, in <module>
    from smbus2 import SMBus
ImportError: No module named smbus2
exetico commented 5 years ago

Should these modules be present in the default OctoPrint setup, or? I've not added any modules or anything else :-) So guess that's why it's broken from the beginning.

eyteam01 commented 5 years ago

Hi, i had the same problem. The LCD works and will be found on adress 27. The program ist not listed by the installed plugins. Octoprint is up to date. Pi3 i2c is aktivated. And it was possible with an oher script to display text on the LCD

n3bojs4 commented 5 years ago

Hello guys,

Let me publish a commit for this, you need the smbus2 python lib because RPLCD needs it (https://github.com/dbrgn/RPLCD)

You can temporarly fix with :

pip install smbus2

I think it should do the job. Sorry i am not at my desk for the moment, can you try it ?

thanks.

eyteam01 commented 5 years ago

on my octoprint the fix will not work

eyteam01 commented 5 years ago

Ok with the fix 9 hours ago i think it works. thank you for the quick help

LG Roland Hoffert

n3bojs4 commented 5 years ago

Ok with the fix 9 hours ago i think it works. thank you for the quick help

LG Roland Hoffert

Lol Roland, i was working on this during the night :) I didn't see my gitlab was syncing this branch.... You're lucky because i am adding some tests to have better results for the future. I don't want anymore people with such simple issue, i forgot a dependency in the setup.py ....

Enjoy the plugin and feel free to comment !

n3bojs4 commented 5 years ago

After the plugin is installed, i can't find it - or options for it. If i try to select "Install" again, OctoPrint reports that the plugin is already installed and running reinstallation, instead of a standard installation.

No information is shown on my I2C-LCD.

I'm on the latest version of OctoPrint, and i've tried to reboot both the Pi and OctiPrint.

I'm on a Pi 3 and wires mounted like i normally do.

Are you able to help me out? Let me know if you need anything else.

Here is some more details:

2019-02-06 15:22:25,326 - octoprint.server - INFO - Intermediary server started
2019-02-06 15:22:25,327 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2019-02-06 15:22:26,004 - octoprint.plugin.core - ERROR - Error loading plugin LCD1602
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
    instance = imp.load_module(key, f, filename, description)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_LCD1602/__init__.py", line 6, in <module>
    from RPLCD.i2c import CharLCD
  File "/home/pi/oprint/local/lib/python2.7/site-packages/RPLCD/i2c.py", line 29, in <module>
    from smbus2 import SMBus
ImportError: No module named smbus2

Hello can you try to reinstall please ?

eyteam01 commented 5 years ago

Hi, i had now reinstallt the newest version 40minutes ago. the plugin ist listed in the installed plugs in the plugin manager. The display works fine. The animation the ending of printjob is funny :) the time in the bargraph is a litle bit iritation. I had now connected it to an 2004 Display (Because i had an 2004 display for showing spool fill as bargraph and temperatures and voltages so i will not use 2 diverent display types)

LG Roland Hoffert

exetico commented 5 years ago

@n3bojs4 - Sure.

Will do it in a few couple of hours. I'll also like to see options to fx. hide some of the stuff, if i fx. only would like to see estimated time, or something simular. But i'lll post my feedback and inputs, after reinstalling it :-D

n3bojs4 commented 5 years ago

I'll clean the repo in few minutes. Too many unecessary commits :'( My pipeline is ready now ! You're right estimating time calculation is bad, i'll improve it. i am open for ideas :)

exetico commented 5 years ago

Well, guess it works. Would is show details after OctoPrint is initiated, or first when i start a print?

However i still have problems with the old plugin, which is trying to be installed after each reboot:

2019-02-08 13:56:20,090 - octoprint.plugins.pluginmanager - INFO - Installing plugin from https://github.com/n3bojs4/OctoPrint-Lcd1602/archive/master.zip
2019-02-08 13:56:21,408 - octoprint.plugin.core - ERROR - Error loading plugin LCD1602
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
    instance = imp.load_module(key, f, filename, description)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_LCD1602/__init__.py", line 6, in <module>
    from RPLCD.i2c import CharLCD
  File "/home/pi/oprint/local/lib/python2.7/site-packages/RPLCD/i2c.py", line 29, in <module>
    from smbus2 import SMBus
ImportError: No module named smbus2
2019-02-08 14:04:05,394 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2019-02-08 14:04:05,582 - octoprint.plugins.pi_support - WARNING - This Raspberry Pi is reporting problems that might lead to bad performance or errors caused by overheating or insufficient power.
!!! FREQUENCY CAPPING DUE TO OVERHEATING REPORTED !!! Improve cooling on the Pi's CPU and GPU.
2019-02-08 14:04:05,689 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {}
2019-02-08 14:04:05,981 - octoprint.plugins.tracking - INFO - Sent tracking event system_unthrottled, payload: {'throttled_mask': 131072, 'throttled_voltage_now': False, 'throttled_voltage_past': False, 'throttled_overheat_now': False, 'throttled_now': False, 'throttled_past': True, 'throttled_overheat_past': True}
2019-02-08 14:05:23,863 - octoprint.plugins.pluginmanager - INFO - Plugin to be installed from https://github.com/n3bojs4/OctoPrint-Lcd1602/archive/master.zip was already installed, forcing a reinstall
2019-02-08 14:05:43,542 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2019-02-08 14:05:44,401 - octoprint.plugin.core - INFO - Found 19 plugin(s) providing 18 mixin implementations, 25 hook handlers
2019-02-08 14:05:44,404 - octoprint.plugin.core - INFO - 19 plugin(s) registered with the system:
|  Action Command Prompt Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt
|  Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements
|  Anonymous Usage Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking
|  Application Keys Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/appkeys
|  Backup & Restore (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup
|  Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard
|  CuraEngine (<= 15.04) (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/cura
|  Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
|  Firmware Updater (1.1.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_firmwareupdater
|  Force Login (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/forcelogin
| !LCD1602 I2c display (0.1.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_LCD1602

(Please skip the information about overheating...)

exetico commented 5 years ago

Well, guess it works. Would is show details after OctoPrint is initiated, or first when i start a print?

However i still have problems with the old plugin, which is trying to be installed after each reboot:

2019-02-08 13:56:20,090 - octoprint.plugins.pluginmanager - INFO - Installing plugin from https://github.com/n3bojs4/OctoPrint-Lcd1602/archive/master.zip
2019-02-08 13:56:21,408 - octoprint.plugin.core - ERROR - Error loading plugin LCD1602
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
    instance = imp.load_module(key, f, filename, description)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_LCD1602/__init__.py", line 6, in <module>
    from RPLCD.i2c import CharLCD
  File "/home/pi/oprint/local/lib/python2.7/site-packages/RPLCD/i2c.py", line 29, in <module>
    from smbus2 import SMBus
ImportError: No module named smbus2
2019-02-08 14:04:05,394 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2019-02-08 14:04:05,582 - octoprint.plugins.pi_support - WARNING - This Raspberry Pi is reporting problems that might lead to bad performance or errors caused by overheating or insufficient power.
!!! FREQUENCY CAPPING DUE TO OVERHEATING REPORTED !!! Improve cooling on the Pi's CPU and GPU.
2019-02-08 14:04:05,689 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {}
2019-02-08 14:04:05,981 - octoprint.plugins.tracking - INFO - Sent tracking event system_unthrottled, payload: {'throttled_mask': 131072, 'throttled_voltage_now': False, 'throttled_voltage_past': False, 'throttled_overheat_now': False, 'throttled_now': False, 'throttled_past': True, 'throttled_overheat_past': True}
2019-02-08 14:05:23,863 - octoprint.plugins.pluginmanager - INFO - Plugin to be installed from https://github.com/n3bojs4/OctoPrint-Lcd1602/archive/master.zip was already installed, forcing a reinstall
2019-02-08 14:05:43,542 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2019-02-08 14:05:44,401 - octoprint.plugin.core - INFO - Found 19 plugin(s) providing 18 mixin implementations, 25 hook handlers
2019-02-08 14:05:44,404 - octoprint.plugin.core - INFO - 19 plugin(s) registered with the system:
|  Action Command Prompt Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt
|  Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements
|  Anonymous Usage Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking
|  Application Keys Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/appkeys
|  Backup & Restore (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup
|  Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard
|  CuraEngine (<= 15.04) (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/cura
|  Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
|  Firmware Updater (1.1.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_firmwareupdater
|  Force Login (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/forcelogin
| !LCD1602 I2c display (0.1.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_LCD1602

(Please skip the information about overheating...)

Guess i have some wiring problems, too... Cause nothing shows up on the display. But it's connected to pin 3 and 5, and i thought it was the correct ones.. (Including two more, one to 5V and one to groud, ofc..)

eyteam01 commented 5 years ago

with the latest update the lcd sreen leaves blank and in the plugin manager shows 2 symbols (rotating arrows and +) thad means to activate i need to restart octoprint and the + says thad there is an install in the next time. and sometimes the plugin was disabled in the plugin manager

eyteam01 commented 5 years ago

yes 3 and 5 is ok. Power 5V GND. And in the moment by bootig up after connecting power to the raspi will clear the display

eyteam01 commented 5 years ago

2019-02-08 14:33:16,153 - octoprint.plugin.core - ERROR - There was an error loading plugin LCD1602 Traceback (most recent call last): File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 980, in load_plugin plugin.load() File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_LCD1602/init.py", line 148, in plugin_load plugin_implementation = LCD1602Plugin() File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_LCD1602/init.py", line 21, in init self.mylcd = CharLCD(i2c_expander='PCF8574', address=0x27, cols=16, rows=2, backlight_enabled=True, charmap='A00') File "/home/pi/oprint/local/lib/python2.7/site-packages/RPLCD/i2c.py", line 168, in init auto_linebreaks=auto_linebreaks) File "/home/pi/oprint/local/lib/python2.7/site-packages/RPLCD/lcd.py", line 99, in init self.command(0x03) File "/home/pi/oprint/local/lib/python2.7/site-packages/RPLCD/lcd.py", line 377, in command self._send_instruction(value) File "/home/pi/oprint/local/lib/python2.7/site-packages/RPLCD/i2c.py", line 241, in _send_instruction (value & 0xF0)) | self._backlight) File "/home/pi/oprint/local/lib/python2.7/site-packages/smbus2/smbus2.py", line 350, in write_byte ioctl(self.fd, I2C_SMBUS, msg) IOError: [Errno 121] Remote I/O error

eyteam01 commented 5 years ago

Ok, the new fix (a view minutes ago) will work and i had to restart the raspberry so it changes from off to on in the pluginmannager

n3bojs4 commented 5 years ago

nice ! thanks for your patience :) I tried to build a good pipeline for testing the code, but it's really hard because it uses some hardware :'( Let met release a 0.1.1 version to make the things clear (in the octoprint interface, see the 0.1.1 release should be refreshing)