Is the integration broken? First I had problems showing the plex sensor but then I tried to remove the integration and add it again but now I can not obtain the token from plex web getting an error.
Also when adding the integration manual the activity sensor show unknown.
No difference, I removed all old HA entities from server and restarted Plex Server and HA but the obtaining from website is still not working. And manual adding is still showing the activity sensor with unknown.
So, when adding the integration manually I had to select connect via ssl but not ssl verify, sensor seems to work now. But automatic obtaining token would be better. Will see if it work correct now.
So, some time after Plex server is offline the sensor changes to not available for the activity sensor. That was not the case in the past. When Server is offline it should just show 0 Watching as before not being unavailable in HA:
I literally just had the same thing happen, had some sensors that were unavailable and the integration wasnāt finding a second plex server so I removed it, removed the authorized device and tried to reinstall and ran into the same problem getting a token from plex. Updated, restarted, but still doesnāt work. Havenāt tried the manual setup yet.
Hi, is there any news on this? it was working fine on 0.116, this is the plex sensor was always notifying 0 if it was off or no one playing, and now when the server is off the sensor does not even exist so If you request state it return āUNKNOWNā this has broken some automations on my sideā¦
I havenāt looked at this in a long time but my solution to plex I think was to use
I dug around in my setup and I canāt figure out how its working but I know it changes the lights based on the type of content being watched and the time of day. It works in real time based on pause/play. I have the above URL in my notes so and Iām pretty sure I remember that the plex integration was not real-time which is why MQTT was needed.
The authentication issue seems to be caused by a change on the Plex side. Iām working to find out what changed and how we can fix it.
The sensor will show āunavailableā when the Plex server is unreachable. Since 0.116 the behavior is to unload the integration while we try to reconnect. Once the Plex server comes back online it will reconnect automatically.
If your Plex server is running but youāre still seeing the sensor is āunavailableā, please create a Github issue and Iāll investigate further. It should always show a count if the server is running.
Iām pretty sure I remember that the plex integration was not real-time
The Plex integration has used realtime updates via websockets for about a year now, since 0.101.
Ok I Have an automation to run after midnight to turn off my NAS, the conditions are:
Shield must be off
Backups server must be off
and no one should be playing anything from plex ( so in the past it was as easy just to check that Plex.sensor state was cero ā0ā)
if this 3 conditions were true then the server can safely shut down and if not it will keep checking every 15 minutes.
this automation is not working now because if plex is down or plex is up but no player is connected it returns āUnknownā, it only returns state 0 if a player is connected but not playing anything.
Yep, make sense. You should be able to add the āunavailableā state into the condition check for the Plex sensor. This will then match when the Plex server is down, or when there are zero active playback sessions:
- condition: state
entity_id: sensor.plex
state:
- 0
- unavailable