Code Monkey home page Code Monkey logo

physicalbutton's Introduction

🎛 Physical Button 🎛

The PhysicalButton plugin (hence the name) lets you add physical buttons to your Raspberry Pi. The buttons are then able to send GCODE and actions to your printer.


Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/LuxuSam/PhysicalButton/archive/master.zip

The buttons have to be plugged in to a ground pin and the desired GPIO pin that you want to use. The GPIO must be chosen in BCM mode (see https://pinout.xyz/). If you have other plugins installed that use GPIOs, make sure those plugins are also set to BCM mode.


🔧 Configuration - Overview 🔧

To add a new button you have to click on the ➕. This adds a new button to the end of your list.

From there you should enter a button name, the used GPIO and the mode (NO or NC) of the button. In addition, you have to specify for how long a button has to be held in order to trigger.

The last step is to add activities to your button which are executed in order of the activities list. You can edit, move or remove activities in the right pane.

You can disable/enable buttons by pressing / .

You can back up your configuration by pressing ( Config) and import a configuration by pressing ( Config).

🔧 Configuration - Detail 🔧

  • Button Name
    • This is where you put the name of your button to differentiate it in the list of buttons.
  • GPIO
    • This is the GPIO you connect your button to. The other cable has to be connected to a ground pin (Buttons are configured to use internal pulled-up resistors).
  • Mode
    • Depending on your button setup or wiring you have to choose between the following two modes:
      • Normally Open (NO)
        • Use this mode if your button is usually not pressed (open).
      • Normally Closed (NC)
        • Use this mode if your button is usually pressed (closed).
  • Hold Time
    • This is where you set the hold time for your button, meaning how long the button has to be held until the reaction is triggered.
  • Enabled while printing
    • When this option is enabled, you can always use the button. If it's disabled, the button won't react to input while the printer is printing.
  • Choose activities for your button
    • Action:
      • You can choose between different actions:
        • connect:
          • Connect to the printer.
        • disconnect
          • Disconnect from the printer.
        • home
          • Homes all axes of the printer.
        • pause
          • Pause the current print.
        • resume
          • Resume the current print.
        • start
          • Start printing the currently selected file.
        • start latest
          • Start printing the latest uploaded file.
        • cancel
          • Cancel the current print.
        • toggle pause-resume
          • Toggle between pausing and resuming a print.
        • toggle start-cancel
          • Toggle between starting the currently selected file or cancelling a print.
        • toggle start latest-cancel
          • Toggle between starting the latest uploaded file and cancelling a print.
        • unselect file
          • Unselect the currently selected file.
    • File:
      • You can specify the path to a file which will be selected.
      • To start the execution of a file, add 'start action' behind the 'file activity'.
      • There are three ways to specify a file:
        • Absolute path to a file:
          /home/pi/Some/Folder/Test.gcode
        • Relative path to a file inside the uploads folder:
          Some/Folder/Test.gcode
        • Path to a file on the SD-card of the printer:
          @sd:Some/Folder/Test.gcode
    • GCODE:
      • You can input any GCODE commands.
    • System:
      • You can input any system command for your Octoprint host.
        Note that system commands will be run under the same user that owns your OctoPrint service (usually 'pi' for OctoPi) with the same rights and permissions, so you may need to use sudo facilities for certain tasks. Please refer to your OctoPrint host's documentation for details.
    • Output:
      • Generate output on the given GPIO pin for a given amount of time.
      • By setting the time to 0, the output will continue until you toggle it again.
      • The async option lets the output run while also continuing with the next activities.
      • The initial value sets the level of the GPIO pin for startup and settings save.
    • Plugin:
      • This activity works in a similar way as the action activity.
      • This activity will only appear if other plugins provide actions for this plugin.
    • These activities will be executed in order of your list. You can also rearrange them by inserting them at your desired position.

Note:

You can only configure one button per GPIO. If you want more activities to be activated upon button press (/release), add more activities to the button.

Custom actions from your plugin:

If you are a developer and want to include functionality of your plugin into PhysicalButton, you can proceed as follows:

  • To get the function to register actions:
helpers = self._plugin_manager.get_helpers("physicalbutton", "register_button_actions")
if helpers and "register_button_actions" in helpers:
    self.register_button_actions = helpers["register_button_actions"]
  • To register actions use self.register_button_actions(self, some_action_callback_dict) with:
    • some_action_callback_dict being a dictionary with structure {some_action : some_callback, ...}.
      • some_action being a string with the name that should be displayed.
      • some_callback being a function without parameters that is executed on a button press.

Screenshots

Output activity

Action activity

GCODE activity

System activity

File activity

Plugin activity

Delete button

Upload backup for buttons


Get Help / Feature request

If you encounter problems using the plugin or if you have an idea for a new feature please use the issue tracker and if applicable add the corresponding label.


⚠️ Use at your own risk ⚠️

I am not accountable for any damages made to your printer/raspberry pi when using this plugin (e.g. wrong wiring of buttons, GCODE or system commands that you send with the buttons to your printer, ...).

When setting the plugin up corresponding to my instructions, nothing should happen.


❤️ Support me ❤️

If you enjoy my plugin and want to support me and the development, you can do so by sending me a donation on

paypal  ko-fi

physicalbutton's People

Contributors

elliott-turner avatar luxusam avatar skobkars avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

physicalbutton's Issues

Doesn't work on new installation

Hi, I can't get the plugin to work on a new OctoPrint.

I installed new instance of Octoprint using Raspberry Pi Imager (Image OctoPi 1.0.0 with OctoPrint 1.9.2). What ever I do, the Physical Button is just not working. Even though other GPIO plugins do work (i.e. Octolight, PSU Control including GPIO sensing)

But when I use the old SD with the original installation (OctoPi 0.18.0 with OctoPrint 1.9.2) everything works fine including the Physical Button!

I doublechecked everything. All the settings are the same, the wiring is the same, even raspi-gpio registers the signals correctly in both cases. I'm totally desperate. Please, help me figure out what am I missing.

Ideas: Pi Shutdown and Double Click Input

It would be really cool if one of the button actions could be to safe shut down the Pi. I have tried a few other plugins, but they do not have the configurability I have seen here. It would also be cool if you could implement a double click input, so that if a button gets bumped, it won't necessarily trigger a function, particularly the Pi shut down.

Button action on Raspi startup

Plugin Version
0.5.0

Question
I use GPIO17 to send an action. The button is connected to ground and it works as intended.
Problem is on raspy startup. I am not an Raspberry expert, but on on start the GPIO17 pin is low and that seems to activate the action once. How can I prevent this behaviour? Do I have to use an pul up resistor or a different pin to get rid of this?

My pins 1-8 are already in use, so I cannot use pins that are HIGH on startup.

Thank you!

Cannot Install - "Install Unknown"

Plugin Version
0.6.1

Describe the bug
After install and prior to restart - this message appears "Install Unknown:"

Python 3.7.3
OctoPi 0.17.0

The plugin does not show up within OctoPrint

button to extrud

Hi !

Can we create a button, which, as long as we press on it, the extruder motor turns?

and if so what is the procedure?

Thank you for your work for us :)

[FEATURE] Run full program

Hi.
Thank you for your work on this plugin. I was wondering if it would be possible, to load an entire program? I'm using this on a sandtable, and I want it to work offline. I am able to use the current plugin to home the machine. I've also managed to cheat a little, by copy and pasting the g code directly into the g code command. However, I was unable to paste a large g code file. I was successful, up to about 1,600 lines of code. The file I would like to run is around 12,000 lines of code. Any help on this, would be greatly appreciated.

Thanks, Mike Pfeiffer

[QUESTION] Run a system command

Plugin Version
0.5.0
Question
I can use "kasa --host 192.168.178.27 on" as a pi user to switch my Kara socket on. Using this as a system command in your plugin does not seem to work. Am doing it right? "sudo" did not help either.
Can I use any command that I use in terminal?

pause/resume action

instead of having separate buttons for pause and resume it would be nice to also have a single button that toggles the printer state.

Not Working After Install

Plugin Version
0.6.2
OctoPrint 1.10.0
Python 3.9.2
OctoPi* 1.0.0 (build 2024.04.25.094544)

Question

This is for a sand table I am building: https://www.diymachines.co.uk/kinetic-sand-art-coffee-table-self-drawing

Fresh install of plugin, seems to be installed correctly but I can't seem to get it to work. I have a known good button connected to GPIO24 and ground. Just trying to test it by having it home the machine, but after making sure the machine is connected and homing works via OctoPrint, when I push the button nothing happens. I have also tried it on GPIO23.

I tried configuring the button two ways to see if that made a difference, but no luck.

Is there some setting I could have missed somewhere?

PXL_20240514_132609322
Versions
Button2
Button1

[QUESTION] Toggle light on/off

I am about to add some physical buttons and was wondering if it is possible to use one button only to toggle the lights. My initial thougt was, to use a short press and a long press, but I just read another comment, explaining that it is not possible.

Is there a simple solution or is it not possible at all?

The lights I am using is a Neopixel attached to the spider board, it can be controlled by gcode commands executed by klipper

Some GPIO pins not available: Why?

Hello Sam,

Thank you for the plugin! When seeing it announced, I immediately designed and printed a button housing. So much fun :)

I'm a bit surprised that not all GPIO pins are available. For example, I don't see 14, 15, and 19. Code search didn't reveal a list, so it's likely not hardcoded? Do you have any idea why above pins are missing from the list? My current setup happens to use pin 19 and it works from a Python script.

#!/usr/bin/env python
from gpiozero import Button
from time import sleep

button_pins = (
    2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
    14, 15,  # not in PhysicalButton list
    16, 17, 18,
    19,  # not in PhysicalButton list
    20, 21, 22, 23, 24, 25, 26, 27,
)

buttons = [(pin, Button(pin)) for pin in button_pins]

while True:
    pressed = []
    for pin, button in buttons:
        if button.is_pressed:
            pressed.append(pin)
    if pressed:
        print(pressed)
    sleep(.1)

Thank you!
Thomas

[QUESTION] system update broke the plugin?

I just updated the base system and now the plugin stopped working

|  Physical Button (0.5.0) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_physicalbutton
|  Pi Support Plugin (2022.3.1) (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_pi_support
|  Plugin Manager (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/pluginmanager
|  PrintTimeGenius Plugin (2.2.8) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_PrintTimeGenius
|  Software Update (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/softwareupdate
|  Tab Order (0.5.12) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_taborder
|  Title Status (0.0.5) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_title_status
|  Virtual Printer (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/virtual_printer
Prefix legend: ! = disabled, # = blacklisted, * = incompatible
2022-03-15 17:27:57,089 - octoprint.environment - INFO - Detected environment is Python 3.7.3 under Linux (linux). Details:
|  hardware:
|    cores: 4
|    freq: 900.0
|    ram: 914014208
|  os:
|    bits: 32
|    id: linux
|    platform: linux
|  plugins:
|    pi_support:
|      model: Raspberry Pi 2 Model B Rev 1.1
|      octopi_version: 0.18.0
|      throttle_state: '0x0'
|  python:
|    pip: 20.3.3
|    version: 3.7.3
|    virtualenv: /home/pi/oprint


2022-03-15 17:28:20,921 - py.warnings - WARNING - /home/pi/oprint/lib/python3.7/site-packages/gpiozero/devices.py:290: PinFactoryFallback: Falling back from rpigpio: No module named 'RPi'
  'Falling back from %s: %s' % (name, str(e))))

2022-03-15 17:28:20,996 - py.warnings - WARNING - /home/pi/oprint/lib/python3.7/site-packages/gpiozero/devices.py:290: PinFactoryFallback: Falling back from lgpio: No module named 'lgpio'
  'Falling back from %s: %s' % (name, str(e))))

2022-03-15 17:28:21,050 - py.warnings - WARNING - /home/pi/oprint/lib/python3.7/site-packages/gpiozero/devices.py:290: PinFactoryFallback: Falling back from rpio: No module named 'RPIO'
  'Falling back from %s: %s' % (name, str(e))))

2022-03-15 17:28:21,100 - py.warnings - WARNING - /home/pi/oprint/lib/python3.7/site-packages/gpiozero/devices.py:290: PinFactoryFallback: Falling back from pigpio: No module named 'pigpio'
  'Falling back from %s: %s' % (name, str(e))))

2022-03-15 17:28:21,430 - py.warnings - WARNING - /home/pi/oprint/lib/python3.7/site-packages/gpiozero/devices.py:285: NativePinFactoryFallback: Falling back to the experimental pin factory NativeFactory because no other pin factory could be loaded. For best results, install RPi.GPIO or pigpio. See https://gpiozero.readthedocs.io/en/stable/api_pins.html for more information.
  warnings.warn(NativePinFactoryFallback(native_fallback_message))

2022-03-15 17:28:22,343 - octoprint.plugins.physicalbutton - INFO - Buttons have been set up!

It looks like a pin factory is missing - not sure which one to install and where.
I tried to just install apt install python3-gpiozero - but I am still getting those errors.

Got a pointer?

Any idea how a apt-get update could remove a former working gpio pin factory?
I am a little puzzled.

[QUESTION] How to setup keyboard hot keys

Rookie coder here, I know enough to fumble through the basics, so bare with me as I try to get my idea across.

I have multiple Raspberry Pis setup with OctoPrint and OctoDash with their own printers, but only one touch screen that I would like to use to control them for convenience and cost efficiency. What I would like to do is setup buttons programmed to type one the IP address for each of the printers when pressed from a keyboard input to the section asking for the IP address in OctoDash. That way I could switch between printers being controlled without needing to have a key board/pad connected to the touch screen Pi. I know enough to do system command such as "sudo -reboot", or something else similar. But I am not sure house to run.

So, it might just be a lack of coding knowledge, but how could I use this plug-in to type out my specified IP addresses as hot keys into OctoDash?

Thanks for any help in advance,

FlufMastaFlex

[FEATURE] Add more actions

Maybe it help some people, when you add some more actions by default. Somthing like Preheat Hotend; Preheat Bed; Preheat both; simple switching the GIO-pin, when the user has there a relais for a lamp or somthing like that connected - such essential things. So user be able to make everything with your plugin and need no other plugin for other functions.

[FEATURE] GCODE Toggle button

Is your feature request related to a problem? Please describe.
Possibility to use a GCODE toggle button, for example to switch the bed temperature between 0°C, 60°C and 70°C. The following scheme:

0 button press 60 button press 70 button press 0 button press 60 button press 70 ...

Describe the solution you'd like
a simple one :)

Additional context
none

[FEATURE] Printing the latest uploaded file

First of all, I want to thank you for your work. I've tried all similar plugins and this one is my favorite!

But I am missing one function, maybe you could implement it.

I want that when the start button is pressed, the last loaded gcode is selected first, and then printing starts. Can you add an activity that finds and selects the last file by date?

[BUG] Plugin fails to install Octoprint 1.9.2

Plugin Version
PhysicalButton 0.6.1

Describe the bug
I installed Physical Button on octoprint V1.9.2 using the plugin manager > I can see 'installation success' > restart octoprint
But the plugin doesn't get installed in octoprint. Its not in the list of installed plugins in octoprint.

To Reproduce
Install plugin in octoprint v1.9.2

Expected behavior
Expected to see plugin landing page

Screenshots / Logs
No plugin found

Additional context
First time user. I have 5 or 6 other plugins installed.

[FEATURE] Temporarily disable a button?

Fighting my EFI interference issues, I wanted to temporarily disable some buttons to prevent problems due to false triggers during printing. I ended up to completely delete the buttons, as there is no way to disable and enable a button via a checkbox?
Some buttons have more actions and multiple lines of gcode, which I had to save in a txt file for future use.
(Since there is also no Backup feature to save and restore your settings... that could be another nice feature though ;-))

So, an enable/disable checkbox for every button would be a nice addition I think.

[FEATURE] Add button on navbar

Hello i would like to ask if its possibile to add a button on navbar that are syncronized with real button status
This idea come when you want able to power on one Relay with Real Button or Via Octoprint Web
It would be nice to have the possibility to access the button through the Octoprint interface for example i pressed Real button "z" the Gpio go 1 and have on Octoprint Interface the button "z" also changed status and able to change status of the button to 0

[BUG] OctoPrint enters Safe Mode after enabling Physical Button plugin (only for the first time)

Plugin Version
0.6.1

Describe the bug
After enabling the plugin, my OctoPrint instance restarts and enters Safe Mode. However, after the next restart, everything goes back to normal and the plugin works correctly.

Expected behavior
After enabling the Physical Button plugin and restarting OctoPrint, the instance should start normally and allow the user to control the printer using physical buttons connected to the Raspberry Pi without needing an additional restart.

Screenshots / Logs
There are no apparent issues or errors in my octoprint.log.

Additional context
I'm using OctoPrint 1.8.7 on a Raspberry Pi 4 Model B Rev 1.5, and my printer is a Prusa Mini+. The detected firmware is Prusa-Firmware-Buddy 4.4.1-RC2+4193 (Github).

[FEATURE] Multi function button

First of all...great work, very convenient and easy to implement. Thank you.
I have a single (NO) button installed and set to shut down system when pressed and held for 2 sec. Is there any way to start up the Pi again with the same button? and secondly will it be possible to set the button to 500sm, 1000ms, and 2000ms to perform different tasks on hold time? for instance 500ms = Toggle pause, 1000ms = Cancel Print, and 2000ms = Shutdown system.

