HomeAutomation 2.0

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

HomeAutomation 2.0

Post by DanielM » 17 Feb 2011, 02:58

Hi all.
Just wanted to let you know that tonight we released version 2.0 of HomeAutomation, in my humble opinion the best web gui for controlling your home using Telldus Tellstick. For more information about HomeAutomation and for downloading install files please visit http://karpero.mine.nu/ha.

Biggest changes for this release are a (once again) completely remake of the scheduling, but there's quite a big list of changes all over the place. Please visit the Telldus forum thread at http://www.telldus.se/forum/viewtopic.p ... 1c9400748e for the entire list. For this release we've also made a decent users manual. We have also for the first time used some kind of release planning with beta testers so there's reason to belive that the release is more stable than earlier ones.

Also please note that this is the first release that is not tested on Bubba 1, which from now on isn't officially supported (since I bought a B3 instead). No reason to think it shouldn't work though...

/Daniel

Klingan
Posts: 26
Joined: 09 Nov 2010, 14:57

Re: HomeAutomation 2.0

Post by Klingan » 28 May 2011, 14:32

Hello!

My name is Tommy, 24, Swedish tech-enthusiast. Currently on weekend, but realizing it'll be monday soon.

I have very little experience in basic linux/ssh/scp/ -handling (which is needed), additionally I'm doing all of this from my first Linux-machine (just to add another tricky factor) so even basic tasks becomes a project. Even though I'm running in mid - I think I've managed to overcome quite a lot!

I am stuck in the procedure of installing the Tellstick + Home Automation version 2.0.
My server is a B3 and I have been trying to get this to work for hours.
I have read every post in the three major threads here, including the manual at Telldus website.

Help would be very appreciated!

I want to be able to control my deviced on my X10 Mini (small screen) through the webserver of B3.

---------------------------------------------------------------------------------------------------------------------------

So far, this is what I've accomplished:

1.) I have installed the Device according to the instructions in the thread "Homeautomation 1.0"
URL: http://forum.excito.net/viewtopic.php?f=6&t=2181

2.) I have downloaded the lastest distribution of Homeautomation, and placed it in my /home/web,
named tellstick (full path: /myserver/home/web/tellstick).

3.) I have managed to, though lacking linux knowledge:
3.1.) Edit the configuration file, setting the path: /home/web/tellstick (is this correct?)
3.2.) Localize the php.ini (used nano-editor over ssh) and setting my timezone (Europe/Stockholm)
3.3.) Set a password on the "root" user of mySQL, since I read this was needed?
3.4.) Created a new database, called "homeautomation"
3.5.) chmod + chown -R 0777 on /home/web/tellstick
3.6.) Installed phpmyadmin (though I can't access this!)
3.7.) Added/Edited the devices for Tellstick to control (using nano editor over ssh)

Note: All of the above are probably basic Linux tasks, but I've had to Google every part of it, so I'm
decicated to get this working!


Where I am stuck:

Step 2 of 6 - mySQL-settings:
Can't get connection with the database. Check your settings.

Even though I'm using the following settings:
Server Adress: localhost
Database Name: homeautomation
User: root
Password: 123456

Why?


Current Possible errors, regarding Tellstick:
  • I can't activate any device through the rfcmd-command. I can do that with tdtool --on 1.
    NOTE: I'm using self-learning devices, so they don't have the regular house codes.
  • I can't find any folder under /dev/tellstick, which the command "rfcmd /dev/tellstick NEXA L 5 1" implies there should be?
  • The description instructs me to give certain priviligies to "www-data" at certain occations. Is this still an active term in B3?

Current Possible errors, regarding Homeautomation:
  • Is the path "/home/web/tellstick" a correct one? Perhaps it should be a relative one instead?
  • At the top of the configuration pages of Homeautomation, there is a textrow with the following content "?> ?>"
    Why is that?

Thank you so much for reading this!
As mentioned above, I'm dedicated to get this working
- since I've gone through so much new to get where I am now.

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

Re: HomeAutomation 2.0

Post by DanielM » 29 May 2011, 01:00

I'll try to answer the questions below. I'm also a happy owner of a X10 mini, so I know that it works good :D

