Hello all, hoping someone can help me understand a few things about MQTT potential within smarttthings. I am using a device that can be communicated to through MQTT. The device is called falcon pi player, it runs on a raspberry pi. The question I have is where do I begin with getting this running?
Essentially, my goal or starting goal is to be able to run a script (multiple mqtt commands) with a virtual switch within smartthings that starts the falcon pi player and sets it in repeat mode. The commands look like the below. When the switch is hit within the smartthings app, I would like it to show on and then after a few seconds go right back to off or a momentary switch would work also – because it is really only running a script so isn’t like a light or anything.
falconplayer_start_playlist:
sequence:
- service: mqtt.publish
data_template:
topic: albero/falcon/player/FPP/playlist/name/set
payload: “hassio”
- delay:
seconds: 1
- service: mqtt.publish
data_template:
topic: albero/falcon/player/FPP/set/playlist/start
payload: ‘1’
retain: false
I feel like I need these things (but I’ll be honest, this is all a guess because I have no clue what I’m doing): A mqtt broker like mosquitto running on a raspberry pi, and something on the smartthings side to take the button press (which I also don’t know how to make the button respond, or make a button in general)-- It would be nice if the device switches in my app which generally control a on/ off light could pretty much do the same thing for mqtt device I am speaking of.
I’m hoping all of this already exist as I don’t really want to recreate the wheel for what I am attempting to do. But I would be very appreciative if someone could help school me a little on how in the world to approach all of this or possibly a template I can review to make my own solution. Thank you all for any help that can be provided!!