Exiting HDHomeRun via command line

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
fattoony Offline
Junior Member
Posts: 40
Joined: Jan 2011
Reputation: 1
Post: #1
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.
find quote
nickr Offline
Team-Kodi Member
Posts: 17,660
Joined: May 2009
Reputation: 356
Location: Christchurch NZ
Post: #2
--action="activatewindow(home)" I would think.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
fattoony Offline
Junior Member
Posts: 40
Joined: Jan 2011
Reputation: 1
Post: #3
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,
find quote
nickr Offline
Team-Kodi Member
Posts: 17,660
Joined: May 2009
Reputation: 356
Location: Christchurch NZ
Post: #4
I'll have a play later. don't have a tv/kodi on now.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
rpcameron Offline
Fan
Posts: 593
Joined: Nov 2015
Reputation: 25
Post: #5
What about the StopScript() function?

Also, this forum is for the PVR client managed by the PVR Manager, not SD's HDHomeRun addon.
find quote
fattoony Offline
Junior Member
Posts: 40
Joined: Jan 2011
Reputation: 1
Post: #6
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,
find quote
rpcameron Offline
Fan
Posts: 593
Joined: Nov 2015
Reputation: 25
Post: #7
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.
find quote
nickr Offline
Team-Kodi Member
Posts: 17,660
Joined: May 2009
Reputation: 356
Location: Christchurch NZ
Post: #8
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.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
nickr Offline
Team-Kodi Member
Posts: 17,660
Joined: May 2009
Reputation: 356
Location: Christchurch NZ
Post: #9
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.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
fattoony Offline
Junior Member
Posts: 40
Joined: Jan 2011
Reputation: 1
Post: #10
Thanks nickr,

That works a treat!
find quote
nickr Offline
Team-Kodi Member
Posts: 17,660
Joined: May 2009
Reputation: 356
Location: Christchurch NZ
Post: #11
Yeah but its a hack. The addon should exit gracefully. StopScript crashed on mine too.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
Usafle Offline
Member
Posts: 72
Joined: Jan 2017
Reputation: 1
Post: #12
(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....
find quote
fattoony Offline
Junior Member
Posts: 40
Joined: Jan 2011
Reputation: 1
Post: #13
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.
find quote