Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Testers wanted] Hyperion-Control for Kodi #474

Open
brindosch opened this issue Sep 15, 2017 · 19 comments

Comments

Projects
None yet
@brindosch
Copy link
Member

commented Sep 15, 2017

Hello everyone, i am pleased to provide you the first testing version of a new Kodi Addon for Hyperion.
This addon will replace the KodiCheck at Hyperion!

Current functions:

  • Enable or disable a Hyperion component of your choice based on the conditions you already know from KodiChecker
  • Enable 2D/3D switch (has a little bug due to missing python apis / race condition with json rpc)
  • Enable Hyperion on startup / disable on shutdown
  • Settings reload during runtime
  • Kodi 17/18

Flaws:

  • http! No detection of hyperion restarts, move to websocket or raw tcp socket.

Please install with "install from zip file"
Don't forget to leave some feedback
script.service.hyperion-control-0.0.3.zip

@redPanther

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2017

@brindosch

This comment has been minimized.

Copy link
Member Author

commented Sep 16, 2017

I already tried that to implement, but failed. I got no reponse/handshake, exception. No clue what i am doing wrong here. But this is my first python "app" so i have no experience which may result in simple issues. Maybe it's a lifetime issues. You can have a look at connect_ws.py which was a test.

Anyway, a huge issues are loops that freezes everything, esp the send/recv. They need to quit when kodi requests it, so that the script can properly exit / perform exit tasks.

Some things i forgot to mention

  • i forgot pictures mode!
  • kodi supports a reload of settings during runtime, this is full implemented, but kodi returns always old values, no clue why, need to ask kodi pros. (That worked earlier in development )
  • Kodi 17 only
@redPanther

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2017

Will test it asap.
On our forum I had posted pycode for raw connection. I fon't know where exectly, but perhaps you find the code

@brindosch

This comment has been minimized.

Copy link
Member Author

commented Sep 22, 2017

Hello again,
updated first post with new zip (v0.0.2).
Changes

  • Code cleanup
  • startup wizard (sadly it's not that what i intended for, because of a issue with setSetting(). Maybe find the issue)
  • fixed read settings during runtime

@redPanther
I didn't found your post, can you remember at least in which area you posted it or topic it was related to?
the whole socket stuff is not as easy as i thought if you want it as clean as possible with async send/read, non blocking. Like a QTcpSocket :)

@brindosch

This comment has been minimized.

Copy link
Member Author

commented Nov 28, 2017

Update - V0.0.3

-Can be installed on Kodi 18

@nrosier

This comment has been minimized.

Copy link

commented Dec 4, 2017

I'm unable to get the same behaviour as with Kodi + hyperion "classic"

Setup:
amlgrabber priority 100
boblight server priority 110
v4l-grabber priority 120

with hyperion "classic" if nothing is playing on Kodi it will give priority to the boblight server or the v4l-grabber. since the switch to hyperion.ng the amlgrabber keeps having the highest priority so boblight and v4l-grabber are never used.
tried to fix this with this addon which should replace the old kodichecker but the behaviour is still the same. only amlgrabber is active.
how can I fix this?

@nrosier

This comment has been minimized.

Copy link

commented Dec 4, 2017

Got a step closer. Turned out I had to restart Kodi for the addon to activate. But still having trouble getting the v4l-grabber to activate. It works when I give it a higher priority than the platform grabber.

@brindosch

This comment has been minimized.

Copy link
Member Author

commented Jan 8, 2018

Hello @nrosier
thank you for your feedback, actually you can just control one component. Which means you need to decide if you want to control the platform capture or usb. V4l can automatically disable and enable itself based on signal (There is a bug which prevents auto enable).
Probably i will add a second component tab (by the risk of more user confusion)

brindosch

@nrosier

This comment has been minimized.

Copy link

commented Jan 10, 2018

Hello @brindosch

I've fixed it by "hacking" this: https://github.com/Hwulex/hyperion-config-switch
In stead of switching config based on my AVR's input, I just use a hyperion-remote command to disable/enable the required component. Or disabled the LED's when the AVR is powered off.

