Toon app: Kodi media player

Forum about forum-provided applications on Toon

Moderator: marcelr

Toon app: Kodi media player

Postby cygnusx » Wed Jun 01, 2016 2:01 pm

This thread has been created on may 25th, 2017. It holds posts pertaining to the Kodi remote app. Since the first posts were extracted from another thread, some remarks in them may seem a bit odd.

So, i'm working at making a KODI plugin for Toon. In short, when KODI is active, it shows a kodi icon in the systray on the right top, next to your mailbox icon e.d.

When you click on it, you get a fullscreen kodi remote. Great for easily switching music, pausing e.d. (and it's cool).

(Is this something to post here? or only when finished including code? :) )
cygnusx
Starting Member
Starting Member
 
Posts: 48
Joined: April 2015

Re: Software: modifications and extensions Toon

Postby Tom » Wed Jun 01, 2016 2:56 pm

That sounds great, I don't have Kodi but the code should give a good start for other plugins!

I was thinking about creating a Domoticz remote (when I get the thermostat connection working..)
Does anybody have some Domoticz functions working on the Toon yet?

Is it as easy as just opening a 'webbrowser' to the Kodi remote webpage or do you fully implement it in qml yourself?
Tom
Starting Member
Starting Member
 
Posts: 25
Joined: May 2016

Re: Software: modifications and extensions Toon

Postby robertk » Wed Jun 01, 2016 4:42 pm

I have created some custom tiles to control all my blinds using Domoticz REST calls (it actually works with all switches in Domoticz). Will post the source code after I clean it up ;-)

I am certainly interested in Kodi integration as well as buienradar integration... If someone already has that working, please share!
robertk
Starting Member
Starting Member
 
Posts: 2
Joined: June 2016

Re: Software: modifications and extensions Toon

Postby cygnusx » Thu Jun 02, 2016 1:09 pm

I can post some work in progress pics here ;)

I also made a custom extension which controls my blinds and lamps. To clarify, i'm NOT using Hue lamps, but my own klikaanklikuit lights, homemade screen switches, and a raspberry pi controller.
Image


Then onto the Kodi plugin. I'm trying to make this one in a way that other ppl here can also use it. But as you can see it's still very much work in progress:
Image
That's the icon in the tray :)

Image
The view. I copied the basis from another screen in Toon, can you guess which one? ;)

As you can see, still much to do. :D
cygnusx
Starting Member
Starting Member
 
Posts: 48
Joined: April 2015

Re: Software: modifications and extensions Toon

Postby robertk » Thu Jun 02, 2016 1:23 pm

Nice work :D

I used a different approach; I implemented every Domoticz blind / light switch is a separate tile. This is kind of ugly, since you would need to transfer some QML scripts for every switch you would like to control (as well as editing the QML to provide the correct Domoticz ID). I'm using a timer per tile to update Toon with the correct status and retrieve the name from Domoticz as well.

I'm currently working out a way to add generic "domoticz switch" tiles, which you can configure yourself by tapping on them (i.e. you can provide the Domiticz IDX instead of hard-coding them).
robertk
Starting Member
Starting Member
 
Posts: 2
Joined: June 2016

Re: Software: modifications and extensions Toon

Postby cygnusx » Thu Jun 02, 2016 1:56 pm

I did that before too, but i like my new approach better. The popout screen button is visible even if the screen is dimmed. So, if i walk to my toon, it's two clicks to activate every light and screen i have. With tiles, it would be 1 tap to wake up toon, 1 tap to switch to next screen and then at least a tap to enable the light.

But, about the tiles. If you look at the controlpanel folder. There you can find some code which generates tiles for every hue lamp and plug you have. That's also on the fly. Maybe you can use that to generate tiles for your domoticz devices.
cygnusx
Starting Member
Starting Member
 
Posts: 48
Joined: April 2015

Re: Software: modifications and extensions Toon

Postby cygnusx » Fri Jun 03, 2016 1:13 pm

More screenshots about the work in progress last evening :)
Image
cygnusx
Starting Member
Starting Member
 
Posts: 48
Joined: April 2015

Re: Software: modifications and extensions Toon

Postby marcelr » Sat Jun 04, 2016 9:11 pm

Nice work, keep it up!

grtz,

marcelr
marcelr
Advanced Member
Advanced Member
 
Posts: 934
Joined: May 2012
Location: Ehv

Re: Software: modifications and extensions Toon

Postby hvxl » Sun Jun 05, 2016 4:08 pm

