HomeAutomation 2.0

"The best web gui for controlling your home using Telldus Tellstick"
knut
Posts: 5
Joined: 13 Aug 2011, 03:42

Re: HomeAutomation 2.0

Post by knut » 16 Aug 2011, 04:05

Permissions of the "resources" folder:
drwxrwsr-x 5 www-data www-data 4096 Aug 11 20:36 resources


My "tellstick.conf":

deviceNode = "/dev/tellstick"
device {
id = 1
name = "MyLamp"
protocol = "NEXA"
model = "NEYCR-1000"
parameters {
house = "A"
unit = "1"
}
}

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

Re: HomeAutomation 2.0

Post by DanielM » 16 Aug 2011, 07:43

knut wrote:Permissions of the "resources" folder:
drwxrwsr-x 5 www-data www-data 4096 Aug 11 20:36 resources
Well, that should definitely work. Could you try enabling debug logging in the settings and see if you get anything useful in logs/debug.txt when you try the upload?
knut wrote: My "tellstick.conf":

deviceNode = "/dev/tellstick"
device {
id = 1
name = "MyLamp"
protocol = "NEXA"
model = "NEYCR-1000"
parameters {
house = "A"
unit = "1"
}
}
Ok. The protocol and model parameters isn't supposed to keep the exact model of the device, it is just a setting of which kind of receiver it is. Try changing model to "codeswitch" and protocol to "arctech" and see if it works better.

/Daniel

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

Re: HomeAutomation 2.0

Post by knut » 16 Aug 2011, 08:14

Yes! Changing the configfile as you instructed made it work!

I also got the background image upload to work. The image I first tried was quite large: 2816x2112 and 2MB. I tried a smaller one 450x470, 240kB. The later worked.

Thank you for the fast help!

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

Re: HomeAutomation 2.0

Post by DanielM » 16 Aug 2011, 09:44

knut wrote:Yes! Changing the configfile as you instructed made it work!

I also got the background image upload to work. The image I first tried was quite large: 2816x2112 and 2MB. I tried a smaller one 450x470, 240kB. The later worked.

Thank you for the fast help!
Good!

I don't know why the first image didn't work. Might be some setting in php limiting the acceptable size of uploaded files. Anyways that big image doesn't seem like a good idea, might be a problem if you're stuck on a bad connection somewhere and can't turn on your lamps because the image is too big :D

/Daniel

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

Re: HomeAutomation 2.0

Post by knut » 17 Aug 2011, 10:18

True :)
Thank you for the support!

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

Re: HomeAutomation 2.0

Post by Klingan » 25 Aug 2011, 10:31

I will retry to complete this solution when I have a bunch of hours to dedicate! :P

A complete Tellstick + HA-step-by-step installation guide on the Wiki would be VERY appreciated.

Love the project!

Magnus
Posts: 51
Joined: 02 Jan 2007, 03:52
Location: Sweden
Contact:

Re: HomeAutomation 2.0

Post by Magnus » 29 Aug 2011, 07:32

I made a wiki guide for HomeAutomation and Tellstick from various threads here on the forum. You find it here: http://wiki.excito.org/wiki/index.php/H ... _Tellstick.

Please let me know if I missed or got anything wrong!
/Magnus
Magnus, Excito developer
www.excito.com
support@excito.com

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

Re: HomeAutomation 2.0

Post by DanielM » 29 Aug 2011, 08:13

Magnus wrote:I made a wiki guide for HomeAutomation and Tellstick from various threads here on the forum. You find it here: http://wiki.excito.org/wiki/index.php/H ... _Tellstick.

Please let me know if I missed or got anything wrong!
/Magnus
Thank you very much, it's very appreciated!

