Has anyone integrated the OBS WebAPI (obs-websocket) into HASS core? I want to use a zwave lightswitch to trigger OBS functions and I haven’t seen anyone on either forum mentioning the other product. Here’s a list of available language APIs for obs-websocket, anyone have an idea on what the easiest way to link a below API with HASS?
Javascript (browser & nodejs): obs-websocket-js by Brendan Hagan
That would be awesome. I would love to see what you come up with! I don’t even know where to start but let me know if there is anything I can do to assist.
I have been thinking about this over the past week and have some ideas but wanted to see what you thought, in terms of making this part of HomeAssistant.
This is the protocol doc, as in everything OBS Websocket can control:
At a bare minimum, features I would want are
Start/stop stream
start/stop recording
Switch scenes
Enable/disable sources in scenes
Adjust audio (volume/mute) on sources
I think that the best way to represent OBS is as a “media player” entity.
input sources would represent scenes (changing input source would change the selected scene in OBS)
Streaming is handled by play/pause
Recording on/off would be a separate switch entity as the media player does not have a record option.
That gets us #1-3.
#4-5 are more difficult and i have a couple ideas
Create services for enabling/disabling & adjusting audio on sources. This kind of sucks because you have to create your own scripts and input entities to control this.
Create two switches for each source to enable/disable. Can’t handle volume in this way.
Create media_player entities for each source (on/off controls visibility, gives audio control). This could be a challenge if you have a lot of sources, as there will be many media_player entities
Which one do you think is most manageable from the UI?
an additional challenge is that the “official” Python library to interact with the websocket connection is not using co-routines (making it sort of not friendly with HomeAssistant), but I think I can work around that
i’d also love something like this, i use OBS for a webcam so would love something that launched the app, powered on my camera and then loaded a profile and started the virtual camera via an automation
I have not been able to get this one working, but I have modified it, and will create a link to my github as well as instructions on how to get it working
Just passing by to thank you for the python script HeedfulCrayon, I use it to automate the streaming lighting. Is there any chance that we can change the scene from HA or retrieve the scene name in use?