Very nice. I'm looking forward to your explanation of how you accomplished it.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1106
Joined: June 2010

Re: Software: modifications and extensions Toon

Postby cygnusx » Mon Jun 06, 2016 3:38 pm

So, last night i finished the first beta version of my Kodi remote app :)
It's a tray icon with a fullscreen app. It's designed to not go to sleep when opened :)
Image

How to install:
  1. Unzip the folder to /HCBv2/qml/apps
  2. Edit the /HCBv2/qml/apps/kodiRemote/MediaScreen.qml file. You will find a hostName and portNum string. Edit this to match the location of your Kodi webinterface.
  3. Edit the file: /HCBv2/qml/qb/base/Globals.qml , here around line 80 add the line:
    Code: Select all
    "kodiRemote",

    so: before:
    Code: Select all
                      var appsToLoad = [
                         "homescreen",
                         "systray",
                         "inbox",
                         "thermostat",
                         "clock",
                         "weather",

    After:
    Code: Select all
                      var appsToLoad = [
                         "homescreen",
                         "systray",
                         "inbox",
                         "thermostat",
                         "clock",
                         "weather",
                         "kodiRemote",
  4. Restart QT, by a reboot or via
    Code: Select all
    killall -9 qt-gui
Done :)
Attachments
kodiRemote.zip
Kodi remote v0.1
(42.26 KiB) Downloaded 256 times
cygnusx
Starting Member
Starting Member
 
Posts: 48
Joined: April 2015

Re: Software: modifications and extensions Toon

Postby RomMon » Sun Dec 18, 2016 2:11 am

A small patch to have username/password support for kodiRemote.
You can apply this patch even if you use the default username on Kodi without password (the default configuration).

EDIT (2016-12-22): the patch accidentally also changes the hostname and port number from its default. Be aware of that.
EDIT (2016-12-31): added a new patch with default hostname and port number. (kodiRemote_001_v2.zip)

(what this patch actually does is just adding the following parameters , userStr, passwdStr at the end of each xmlhttp.open command, and create variables with the correct values.)

copy patch file to /HCBv2/qml/apps/ (e.g. using WinSCP)
and execute:
patch -p0 < kodiRemote_001.patch

example
Code: Select all
# pwd
/HCBv2/qml/apps
# ls -la *.patch
-rw-r--r--    1 root     root          3395 Dec 18 00:59 kodiRemote_001.patch
# patch -p0 < kodiRemote_001.patch
patching file ./kodiRemote/MediaScreen.qml
Attachments
kodiRemote_001_v2.zip
Username password support, hostname port correction
(997 Bytes) Downloaded 116 times
kodiRemote_001.zip
Username password support
(1.01 KiB) Downloaded 117 times
Last edited by RomMon on Wed Feb 01, 2017 12:04 am, edited 3 times in total.
RomMon
Starting Member
Starting Member
 
Posts: 39
Joined: August 2016

Re: Toon app: Kodi media player

Postby Eddieb85 » Mon Feb 05, 2018 10:35 pm

Hello,

Is the Kodi plugin compatibel w
For the latest software version of the Toon?
Eddieb85
Starting Member
Starting Member
 
Posts: 3
Joined: February 2018

Re: Toon app: Kodi media player

Postby ronalddehaan » Fri Mar 02, 2018 2:41 pm

Hi CygnusX,

Your app looks nice! Will it be made available in the Toonstore anytime soon? :D
ronalddehaan
Starting Member
Starting Member
 
Posts: 24
Joined: August 2017

Re: Toon app: Kodi media player

Postby angeloloi » Sat Jun 23, 2018 2:47 pm

I know its been 2 years ago, but i`ve installed the kodi app, latest firmware on the Toon
it has connection but nothing shows up in the screen.
see attachment.
Is there a way to fix this?

Schermopname (1).png
Schermopname (1).png (13.14 KiB) Viewed 2588 times
angeloloi
Starting Member
Starting Member
 
Posts: 5
Joined: June 2018

Re: Software: modifications and extensions Toon

Postby timkoers » Fri Aug 03, 2018 3:57 pm

cygnusx wrote:I can post some work in progress pics here ;)

I also made a custom extension which controls my blinds and lamps. To clarify, i'm NOT using Hue lamps, but my own klikaanklikuit lights, homemade screen switches, and a raspberry pi controller.
Image



Can you share this extension? :D
Btw, what's your favorite, Super String? :wink:
timkoers
Starting Member
Starting Member
 
Posts: 40
Joined: June 2018

Next

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 0 guests