Cheers!!

clarify the user commands are run as

While user pi can successfully run sudo halt from the terminal,
but this fails when called as system action from the plugin.

What's the best course of action to debug this?

[FEATURE] Actions from other plugins

I use your awesome plugin to switch my PSU on or off via button.
The whole thing is controlled by OctoPrint-PSUControl.

Currently I have the fatal problem that the PSU can be switched off by a button while printing. (System: gpio write X 0)
Since for this scenario a mechanism is already integrated in the PSUControl, I will execute in the future in your plugin per system the command ~/oprint/bin/octoprint plugins psucontrol:toggle.
However, it is unpleasant to have to take the CLI detour, which makes the process unnecessarily complex and time-consuming.

Do you have the possibility to make all commands of installed plugins available under Actions as well? (~/oprint/bin/octoprint plugins)
The goal should be a more user-friendly way to use all the possibilities of Octoprint and his plugins.

Plugin not found

After installation i can't see the plugin in my plugin list.

Physical Button (0.5.0)
OctoPrint 1.7.3
Python 3.7.3
OctoPi 0.18.0

[QUESTION] List of actions

Plugin Version
Physical Button: 0.5.0

Question
Hi. Sorry for my noob question but is there anywhere that I can read up on what the various 'actions' do? Are these octoprint commands/plugin commands or something else?

At the moment my plugin activities has action: start latest selected. Does this mean it will start/print the most recent/latest thing that was printed?

increase or decrease bed- or hotendtemp

Hey there, really nice plug-in. Like it a lot. (and already have +- 15 buttons set up ;o) )

Would be nice if there was a possibility to increase or decrease temperature. (maybe in 10° increments or so)
Since with GCODE there is no way to use variables, so it is not possible to change temperature relative to the value that's already set.

Won't install on Octoprint 1.6.1

Plugin doesn't appear in Plugin Manager, and I don't seem to be able to install plugin manually,
on Octoprint 1.6.1 on OctoPi 0.17.0

I think I saw a message scroll up about wrong Python versions

[FEATURE] Prevent button execution while printing

Great work on this awesome plugin, thank you!

However, I've built this great new 3D-printer but I have trouble with (probably) EFI interference.
Every ones in a while, a button is triggered during a print without any obvious reason.
This caused some troubles; Once the button "shutdown Pi" was triggered, shutting the whole system down during printing.
An other time, the "cool down" button was triggered, causing the hot end to block up and the extruder grinded happily for hours when discovered something was wrong.
I've tried to increase the duration you have top press a button, but that does not seem to help a lot.

Request:
An option you can enable to prevent execution a button while printing.
Preferably per button; You don't want a "cool down" button to be executed during print, however, a "LED strip on" button is not a problem.

This would be a big help, because for now, I had to disable all my buttons except the LED strip button..
I've tried to solve the problem hardware wise, but cannot seem to solve this issue completely..

[FEATURE] Start/Cancel toggle action

Describe the solution you'd like
It would be awesome if there were a Start/Cancel toggle action just like the recently added pause toggle action! That would allow starting a print (if nothing is printing) and cancelling an ongoing print with the same button!

Additional context
Thanks again for the quick turnarounds and releases!

[QUESTION] Does this support Waveshare 2.7" HAT on Raspberry Pi?

Plugin Version
0.6.1

Question
The Waveshare 2.7" HAT on Raspberry Pi has an e-paper display, as well as four buttons, which operate on GPIO pins 5, 6, 13, 19. From a Python session, I'm able to use button 1 like this:

from gpiozero import Button
def handle_key1():
    print("Hello World")

btn = Button(5)
btn.when_pressed = handle_key1
# Then I press the button a few times...
Hello World
Hello World
Hello World

Your code uses gpiozero too and seems to work similarly, but I've been unable to have the following work:

Physical Button: Key 1

Am I doing something wrong?

Additional context
In a shell session, as the same user OctoPrint is running as, I am able to call wall "hello world" and see the broadcast message in my terminal.

Here's an example project for this hat: RaneWallin/hello_epaper3.py

[QUESTION] Sometimes save doesn't save changes

Plugin Version
0.6.1

Question
Just getting started with your plugin. I started by adding a button to Home on GPIO13, set the Action to home, and saved. I realized later I wanted to just send the Gcode G28 instead. Went in, changed it, hit save, and tried using the button. I double-checked my settings for the button, and it didn't change the action from Home to G28 like I expected. Note that the printer connection was established at the time. I performed a restart, didn't reconnect my printer yet, adjusted the settings, and now they save. Is this normal behavior for the plugin - to not be connected to the printer in order to make button changes?

Additional context
Add any other context about the question here.

[FEATURE] Short and Long press functions for ONE physical button

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I would like to have one button on my printer that can perform an action on a short press & also perform a different function when held for X number of seconds.

Additional context
I had a python script that did this but it did not work well with octoprint. My script would just record the seconds the pin was pulled up and decide what to do from there.

GPIO buttons not working

Hi, first of all thanks so much for creating this plugin! I've previously been using the enclosure plugin to control octoprint with physical buttons, but this plugin looks cleaner and easier to use!

I attempted to set this up but unfortunately was unable to get any of the buttons working. In my logs I see the below error:

2021-08-10 00:02:29,542 - octoprint.plugins.physicalbutton - DEBUG - Buttons to remove: []
2021-08-10 00:02:29,542 - octoprint - ERROR - Error while trying to migrate settings for plugin physicalbutton, ignoring it
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/__init__.py", line 512, in init_settings_plugin_config_migration_and_cleanup
    implementation._identifier, implementation
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/__init__.py", line 503, in settings_plugin_config_migration_and_cleanup
    implementation.on_settings_cleanup()
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1941, in wrapper
    return f(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_physicalbutton/__init__.py", line 155, in on_settings_cleanup
    octoprint.plugin.SettingsPlugin.on_settings_cleanup()
TypeError: on_settings_cleanup() missing 1 required positional argument: 'self'

A little further down, I also this which seem to suggest that everything was set up ok:

2021-08-10 00:02:44,001 - octoprint.plugins.physicalbutton - DEBUG - Setting up buttons ...
2021-08-10 00:02:44,806 - octoprint.plugins.physicalbutton - DEBUG - Added Buttons: [<gpiozero.Button object on pin GPIO24, pull_up=True, is_active=False>, <gpiozero.Button object on pin GPIO23, pull_up=True, is_active=False>, <gpiozero.Button object on pin GPIO22, pull_up=True, is_active=False>, <gpiozero.Button object on pin GPIO27, pull_up=True, is_active=False>, <gpiozero.Button object on pin GPIO17, pull_up=True, is_active=False>]
2021-08-10 00:02:44,807 - octoprint.plugins.physicalbutton - INFO - Buttons have been set up!

Unfortunately, none of the buttons work when I press them. I've tried changing the mode from normally open to normally close as well but the buttons still do not react. The hold time is set to 100ms for all the buttons, if it matters.

Is there anything that I have set up incorrectly, or is there any other way to troubleshoot this? Thanks for your help!

[FEATURE] USB

*Would it be possible to set this up to use a USB button instead of GPIO?

[BUG] GCODE button only works with a connected printer in the Octoprint interface

Plugin Version
Physical Button (0.6.1)

Describe the bug
Connected simple GCODE (Extruder Temp -> 190) to a Button.

That button only works, when octoprint is connected to the printer in the browser, not in the following state or completely without connecting octoprint.

To Reproduce
Power up raspberry, press a button with gcode -> nothing happens.
Power up raspberry, connect the printer in the web surface of octoprint, press a button with gcode -> works fine.

Expected behavior
I think that the plugin should also work completely "offline", right? the other buttons, which control relays, work without any problems - only the ones with a gcode don't.

Screenshots / Logs

image

image

Additional context
If applicable, add any other context about the problem here.

[BUG] 'Physical-Button' requires a different Python: 2.7.16 not in '>=3, <4'

Plugin Version
unknown, currently available under https://github.com/LuxuSam/PhysicalButton/archive/master.zip

Describe the bug

  • Cannot find PlugIn when searching in Plugin Manager
  • Cannot install, wrong Python version:
  • ERROR: Package 'Physical-Button' requires a different Python: 2.7.16 not in '>=3, <4'

To Reproduce
OctoPrint 1.6.1 - Python 2.7.16 - OctoPi 0.17.0

Expected behavior

  • Find Plugin in Plugin Manager
  • Install Plugin

Gpio 0

Plugin Version
0.5.0

Question
I don't see a pin gpio0 in the menu. Why?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.