I'll also delete your double posts. Since these questions are about ha 2.0 there's no need for the posts in the threads about other ha versions.
Klingan wrote: 3.1.) Edit the configuration file, setting the path: /home/web/tellstick (is this correct?)
Yes, this should be correct, assuming /home/web/tellstick is the place where you find the homeautomation php files (like index.php).
Klingan wrote: 3.3.) Set a password on the "root" user of mySQL, since I read this was needed?
No need for this, although I guess it should work. I have no password for the root user in my mysql. My homeautomation doesn't use the root user, I set up a special user that just has access to my homeautomation database.
Klingan wrote: 3.6.) Installed phpmyadmin (though I can't access this!)
Never used phpmyadmin, no clue about this. Guess someone other here can help with that?
Klingan wrote:
  • I can't activate any device through the rfcmd-command. I can do that with tdtool --on 1.
    NOTE: I'm using self-learning devices, so they don't have the regular house codes.
No problem here. rfcmd is an old command that doesn't handle self-learning devices. Homeautomation doesn't use rfcmd, it uses tdtool.
Klingan wrote: [*]I can't find any folder under /dev/tellstick, which the command "rfcmd /dev/tellstick NEXA L 5 1" implies there should be?
If you haven't done any fiddling with udev it's probably not named /dev/tellstick but rather /dev/ttyUSB0 or something like that. If tdtool works for you this is no problem though. Homeautomation never operates directly on the device node, it uses tdtool.
Klingan wrote: [*]The description instructs me to give certain priviligies to "www-data" at certain occations. Is this still an active term in B3?[/list]
Yes. www-data is the user running the apache process. It needs to have write privilegies to for example the log directory.
Klingan wrote: [*]At the top of the configuration pages of Homeautomation, there is a textrow with the following content "?> ?>"
Why is that?[/list]
Where is this row? Feels like some php file is broken in your installation...

/Daniel

Klingan
Posts: 26
Joined: 09 Nov 2010, 14:57

Re: HomeAutomation 2.0

Post by Klingan » 29 May 2011, 17:01

Thank you for your answer, Daniel!

Alright, then I'll try to remove the password from root again.
How do I create a separate user that just has access to the homeautomation database?

I installed phpmyadmin because I thought it'd simplify things. I'll uninstall it somehow, then.

Good! I was worried I'd be screwed because of the rfcmd not working. I'm glad to hear tdtool is the current dependency!

I followed the guide on page 1 in the Homeautomation 1.0-thread. Did I do any unneccessary steps that I need to revert then?
The instructions there suggests that I should have access to a location named /dev/tellstick?
What is udev by the way?

Sidenote: Is there any easier way to edit/add devices to TDtool instead of editing the hard-to-find text file using nano over ssh?

Could the www-data part be the reason that HA can't locate the database somehow? Because that's where I'm stuck. How to I give it access to the log?

The "?> ?>" is echoed at the top of the page. Then there's a linebreak. Perhaps this has to do with the config.php-path? Because at first, there was only one "?>", but once I experimented with the path and refreshed the page - there was two. Now it's there everytime I run the setup.

Any clues?

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

Re: HomeAutomation 2.0

Post by DanielM » 30 May 2011, 01:41

Klingan wrote:Alright, then I'll try to remove the password from root again.
How do I create a separate user that just has access to the homeautomation database?

I installed phpmyadmin because I thought it'd simplify things. I'll uninstall it somehow, then.
I didn't say phpmyadmin can't simplify things. I just said I don't use it myself so I don't know how it works :wink:

Anyway, creating a user the sql way would be starting mysql and typing something like

Code: Select all

CREATE USER 'hadbuser'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON homeautomation.* TO 'monty'@'localhost' WITH GRANT OPTION;
If I'm not misremembering though, the homeautomation installation can do all this stuff for you, I don't think you have to do any sql fiddling yourself.

MySQL reference manual is really good for these things:
http://dev.mysql.com/doc/refman/5.1/en/ ... users.html
Klingan wrote:I followed the guide on page 1 in the Homeautomation 1.0-thread. Did I do any unneccessary steps that I need to revert then?
Probably. Installation of homeautomation has been very much simplified since 1.0. Once tellstick is installed it's just a matter of extracting the installation zip somewhere and surfing to index.php and the rest is fixed by the installer. In fact, the best might be for you to simply delete your homeautomation folder and start from scratch. Start by reading the readme and don't read any old guides...
Klingan wrote:The instructions there suggests that I should have access to a location named /dev/tellstick?
What is udev by the way?
All devices on a Linux computer needs a device node for the software to talk to. All device nodes are placed in /dev. It's the job of udev to create all necessary device nodes. If you just plug in your tellstick without any udev configuration it's device node is probably named something like /dev/ttyUSB0, which works perfectly fine if you just tell tellstick (in tellstick.conf) to use that node. With a small bit of udev configuration you can instead get the device node named /dev/tellstick, which looks better. But if you've got tdtool working you can ignore all this.
Klingan wrote:Sidenote: Is there any easier way to edit/add devices to TDtool instead of editing the hard-to-find text file using nano over ssh?
Nope. Or... well, you could copy the file over to /home/storage or something, open it in a gui text editor on another computer and after that copy it back to /etc again. But that doesn't smell simpler to me :D
Klingan wrote:Could the www-data part be the reason that HA can't locate the database somehow? Because that's where I'm stuck. How to I give it access to the log?

The "?> ?>" is echoed at the top of the page. Then there's a linebreak. Perhaps this has to do with the config.php-path? Because at first, there was only one "?>", but once I experimented with the path and refreshed the page - there was two. Now it's there everytime I run the setup.

Any clues?
Once again, I think it would be best to start over from scratch. These permissions should be fixed all automatically.

/Daniel

Klingan
Posts: 26
Joined: 09 Nov 2010, 14:57

Re: HomeAutomation 2.0

Post by Klingan » 03 Jun 2011, 11:05

Sorry for my late reply. I am dedicated to this project, I have just been working a lot.
I do appreciate your help a lot, Daniel.

***

Alright, then I'll do that. I'll also Google how to remove the Root-password I just set. B3 won't update now due to the password. :P

Sidenote: As an example, you wrote 'hadbuser' as an example name of a user - what does it stand for? some_pass is clear to me, however. :)

