mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 05:35:30 +02:00
[GH-ISSUE #472] [Feature]: Allow Switching Power via MQTT / Implement REST API #293
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy#293
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Percy2Live on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/472
Originally assigned to: @maziggy on GitHub.
Problem or Use Case
Right now switching power via MQTT is not supported. For users using home automation (like openHAB, ioBroker, FHEM,... basically everything else than Home Assistent) there are plenty ways to control a power socket. Unfortunately it's impossible right now to do this. Some simple adaptions would allow these users to control power also via MQTT, please consider implementing a solution. If you want to keep the effort low, you could implement a solution that is easy to implement on bambuddys side but requires some effort on home automations side - as long as there is a way at all.
Proposed Solution
There are multiple solutions possible, these are just suggestions:
Alternatives Considered
No response
Feature Category
Smart Plugs
Priority
Would improve my workflow
Mockups or Examples
Contribution
Checklist
@maziggy commented on GitHub (Feb 20, 2026):
Please go ahead. Thanks!
@maziggy commented on GitHub (Mar 24, 2026):
Before we commit to building this, I'd like to gauge community interest. If you'd find this feature useful, please give this issue a thumbs up (👍) reaction so we can prioritize accordingly.
@maziggy commented on GitHub (Apr 1, 2026):
Available/Fixed in branch dev and available with the next release or daily build.
Can someone please test and let me know if it works?
Docs -> https://wiki.bambuddy.cool/features/smart-plugs/?h=rest#adding-a-rest-webhook-plug
@Percy2Live commented on GitHub (Apr 2, 2026):
tested with iobroker and simple-api. Good news first: turning the printer on and off works. What doesn't work is state, energy and power. By default, ioBroker easily allows me to use an individual GET request to retrieve the state, the energy and the power. But bambuddy expects a single state request that contains all three. ioBroker offers a getBulk() method which I tried to utilize, but bambuddy is somehow unable to extract the information out of that. My GET request
http://192.168.101.10:8087/getBulk/shelly.0.shellyplugsg3%23d0cf13c7ad30%231.Relay0.Switch,shelly.0.shellyplugsg3%23d0cf13c7ad30%231.Relay0.Power,shelly.0.shellyplugsg3%23d0cf13c7ad30%231.Relay0.Energyreturns the following response (state, power and energy):
[{"id":"shelly.0.shellyplugsg3#d0cf13c7ad30#1.Relay0.Switch","val":true,"ts":1775143379988,"ack":true},{"id":"shelly.0.shellyplugsg3#d0cf13c7ad30#1.Relay0.Power","val":9.5,"ts":1775143379988,"ack":true},{"id":"shelly.0.shellyplugsg3#d0cf13c7ad30#1.Relay0.Energy","val":30947.07,"ts":1775143379988,"ack":true}]This is my bambddy configuration (I also tried passing the arrays without the "$" sign, no difference):
It seems bambuddy cannot resolve the arrays. Another issue I see is the energy factor. Bambuddy expects kWh, the datapoint only contains Wh.
A straight-forward approach would be to allow individual GET-requests for state, power and energy. Also a simple power factor / energy factor would allow users to adapt it to the available datapoints.
Great work so far, thank you very much!
@maziggy commented on GitHub (Apr 3, 2026):
Available/Fixed in branch dev and available with the next release or daily build. Please let me kow if it works now.
@Wolfi913 commented on GitHub (Apr 5, 2026):
Hope that helps you further.
I tested the daily build and it works perfectly.
Also with ioBroker and in my case the RestAPI-adapter.
This is really a good addition.
@maziggy commented on GitHub (Apr 5, 2026):
If you find Bambuddy useful, please consider giving it a ⭐ on GitHub — it helps others discover the project!