Kodi Community Forum

Full Version: Exiting HDHomeRun via command line
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Is they any way to exit out of HDHomeRun native addon, direct to kodi without first entering the settings via the back button?

I would like to be able to exit the addon via the command line or kodi send, similar to how you would launch it...

Code:
kodi-send --host=127.0.0.1 --action="RunAddon(script.hdhomerun.view)"


For me it seems strange that you first have to go to the settings to exit out of the addon. In my experience with other addons and indeed with local content
the back button would quit the addon and return you to kodi and the settings would be available via a separate button.

Thanks in advance,
Regards.
--action="activatewindow(home)" I would think.
Thanks nickr,

--action="activatewindow(home)" just brings up the channel guide.

--action="XBMC.PlayerControl(Stop)" will stop the stream and bring up the settings page from there I must select exit.

It seems the only option I have to quit out of the hdhomerun addon without invoking the gui is to restart kodi.

is this correct?

kind regards,
I'll have a play later. don't have a tv/kodi on now.
What about the StopScript() function?

Also, this forum is for the PVR client managed by the PVR Manager, not SD's HDHomeRun addon.
Hi rpcameron,

Apologies for posting in wrong place.

I have tried your suggestion, not sure I'm formatting this correctly but it is crashing the addon/kodi

kodi-send --host=127.0.0.1 --action="StopScript(script.hdhomerun.view)"

kind regards,
All I can say is if you wish the addon to behave differently, then perhaps you ought to ask the authors how they see it working, The SD forums have a place for the Kodi addon, as they are the ones that develop it.

Personally, I can't help beyond offering a suggestion as I don't care for their software in any way.
Code:
kodi-send --host=localhost --action="Stop" --action="Right" --action="Select"

That kinda works if you do them one at a time, but doing it all in one line seems to result in the codes being sent too soon. Maybe something like
Code:
kodi-send --host=localhost --action="Stop"
sleep 2
kodi-send --host=localhost --action="Right" --action="Select"

But I'll leave you to play with that.
OK so I couldn't stop playing...

Code:
kodi-send --host=localhost --action="Stop" && sleep 2 && kodi-send --host=localhost --action="Right" --action="Select"
works for me.
Thanks nickr,

That works a treat!
Yeah but its a hack. The addon should exit gracefully. StopScript crashed on mine too.
(2017-04-29, 04:11)rpcameron Wrote: [ -> ]Personally, I can't help beyond offering a suggestion as I don't care for their software in any way.

Are you using some other piece of software to control your HDHomeRun?

(2017-04-29, 05:24)nickr Wrote: [ -> ]OK so I couldn't stop playing...

Code:
kodi-send --host=localhost --action="Stop" && sleep 2 && kodi-send --host=localhost --action="Right" --action="Select"
works for me.

Excuse my total noobness, but where/how are you putting this into Kodi? I can't stand the way the app "exits" either....
Kodi-send is generally used via command line, you would need to ssh into the device running kodi and then issue the command.

You could also tie the command to your remote or keyboard in keymaps.

Personally my intention was to have the “sleep timer” addon issue the command after a predefined period of inactivity

As nickr says the above kodi-send actions are “just a hack” to manipulate the gui, as if you was pressing the keys on the remote, not ideal but it works.
There really should be a way to interact with the hdhomerun script directly without resorting to messing with the gui.