Do you mean that homeautomation can create a specific user for me?
It asks me for user + password during setup.

I found the installation guide on Telldus website hard to understand, since they didn't explain how to execute all steps, therefor I used the instructions from "Homeautomation 1.0"-thread.
But merely installing the Tellstick felt like a 100-step allnight-procedure. :P

Perhaps there's something I should delete/revert of the steps mentioned in that guide, I went wacko and I suspect I might have caused some compability/security issues during this.

Is there any way to start all over, reset the Operating System to delivery status and then redo only the necessary parts?

Is udev installed on B3 on delivery, or is that an addon? Thanks for explaining that part, I think that part is clear now. :) Knowing what it was calmed down my worries related to that part.

Sidenote: Commands like apt-get, wget and copy-commands were completely new to me, that's why I needed a clinical step-by-step guide. :p

Is www-data a user in MySQL or a hidden Operating System-user on B3?

Thanks a lot for your enthusiasm, Daniel! I will reinstall Homeautomation this evening. I did however just do the fresh install when the problems occured. But I'll try. :)

Have a nice day!

Kind regards,
/ Tommy

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

Re: HomeAutomation 2.0

Post by DanielM » 03 Jun 2011, 13:27

Klingan wrote:Sidenote: As an example, you wrote 'hadbuser' as an example name of a user - what does it stand for? some_pass is clear to me, however. :)
ha=homeautomation, db=database. This is just an example, however. You might want to name your database user Göran instead :D
Klingan wrote:Do you mean that homeautomation can create a specific user for me?
It asks me for user + password during setup.
Yes, it should create the database and the user needed.
Klingan wrote:Is there any way to start all over, reset the Operating System to delivery status and then redo only the necessary parts?
If you mean you want to factory reset the entire Bubba, I think you could just simply download the usb install image from http://www.excito.com/bubba/support/download.html, put it on an usb stick and boot from it. (haven't tried that myself though, if you run into trouble with that part I'm sure there are other folks here who knows more)
Klingan wrote:Is udev installed on B3 on delivery, or is that an addon? Thanks for explaining that part, I think that part is clear now. :) Knowing what it was calmed down my worries related to that part.
udev is a fundamental part of any Linux system, including B3, so yes it is included. You don't need to worry about it. The only thing you should worry about is if you want your Tellstick to be named /dev/tellstick, in that case I can tell you how 8)
Klingan wrote:Is www-data a user in MySQL or a hidden Operating System-user on B3?
www-data is an operating system user. All Apache stuff on the B3 is per default run as www-data, so anything you want Homeautomation to have properties to do, www-data has to have permissions to.

(if you want to know which users you have on your B3, check the file /etc/passwd. There are quite many of them)
Klingan wrote:Thanks a lot for your enthusiasm, Daniel! I will reinstall Homeautomation this evening. I did however just do the fresh install when the problems occured. But I'll try. :)
Well, my enthusiasm is quite low for the moment, haven't done any coding on homeautomation at all for some months. But your questions are quite easy to answer. It's always more fun to help people that really wants to learn than people that just want a ready-made solution out-of-the-box :D

/Daniel

Klingan
Posts: 26
Joined: 09 Nov 2010, 14:57

Re: HomeAutomation 2.0

Post by Klingan » 07 Jun 2011, 17:21

I have been working a lot so I havn't got the time to try the reinstall just yet.
But my goal and ambition is to do this tomorrow - evening time! :)

Just a few question marks in the meantime:

Thank you for the user explanation, once you had it covered, it felt quite self explanatory. :-P

If the HA-setup/installation creates a specific mySQL-user itself, how come there is a step in the early installation procedure where you manually enter USER + PASSWORD ?

Thanks for the hint of listing all the operating system users. It helped me understand a little more in the composition of the Linux operating system. :)