Some comments:
  • The "house" parameter should be a letter when using the codeswitch protocol.
  • Just changing the permissions of /dev/tellstick will give problems after next reboot. Better add an udev rule so the node is created with correct permissions. I have a /etc/udev/rules.d/99-tellstick.rules containing the following:

    Code: Select all

    KERNEL=="ttyUSB*", BUS=="usb", SYSFS{idVendor}=="1781", SYSFS{idProduct}=="0c30", NAME="tellstick", GROUP="plugdev"
  • What was the point with the installation of phpmyadmin?
/Daniel

Magnus
Posts: 51
Joined: 02 Jan 2007, 03:52
Location: Sweden
Contact:

Re: HomeAutomation 2.0

Post by Magnus » 29 Aug 2011, 08:36

The "house" parameter should be a letter when using the codeswitch protocol.
Just changing the permissions of /dev/tellstick will give problems after next reboot. Better add an udev rule so the node is created with correct permissions. I have a /etc/udev/rules.d/99-tellstick.rules containing the following:
KERNEL=="ttyUSB*", BUS=="usb", SYSFS{idVendor}=="1781", SYSFS{idProduct}=="0c30", NAME="tellstick", GROUP="plugdev"
Great, I have updated the guide.
What was the point with the installation of phpmyadmin?
Hmm, good point. This was from an earlier version I had of the guide.
/Magnus
Magnus, Excito developer
www.excito.com
support@excito.com

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

Re: HomeAutomation 2.0

Post by DanielM » 29 Aug 2011, 11:53

Magnus wrote:Great, I have updated the guide.
Good. A thought struck me though: Is www-data member of plugdev per default? Otherwise it either must be added or the udev rule has to be changed.

Oh, and if the udev rule is changed after inserting the Tellstick it won't do much good until after next boot :wink:

/Daniel

Magnus
Posts: 51
Joined: 02 Jan 2007, 03:52
Location: Sweden
Contact:

Re: HomeAutomation 2.0

Post by Magnus » 30 Aug 2011, 08:12

I changed the udev rule to www-data instead, and added a reboot... :)
/Magnus
Magnus, Excito developer
www.excito.com
support@excito.com

dreher
Posts: 4
Joined: 30 Aug 2011, 16:11

Re: HomeAutomation 2.0

Post by dreher » 30 Aug 2011, 16:21

Excellent guide. I wish I had that when I installed Home Automation on my B2 a few weeks ago. :)

The guide seems to be more or less what I did. However I also had to give www-data write permission to /var/state/telldus-core.conf. Without that tdtool would fail after sending the first command, so if you tried to turn on several devices simultaneously from Home Automation only the first would be successfully turned on.

johannes
Posts: 1467
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: HomeAutomation 2.0

Post by johannes » 04 Nov 2011, 14:06

I followed Magnus's guide and it worked great. Today I added a few new units to /etc/tellstick.conf and wanted to import them to HA, but how? According to the guide, there should be a text saying "Uppdatera från Tellstick" under konfiguration -> enheter, but there is none? See screenshot.

I tried deleting the units I already had there (thinking the text only would show up if the lsit was empty) but it didn't work either.

Knowing that this is probably something easy - please don't kill me for being stupid.
Attachments
1.png
1.png (95.18 KiB) Viewed 9203 times
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)

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

Re: HomeAutomation 2.0

Post by DanielM » 04 Nov 2011, 14:52

johannes wrote:According to the guide, there should be a text saying "Uppdatera från Tellstick" under konfiguration -> enheter, but there is none? See screenshot.
Oops.

You seem to have found a bug here. Strangely enough nobody has seen this before.

The problem here is that you're logged in as "local". That user seem to have the user level "user", which doesn't have permission to import devices. Of course it shouldn't have permissions to remove devices either.

So, the solution for you is to click "Logga ut" and then login using an account that has user level "admin" and import the devices from there. And I'll fix the bug in svn so it doesn't look like this in next release.

/Daniel

johannes
Posts: 1467
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: HomeAutomation 2.0

Post by johannes » 04 Nov 2011, 15:05

Ah, explains. I noted that the "edit" buttons where dead, but remove worked..

Thanks!
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)

Post Reply