Toon app: Kodi media player

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, Toonz

cygnusx
Starting Member
Starting Member
Posts: 48
Joined: Tue Apr 14, 2015 10:12 am

Toon app: Kodi media player

Post by cygnusx »

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? :) )
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Software: modifications and extensions Toon

Post by Tom »

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?
robertk
Starting Member
Starting Member
Posts: 2
Joined: Wed Jun 01, 2016 5:37 pm

Re: Software: modifications and extensions Toon

Post by robertk »

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!
cygnusx
Starting Member
Starting Member
Posts: 48
Joined: Tue Apr 14, 2015 10:12 am

Re: Software: modifications and extensions Toon

Post by cygnusx »

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
robertk
Starting Member
Starting Member
Posts: 2
Joined: Wed Jun 01, 2016 5:37 pm

Re: Software: modifications and extensions Toon

Post by robertk »

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).
cygnusx
Starting Member
Starting Member
Posts: 48
Joined: Tue Apr 14, 2015 10:12 am

Re: Software: modifications and extensions Toon

Post by cygnusx »

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: Tue Apr 14, 2015 10:12 am

Re: Software: modifications and extensions Toon

Post by cygnusx »

More screenshots about the work in progress last evening :)
Image
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Software: modifications and extensions Toon

Post by marcelr »

Nice work, keep it up!

grtz,

marcelr
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Software: modifications and extensions Toon

Post by hvxl »

Very nice. I'm looking forward to your explanation of how you accomplished it.
Schelte
cygnusx
Starting Member
Starting Member
Posts: 48
Joined: Tue Apr 14, 2015 10:12 am

Re: Software: modifications and extensions Toon

Post by cygnusx »

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 837 times
RomMon
Starting Member
Starting Member
Posts: 44
Joined: Mon Aug 29, 2016 9:05 pm

Re: Software: modifications and extensions Toon

Post by RomMon »

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 678 times
kodiRemote_001.zip
Username password support
(1.01 KiB) Downloaded 669 times
Last edited by RomMon on Wed Feb 01, 2017 1:04 am, edited 3 times in total.
Eddieb85
Starting Member
Starting Member
Posts: 3
Joined: Sun Feb 04, 2018 8:56 pm

Re: Toon app: Kodi media player

Post by Eddieb85 »

Hello,

Is the Kodi plugin compatibel w
For the latest software version of the Toon?
ronalddehaan
Starting Member
Starting Member
Posts: 29
Joined: Mon Aug 21, 2017 8:58 am

Re: Toon app: Kodi media player

Post by ronalddehaan »

Hi CygnusX,

Your app looks nice! Will it be made available in the Toonstore anytime soon? :D
angeloloi
Starting Member
Starting Member
Posts: 5
Joined: Sun Jun 17, 2018 4:01 pm

Re: Toon app: Kodi media player

Post by angeloloi »

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 16670 times
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: Software: modifications and extensions Toon

Post by timkoers »

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:
Post Reply

Return to “Toon Apps”