New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Homeautomation 1.2

"The best web gui for controlling your home using Telldus Tellstick"
Post Reply
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Homeautomation 1.2

Post by DanielM »

Hi.
For those of you who like to control stuff in your home, Homeautomation has just been released in a new version, 1.2. It is a web gui used to control a Tellstick device (see http://www.telldus.se for more information about Tellstick). It supports scheduling (static, sun controlled and temperature controlled), user management, controlling devices from graphic house plan, logging and much more.

Since I've just got my new B3, this is the first version of homeautomation with official B3 support. Everything needed to run it (except of course the Tellstick and Telldus software for controlling it) is already installed on the B3.

Biggest new for this version (except for lots of bug fixing) is ajaxification (meaning the entire page doesn't reloaded for example when lamps are turned on) .

If you like it, please tell me :D

http://karpero.mine.nu/ha/

/Daniel
MagnusJonsson
Posts: 88
Joined: 26 Sep 2008, 04:18

Re: Homeautomation 1.2

Post by MagnusJonsson »

Welcome "back" Daniel !! :-)

Good news to hear that A) you've purchased a B3 and B) that you've released a new version of Homeautomation.
I'm looking forward to the reload part since I'm still pretty annoyed with the fact that the Tellstick seems to fail in sending the message some 6 meters to a lamp. Due to this I have to use my X10 mini to shut of the lamps which is done by first switching them on (since HA has done its part correctly) and then switching them off again. This is a bit cumbersome since I need to zoom in my floor plan and thus the lack of re-loading seems interesting.
I'll let you know the success story when it happens.... ;-)
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: Homeautomation 1.2

Post by DanielM »

MagnusJonsson wrote:Welcome "back" Daniel !! :-)

Good news to hear that A) you've purchased a B3 and B) that you've released a new version of Homeautomation.
I'm looking forward to the reload part since I'm still pretty annoyed with the fact that the Tellstick seems to fail in sending the message some 6 meters to a lamp. Due to this I have to use my X10 mini to shut of the lamps which is done by first switching them on (since HA has done its part correctly) and then switching them off again. This is a bit cumbersome since I need to zoom in my floor plan and thus the lack of re-loading seems interesting.
I'll let you know the success story when it happens.... ;-)
Being a (happy) X10 Mini owner myself I've done the best to try to optimize the mobile version for really tiny screens. I hope you'll be happy :D

Also one thing that is on the todo (although I don't know when we'll actually do it) is resending of codes. I think it would be nice if homeautomation always sent codes not only one time but a few times with a delay in between. Just to make sure...

/Daniel
ambok
Posts: 1
Joined: 16 Nov 2010, 22:26

Re: Homeautomation 1.2

Post by ambok »

great job. .i have fun reading your topic. .
MagnusJonsson
Posts: 88
Joined: 26 Sep 2008, 04:18

Re: Homeautomation 1.2

Post by MagnusJonsson »

Hi Daniel,

After a (really) long dealy I have finally upgraded to HomeAutomation v1.2.2. I like the fact that the floorplan page does not get reloaded on my X10 mini (also a happy user, but I have to be since I work @ SEMC :) )

Anyway, it seems as if the floorplan lamp icons does not get re-loaded when I toggle the lamps, meaning that the lamp status does not change after the "refresh circle icon" vanishes. This seems to be the case both in the X10 mini browser as well as in Google Chrome. (I have to press refresh in both browsers)

Apart from this small issue I really like the new version.
(However on my wishlist to Santa there is still automatic (configurable) re-sending of the codes. My Tellstick is far from perfect. (In my setup some lamps are at a 60% success ratio and the distance is less than 10 meters))

(By the way : The upgrade instructions on the webpage were excellent! The only thing that you might add is (in my case anyway) a chown www-data homeautomation ! :D )
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: Homeautomation 1.2

Post by DanielM »

MagnusJonsson wrote:Hi Daniel,

After a (really) long dealy I have finally upgraded to HomeAutomation v1.2.2. I like the fact that the floorplan page does not get reloaded on my X10 mini (also a happy user, but I have to be since I work @ SEMC :) )
Oh, you do? Does this mean you can give me the inhouse-only-froyo-upgrade for my phone :D

(Jobbar du i Linköping förresten?)
MagnusJonsson wrote:Anyway, it seems as if the floorplan lamp icons does not get re-loaded when I toggle the lamps, meaning that the lamp status does not change after the "refresh circle icon" vanishes. This seems to be the case both in the X10 mini browser as well as in Google Chrome. (I have to press refresh in both browsers)
This feels spooky familiar. I know I have seen this behaviour before. Gotta dig in my mind, I'll come back to you about this.
MagnusJonsson wrote:Apart from this small issue I really like the new version.
(However on my wishlist to Santa there is still automatic (configurable) re-sending of the codes. My Tellstick is far from perfect. (In my setup some lamps are at a 60% success ratio and the distance is less than 10 meters))
Just a thought that struck me now. What about if you rename tdtool to something else (tdtool.therealthing) and make a bash script named tdtool. And then you make that bash script call tdtool.therealthing a couple of times, maybe with some delay in between and just send on the arguments? Pure brainstorming here, but that might work 8)
MagnusJonsson wrote:(By the way : The upgrade instructions on the webpage were excellent! The only thing that you might add is (in my case anyway) a chown www-data homeautomation ! :D )
Hmmm... Good point. But then again, we don't want the users to become too lazy, do we :lol:

/Daniel
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: Homeautomation 1.2

Post by DanielM »

MagnusJonsson wrote:Anyway, it seems as if the floorplan lamp icons does not get re-loaded when I toggle the lamps, meaning that the lamp status does not change after the "refresh circle icon" vanishes. This seems to be the case both in the X10 mini browser as well as in Google Chrome. (I have to press refresh in both browsers)
Ok. Seems you are experiencing a bug that we had in 1.2.0 and that we thought we'd got rid of for good.

