Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons not showing on Raspberry Pi 5 #255

Closed
ionicaalexandru opened this issue Feb 4, 2024 · 13 comments · Fixed by #280
Closed

Buttons not showing on Raspberry Pi 5 #255

ionicaalexandru opened this issue Feb 4, 2024 · 13 comments · Fixed by #280
Labels
question Further information is requested

Comments

@ionicaalexandru
Copy link

Hi,

did someone encounter this issue: octorelay buttons not showing in the navbar?
Im using octoprint 1.9.3 Python 3.11.2 on a Raspberry Pi 5 8Gb Board with default plugins installed

TNX

@ckiefer
Copy link

ckiefer commented Feb 6, 2024

Indeed. I have the same setup and I don't see the buttons either.

@BroncoNS
Copy link

Exact same for me as well.

@RobinTail
Copy link
Collaborator

@ionicaalexandru , @ckiefer , @BroncoNS ,

README.md
After installing the plugin you need to configure it in order to see the control buttons in the navigation bar.

Did you configure the plugin and set some of the buttons "Active"?

image

@RobinTail RobinTail added the question Further information is requested label Feb 12, 2024
@ionicaalexandru
Copy link
Author

@ionicaalexandru , @ckiefer , @BroncoNS ,

README.md
After installing the plugin you need to configure it in order to see the control buttons in the navigation bar.

Did you configure the plugin and set some of the buttons "Active"?

image

yes, there are active buttons for light and fan

@RobinTail RobinTail added invalid This doesn't seem right and removed question Further information is requested labels Feb 12, 2024
@ckiefer
Copy link

ckiefer commented Feb 12, 2024

Yes, active buttons are defined for air filtration.

@RobinTail RobinTail reopened this Feb 12, 2024
@RobinTail
Copy link
Collaborator

  1. Please check if there are any errors in the browser console?
  2. Please enabled debug level of the plugin logging in the Logging section of the OctoPrint, then reload the UI and download the "octoprint.log". In the end of it should be the information prefixed with "The UI feed", having the actual buttons sent to the UI. What do you see there?

@RobinTail RobinTail removed the invalid This doesn't seem right label Feb 12, 2024
@ckiefer
Copy link

ckiefer commented Feb 16, 2024

@ionicaalexandru , @BroncoNS , @hcooper , @patrickcollins12 , @RobinTail

This is the information you were looking for:

The UI feed: {'r1': {'relay_pin': 18, 'inverted_output': True, 'relay_state': False, 'label_text': 'Air Filtration', 'active': False, 'icon_html': '<div style="filter: grayscale(90%)">&#128161;</div>', 'confirm_off': False, 'upcoming': None}, 'r2': {'relay_pin': 23, 'inverted_output': True, 'relay_state': False, 'label_text': 'Relay_23', 'active': False, 'icon_html': '<img width="24" height="24" src="/plugin/octorelay/static/img/3d-printer.svg" style="filter: opacity(20%)">', 'confirm_off': False, 'upcoming': None}, 'r3': {'relay_pin': 18, 'inverted_output': True, 'relay_state': False, 'label_text': 'Air Filtration', 'active': False, 'icon_html': '<img width="24" height="24" src="/plugin/octorelay/static/img/fan.svg" style="filter: opacity(20%)">', 'confirm_off': False, 'upcoming': None}, 'r4': {'relay_pin': 23, 'inverted_output': True, 'relay_state': False, 'label_text': 'Webcam', 'active': False, 'icon_html': '<img width="24" height="24" src="/plugin/octorelay/static/img/webcam.svg" style="filter: opacity(20%)">', 'confirm_off': False, 'upcoming': None}, 'r5': {'relay_pin': 24, 'inverted_output': True, 'relay_state': False, 'label_text': 'R5', 'active': False, 'icon_html': 'OFF', 'confirm_off': False, 'upcoming': None}, 'r6': {'relay_pin': 25, 'inverted_output': True, 'relay_state': False, 'label_text': 'R6', 'active': False, 'icon_html': '<div style="filter: grayscale(90%)">&#128161;</div>', 'confirm_off': False, 'upcoming': None}, 'r7': {'relay_pin': 8, 'inverted_output': True, 'relay_state': False, 'label_text': 'R7', 'active': False, 'icon_html': '<div style="filter: grayscale(90%)">&#128161;</div>', 'confirm_off': False, 'upcoming': None}, 'r8': {'relay_pin': 7, 'inverted_output': True, 'relay_state': False, 'label_text': 'R8', 'active': False, 'icon_html': '<div style="filter: grayscale(90%)">&#128161;</div>', 'confirm_off': False, 'upcoming': None}}

2024-02-16 10:56:55,677 - octoprint.plugin - DEBUG - Calling on_event on achievements
2024-02-16 10:56:55,677 - octoprint.plugin - DEBUG - Calling on_event on action_command_notification
2024-02-16 10:56:55,678 - octoprint.plugin - DEBUG - Calling on_event on action_command_prompt
2024-02-16 10:56:55,678 - octoprint.plugin - DEBUG - Calling on_event on announcements
2024-02-16 10:56:55,678 - octoprint.plugin - DEBUG - Calling on_event on file_check
2024-02-16 10:56:55,678 - octoprint.plugin - DEBUG - Calling on_event on firmware_check
2024-02-16 10:56:55,678 - octoprint.plugin - DEBUG - Calling on_event on pluginmanager
2024-02-16 10:56:55,678 - octoprint.plugin - DEBUG - Calling on_event on softwareupdate
2024-02-16 10:56:55,678 - octoprint.plugin - DEBUG - Calling on_event on tracking
2024-02-16 10:56:55,678 - octoprint.plugin - DEBUG - Calling on_event on DisplayLayerProgress
2024-02-16 10:56:55,680 - octoprint.plugin - DEBUG - Calling on_event on arc_welder
2024-02-16 10:56:55,681 - octoprint.plugin - DEBUG - Calling on_event on bedlevelvisualizer
2024-02-16 10:56:55,681 - octoprint.plugin - DEBUG - Calling on_event on octoeverywhere
2024-02-16 10:56:55,681 - octoprint.plugin - DEBUG - Calling on_event on octolapse
2024-02-16 10:56:55,682 - octoprint.plugin - DEBUG - Calling on_event on octorelay
2024-02-16 10:56:55,682 - octoprint.plugins.octorelay - DEBUG - Received the SettingsUpdated event having payload: {'config_hash': 'ea196fbb1b884292bc521e2876c1ff26', 'effective_hash': 'c9fba6bb3c32011b4fd6d95fb703a78f'}
2024-02-16 10:56:55,683 - octoprint.plugin - DEBUG - Calling on_event on tplinksmartplug
2024-02-16 10:56:55,809 - octoprint.plugin - DEBUG - Calling get_webcam_configurations on classicwebcam
2024-02-16 10:56:55,813 - octoprint.plugin - DEBUG - Calling get_webcam_configurations on classicwebcam
2024-02-16 10:56:55,816 - octoprint.plugin - DEBUG - Calling get_webcam_configurations on classicwebcam
2024-02-16 10:56:57,542 - octoprint.plugin - DEBUG - Calling on_event on achievements
2024-02-16 10:56:57,542 - octoprint.plugin - DEBUG - Calling on_event on action_command_notification
2024-02-16 10:56:57,542 - octoprint.plugin - DEBUG - Calling on_event on action_command_prompt
2024-02-16 10:56:57,542 - octoprint.plugin - DEBUG - Calling on_event on announcements
2024-02-16 10:56:57,542 - octoprint.plugin - DEBUG - Calling on_event on file_check
2024-02-16 10:56:57,542 - octoprint.plugin - DEBUG - Calling on_event on firmware_check
2024-02-16 10:56:57,542 - octoprint.plugin - DEBUG - Calling on_event on pluginmanager
2024-02-16 10:56:57,542 - octoprint.plugin - DEBUG - Calling on_event on softwareupdate
2024-02-16 10:56:57,542 - octoprint.plugin - DEBUG - Calling on_event on tracking
2024-02-16 10:56:57,543 - octoprint.plugin - DEBUG - Calling on_event on DisplayLayerProgress
2024-02-16 10:56:57,543 - octoprint.plugin - DEBUG - Calling on_event on arc_welder
2024-02-16 10:56:57,543 - octoprint.plugin - DEBUG - Calling on_event on bedlevelvisualizer
2024-02-16 10:56:57,543 - octoprint.plugin - DEBUG - Calling on_event on octoeverywhere
2024-02-16 10:56:57,543 - octoprint.plugin - DEBUG - Calling on_event on octolapse
2024-02-16 10:56:57,543 - octoprint.plugin - DEBUG - Calling on_event on octorelay
2024-02-16 10:56:57,543 - octoprint.plugins.octorelay - DEBUG - Received the DisplayLayerProgress_timerTrigger event having payload: {'updateReason': 'timerTrigger', 'totalLayer': '-', 'currentLayer': '-', 'lastLayerDuration': '-', 'lastLayerDurationInSeconds': '-', 'averageLayerDuration': '-', 'averageLayerDurationInSeconds': '-', 'currentHeight': '-', 'currentHeightFormatted': '-', 'totalHeight': '-', 'totalHeightFormatted': '-', 'feedrate': '-', 'feedrateG0': '-', 'feedrateG1': '-', 'fanspeed': '-', 'progress': '0', 'm73progress': '', 'printTimeLeft': '-', 'printTimeLeftInSeconds': '-', 'printerState': 'operational', 'estimatedEndTime': '-', 'estimatedChangedFilamentTime': '-', 'changeFilamentTimeLeft': '-', 'changeFilamentTimeLeftInSeconds': 0, 'changeFilamentCount': 0, 'currentFilename': '-'}
2024-02-16 10:56:57,543 - octoprint.plugin - DEBUG - Calling on_event on tplinksmartplug
2024-02-16 10:57:11,529 - octoprint.plugins.discovery - DEBUG - Sending NOTIFY alive via 192.168.2.143
2024-02-16 10:57:30,828 - octoprint.plugin - DEBUG - Calling on_event on achievements
2024-02-16 10:57:30,829 - octoprint.plugin - DEBUG - Calling on_event on action_command_notification
2024-02-16 10:57:30,829 - octoprint.plugin - DEBUG - Calling on_event on action_command_prompt
2024-02-16 10:57:30,829 - octoprint.plugin - DEBUG - Calling on_event on announcements
2024-02-16 10:57:30,829 - octoprint.plugin - DEBUG - Calling on_event on file_check
2024-02-16 10:57:30,829 - octoprint.plugin - DEBUG - Calling on_event on firmware_check
2024-02-16 10:57:30,829 - octoprint.plugin - DEBUG - Calling on_event on pluginmanager
2024-02-16 10:57:30,829 - octoprint.plugin - DEBUG - Calling on_event on softwareupdate
2024-02-16 10:57:30,829 - octoprint.plugin - DEBUG - Calling on_event on tracking
2024-02-16 10:57:30,829 - octoprint.plugin - DEBUG - Calling on_event on DisplayLayerProgress
2024-02-16 10:57:30,831 - octoprint.plugin - DEBUG - Calling on_event on arc_welder
2024-02-16 10:57:30,832 - octoprint.plugin - DEBUG - Calling on_event on bedlevelvisualizer
2024-02-16 10:57:30,832 - octoprint.plugin - DEBUG - Calling on_event on octoeverywhere
2024-02-16 10:57:30,833 - octoprint.plugin - DEBUG - Calling on_event on octolapse
2024-02-16 10:57:30,833 - octoprint.plugin - DEBUG - Calling on_event on octorelay
2024-02-16 10:57:30,833 - octoprint.plugins.octorelay - DEBUG - Received the SettingsUpdated event having payload: {'config_hash': '4126297e350ce3a24cdd1b0fe61630c7', 'effective_hash': '16045dee384244cdf48251d42bc312f9'}
2024-02-16 10:57:30,833 - octoprint.plugin - DEBUG - Calling on_event on tplinksmartplug
2024-02-16 10:57:30,934 - octoprint.plugin - DEBUG - Calling get_webcam_configurations on classicwebcam
2024-02-16 10:57:30,939 - octoprint.plugin - DEBUG - Calling get_webcam_configurations on classicwebcam
2024-02-16 10:57:30,942 - octoprint.plugin - DEBUG - Calling get_webcam_configurations on classicwebcam
2024-02-16 10:57:33,551 - octoprint.plugin - DEBUG - Calling on_event on achievements
2024-02-16 10:57:33,551 - octoprint.plugin - DEBUG - Calling on_event on action_command_notification
2024-02-16 10:57:33,551 - octoprint.plugin - DEBUG - Calling on_event on action_command_prompt
2024-02-16 10:57:33,551 - octoprint.plugin - DEBUG - Calling on_event on announcements
2024-02-16 10:57:33,551 - octoprint.plugin - DEBUG - Calling on_event on file_check
2024-02-16 10:57:33,551 - octoprint.plugin - DEBUG - Calling on_event on firmware_check
2024-02-16 10:57:33,551 - octoprint.plugin - DEBUG - Calling on_event on pluginmanager
2024-02-16 10:57:33,551 - octoprint.plugin - DEBUG - Calling on_event on softwareupdate
2024-02-16 10:57:33,551 - octoprint.plugin - DEBUG - Calling on_event on tracking
2024-02-16 10:57:33,552 - octoprint.plugin - DEBUG - Calling on_event on DisplayLayerProgress
2024-02-16 10:57:33,552 - octoprint.plugin - DEBUG - Calling on_event on arc_welder
2024-02-16 10:57:33,552 - octoprint.plugin - DEBUG - Calling on_event on bedlevelvisualizer
2024-02-16 10:57:33,552 - octoprint.plugin - DEBUG - Calling on_event on octoeverywhere
2024-02-16 10:57:33,552 - octoprint.plugin - DEBUG - Calling on_event on octolapse
2024-02-16 10:57:33,552 - octoprint.plugin - DEBUG - Calling on_event on octorelay
2024-02-16 10:57:33,552 - octoprint.plugins.octorelay - DEBUG - Received the DisplayLayerProgress_timerTrigger event having payload: {'updateReason': 'timerTrigger', 'totalLayer': '-', 'currentLayer': '-', 'lastLayerDuration': '-', 'lastLayerDurationInSeconds': '-', 'averageLayerDuration': '-', 'averageLayerDurationInSeconds': '-', 'currentHeight': '-', 'currentHeightFormatted': '-', 'totalHeight': '-', 'totalHeightFormatted': '-', 'feedrate': '-', 'feedrateG0': '-', 'feedrateG1': '-', 'fanspeed': '-', 'progress': '0', 'm73progress': '', 'printTimeLeft': '-', 'printTimeLeftInSeconds': '-', 'printerState': 'operational', 'estimatedEndTime': '-', 'estimatedChangedFilamentTime': '-', 'changeFilamentTimeLeft': '-', 'changeFilamentTimeLeftInSeconds': 0, 'changeFilamentCount': 0, 'currentFilename': '-'}
2024-02-16 10:57:33,552 - octoprint.plugin - DEBUG - Calling on_event on tplinksmartplug
2024-02-16 10:57:42,298 - octoprint.plugins.octorelay - INFO - Saving the settings: {'r3': {'active': True}}
2024-02-16 10:57:42,306 - octoprint.plugins.octorelay - DEBUG - Updating the UI
2024-02-16 10:57:42,313 - octoprint.plugins.octorelay - DEBUG - Finding the upcoming tasks
2024-02-16 10:57:42,313 - octoprint.server.api.settings - ERROR - Could not save settings for plugin OctoRelay (4.0.1)
Traceback (most recent call last):
File "/home/pi/OctoPrint/lib/python3.11/site-packages/octoprint/server/api/settings.py", line 1217, in _saveSettings
plugin.on_settings_save(data["plugins"][plugin_id])
File "/home/pi/OctoPrint/lib/python3.11/site-packages/octoprint/util/init.py", line 1686, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/pi/OctoPrint/lib/python3.11/site-packages/octoprint_octorelay/init.py", line 56, in on_settings_save
self.update_ui()
File "/home/pi/OctoPrint/lib/python3.11/site-packages/octoprint_octorelay/init.py", line 320, in update_ui
relay_state = relay.is_closed() if active else False
^^^^^^^^^^^^^^^^^
File "/home/pi/OctoPrint/lib/python3.11/site-packages/octoprint_octorelay/driver.py", line 30, in is_closed
GPIO.setup(self.pin, GPIO.OUT)
RuntimeError: Cannot determine SOC peripheral base address

I am running on

@RobinTail
Copy link
Collaborator

RobinTail commented Feb 18, 2024

Thank you, @ckiefer

First thing I noticed is that the first feed reports all relays inactive, which makes their control buttons invisible.

image

Then I see you're setting the third relay active

2024-02-16 10:57:42,298 - octoprint.plugins.octorelay - INFO - Saving the settings: {'r3': {'active': True}}

But it fails due to an error, which is caused by GPIO driver

File "/home/pi/OctoPrint/lib/python3.11/site-packages/octoprint_octorelay/driver.py", line 30, in is_closed
GPIO.setup(self.pin, GPIO.OUT)
RuntimeError: Cannot determine SOC peripheral base address

Which is unusual and may be an exclusive issue of Raspberry Pi 5.
Here I found some information on it:

https://www.reddit.com/r/RASPBERRY_PI_PROJECTS/comments/188yynn/im_having_soc_problems_in_rpigpio_library_can_any/

What is also worth to notice:

I am running on
https://github.com/OctoPrint/OctoPrint/releases/tag/1.10.0rc2

that OctoRelay is not yet completely tested on on OctoPrint 1.10.x.

However, @ionicaalexandru is running on OctoPrint 1.9.3, so it's probably not the cause.

Are you, @ckiefer , running on Raspberry 5?

