2014-02-02, 02:17
Hi,
This is my first attempt at a Python addon script for XBMC. It has been 10 years since I have used Python, and only ever in the Zope environment. To say this has been a very time consuming (and at times extremely frustrating) foray into xbmc addon development would be an understatement. Somehow I have managed to hack together something that works (at least for me). Now I would like to release it on the unsuspecting world.
I started with a simple idea… I wanted to be able to control INSTEON Scenes from within XBMC – using the new INSTEON Hub as the INSTEON Scene controller (this may also work with the older SmartLinc 2414N controller - however I have not tested this - please let me know if it does).
Luckily there are a number of scripts that have been written for other home automation technologies – MiCasaVerde Vera (here), Philips Hue (here) and some others (here). I started with these scripts (as they all seem to be basically the same) and thought “wow, this will be easy, all I need to do is adapt the HTTP calls to work with the INSTEON Hub”. Wrong!
It would seem that the scripts did not work in their entirety, in particular the pause/resume control as well as urllib2.urlopen (see my post about this here - a big thank you to the people that helped to turn me onto the requests module instead of using urllib2).
Now, as this is my first attempt at an addon, I am sure that there are going to be issues, better ways to write the code and different approaches. I am looking for feedback from the xbmc python community to test and improve this addon - hopefully achieving best practices and compatibility with XBMC.
Any and all input is sincerely appreciated.
As this is as much about improving the addon, it is also about me learning, so if you have suggestions, it would be greatly appreciated if you were able to include the reasoning – so I can learn (and I am sure it will help others).
The setup and use should be self evident from the addon config settings and code. However I will work to compile a complete user guide shortly (Edit: see post number 3 below). Don’t worry if you do not have the INSTEON Hub, I have tried to include a debugging mode (turn on/off in the settings) so you will still be able to test the addon.
Thank you for taking the time to have a look at my first attempt at an XBMC addon – I hope it is useful for someone out there!
Without further adieu, let the critiquing begin… (be gentle please)…
INSTEON Hub XBMC Event Addon Zip
(note I will replace this link as newer versions become available):
Download
services.insteon.addon.0.2.1.zip
Changelog
- Various bug fixes and improvements
Older versions
services.insteon.addon.0.1.5.zip
services.insteon.addon.0.1.2.zip
User Guide
Please see post 3 below.
PS If anyone is interested in really getting involved in the development of this addon and can spare some time (and brain cells), please pm me, I would love to hear from you.
This is my first attempt at a Python addon script for XBMC. It has been 10 years since I have used Python, and only ever in the Zope environment. To say this has been a very time consuming (and at times extremely frustrating) foray into xbmc addon development would be an understatement. Somehow I have managed to hack together something that works (at least for me). Now I would like to release it on the unsuspecting world.
I started with a simple idea… I wanted to be able to control INSTEON Scenes from within XBMC – using the new INSTEON Hub as the INSTEON Scene controller (this may also work with the older SmartLinc 2414N controller - however I have not tested this - please let me know if it does).
Luckily there are a number of scripts that have been written for other home automation technologies – MiCasaVerde Vera (here), Philips Hue (here) and some others (here). I started with these scripts (as they all seem to be basically the same) and thought “wow, this will be easy, all I need to do is adapt the HTTP calls to work with the INSTEON Hub”. Wrong!
It would seem that the scripts did not work in their entirety, in particular the pause/resume control as well as urllib2.urlopen (see my post about this here - a big thank you to the people that helped to turn me onto the requests module instead of using urllib2).
Now, as this is my first attempt at an addon, I am sure that there are going to be issues, better ways to write the code and different approaches. I am looking for feedback from the xbmc python community to test and improve this addon - hopefully achieving best practices and compatibility with XBMC.
Any and all input is sincerely appreciated.
As this is as much about improving the addon, it is also about me learning, so if you have suggestions, it would be greatly appreciated if you were able to include the reasoning – so I can learn (and I am sure it will help others).
The setup and use should be self evident from the addon config settings and code. However I will work to compile a complete user guide shortly (Edit: see post number 3 below). Don’t worry if you do not have the INSTEON Hub, I have tried to include a debugging mode (turn on/off in the settings) so you will still be able to test the addon.
Thank you for taking the time to have a look at my first attempt at an XBMC addon – I hope it is useful for someone out there!
Without further adieu, let the critiquing begin… (be gentle please)…
INSTEON Hub XBMC Event Addon Zip
(note I will replace this link as newer versions become available):
Download
services.insteon.addon.0.2.1.zip
Changelog
- Various bug fixes and improvements
Older versions
services.insteon.addon.0.1.5.zip
services.insteon.addon.0.1.2.zip
User Guide
Please see post 3 below.
PS If anyone is interested in really getting involved in the development of this addon and can spare some time (and brain cells), please pm me, I would love to hear from you.