Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for MQTT & Home Assistant #61

Open
AtryFox opened this issue Dec 11, 2023 · 6 comments
Open

Support for MQTT & Home Assistant #61

AtryFox opened this issue Dec 11, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request in progress This feature is being worked on currently

Comments

@AtryFox
Copy link

AtryFox commented Dec 11, 2023

A simple MQTT implementation publishing the sleeping state to a broker to allow control of things outside VR or your PC would be interesting.

With this users could run automations in Home Assistant or other home automation software to control lights/fans/ACs/window shutters/heating and so much more, bascially allowing endless possibilities.

Is anything like that in the pipeline? Would love to see it!

@Raphiiko
Copy link
Owner

Raphiiko commented Dec 11, 2023

As a long-time Home Assistant user myself it's something I've been wanting to add for a while now, but I've not yet had the time. At this point I can't say how soon it would be, as there are more things that still have higher priorities. However I can say it will likely be added in some future update.

@Raphiiko Raphiiko changed the title MQTT implementation Support for MQTT & Home Assistant Dec 11, 2023
@dubyatp
Copy link

dubyatp commented Dec 14, 2023

+1

As someone who uses a Quest 2 with PCVR, having lights on is a requirement for proper tracking with my controllers, and I really don't want to have the lights on if i'm asleep, it would be really nice to just have an automation trigger to HA to turn my lights on if motion is detected on my controllers.

@Raphiiko Raphiiko added the enhancement New feature or request label Dec 15, 2023
@Raphiiko Raphiiko self-assigned this Apr 21, 2024
@Raphiiko Raphiiko added the in progress This feature is being worked on currently label Apr 21, 2024
@Raphiiko
Copy link
Owner

@AtryFox A very basic implementation of this is now in develop. It should land in the beta on Steam shortly.

Currently, it only exposes the sleep mode to home assistant as a switch.
However now that the functionality is there, I do plan on exposing more options.
I'll be adding those before the next feature update drops, but for now you can already play around with it. You'll find the option for it in the integration settings.

@Raphiiko
Copy link
Owner

It seems that right now, in release builds it doesn't really like dealing with insecure sockets. I'll have to see how I'm going to get around that some time later. Until then, you'll likely only be able to get this to work if you've got SSL enabled on your broker's websocket.

@AtryFox
Copy link
Author

AtryFox commented Apr 21, 2024

That's really cool, thanks for the update! Works flawlessly for me so far.
It seems like it not just requires SSL, but also a valid certificate? I don't have SSL certificates setup directly on my HA/broker machine, I just run everything behind a reverse proxy that's managing my certs.
Pointing directly to my MQTT broker, Oyasumi doesn't connect. Setting up a reverse proxy host with valid certificate, that points to my broker and using that in Oyasumi works fine.

@Raphiiko
Copy link
Owner

Raphiiko commented Apr 22, 2024

It seems like it not just requires SSL, but also a valid certificate?

Correct, by default release builds seem to not allow for mixed security content, so even if you're using SSL, it's still considered to be insecure when the certificate is not valid.

I found an option in Tauri to allow for mixed content. Since the only external connections OyasumiVR makes are either secure or local, and no external code is ever loaded/ran, I don't think enabling this has any security implications.

The new beta build should have this fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress This feature is being worked on currently
Projects
None yet
Development

No branches or pull requests

3 participants