Sidehistorik
...
In the /var/www/cgi-bin/ I place 2 files:
Kodeblok | ||
---|---|---|
| ||
#!/usr/bin/expect spawn telnet 10.0.0.110 10001 expect "'^]'." send ">>Login 32010<<\r" expect ">>Login Ok<<" sleep .1; send ">>Set 10604 1<<" sleep .1; send ">>Logout<<\r" expect ">>Logout Ok<<" exit |
Kodeblok | ||
---|---|---|
| ||
#!/usr/bin/expect spawn telnet 10.0.0.110 10001 expect "'^]'." send ">>Login 32010<<\r" expect ">>Login Ok<<" sleep .1; send ">>Set 10604 0<<" sleep .1; send ">>Logout<<\r" expect ">>Logout Ok<<" exit |
And now its possible to turn on the Kontor Office light at the URL: http://10.0.0.150/cgi-bin/turnon-10604office.exp
And off at http://10.0.0.150/cgi-bin/turnoff-10604office.exp
Access from outside
The next step is to make a port forward in my Icotera Router:
...
Info | ||
---|---|---|
Here, we should consider to make som some (at least) IP restrictions in the Apache. Currently, the whole world can potentionally turn the office light on/off
|