Skip to content

reneboer/openLuup-ImperiHome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openLuup-ImperiHome

A LUA CGI file to make openLuup talk ImperiHome ISS. Upload imperihome.lua to the /etc./cmh-ludl/cgi folder of your openLuup device.

This version pulls the status of most Vera device types. It can arm and disarm security sensors, it should be able to toggle a switch and control a dimmer, thermostats, run scenes etc. It also supports the Harmony Hub plugin, Dutch Smart Meter and VW CarNet.

Adding your own device definition is pretty simple as it is mostly data driven with limited coding required. With V1.0 you can define a function for adding sub-devices if you want more information or control than a single Imperihome device would give you. See the ImperiHoneScreenshot.png as an example, this is one device on openLuup! See the subdev_CarNet funciton as example. V1.1 has sub-device actions support. See subdev_HouseDevice as example.

First you must upload the imperihome.lua file to your openLuup system in the /etc/cmh-ludl/cgi folder. You can see if it works by entering this URL in your browser:
http://[openLuup IP]:3480/cgi/imperihome.lua?query=/system

This should return this:
{
"apiversion":1,
"id":"88800000",
}

In ImperiHome choose Settings, My systems, Add a new system. as Local API Base Url enter :
http://[openLuup IP]:3480/cgi/imperihome.lua?query=

If you can setup remote access as described below, enter as External API Base Url enter :
http://[your dataplicity wormhole url]/cgi/imperihome.lua?query=

It should find the system with 88800000 as system name. Set the Connection Mode to Force Local.

Enjoy the intergrated control of all your Vera's and you openLuup system.

#Setting up remote access Using the (free) Dataplicity option can get you remote access to ALTUI and via ImperiHome using these instructions. It only works for a Raspberry Pi.

First enable Dataplicity as documented on https://www.dataplicity.com and enable the wormhole option as described here http://docs.dataplicity.com/docs/host-a-website-from-your-pi. By going to https://[yourid].dataplicity.io should then get your default web page from your Pi.

Next is to enable authentication and a redirect from port 80 to 3480 on your Pi.Now on your Pi you may need to add the proxy module for the Apache server.
sudo a2enmod proxy_http

Now create a user id and password.
sudo htpasswd -c /etc/apache2/passwords [name-of-user]

Then you have to update the Apache virtual host settings so it will limit access and redirects to port 3480.
sudo nano /etc/apache2/sites-enabled/000-default.conf

Add this towards the end
<Proxy *>
AuthType Basic
AuthName "Restricted openLuup access"
AuthBasicProvider file
AuthUserFile /etc/apache2/passwords
Require user [name-of-user]
</Proxy>
# set redirect to openLuup port
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:3480/
ProxyPassReverse / http://localhost:3480/
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

(the lines </VirtualHost> and #vim are al ready at the end)

Now restart the web server.
sudo /etc/init.d/apache2 restart

If you now go to https://[yourid].dataplicity.io you should be prompted for your created userid and password. And hurray, your ALTUI interface appears.

Enjoy.

About

A simple LUA CGI file to make openLuup talk ImperiHome ISS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages