I think I should work for #MI6. Specifically they should pay me to go and work for #Russia. I am such a walking disaster area that me sincerely trying my best would probably bring Russia to its knees within a week or so. The big danger is me accidentally starting #WWIII by putting my coffee mug on the #BigRedButton of doom after mistaking it for a coaster. I could see me doing that.
So V2 does things differently. Here's how it works:
When #HomeAssistant starts up, an automation populates a dropdown selector with a shuffled list of songs, pulled from a sensor which monitors the contents of a folder.
When the #BigRedButton is pressed, a virtual toggle is turned on.
An automation watches for when that toggle’s state changes to “on”, and triggers a script which changes the lighting and plays the song selected in the dropdown. The automation is only interested in the toggle, so if it's already on, subsequent button presses are ignored. No skipping tracks with multiple button presses!
Another automation watches for when the bathroom speaker stops playing at the end of a song, and checks to see if the virtual toggle is on (ie the song was started from a button press, not from my phone or whatever). If so, it triggers a script that changes the lights back to normal, selects the next item in the dropdown, and turns off the virtual toggle, ready for the next button press.
V2 of our #BigRedButton is up and running. From the outside, it seems absolutely no different, but the stuff behind it is waaaay more complicated.
Previously, a song was selected at random every time the button was pressed. So if someone panicked and pressed the button again it would stop the current song and start another one, and then another, and another... not the experience I wanted.
Also, the random selection was not random in the right way. Each time, it picked from the entire list. This meant that it was possible for the same song to be selected on subsequent presses, and some songs never got picked.
It seemed to really like "Let's Get Loud" by JLo.
Before "Computer, end program," there was...
#StarTrek #EndProgram #BigRedButton #PushToExit #IsThisTheHolodeck?
Garage Door Opener Ejection Seat - [Scott Prints] had a familiar problem. His garage door opener was boring, and ratt... - https://hackaday.com/2022/11/05/garage-door-opener-ejection-seat/ #garagedooropener #bigredbutton #mischacks #carhacks #news