[WIP] Switch King (a Tellstick 3rd party program) addon

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
nilzen Offline
Member
Posts: 62
Joined: Dec 2009
Reputation: 2
Location: SkellefteƄ, Sweden
Post: #1
I have seen a few autoexec.py scripts that executes a python file which triggers the Tellstick when a movie is started/stopped/paused/resumed but all these require the user to change in a python file if they want to change anything. So i have written a addon that's split up in two parts, a program addon where you can select a scenario or browse your devices and turn them on/off or dim. The other part is a service addon that listens to player events and triggers the selected scenario when the player event is triggered.

If anyone else is using Switch King and Xbmc please try it out and report any bugs on Github!

https://github.com/nilzen/xbmc-switchking
(This post was last modified: 2012-03-29 21:19 by nilzen.)
find quote
pabben Offline
Junior Member
Posts: 7
Joined: Mar 2012
Reputation: 0
Post: #2
Step-by-step guide for n00bs, please Wink
find quote
nilzen Offline
Member
Posts: 62
Joined: Dec 2009
Reputation: 2
Location: SkellefteƄ, Sweden
Post: #3

  1. Download the latest version from https://github.com/nilzen/xbmc-switchking/downloads
  2. Install the zip file in System > Add-ons > Install from zip file
  3. Configure the add-on
  4. Try it out!
find quote
pabben Offline
Junior Member
Posts: 7
Joined: Mar 2012
Reputation: 0
Post: #4
I LOVE YOU!!!

Had to do a restart of XBMC, but now it works like a charm!

Recommended!
find quote
kunsjef Offline
Junior Member
Posts: 1
Joined: Jul 2012
Reputation: 0
Post: #5
I can't seem to get this to work 100%. Switch King works like a charm, and I have several other addons on XBMC that work without problems. The addon can connect to the Switch King server and I can control both devices and scenarios, but the automatic video play/stop is not working.

Any ideas?
find quote
Martin75a Offline
Junior Member
Posts: 14
Joined: Nov 2011
Reputation: 0
Location: Sweden
Post: #6
Nice work. Thanks!

Is it also possible for you to add the data sources view from SK?

Best Regards
Martin
find quote
ontrose Offline
Junior Member
Posts: 32
Joined: May 2010
Reputation: 0
Post: #7
Nice, bought an tellstick duo last week ans have just started to play with it.

Is there any way to implement a time req option for example that it has to be after 19:00 for the plugin to be active?
Havent found an easy way to set time as a condition in SK

/Ontrose
find quote
meisamb Offline
Junior Member
Posts: 5
Joined: Jul 2013
Reputation: 0
Post: #8
Hi

could you write a plugin for XBMC openelec to control lamps via telldus USB?
find quote
Exile82 Offline
Junior Member
Posts: 11
Joined: Jan 2015
Reputation: 0
Post: #9
Hi! I have tried this plugin but it won't istall on XBMC (Helix on win), stating the zip file have wrong structure. I guess the addon is not updated for the Helix version.

Are there any other other addons similiar to this? I should mention I also tried an addon created by henkapenka, don't remember what it is called though. That addon is obsolete and cannot be used until developer make some upgrades.

Really appreciate any respond!
find quote
Exile82 Offline
Junior Member
Posts: 11
Joined: Jan 2015
Reputation: 0
Post: #10
Hi, I finally solved the installation issue (just needed to update the python version in the addon.xml)
But the next question, do I need to edit the settings.xml? It looks like this now, after some slight changes:
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<settings>
<setting default="192.168.1.69" label="30500" type="ipaddress" id="host"/> IP adress changed to the computer that hosts the Switchking-server
<setting default="8800" label="30501" type="text" id="port"/> Port 8800 is okay
<setting label="30502" type="text" id="username"/> I guess I need to change "username" to my actual username on the switchking server?
<setting label="30503" type="text" id="password"/> Same as above, change "password" to my actual password?
<setting type="sep"/> Ingen aning
<setting label="30510" type="bool" id="event_enabled"/>
<setting label="30511" type="action" id="event_video_play" enable="eq(-1,true)" action="RunScript($CWD/scenario_select.py, event_video_play)"/>
<setting label="30512" type="action" id="event_video_stop" enable="eq(-2,true)" action="RunScript($CWD/scenario_select.py, event_video_stop)"/>
</settings>

With these settings I still don't work. I successfully installed the addon, but when I am searching for my Devices, I receive a script error after a while. What have I missed?
I really appreciate any response!!
find quote
el_Paraguayo Offline
Donor
Posts: 764
Joined: Feb 2011
Reputation: 16
Location: London, UK
Post: #11
I know nothing about this add-on. However, I can say this: don't edit the settings.xml file. This sets up the template for the settings screen. You can change your settings by going to the add-ons menu in Kodi and then selecting "configure" from the add-on's context menu.

MythSuspendAlarm: Suspend and wake for next MythTV recording.
BBC Live Football Scores: Football scores notifications.
Random Movie Script: Play random movies from library.
find quote
Exile82 Offline
Junior Member
Posts: 11
Joined: Jan 2015
Reputation: 0
Post: #12
(2015-01-07 11:15)el_Paraguayo Wrote:  I know nothing about this add-on. However, I can say this: don't edit the settings.xml file. This sets up the template for the settings screen. You can change your settings by going to the add-ons menu in Kodi and then selecting "configure" from the add-on's context menu.
Hi!
That sounds reasonable, thanks for you input. When I changed that and when I yesterday tried to configure the addon in the GUI, the IP adress was already correct, most likely because I edited the file. But this will probably cause more errors, so I will reset the file to the default one. Thanks again!
find quote
el_Paraguayo Offline
Donor
Posts: 764
Joined: Feb 2011
Reputation: 16
Location: London, UK
Post: #13
Changing the default in settings.xml shouldn't cause a problem, changing the id will.

MythSuspendAlarm: Suspend and wake for next MythTV recording.
BBC Live Football Scores: Football scores notifications.
Random Movie Script: Play random movies from library.
find quote
Exile82 Offline
Junior Member
Posts: 11
Joined: Jan 2015
Reputation: 0
Post: #14
(2015-01-07 12:04)el_Paraguayo Wrote:  Changing the default in settings.xml shouldn't cause a problem, changing the id will.
Yes, when you put it that way I think I understand how this works. I did change the default value, but also the id value for username and password. Well, I will make another try tonight, thanks for your support!
find quote