37 / 48
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without
express authorization is prohibited. Offenders will be held liable for the payment of damages.
All rights reserved in the event of the grant of patent, utility model or design.
14.04.2020
Version 1.18.0
Examples
REST
6 Examples
6.1
Integrated python script
To see how the REST API works a simple python script is integrated in the device. The APS uses as standard setup DHCP -
not a fixed IP as his predecessor APC. So first check your e.g. router or OpenDHCP server, which IP the APS uses since
startup.
Use telnet or ssh to navigate inside the sensor and execute the script.
ssh
To use ssh at a Windows PC use tools like e.g. PuTTY (
http://www.chiark.greenend.org.uk/~sgtatham/putty/). At first
connecting time you get a "Putty Security Alert", because of a missing ssh key file at your PC - simply accept and store the
key by
<Yes>
. Login with
root
and password
counter
.
Telnet
Telnet is an old and unencrypted protocol. Since firmware 1.6, telnet is by default deactivated. To use it, first activate it in the
user interface “
Network
Network Services
Telnet”.
To connect by telnet at a Windows PC, first aktivate the telnet feature in "Control Panel", "Programs and Features", "Turn
Windows features on or off", and activate the "Telnet Client". Then use the Windows "Command Prompt" and enter:
C:\Users\xyz> telnet 192.168.100.10
APS012345 login: root
Password: counter
~ #