@007hacky007

This comment has been minimized.

Copy link

commented Jan 27, 2018

Thank you for this addon! Seems to work perfectly for my setup:
hyperion-ng with grabber and forwarder to second hyperion-ng instance running in VM with access to arduino nano.

Works as expected: enable lights on playback and when starting kodi and disable them when kodi is off or on screensaver.

@newkind

This comment has been minimized.

Copy link

commented May 11, 2018

I just tested this addon and I noticed two issues.

  1. With enabled "Hyperion during Pause", when you play the video - you won't get the led light until you pause the video at least once during the playback

  2. When you have enabled the video play detection - Live TV from ie. TVHeadend doesn't trigger Hyperion

UPDATE: Looks like isPlayingVideo() does work only with regular video and not Live TV. This is either by design or it's a bug in Kodi Leia. I haven't found any other checks specifically for the Live TV or streaming so not sure about it.

Anyways changing line 170 in service.py from :
if self.player.isPlayingVideo():
to:
if self.player.isPlaying():

This is just a temp workaround for anyone that wants it.

@zenji101

This comment has been minimized.

Copy link

commented Jun 11, 2018

Thanks for the addon;
Running an Odriod C2, Coreelec, Hyperion.ng addon service.
Like @newkind I have the issue where LED lights don't work until paused, then resumed. But I only have Video play detection enabled .....
Would the workaround listed work for me too?

@zenji101

This comment has been minimized.

Copy link

commented Jun 12, 2018

never mind - I gave it a shot and so now it works!! Yey!
Thanks @newkind and of course @brindosch

Regards
Z.

@tbrasser

This comment has been minimized.

Copy link

commented Nov 7, 2018

Nice, got this working (including LiveTV 'fix'), only thing I did was put the playingaudiocheck before the playing(video), so the distinction between them would still be made.

@AndyMel

This comment has been minimized.

Copy link

commented Mar 1, 2019

Hi, is possible to run this script on LE 9 kodi 18 on s812 analogic ?

@AndyMel

This comment has been minimized.

Copy link

commented Mar 1, 2019

amlogic wanted to say

@Cyriltra

This comment has been minimized.

Copy link

commented May 5, 2019

Hi, thank you for this addon, definitively very useful with hyperion-ng
How the target component setting works actually ?
I can select either:

  • platform capture
  • Hyperion
  • Boblight server
  • UDP Listener
  • Forwarder
  • Blackborder detection
  • Smoothing
  • Led hardware
  • USB capture

I just want the leds to be turned on when I play a movie. Otherwise they need to be off.
So i've selected platform capture, should I select Hyperion instead ? what is the difference ?

@Cyriltra

This comment has been minimized.

Copy link

commented May 15, 2019

Hello,
version 0.0.3 was not working for me as the selected component would be disabled but the LEDs were still ON but not refreshed....
So i've modified this addon to instead set LEDs brightness to 0 when I want them OFF and to whatever level i want (0 to 100) whenever I need them to be ON.
My version:
script.service.hyperion-control.0.0.4.zip

@UniCizin

This comment has been minimized.

Copy link

commented Jun 2, 2019

Hey,
i tried it with the newest version of Hyperion.ng but it doesnt work.
i tried to deactivate USB Capture while Kodi plays a Video, but Hyperion debugger shows me only this message
[hyperiond JSONCLIENTCONNECTION] (ERROR) Failed to parse json data from JsonRpc@::ffff:192.168.0.33: Error: illegal value at Line: 0, Column: 1
[hyperiond JSONCLIENTCONNECTION] (ERROR) Failed to parse json data from JsonRpc@::ffff:192.168.0.33: Error: illegal value at Line: 1, Column: 0

the IP is the Kodi Box.
I used the JSON-RPC-Port of Hyperion.ng (19444)

i used version 0.0.3 and 0.0.4 (but i liked 0.0.3. more because of the ability to choose the components)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.