[RELEASE] X10 - lights (Domotica Commander)

  Thread Rating:
  • 4 Votes - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
brazen1 Offline
Senior Member
Posts: 123
Joined: Dec 2012
Reputation: 1
Post: #181
Wishlist
- make it that my lights wouldn't turn when watching something during daytime

Enable/Disable determined by system clock would be great. Can't tell you how many times I manually turn off lights in the daytime.

Sadly, I've found the only function reliable is On/Off which is perfect. Dim/Bright (With or without Free Definable) often yields incorrect value for event.
Imo, the reason why is because of the time it takes to execute the command(s). On/Off is 1 quick command allowing more commands to execute in succession. Dim/Bright is a succession of commands in increments which does not allow other commands to execute within the time period.

Without getting too complicated:
I use a Harmony remote turning my devices on including my TV for an XBMC activity.
My devices consist of X10 Appliance Modules, IR543, CM19a using X10 Commander.

XMBC start event =

Device 1 (Lights) Off
Device 2 (PC Monitor) Off
Device 3 (Bass Shakers) On
This works perfectly.

XBMC start event =

Device 1 (Lights) Dim 100% = Yes
Device 2 Fails to execute
Device 3 Fails to execute
If I enter any Dim/Bright value for an event, the add-on is so busy executing the % increments, it bypasses the other commands.
X10 Commander log shows Status, Queries, Send plc's correct although they did not execute since the CM19a was busy executing the % values instead and over road the other 2 device commands. It's like they get lost in the shuffle. I can watch my IR light on the CM19a. 1 flash for on or off. Multiple flashes and a lot of time executing a % value.

I think if a 'Pause' value between executing devices and their events could be implemented, interaction would be improved. Maybe I'm the only user facing this limitation.....perhaps not?

This is still a great add-on even if On/Off is all that works for me. Thank you for creating it.
find quote
Znubbis Offline
Junior Member
Posts: 30
Joined: Jan 2009
Reputation: 0
Post: #182
I had problems with logging on to my domoticz server with this addon, I dont know why but did a fix in the code. The Author is free to use it if he wants i have myself snagged it from here: http://www.voidspace.org.uk/python/artic...tion.shtml

Search for
Code:
X10CommanderRequest = urllib2.urlopen(URL + ActionData)
in the default.py in the addon script directory.

Add the following before it, make sure its on the same tab space since python use that:

Code:
passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
passman.add_password(None, URL + ActionData, __addon__.getSetting("USER"), __addon__.getSetting("PASS"))
authhandler = urllib2.HTTPBasicAuthHandler(passman)
opener = urllib2.build_opener(authhandler)
urllib2.install_opener(opener)

After that go and disable login in the addon settings, you can rewrite the code more if you know python and remove the user:password@ further down but its easiest just to disable it for now. (Make sure you have the right user and password there first since this fix will still use whats written there)

Hope this helps someone that has the same problem as I, I'm not sure if this is a better way o handle logins to http pages or not but the other way only gave me 401 errors.

Peace!

/Magnus
find quote
ben9519 Offline
Junior Member
Posts: 2
Joined: Jul 2014
Reputation: 0
Location: The Netherlands
Post: #183
Hi,

I have some issues with the X10 - lights Domotica Commander

First of all my setup:

Raspberry Pi with Domoticz
RFXcomm 433MHz transreceiver
Intel NUC with Openelec 4.0.7 (XBMC)

I installed the add-on manually because the zip file showed some strange error with "Afhankelijkheden komen niet overeen. neem contact op"
So the add-on was working.
Then I configured the add-on and added a device to the configuration.
Started a movie and nothing happened with the lights Sad

so I reviewed the log files, and the XBMC log shows me this:

20:59:45 T:140133214963456 NOTICE: X10-Lights: *************** Handeling an Event **************
20:59:45 T:140133214963456 NOTICE: X10-Lights: Event Type = P_Resume
20:59:45 T:140133214963456 NOTICE: X10-Lights: Domoticz, Dim lights with 20% converted to: 3
20:59:45 T:140133214963456 NOTICE: X10-Lights: Domoticz, URL: http://username:password@domoticz.ip.add...el&level=3
20:59:45 T:140133214963456 NOTICE: X10-Lights: Domoticz, The DIM Event Failed
20:59:45 T:140133214963456 NOTICE: X10-Lights: Event Device ID = 12
20:59:45 T:140133214963456 NOTICE: X10-Lights: Event Action = DIM
20:59:45 T:140133214963456 NOTICE: X10-Lights: Event Value = 20
20:59:45 T:140133214963456 NOTICE: X10-Lights: Event Free CMD = False
20:59:45 T:140133214963456 NOTICE: X10-Lights: *************************************************
20:59:45 T:140133214963456 NOTICE: X10-Lights: PLAYBACK RESUMED
20:59:45 T:140131679852288 WARNING: CActiveAEStream::AddData - timeout waiting for buffer, paused: 0, cache time: 0.512000, free buffers: 0
20:59:51 T:140133214963456 NOTICE: X10-Lights: *************** Handeling an Event **************
20:59:51 T:140133214963456 NOTICE: X10-Lights: Event Type = P_Pause
20:59:51 T:140133214963456 NOTICE: X10-Lights: Domoticz, Brighten lights with 80% converted to: 12
20:59:51 T:140133214963456 NOTICE: X10-Lights: Domoticz, URL: http://username:password@domoticz.ip.add...l&level=12
20:59:51 T:140133214963456 NOTICE: X10-Lights: Domoticz, The BRIGHT Event Failed
20:59:51 T:140133214963456 NOTICE: X10-Lights: Event Device ID = 12
20:59:51 T:140133214963456 NOTICE: X10-Lights: Event Action = BRIGHT
20:59:51 T:140133214963456 NOTICE: X10-Lights: Event Value = 80
20:59:51 T:140133214963456 NOTICE: X10-Lights: Event Free CMD = False
20:59:51 T:140133214963456 NOTICE: X10-Lights: *************************************************
20:59:51 T:140133214963456 NOTICE: X10-Lights: PLAYBACK PAUSED

Then I tried to copy the urls and paste it in Google Chrome.
That worked well!
Why is XBMC not able to execute this commands? Any ideas?
(This post was last modified: 2014-07-16 11:25 by ben9519.)
find quote
ben9519 Offline
Junior Member
Posts: 2
Joined: Jul 2014
Reputation: 0
Location: The Netherlands
Post: #184
Never mind got it working already.
The changes in the add-on where applied after a reboot of the system.
That was the trick.
find quote
Shoop_NL Offline
Member
Posts: 89
Joined: Dec 2009
Reputation: 0
Location: NL
Post: #185
(2014-07-05 22:14)Znubbis Wrote:  I had problems with logging on to my domoticz server with this addon, I dont know why but did a fix in the code. The Author is free to use it if he wants i have myself snagged it from here: http://www.voidspace.org.uk/python/artic...tion.shtml

Search for
Code:
X10CommanderRequest = urllib2.urlopen(URL + ActionData)
in the default.py in the addon script directory.

Add the following before it, make sure its on the same tab space since python use that:

Code:
passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
passman.add_password(None, URL + ActionData, __addon__.getSetting("USER"), __addon__.getSetting("PASS"))
authhandler = urllib2.HTTPBasicAuthHandler(passman)
opener = urllib2.build_opener(authhandler)
urllib2.install_opener(opener)

After that go and disable login in the addon settings, you can rewrite the code more if you know python and remove the user:password@ further down but its easiest just to disable it for now. (Make sure you have the right user and password there first since this fix will still use whats written there)

Hope this helps someone that has the same problem as I, I'm not sure if this is a better way o handle logins to http pages or not but the other way only gave me 401 errors.

Peace!

/Magnus

I will try to check this and if I find a similar problem I will add it to the new release, thanx for your info.

(2014-07-17 09:05)ben9519 Wrote:  Never mind got it working already.
The changes in the add-on where applied after a reboot of the system.
That was the trick.

That is good
(This post was last modified: 2014-07-27 16:42 by Shoop_NL.)
find quote
Post Reply