We have moved at community.getvera.com

Author Topic: How to install "myvera" directly on your vera.  (Read 29150 times)

Offline psykokwak

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
How to install "myvera" directly on your vera.
« on: January 06, 2013, 06:15:49 am »
Hi all,
MyVera is an interface that allows you to control your home automation from your browser (chrome only) or from your ipad or iphone (or android device).
Here, some screenshots :
- http://sbdomotique.files.wordpress.com/2012/09/myvera3d.jpg
- http://sbdomotique.files.wordpress.com/2012/12/20121205-221700.jpg
- http://sbdomotique.files.wordpress.com/2012/12/iphone1.jpg

And a video : https://www.youtube.com/watch?v=vEtwF4m6tzA

You can download it from its author website : http://sbdomotique.wordpress.com/
The official myvera thread (in french) : http://www.touteladomotique.com/forum/viewtopic.php?f=48&t=9041

This interface uses PHP, so you will need to have a web server with PHP that can communicate with your vera.

I'll explain here how to install myvera (and php) directly on the vera. So, no need to have an external computer for our PHP interfaces...


WARNING:
I explain here how to install "myvera" on the flash memory but that space is very limited. It turns out that it fits with the version of "myvera" available at the time of writing this tutorial, but there is no guarantee that future versions of myvera can also fit.
If this is the case, there are two possibilities:
- Install MyVERA in RAM (in "/tmp"). However, at every reboot you will need to reinstall "myvera."
- Install on a USB stick. There's no risk in case of reboot.

I still places available the current "space optimized" version (myveraRC121119)  http://www.psykokwak.com/pub/vera/myvera.tgz

PREREQUISITES:
So obviously the first thing to do is to install PHP on your vera. For this, I invite you to visit the following tutorial: http://forum.micasaverde.com/index.php/topic,13126.0.html


Step 1: Copy "myvera" on vera:
- With winscp copy "myvera.tgz" folder in the "/tmp" your vera.


Step 2: Install "myvera" (in "/root", but you are free to install it wherever you want)
- In SSH (with putty), type the following commands:
Code: [Select]
cd /tmp
tar xvzf myvera.tgz -C /root/


Step 3: Configure the web server (lighttpd) to access to "myvera"
- Edit (with "vi") file "/etc/lighttpd.conf".
- At the very end of the file, add the following:
Code: [Select]
$SERVER["socket"] == ":8080" {
server.document-root = "/root/myvera"
}
The first line indicate the TCP port on which we want to access to myvera (useful for separating "integrated" interface in the case of access from internet)
The second line indicates the location where you installed "myvera."


Step 4: Test that everything works
- Restart the web server:
Code: [Select]
pkill -9 lighttpd
lighttpd-f /etc/lighttpd.conf
If there is no message that appears is that the server is restarted.
Now from your browser, type the following url: http://<veraip>:8080/

 ;D ;D

If you have any questions, do not hesitate to post them here :D
« Last Edit: January 09, 2013, 07:45:31 am by psykokwak »

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1036
  • Karma: +37/-14
Re: How to install "myvera" directly on your vera.
« Reply #1 on: January 09, 2013, 07:31:38 am »
I have installed everything according to your description, which by the way is very straight forward, I like it. It is installed on a UBS stick. The interface seems to be running, at least I can access it through my browser. I will do some more extensive testing on the weekend.

However, I already have some questions/remarks:

1. Do you plan on creating an english version? I do speak french and english quite well, I would offer to do the translations for you. I could also offer german translations since that is my native language.

2. On http://sbdomotique.wordpress.com/ I was unable to find a download for MyVera. Is http://www.psykokwak.com/pub/vera/myvera.tgz the newest version or is this the special "space optimized" version?

3. Do you plan on implementing an update routine? Or does this always have to be done manually? I think it would be nice if the version and release date would be listed in "Config.", then I would at least know which version is running.

4. The command "lighttpd-f / etc / lighttpd.conf" in the description above is wrong, should be "lighttpd -f /etc/lighttpd.conf".

5. I would love to see you implement rights/users. So for example I could say "The user XY has only access to light XY".

6. Could you maybe explain how to setup .htaccess when installed locally on the vera?

By the way, I saw on some screenshots that you already support two of my plugins, the VirtualSwitch and the VariableContainer, THANK YOU for this and the plugin, great work!
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline psykokwak

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: How to install "myvera" directly on your vera.
« Reply #2 on: January 09, 2013, 07:43:46 am »
1. Do you plan on creating an english version? I do speak french and english quite well, I would offer to do the translations for you. I could also offer german translations since that is my native language.
I'm not the "myvera" developper. I'll forward your request to him. I think it could be a good idea.

2. On http://sbdomotique.wordpress.com/ I was unable to find a download for MyVera. Is http://www.psykokwak.com/pub/vera/myvera.tgz the newest version or is this the special "space optimized" version?
This is the latest version at the time I writing this but I know there is a major update in the next few days.
If you have enough space (because you use an USB stick), you could use the "standard" version.

3. Do you plan on implementing an update routine? Or does this always have to be done manually? I think it would be nice if the version and release date would be listed in "Config.", then I would at least know which version is running.
I don't know. Like I said, I'm not the developper.

4. The command "lighttpd-f / etc / lighttpd.conf" in the description above is wrong, should be "lighttpd -f /etc/lighttpd.conf".
Oups, sorry. Fixed. Thanks.

5. I would love to see you implement rights/users. So for example I could say "The user XY has only access to light XY".
I think it will be a feature of the next release.

6. Could you maybe explain how to setup .htaccess when installed locally on the vera?
Here an automatic translation that explain it : http://translate.google.fr/translate?sl=fr&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&eotf=1&u=http%3A%2F%2Fsbdomotique.wordpress.com%2F2012%2F11%2F20%2Fmyvera-htaccess%2F&act=url