@RobinTail RobinTail added the question Further information is requested label Feb 18, 2024
@RobinTail
Copy link
Collaborator

RobinTail commented Feb 18, 2024

Here is the solution that reported to solve the issue:

https://www.reddit.com/r/RASPBERRY_PI_PROJECTS/comments/188yynn/comment/kbqbc2w/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

it looks like it was a 64-bit bug with addressing that did not have a case in the Python Rpi-gpio library for that OS version on Pi5. Using the 32-bit version of Rasberry Pi OS was able to resolve the error and make it work as expected.

@ckiefer , @ionicaalexandru , @BroncoNS

Therefore, consider installing 32-bit version of Raspberry OS:

https://www.raspberrypi.com/software/operating-systems/

Note that Raspberry Pi 5 is NOT yet supported by OctoPi (OS)

image

@RobinTail RobinTail changed the title Buttons not showing in the navbar Buttons not showing on Raspberry Pi 5 Feb 18, 2024
@RobinTail
Copy link
Collaborator

Probable related issue: https://sourceforge.net/p/raspberry-gpio-python/tickets/214/

@ionicaalexandru
Copy link
Author

For me 32 bit os did not resolve the issue

@aaronmussig
Copy link

Hi, I forked this and used pinctrl to control the GPIO pins. Since it's not backwards compatible I haven't made a PR, but if you want to use it, you can use this release: https://github.com/aaronmussig/OctoRelay/releases/download/v1.0.13/release.zip

@RobinTail
Copy link
Collaborator

@ionicaalexandru , @ckiefer , @BroncoNS and @aaronmussig ,

I'm glad to announce that thanks to the contribution of @ch3p4ll3 I managed to release version 5.0.0 that supports Raspberry Pi 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants