[RELEASE] X10 - lights (Domotica Commander)
(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:[email protected] 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
Reply
 
Thread Rating:
  • 4 Vote(s) - 4.75 Average


Messages In This Thread
[No subject] - by m0v1em4n - 2011-09-19, 22:19
[No subject] - by m0v1em4n - 2011-09-20, 10:10
[No subject] - by m0v1em4n - 2011-09-20, 13:33
[No subject] - by Shoop_NL - 2011-09-20, 17:17
[No subject] - by Livin - 2011-09-20, 17:55
[No subject] - by m0v1em4n - 2011-09-20, 19:28
[No subject] - by Shoop_NL - 2011-09-20, 19:31
[No subject] - by Shoop_NL - 2011-09-20, 19:32
[No subject] - by m0v1em4n - 2011-09-20, 20:33
[No subject] - by m0v1em4n - 2011-09-20, 21:18
[No subject] - by Shoop_NL - 2011-09-20, 21:52
[No subject] - by Livin - 2011-09-20, 23:16
[No subject] - by Shoop_NL - 2011-09-20, 23:39
[No subject] - by m0v1em4n - 2011-09-21, 07:45
[No subject] - by Shoop_NL - 2011-09-21, 15:02
[No subject] - by m0v1em4n - 2011-09-21, 15:57
[No subject] - by m0v1em4n - 2011-09-21, 19:41
[No subject] - by Shoop_NL - 2011-09-21, 20:50
[No subject] - by m0v1em4n - 2011-09-22, 08:52
V0.0.4 Released - by Shoop_NL - 2011-09-25, 14:07
[No subject] - by Shoop_NL - 2011-09-25, 15:57
[No subject] - by m0v1em4n - 2011-09-26, 01:09
[No subject] - by RockerC - 2011-09-26, 12:13
[No subject] - by Shoop_NL - 2011-09-26, 18:55
[No subject] - by m0v1em4n - 2011-09-26, 19:01
[No subject] - by Shoop_NL - 2011-10-01, 15:04
[No subject] - by Shoop_NL - 2011-10-01, 15:14
[No subject] - by m0v1em4n - 2011-10-01, 16:44
[No subject] - by RockerC - 2011-10-03, 12:05
[No subject] - by Kn0wn1 - 2011-10-05, 14:23
[No subject] - by Shoop_NL - 2011-10-06, 19:38
[No subject] - by Kn0wn1 - 2011-10-06, 20:25
[No subject] - by Shoop_NL - 2011-10-06, 21:13
[No subject] - by Kn0wn1 - 2011-10-07, 02:02
[No subject] - by Kn0wn1 - 2011-10-07, 03:07
[No subject] - by Shoop_NL - 2011-10-07, 17:57
[No subject] - by Kn0wn1 - 2011-10-07, 23:17
[No subject] - by Deejens - 2011-10-26, 17:23
[No subject] - by Shoop_NL - 2011-10-30, 10:48
[No subject] - by Invincer - 2011-10-30, 16:13
[No subject] - by Shoop_NL - 2011-10-30, 17:53
[No subject] - by Livin - 2011-10-30, 19:01
[No subject] - by Invincer - 2011-10-31, 05:32
[No subject] - by giftie - 2011-11-01, 17:37
[No subject] - by Livin - 2011-11-01, 18:03
[No subject] - by kalross - 2011-11-02, 04:02
[No subject] - by kalross - 2011-11-02, 07:12
[No subject] - by the-pred - 2011-11-02, 14:14
[No subject] - by kalross - 2011-11-02, 17:35
[No subject] - by Livin - 2011-11-02, 17:49
[No subject] - by baguzzo86 - 2011-11-07, 20:38
[No subject] - by Shoop_NL - 2011-11-12, 10:42
[No subject] - by Shoop_NL - 2011-11-12, 10:46
[No subject] - by Martin75a - 2011-12-14, 22:44
[No subject] - by Shoop_NL - 2011-12-24, 18:25
[No subject] - by Martin75a - 2011-12-30, 14:55
Next Release - by Tophicles - 2012-01-25, 23:14
New version? - by Tophicles - 2012-02-02, 17:22
+1 - by nelsonamen - 2012-02-03, 11:36
[No subject] - by Martin75a - 2012-02-10, 18:17
[No subject] - by Vidman - 2012-02-17, 01:18
V0.0.5 Released - by Shoop_NL - 2012-02-25, 20:37
[No subject] - by Shoop_NL - 2012-02-25, 20:38
[No subject] - by Shoop_NL - 2012-02-25, 20:39
[No subject] - by Shoop_NL - 2012-02-25, 20:45
[No subject] - by Martin75a - 2012-02-26, 11:50
[No subject] - by Shoop_NL - 2012-02-26, 12:22
[No subject] - by Martin75a - 2012-02-26, 12:56
[No subject] - by Shoop_NL - 2012-02-26, 16:57
[No subject] - by Livin - 2012-02-26, 17:44
[No subject] - by Shoop_NL - 2012-02-26, 18:54
[No subject] - by Martin75a - 2012-02-26, 20:42
[No subject] - by Shoop_NL - 2012-02-28, 19:50
[No subject] - by nelsonamen - 2012-02-28, 22:16
V0.0.6 alpha - by Shoop_NL - 2012-03-04, 10:48
V0.0.6 alpha - by Shoop_NL - 2012-03-05, 19:57
[No subject] - by Martin75a - 2012-03-06, 08:20
[No subject] - by Martin75a - 2012-03-06, 19:31
[No subject] - by Shoop_NL - 2012-03-07, 20:22
V0.0.6 alpha updated - by Shoop_NL - 2012-03-07, 21:01
[No subject] - by Martin75a - 2012-03-08, 17:50
[No subject] - by Shoop_NL - 2012-03-08, 21:47
[No subject] - by Martin75a - 2012-03-08, 22:10
V0.0.6 alpha updated - by Shoop_NL - 2012-03-08, 23:17
[No subject] - by Martin75a - 2012-03-09, 09:00
[No subject] - by Shoop_NL - 2012-03-10, 21:36
[No subject] - by Martin75a - 2012-03-11, 11:55
RE: - by Shoop_NL - 2012-08-20, 19:55
RE: - by Martin75a - 2012-08-26, 12:03
RE: [RELEASE] X10 - lights (Domotica Commander) - by Shoop_NL - 2014-07-26, 11:12


Logout Mark Read Team Forum Stats Members Help
[RELEASE] X10 - lights (Domotica Commander)4.754