Multiple PWM doesn't work reliably #236

Open
opened 2019-04-19 14:46:40 +01:00 by HaythamB · 3 comments
HaythamB commented 2019-04-19 14:46:40 +01:00 (Migrated from github.com)

Describe the bug
Setting up 3 separate PWM outputs for RGB 5050 LED strips doesn't change duty cycles reliably, ending up with this in the logs:

octoprint.plugins.enclosure - WARNING - An exception of type RuntimeError occurred on log_error. Arguments:
('A PWM object already exists for this GPIO channel',)

To Reproduce
Steps to reproduce the behavior:

  1. Create 3 PWM outputs, map to any default GPIO pin
  2. Try and change duty cycle normally, and then change another PWM duty cycle

Expected behavior
Duty cycle should trigger an output, nothing happens, and log outputs the above for debug.

**Describe the bug** Setting up 3 separate PWM outputs for RGB 5050 LED strips doesn't change duty cycles reliably, ending up with this in the logs: octoprint.plugins.enclosure - WARNING - An exception of type RuntimeError occurred on log_error. Arguments: ('A PWM object already exists for this GPIO channel',) **To Reproduce** Steps to reproduce the behavior: 1. Create 3 PWM outputs, map to any default GPIO pin 2. Try and change duty cycle normally, and then change another PWM duty cycle **Expected behavior** Duty cycle should trigger an output, nothing happens, and log outputs the above for debug.
HaythamB commented 2019-04-19 17:13:16 +01:00 (Migrated from github.com)

Tested this out further. Turns out it requires a restart of the OctoPrint service every time you change the PWM frequency. Working properly after restarting the service.

Tested this out further. Turns out it requires a restart of the OctoPrint service every time you change the PWM frequency. Working properly after restarting the service.
RoCkHeLuCk commented 2021-04-30 13:54:22 +01:00 (Migrated from github.com)

I have the same problem, if I change any PWM plugin configuration to, and in the log the message "A PWM object already exists for this GPIO channel", just restarting to get back to work.

I have the same problem, if I change any PWM plugin configuration to, and in the log the message "A PWM object already exists for this GPIO channel", just restarting to get back to work.
jacopotediosi commented 2025-05-01 17:50:47 +01:00 (Migrated from github.com)

Hi everyone, the recently merged PR #504 should have fixed this issue. Could you please reinstall the plugin and, if confirmed, close the issue?

Hi everyone, the recently merged PR #504 should have fixed this issue. Could you please reinstall the plugin and, if confirmed, close the issue?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#236