Join the "Danske ZenseHome Brugere" Facebook grooup
To use the ZenseHome installation from outside, we need some "service manager" at the home LAN to send API commands to the ZenseHome box.
This is a POC - Proof Of Concept - It has various security problems and stupid static scripts - that could be improved and parameter parameterized (so much...)
A Pre-requsite is reading / installing from ZenseHome API interfacing
Installing the basics
As I have an Ubuntu server (with PLEX) in the house already (located at IP 10.0.0.150), I add the webserver apache2 to the installation. :
then changing the default Apache2 config file:
Adding Zensehome /expect scipts
In the /var/www/cgi-bin/ I place 2 files:
And now its possible to turn on the Office light at the URL: http://10.0.0.150/cgi-bin/turnon-office.exp
And off at http://10.0.0.150/cgi-bin/turnoff-office.exp
As there is not output, the Apache will return a 500 Error. Theres room for improvement - https://docstore.mik.ua/orelly/linux/cgi/ch03_03.htm
Access from outside
The next step is to make a port forward in my Icotera Router:
And now its accessible from the world!!
Here, we should consider to make some (at least) IP restrictions in the Apache. Currently, the whole world can potentionally turn the office light on/off