Reply To: Battery powered wall switch to start/pause playback?

Max2Play Home Forums Max2Play Projects and Builds Battery powered wall switch to start/pause playback? Reply To: Battery powered wall switch to start/pause playback?

19. Januar 2020 at 15:13 #47942

In case someone has the same requirement:

In the end I set up the bigger thing. What I don’t like about it is that have an additional device now that also needs around a Watt of power.

I use a 433MHz radio Wall Button (for example: https://www.aliexpress.com/item/32877220475.html – I had one already for a lamp) and a Sonoff RF Bridge (https://sonoff.tech/product/accessories/433-rf-bridge) Re-Flashed with the Open Source Tasmota Firmware (https://github.com/arendst/Tasmota/).

With this setup I trigger a script in ioBroker which uses the Sonoff (https://github.com/ioBroker/ioBroker.sonoff) and Squeezebox (https://github.com/UncleSamSwiss/ioBroker.squeezebox) ioBroker Adapters .

Problems I ran into setting this up as a total Noob with ioBroker and the RF Bridge:
– Buttons in the Bridge have to learn the Codes the Button sends before RfReceived pops up in ioBroker (Run RfKey<#> 2 in Tasmota console).
– The state of the squeezebox Player has to be set via „Control“ and not the „Update“ command in the Script

My ioBroker Blocky script:

(Start Playback when On-Button is pressed between 06:00 and 10:00, Pause Playback when Off-Button is pressed)

on({id: ’sonoff.0.rf_bridge_wohnzimmer.RfReceived_Data‘, change: „ne“}, function (obj) {
var value = obj.state.val;
var oldValue = obj.oldState.val;
if (getState(„sonoff.0.rf_bridge_wohnzimmer.RfReceived_Data“).val == ‚554415‘) {
if (compareTime(„06:00“, „null“, „>=“) && compareTime(„10:00“, „null“, „<=“)) {
setState(„squeezebox.0.wohnzimmerlinks.state“/*wohnzimmerlinks.state*/, 1);
}
} else {
setState(„squeezebox.0.wohnzimmerlinks.state“/*wohnzimmerlinks.state*/, 0);
}
});

  • This reply was modified 4 years, 3 months ago by alex005.
  • This reply was modified 4 years, 3 months ago by alex005.