Controlling via http
to send control telegrams via http, there are various possibilities. The
probably most annoying thing is that you will always receive a useless
blank page with Ok
on it. One possibility to avoid this is to place a
small (0x0) iframe on your page and set this as target. In IE6 this
iframe is truly invisible, in firefox you see a small 2x2 dot.
To switch a lamp you can place a button like this:
<p>Kinderzimmer
<button value="1" name="Kizi1" onclick="self.location.href='http://ariel:1215/eib/grp/0.2.0?val=0'">aus</button>
<p>Kinderzimmer
</form>
and you will receive the Ok
-page or you can place a simple link like
this:
<iframe src="" width="0" height="0" name="ifr">
the Ok
will be written in the zero-sized iframe and is
therefore invisible.
When hitting the back
-button, IE will return to the previous page
whereas firefox will resend the eib-command.
Since 01/2010 the portserver on most queries replies with more
distinctive words (e.g. the value it currently tries to set).
If you want to see these you can of course make the iframe bigger.
Inserting and deleting triggers
Since the introduction of named triggers it is possible to insert and delete triggers into the running system. For further information see Named Triggers
Examples
In the example files you can find
- a sample xml file to define your eib installation.
- a php page for displaying window status. It includes a standard definitions file to ease up building versatile pages.
- a perlscript to start a script via command line
- the perlscript
sunjob
. It calculates the time of sunrise and sunset and I use it to open my shutters every morning at dawn and close them again in the evening.
Thanks to astronomie.info for the formula.