hyperion-project/hyperion.ng

Color calibration via Kodi doesn't work

kuba-orlik opened this issue · 10 comments

  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

  1. Run Hyperion
  2. Start the color calibration wizard
  3. Enter the IP address of the Kodi instance

What is expected?

It should connect and start the wizard

What is actually happening?

A "test success - time to proceed!" message is displayed in the Kodi interface, but Hyperion says "Kodi not found, proceed without Kodi support (please check, if remote control by other systems is activated)."

System

Hyperion Server:

  • Build: master (Hyperion-Bot-5ec7849a/2aa0d01d-1702152598)
  • Build time: Dec 27 2023 17:26:32
  • Git Remote: /var/cache/private/yay/hyperion.ng-git/hyperion.ng
  • Version: 2.0.16-beta.1
  • UI Lang: en (BrowserLang: pl)
  • UI Access: expert
  • Avail Screen Cap.: framebuffer,x11,xcb,qt
  • Avail Video Cap.: v4l2
  • Avail Audio Cap.: audio
  • Avail Services: boblight,cec,effectengine,forwarder,flatbuffer,protobuffer,mDNS,SSDP,borderdetection
  • Config path: /.hyperion
  • Database: read/write

Hyperion Server OS:

  • Distribution: Arch Linux
  • Architecture: x86_64
  • CPU Model: 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz
  • CPU Type: 140
  • Kernel: linux (6.6.8-arch1-1 (WS: 64))
  • Root/Admin: true
  • Qt Version: 6.6.1
  • Python Version: 3.11.6
  • Browser: Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0

Which Kodi Version have you tested with?
Have you ensured that „remote control by other systems is activated" in Kodi?

I've tested this with Kodi Media Center 20.2 (20.2.0). I've triple-checked that "remote control by other systems" is activated in Kodi

Hi

can you check, if there are any difference in your configuration screen to the one below?

image

I just tested with LibreElec 11 and CoreElec 20 and both worked....

Closing as no feedback

@Lord-Grey Apologies for the delay, I got sick in the meantime. Yes, I can confirm the settings look like what you've shown:

IMG_20240116_174832

Here's the video of the issue:

VID_20240116_174939.mp4-lq.mp4

Please reopen this issue.

@kuba-orlik Could you do me a favour and share the messages exchanged with Kodi, please?
I cannot reproduce the problem on my side and would like to understand what Kodi responses....

To do so, please open Hyperion in the Browser and right-click and select Inspect.
Then go to the "Network" tab and select "ws".
The picture below might help to find what I am looking for.

Then start the wizard and change the IP that there is a failure.
Then change back to Kodi's IP (192.168.1.90)

Now click on the last websocket connection and share the messages with me.
The first message should look like the one on my screenshot.

You might also share the messages shown on the "Console" tab.

Many thanks for your support.

image

Ok, here are the results:

image

{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Colour calibration wizard","message":"Test success - time to proceed!","image":"info","displaytime":5000},"id":"1"}
{"id":"1","jsonrpc":"2.0","result":"OK"}
Connection closed: 1006

The JS console shows a warning:

The connection to ws://192.168.1.90:9090/jsonrpc/websocket was interrupted while the page was loading. [wizard.js:235:14](http://192.168.1.90:8090/js/wizard.js)

The line mentioned in the warning is

var ws = new WebSocket(kodiUrl);

I'm using Firefox, btw

It seems that the cb callback is sometimes called twice in the sendToKodi function - first with success, and then with error. It seems that closing the websocket triggers the .onerror handler. I think in this case it'll be useful to only call cb once. I'll draft a PR

Hi @kuba-orlik
I reworked the Kodi Wizzard that a websocket is maintained during one Kalibration session.
Would you mind testing PR #1718, if it works for you?

PS: In case you would like to test the PR without building yourself, you can test the re-build artifacts following the
Testing Pull Requests documentation.

Sorry I didn't manage to test it in time - thank you for addressing the issue! <3