Playnite Forums
MQTT Client - Printable Version

+- Playnite Forums (https://playnite.link/forum)
+-- Forum: Extension Database (https://playnite.link/forum/forum-3.html)
+--- Forum: Generic Extensions (https://playnite.link/forum/forum-6.html)
+--- Thread: MQTT Client (/thread-1119.html)



MQTT Client - simeonradivoev - 02-04-2022

[Image: icon.png] MQTT Client with home assistant discovery integration

This extension posts different topics to an MQTT server. Like:
  • Selected Game
  •      Cover Image (optional)
  •      Dominant Cover Color (optional)
  • Playing Game
  •      Cover Image (optional)
  •      Background Image (optional)
  •      Icon
  •      Dominant Cover Color
  • Active View
  • Installed Game
  • Uninstalled Game
Connection
It automatically connects to the configured server on every playnite app launch. To disconnect and connect using the side menu icon (that also turns active if the client is connected).

Home Assistant
Support for home assistant discovery is built in. All attributes and entities and devices should be discoverable by home assistant and its MQTT integration

Security
Currently, the only option supported is logging in through username and password.

Notes
  • This was made mainly for personal use so I probably won't include localization, also if you know how to work with MQTT you probably know English.
  • As of now re-connection retrying isn't implemented yet.

Links:


RE: MQTT Client - sheepbeep - 02-04-2022

What is MQTT ?


RE: MQTT Client - simeonradivoev - 02-04-2022

(02-04-2022, 07:51 PM)sheepbeep Wrote: What is MQTT ?

Home automation protocol


RE: MQTT Client - Xenor - 02-04-2022

Woah, great. Now I can turn off my lights when playing a game. Or maybe even turn off notifications? So many options! I'm definitely going to test it out.
BTW, you could try putting it to the add-on database, so it's available directly in Playnite: https://github.com/JosefNemec/PlayniteAddonDatabase.

EDIT: Uhm, no dice. Is it compatible with Playnite 9?


RE: MQTT Client - simeonradivoev - 02-10-2022

Yea, there was a small bug that is now fixed.


RE: MQTT Client - Xenor - 02-10-2022

Yup, can confirm that now it works, it shows up in Home Assistant nicely too, thanks for the update. Now just to automate stuff based on it Smile.


RE: MQTT Client - Tactical_Bill - 03-22-2022

I like this add on, but I’m having trouble getting it to create entities in HA. The add on in Playnite says it’s connected but no new entities are showing up in HA. Other services are publishing to the MQTT broker such as Frigate and RoomAssistant.

Am I missing something? I’ve added username and password to the Playnite addon and it says it’s connected. I’m at a lose.


RE: MQTT Client - Giodude - 03-23-2022

Wait, so like, could I use this to launch a game from Google home?


RE: MQTT Client - Tactical_Bill - 03-30-2022

I'm still having trouble with this MQTT client publishing topics to my MQTT broker in Home Assistant. I've setup the client with my username and password, it shows connected in Playnite, and I can see it's connected in the logs of the MQTT Broker in Home Assistant.... yet nothing is being published. I've also tried watching broker traffic with an MQTT Explorer and nothing is being published to it from the Playnite client, despite it being connected to the broker. My MQTT setup is the standard within HA, I've not changed anything out of the ordinary that I can remember.


RE: MQTT Client - sigmaeldritch - 08-14-2022

Can someone make an installation guide for this? The github page says "It automatically connects to the configured server on every playnite app launch.". Doesn't that suggest this module needs to be configured? I haven't found anything that allows any kind of configuration.


RE: MQTT Client - banggun - 08-16-2022

(08-14-2022, 03:55 AM)sigmaeldritch Wrote: Can someone make an installation guide for this? The github page says "It automatically connects to the configured server on every playnite app launch.". Doesn't that suggest this module needs to be configured? I haven't found anything that allows any kind of configuration.

Yeah I also found some information was missing. Either way you need to download the MQTT broker integration from the Home assistant HACS store. Once installed you can then configure it through Playnite by Addoons -> Generic - MQTT client and enter your HA IP address and credentials. The port from the HASS integration should be the default 1883 port

Thanks for making this addon. I've been using it for some days and it works perfectly. However I sometimes put my computer to sleep and noticed that after the computer wakes up the MQTT client loses the connection to the broker and you need to manually reconnect it or restart playnite


RE: MQTT Client - meetingpeople - 09-11-2022

MQTT or MQ Telemetry Transport is a lightweight, publish-subscribe, machine-to-machine network protocol. It enables the communication between remote devices, such as smartphones and web apps, sensors, and other systems.

If you want to know more, I recommend reading this article about mqtt client and broker connection. There’s a thorough explanation of what this protocol is, what it’s used for and how to establish a reliable and secure connection between MQTT client and broker. Do not forget to read about TLS encryption to make the connection secure and prevent data stealing.