Jump to content

Check Status of EMBY ?


nyplayer

Recommended Posts

nyplayer

Is there a way to check if EMBY is recording via batch file ... or a command ? I would like to schedule some maintenance when EMBY is not recording ? My EMBYSERVER is running on Windows 10.

Edited by nyplayer
Link to comment
Share on other sites

nyplayer
5 hours ago, ebr said:

Hi.  You could write a small program to use the API to retrieve active recordings.

I am not a programmer but I did find a way around it by checking usage of my HDHR units against the Server IP. ... using IPCONFIG.

Edited by nyplayer
Link to comment
Share on other sites

rbjtech

You can query the HDHome directly  to see if the tuners are active.  Download the hdhomerun utilities are run :-

hdhomerun_config <yourHDHR_ID> get /tuner0/status

it will output this -

ch=none lock=none ss=0 snq=0 seq=0 bps=0 pps=0

ch=none, means that tuner is not active.

Do this for all the tuners to see them all (tuner1, tuner2 etc)

Link to comment
Share on other sites

nyplayer
17 hours ago, rbjtech said:

You can query the HDHome directly  to see if the tuners are active.  Download the hdhomerun utilities are run :-

hdhomerun_config <yourHDHR_ID> get /tuner0/status

it will output this -

ch=none lock=none ss=0 snq=0 seq=0 bps=0 pps=0

ch=none, means that tuner is not active.

Do this for all the tuners to see them all (tuner1, tuner2 etc)

Thanks but That really does not help as you do not know what device is using the tuner ... I found a better way as the lock on the tuner is the IP of the Device using it. The Sample below checks if the IP of the EMBY Server matches the IP that is using the tuner if there is no match it will reboot the server. If there is a match it will check again in 5 minutes.

 

if not exist "C:\Program Files\Silicondust\HDHomeRun\hdhomerun_config.exe" exit 1
if not exist c:\temp md c:\temp
:loop
C:\Windows\System32\ipconfig | find "IPv4 Address" > c:\temp\File.txt
set /P ipnumber=<c:\temp\File.txt
echo %ipnumber%
set ipnumber=%ipnumber:~39%
echo %ipnumber%
del c:\temp\File.txt
CD /d "%~dp0"
"C:\Program Files\Silicondust\HDHomeRun\hdhomerun_config.exe" 104112F4 get /tuner0/lockkey >"%~dp0tunerip.txt"
set /P pcname=<"%~dp0tunerip.txt"
echo %pcname%
if "%pcname%" EQU "%ipnumber%" goto recording

"C:\Program Files\Silicondust\HDHomeRun\hdhomerun_config.exe" 104112F4 get /tuner1/lockkey >"%~dp0tunerip.txt"
set /P pcname=<"%~dp0tunerip.txt"
echo %pcname%
if "%pcname%" EQU "%ipnumber%" goto recording

shutdown -r -f -t 2
exit
:recording
CLS
echo recording
timeout 300
goto loop
exit

 

Edited by nyplayer
  • Like 1
Link to comment
Share on other sites

rbjtech

Nice 😃  Sorry, I didn't realise you already knew there were CLI utilities for the HDHR.

Another useful but undocumented one you may not know about is below - this resets the tuners if they get stuck/locked for some reason.

"c:\Program Files\Silicondust\HDHomeRun\hdhomerun_config.exe"  <ID> set /sys/restart self

 

 

Link to comment
Share on other sites

nyplayer
6 hours ago, rbjtech said:

Nice 😃  Sorry, I didn't realise you already knew there were CLI utilities for the HDHR.

Another useful but undocumented one you may not know about is below - this resets the tuners if they get stuck/locked for some reason.

"c:\Program Files\Silicondust\HDHomeRun\hdhomerun_config.exe"  <ID> set /sys/restart self

 

 

No problem appreciate your input .

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...