If you'd like to help us error searching you could do the following:

1. In the file ajax/ajax.js, go to line 144 and remove the double slashes commenting out the row.
2. Reload the web page (using shift-reload or simply restarting the browser).
3. Turn any device on or off. You should now get a requester containing the stuff used to change the device image. Copy the contents of the requester and hand them over...

/Daniel
MagnusJonsson
Posts: 88
Joined: 26 Sep 2008, 04:18

Re: Homeautomation 1.2

Post by MagnusJonsson »

DanielM wrote: Ok. Seems you are experiencing a bug that we had in 1.2.0 and that we thought we'd got rid of for good.

If you'd like to help us error searching you could do the following:

1. In the file ajax/ajax.js, go to line 144 and remove the double slashes commenting out the row.
2. Reload the web page (using shift-reload or simply restarting the browser).
3. Turn any device on or off. You should now get a requester containing the stuff used to change the device image. Copy the contents of the requester and hand them over...
Sure I'd like to help.
Following your instructions I get:

Code: Select all

<br />
<b>Warning</b>:  chmod() [<a href='function.chmod'>function.chmod</a>]: Operation not permitted in <b>/home/web/homeautomation/system/functions.php</b> on line <b>259</b><br />
4;./resources/light_on.png;0
DanielM wrote:Oh, you do? Does this mean you can give me the inhouse-only-froyo-upgrade for my phone

(Jobbar du i Linköping förresten?)
Nope, I work in Lund (and not with Android development). Anyway, you don't want our in-house versions. (trust me on this one). They still have some issues (such as power saving) that I think you'd rather not have. Also you would not be able to flash them into your phone anyway since they are not signed for commercial phones like yours they just work on prototypes like mine.... :wink:
DanielM wrote: Just a thought that struck me now. What about if you rename tdtool to something else (tdtool.therealthing) and make a bash script named tdtool. And then you make that bash script call tdtool.therealthing a couple of times, maybe with some delay in between and just send on the arguments? Pure brainstorming here, but that might work
Good idea. I'll give that a try !!!
MagnusJonsson
Posts: 88
Joined: 26 Sep 2008, 04:18

Re: Homeautomation 1.2

Post by MagnusJonsson »

DanielM wrote: Just a thought that struck me now. What about if you rename tdtool to something else (tdtool.therealthing) and make a bash script named tdtool. And then you make that bash script call tdtool.therealthing a couple of times, maybe with some delay in between and just send on the arguments? Pure brainstorming here, but that might work
(Haven't done much bash scripting so I) Googled for a few minutes and came up with the following bash script

Code: Select all

#! /bin/bash
# Calling tdtool serveral times with delay
for loop in 1 2 3 4 5
do
	tdtool-exe $1 $2 $3 $4 $5 $6;
	sleep 2;
done
Calling the new tdtool works well from a Terminal (it's not fast but does the job), but unfortunately HomeAutomation does not seem to approve at all. The lamps are not switched on nor off when I press the symbols on the floorplan page. :cry:
I tested to switch on debug print but could not see anything that seemed useful....
Maybe the fact that the tdtool script take 10 seconds to complete is a bad thing. A timeout issue ?

Using the old tdtool and everything works as expected again (If you think that the lamps sometimes not reacting is "as expected" ;-) )
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: Homeautomation 1.2

Post by DanielM »

MagnusJonsson wrote:Following your instructions I get:

Code: Select all

<br />
<b>Warning</b>:  chmod() [<a href='function.chmod'>function.chmod</a>]: Operation not permitted in <b>/home/web/homeautomation/system/functions.php</b> on line <b>259</b><br />
4;./resources/light_on.png;0
This is weird. Does the folder /home/web/homeautomation/log exist? Who is owner of it and what permissions does it have?

/Daniel
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: Homeautomation 1.2

Post by DanielM »

MagnusJonsson wrote:
DanielM wrote: Just a thought that struck me now. What about if you rename tdtool to something else (tdtool.therealthing) and make a bash script named tdtool. And then you make that bash script call tdtool.therealthing a couple of times, maybe with some delay in between and just send on the arguments? Pure brainstorming here, but that might work
(Haven't done much bash scripting so I) Googled for a few minutes and came up with the following bash script

Code: Select all

#! /bin/bash
# Calling tdtool serveral times with delay
for loop in 1 2 3 4 5
do
	tdtool-exe $1 $2 $3 $4 $5 $6;
	sleep 2;
done
Calling the new tdtool works well from a Terminal (it's not fast but does the job), but unfortunately HomeAutomation does not seem to approve at all. The lamps are not switched on nor off when I press the symbols on the floorplan page. :cry:
I tested to switch on debug print but could not see anything that seemed useful....
Maybe the fact that the tdtool script take 10 seconds to complete is a bad thing. A timeout issue ?

Using the old tdtool and everything works as expected again (If you think that the lamps sometimes not reacting is "as expected" ;-) )
Seems to me that this should work. I guess you could use "$@" instead of "$1 $2 etc" but it shouldn't make any difference. I can't dig into this right now though. What happens if you change it to loop just two times? Or just one?

/Daniel

edit: I came around to testing myself anyways. Works fine for me. Only problem is that it takes ten seconds for the web interface to stop spinning. I solved that by changing line 163 in system/functions.php from exec() to _exec() which makes homeautomation not wait for the return of the call. Oh, and just a note to anyone reading this: This is not a supported solution. Changing tdtool in this way will make other things behave strangely (such as import of devices from tdtool to homeautomation). Hopefully there will be a better solution in the future...
Post Reply