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

[FR]: software button on GUI? #9

Closed
morris2009 opened this issue Oct 13, 2024 · 7 comments
Closed

[FR]: software button on GUI? #9

morris2009 opened this issue Oct 13, 2024 · 7 comments
Labels

Comments

@morris2009
Copy link

morris2009 commented Oct 13, 2024

Hi, first of all thanks for the work performed with regards to hardware PWM for the RPI.
I have a 12V ledstrip controlled with a pwm module that wasn't very usefull due to the flickering of the software pwm signal on the RPI 3b. This should make it much more useful.

I was wondering how I could use it with someting like a software button in the GUI to turn on/off the light. And another question, how could I use this together with octolapse to turn on full brightness for the camera snapshot and revert to lower brightness in between.
I am not a developer myself, and haven't yet unraveled how I could have octolapse control the LED's via lightcontrols so that the hardware PWM is used.
I don't think currently it is able to listen to gcode commands that could be used to control the PWM signal? That might also be a nice feature request for the future.
Tnx!

*Edit
OK, nevermind the software button question.. I guess my octoprint wasn't reloaded properly because i do see a lights section in the control tab.

@RoboMagus
Copy link
Owner

If I understand correctly, the issue regarding light controls on the Octoprint GUI has resolved itself?

Regarding the automated control of the light values; Currently this plugin only supports Start, Pause, Resume, and End print events to automatically set lights to a specific value. I do not use Octolapse myself, but I'll have to assume that on making a snapshot that plugin does not trigger any of these events.
A brief look at that plugins page shows it does have some form of scripting / GCode command options that would run before and after a snapshot is taken.

As this LightControls plugin exposes some form of API that could be used to set the light values using the scripting part of the OctoLapse plugin. As you indicate you're not a programmer however, this could be quite a cumbersome task. Let me know if you're able to get this implemented based on API calls to this plugin. If not, I could probably add some custom @-commands to this plugin that would make it easier for e.g. Octolapse to control the light values.

It's been a while since I've worked on this plugin though, and I'm not actively using it anymore so it could be some time before I could get changes implemented.

@morris2009
Copy link
Author

Hi,
Tnx for your quick reply.
Getting something in scripting wouldn't be very easy for me, but if you have a very simple example, i could probably work from there.
Implemeting listening to a @-command would be a huge improvement for this plugin, as from there you could use it in all kind of other plugins that already use insertion of @-commands and from slicers.
Octolapse can indeed run a pre-image @-command, or run a pre-image script.
If you don't use light-control anymore yourself, what did you change to? Or different printer with built-in lighting?

@RoboMagus
Copy link
Owner

If you don't use light-control anymore yourself, what did you change to? Or different printer with built-in lighting?

I'm not 3D printing that much anymore these days and currently run Octoprint containerized on a mini pc that also runs HomeAssistant, which I've used to automate a different set of lights around my printer. Its not as integrated with Octoprint anymore, but usable enough and easier to maintain all (smart-) devices through HomeAssistant for me.

@RoboMagus
Copy link
Owner

RoboMagus commented Oct 18, 2024

I've had some time to look at other plugins that parse @ Commands and it turned out to be quite easy to add this feature.

As I'm no longer actively using this plugin myself I've not been able to fully test these changes, other than in a simulated environment. The changes are currently released as a Release Candidate / pre-release.

Could you check out these changes by switching release channels to Development to update the plugin and report back to me if this works for you?

The use of these newly added commands are documented here.

@morris2009
Copy link
Author

Some small first tests by sending the @LightControl commands manually work perfectly.
Am going to test with a print and my setup with Octolapse to check.

Tnx so much for the work!

Copy link

stale bot commented Nov 22, 2024

This issue has been automatically marked as stale because it has not had activity in 31 days. It will be closed if no further activity occurs in 14 days.

@stale stale bot added the stale label Nov 22, 2024
@RoboMagus
Copy link
Owner

No issues found since RC.
Released implementation of @ commands as full release with version 0.5.0

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

No branches or pull requests

2 participants