By the way, I saw on some screenshots that you already support two of my plugins, the VirtualSwitch and the VariableContainer, THANK YOU for this and the plugin, great work!
I'll forward your thanks to the author ;)

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1036
  • Karma: +37/-14
Re: How to install "myvera" directly on your vera.
« Reply #3 on: January 09, 2013, 08:36:16 am »
Thanks for the fast reply!

Concerning point 6:

Which would be the "web" folder on the vera? Is this /www? Do in need to put the .htaccess there?
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline psykokwak

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: How to install "myvera" directly on your vera.
« Reply #4 on: January 09, 2013, 08:46:55 am »
Not sure that lighttpd supports .htaccess files (which are specific to Apache server).

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1036
  • Karma: +37/-14
Re: How to install "myvera" directly on your vera.
« Reply #5 on: January 09, 2013, 09:08:10 am »
Not sure that lighttpd supports .htaccess files (which are specific to Apache server).

So does this mean it is not needed when installed locally on the vera itself? Which users/pw would I then need to enter? Or is then no password needed?
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline psykokwak

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: How to install "myvera" directly on your vera.
« Reply #6 on: January 09, 2013, 01:36:25 pm »
By default there is no protection. Just enter what you want as login and password.
Lighttpd provides a different mechanism to do the same as the .htaccess protection (which is a classic http auth).
You have to read the lighttpd documentation if you want to use this feature.
In the next release this mechanism will be replaced by a PHP transparent auth (both auth will always be possible).

Offline big517

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: How to install "myvera" directly on your vera.
« Reply #7 on: January 09, 2013, 04:10:00 pm »
This is interesting, looking forward to the english version before I jump in.
I have a question though.

There seems to be a "blueprint" style layout of your home.  Where do you set this up at?   Do you provide a picture, then place the devices anywhere on a map?

Offline psykokwak

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: How to install "myvera" directly on your vera.
« Reply #8 on: January 09, 2013, 05:27:08 pm »
Exactly,
You have to create your plan from any software you want (I used http://floorplanner.com/) then export it as an image and insert the image into the app. Then you just have to place your devices anywhere you want over the image.
MyVera asks the vera for all available devices, so you just have to decide which one you want do display on your map.

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1036
  • Karma: +37/-14
Re: How to install "myvera" directly on your vera.
« Reply #9 on: January 10, 2013, 02:43:00 am »
So it is up and running for me. But I still have some questions:

In which format and size should the pictures be available? Always when I try adding and image url I get and error that the vue was not updated. Can images also be stored locally ond the vera/usb-stick?

Also for me virtual switches and variable containers are not working, even though it says here (http://sbdomotique.wordpress.com/2012/11/08/myvera-modules/) that they should be working. So I am still wondering if I really have the newest version?

What I also realized that it is very optimzed for the iPad, on which the interface looks very perfect and clear. On the Nexus 10 however the interface does not look nice, no errors, but just not clear.
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline psykokwak

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: How to install "myvera" directly on your vera.
« Reply #10 on: January 10, 2013, 03:00:47 am »
Your image must be in jpeg and it will be stored in one myvera subdir.
Try with this is newer beta version, there is lot of improvement : http://sb.domo.free.fr/dev/myvera02_nigtlybuild231212.zip
(don't forget to clear your cache)

Offline davidd1205

  • Full Member
  • ***
  • Posts: 158
  • Karma: +0/-0
Re: How to install "myvera" directly on your vera.
« Reply #11 on: January 10, 2013, 05:52:04 am »
Your image must be in jpeg and it will be stored in one myvera subdir.
Try with this is newer beta version, there is lot of improvement : http://sb.domo.free.fr/dev/myvera02_nigtlybuild231212.zip
(don't forget to clear your cache)

hello

the link is http://sb.domo.free.fr/dev/myvera02_nigtlybuild301212.zip

very good job


Offline big517

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: How to install "myvera" directly on your vera.
« Reply #12 on: January 11, 2013, 02:40:29 pm »
Thanks for the link to the homefloorplanner site, I spent a good amount of time yesterday re-creating my home :)  I plan to use it for this.

I have a question though; Could I install this on another PHP webserver?  i'll admit this is new to me, but I have a QNAP NAS which has a webserver, can I follow your install instructions above?  If it's easy enough, please advise how to install, it will save me a lot of time.  Also advise when/where to change the information to suit my system.

2nd question is can this be installed on Vera2?

Thank you,

Offline psykokwak

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: How to install "myvera" directly on your vera.
« Reply #13 on: January 12, 2013, 06:12:36 am »
I have a question though; Could I install this on another PHP webserver?  i'll admit this is new to me, but I have a QNAP NAS which has a webserver, can I follow your install instructions above?  If it's easy enough, please advise how to install, it will save me a lot of time.  Also advise when/where to change the information to suit my system.
I don't know your QNAP NAS. It should have a package installer, so you have to use it to install PHP. My package only works for our Vera.


2nd question is can this be installed on Vera2?

It should :D

Offline big517

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: How to install "myvera" directly on your vera.
« Reply #14 on: January 12, 2013, 06:48:31 am »
I actually copied it all over to the qnap, it seems to be running, but i'm having a hard time configuring this thing.  Are you saying that this "web page" can ONLY be ran from Vera?

In New View, I have Name, Tab, Index, and URL of the Image.
I cannot select anything under tab, URL I've tried a remote and local URL, I only get ERROR Updating.

I cannot create a Tab, or Create a View.  All errors every time.  I can see a list of all my devices and scenes in those tabs, but I cannot create or save anything... please help.
« Last Edit: January 12, 2013, 09:00:51 am by big517 »