Skip to content

Instantly share code, notes, and snippets.

View RonnieDilli's full-sized avatar

Ronnie Dilli RonnieDilli

  • GOV.BR
  • Brazil
View GitHub Profile
@HeedfulCrayon
HeedfulCrayon / README.md
Last active April 3, 2025 21:32
Script for OBS Studio to publish session stats to MQTT broker with autodiscovery set up for Home Assistant

OBS MQTT Status to Home Assistant

Setup:

  1. Download script
  2. Install mqtt-wrapper pip install mqtt-wrapper
  3. Open OBS Studio
  4. In OBS Studio add a script (Tools -> Scripts)
  5. Configure script parameters (my base channel is homeassistant and my sensor name is obs, creating the path homeassistant/sensor/obs)

script_parameters

on getiTunesCurrentSong()
tell application "iTunes"
try
if not (exists current track) then return ""
return (get name of current track) & " - " & (get artist of current track)
end try
end tell
end getiTunesCurrentSong
using terms from application "Messages"