Once again - thanks for helping a willing learnee! :-)

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

Re: HomeAutomation 2.0

Post by DanielM » 08 Jun 2011, 01:45

Klingan wrote:If the HA-setup/installation creates a specific mySQL-user itself, how come there is a step in the early installation procedure where you manually enter USER + PASSWORD ?
Because HA wants to know what you want for username and password on the new user 8)

(Just a note here. The installation part of HA was written by Tom and I've hardly never looked at that code. So I COULD be wrong here, but if I'm not completely misremembering this is the way it works.)

/Daniel

linuxtrap
Posts: 16
Joined: 14 May 2011, 14:56

Re: HomeAutomation 2.0

Post by linuxtrap » 24 Jun 2011, 17:36

Hello there

Started the installation yesterday, and now I'm stuck at the last page
Message is:
Deletion of install folder failed.

Any idea or tips ?

Regards
Per T

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

Re: HomeAutomation 2.0

Post by DanielM » 26 Jun 2011, 13:34

linuxtrap wrote:Deletion of install folder failed.
The directory "install" in the homeautomation directory is supposed to be automatically deleted after installation is completed. It seems as if If the apache user (www-data) doesn't have permissions to do this. Either change the permissions of the directory or I think you could simply delete it yourself.

/Daniel

knut
Posts: 5
Joined: 13 Aug 2011, 03:42

Re: HomeAutomation 2.0

Post by knut » 13 Aug 2011, 04:12

Hi!
I have some problems with HomeAutomation..

1. I have followed the instructions to install the Tellstick from Homeautomation 1.0 (but I used the latest version of the Tellstick core 2.0.4).
2. Then I install HomeAutomation, version 2.0.2. The installation went fine. Database etc is working I guess (according to the ok-signs during installation steps).

I use the NEXA selflearning modules.

I can switch on and off the modules by doing this on a putty session:
rfcmd /dev/tellstick NEXA A 1 1
and
rfcmd /dev/tellstick NEXA A 1 0

3. I have "imported" my NEXA units into HomeAutomation and can see the units in the webinterface.

But what not is working is this:
1. upload a "planlösning"
2. switch on or of my nexa unit. No reaction what so ever on the NEXA.

Any ideas??

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

Re: HomeAutomation 2.0

Post by DanielM » 15 Aug 2011, 04:47

knut wrote:1. I have followed the instructions to install the Tellstick from Homeautomation 1.0 (but I used the latest version of the Tellstick core 2.0.4).
2. Then I install HomeAutomation, version 2.0.2. The installation went fine. Database etc is working I guess (according to the ok-signs during installation steps).
Why did you install 1.0 first? It should work, but I don't see the point...
knut wrote: 1. upload a "planlösning"
What happens when you try?
knut wrote: 2. switch on or of my nexa unit. No reaction what so ever on the NEXA.
Homeautomation doesn't use the rfcmd command (which is obsoleted, I think Telldus still includes it in the software for backwards compability reasons), it uses tdtool. First thing you should check is if tdtool works from command line. If you succeeded in importing your devices it seems like it succeeded in running "tdtool -l", but you should try running "tdtool --on x" (replacing the x with a valid device number as found in the list returned by "tdtool -l").

/Daniel

knut
Posts: 5
Joined: 13 Aug 2011, 03:42

Re: HomeAutomation 2.0

Post by knut » 15 Aug 2011, 11:54

Sorry for not being clear. I did not install the HomeAutomation 1.0, I installed the "Tellstick" with the information from the thread Homeautomation 1.0 (from forum user Moloko). But maybe that was unnecessary?

When I try to upload a picture nothing happens. I press upload and then the page just reloads (no error message).

"tdtool -l" gives me a list of my devices. When I type the command: "tdtool --on 1" I get:

"Turning on device 1, MyLamp - The method you tried to use is not supported by the device"

/K

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

Re: HomeAutomation 2.0

Post by DanielM » 16 Aug 2011, 01:53

knut wrote:Sorry for not being clear. I did not install the HomeAutomation 1.0, I installed the "Tellstick" with the information from the thread Homeautomation 1.0 (from forum user Moloko). But maybe that was unnecessary?
No, it is very much necessary. I just thought you were talking about version 1.0 of homeautomation 8)
knut wrote:When I try to upload a picture nothing happens. I press upload and then the page just reloads (no error message).
Could be a permission error. Check the permissions of the "resources" folder in homeautomation, www-data has to be able to write there.
knut wrote:"tdtool -l" gives me a list of my devices. When I type the command: "tdtool --on 1" I get:

"Turning on device 1, MyLamp - The method you tried to use is not supported by the device"
Sounds like this device is incorrect set up in tellstick.conf. Could you paste that part of tellstick.conf here so I can look at it?

/Daniel

Post Reply