Domoticz service addon for Kodi

Post Reply
moengiant
Posts: 13
Joined: Monday 25 January 2016 7:33
Target OS: Windows
Domoticz version:
Contact:

Domoticz service addon for Kodi

Post by moengiant » Monday 25 January 2016 9:39

I created an addon for Kodi that uses the player's status to control Domoticz scenes. You can configure the addon to activate different scenes when the player starts, is paused, stopped or ends. This can also be configured separately for audio playback as well.

If you know how to create or edit a key map for Kodi you can additional create a custom menu with 5 additional settings of your choosing.
Very easy to add to the keymap. Just add this line between the <keyboard></keyboard> tags:

<keymap>
<global>
<keyboard>
<d mod="ctrl">SetProperty(Domoticzmenu,true,10000)</d>
</keyboard>
</global>
<Home>
<keyboard>
</keyboard>
</Home>
</keymap>

Now when the control + d keys are pressed the Domoticz menu will display.

Default location for the keymap.xml file - In some cases you will need to create the file.
Operative system File path
Android: Android/data/org.xbmc.kodi/files/.kodi/userdata/ (see note)
iOS: /private/var/mobile/Library/Preferences/Kodi/userdata/
Linux: ~/.kodi/userdata/
Mac: /Users/<your_user_name>/Library/Application Support/Kodi/userdata/ (see note)
OpenELEC: /storage/.kodi/userdata/
Windows: Start - type %APPDATA%\kodi\userdata - press <Enter>


This addon is a port of Brad Arthur's hard work with his Insteon addon that I tweaked to work for both InControl and now Domoticz.
If something doesn't work let me know as I didn't do any major testing on this.

Here is the link on Github - https://github.com/moengiant/DomoKodi
I'd rather have a bottle in front of me than a frontal lobotomy

Deluka
Posts: 21
Joined: Thursday 03 March 2016 19:38
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Domoticz service addon for Kodi

Post by Deluka » Sunday 03 April 2016 15:30

Hello
Trying this script but getting a error inside KODI to check the log
This is what i get there

Code: Select all

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: 
Error Contents: global name 'user' is not defined
Traceback (most recent call last):
File "/storage/.kodi/addons/DomoKodi-master/default.py", line 533, in 
Domoticz_direct( ip = hip, port = hport, username = huser, password = hpword, command = g_video_paused )
File "/storage/.kodi/addons/DomoKodi-master/default.py", line 79, in Domoticz_direct
url = 'http://%s:%s\@%s:%s/json.htm?type=command&param=switchscene&idx=%s&switchcmd=On' % (user,password,ip,port,command)
NameError: global name 'user' is not defined
-->End of Python script error report<--
I'm using version 6.0.3 of openelec

moengiant
Posts: 13
Joined: Monday 25 January 2016 7:33
Target OS: Windows
Domoticz version:
Contact:

Re: Domoticz service addon for Kodi

Post by moengiant » Sunday 29 May 2016 1:17

On line 79 (user,password,ip,port,command) should be (username,password,ip,port,command)
I'd rather have a bottle in front of me than a frontal lobotomy

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests