Remote control GPO, buzzer and speaker
Introduction
Controlling the GPO lines, speaker and buzzer is done by issuing HTTP GET requests.
All HTTP GET requests follow the same base structure.
HTTP GET ${device-ip}:3161/devices/${device-id}/${parameters}
Where:
${device-ip}: device IP address
${device-id}: device ID address
${parameters}: are specific to the command
Device ID
The device ID can be easily discovered accessing the follwoing URL from any web browser
http://${device-ip}:3161/devices
GPO lines control
Enable/Disable
The particular HTTP GET request is
HTTP GET ${device-ip}:3161/devices/${device-id}/setGPO/${line}/${value}
Where:
${line}: is the GPO line number: 1, 2, 3, 4, 5
${value}
true: for high value
false: for low value
Examples
To enable and disable line 1
http://192.168.1.112:3161/devices/AdvanReader-m2-60/setGPO/1/true
http://192.168.1.112:3161/devices/AdvanReader-m2-60/setGPO/1/false
GPO operation
A GPO operation allow to execute a compound GPO action: enable/disable a certain GPO line for a certain duration
The particular HTTP GET request is
HTTP GET ${device-ip}:3161/devices/${device-id}/GPOOperation/${line}/${value}/${time-on}/${time-off}/${time-total}
Where:
${line}: is the GPO line number: 1, 2, 3, 4, 5
${value}
true: for high value. In this case it means we do not negate the output
false: for low value. In this case it means we negate the output
${time-on}: is the active time of the GPO operation in ms
${time-off}: is the quiet time of the GPO operation in ms
${time-total}: is the total time of the GPO operation action in ms
Examples
To create a flashing effect on line 1
http://192.168.1.112:3161/devices/AdvanReader-m2-60/GPOOperation/1/true/150/150/900
Buzzer control
The particular HTTP GET request is
HTTP GET ${device-ip}:3161/devices/${device-id}/buzzer/${time-on}/${time-off}/${time-total}
Where:
${time-on}: is the active time of the buzzer in ms
${time-off}: is the quiet time of the buzzer in ms
${time-total}: is the total time of the buzzer action in ms
Valid values can be seen at
http://${device-id}:3161/devices/${device-id}/MCU/features/
Examples
http://192.168.1.112:3161/devices/AdvanReader-m2-60/buzzer/200/200/600
Speaker control
The particular HTTP GET request is
HTTP GET ${device-ip}:3161/devices/${device-id}/speaker/${freq}/${volume}/${time-on}/${time-off}/${time-total}
Where:
${freq}: tone frequency. Possible values: 1000,1500,2000,2500,3000,3500,4000,4500,5000
${volume}: volume: Possible values: from 1 to 10.
${time-on}: is the active time of the buzzer in ms
${time-off}: is the quiet time of the buzzer in ms
${time-total}: is the total time of the buzzer action in ms
Valid values can be seen at
http://${device-id}:3161/devices/${device-id}/MCU/features/
Examples
Two tones at 3000 Hz and low volume
http://192.168.1.112:3161/devices/AdvanReader-m2-60/speaker/3000/2/200/200/600
Alarm tone
http://192.168.1.112:3161/devices/AdvanReader-m2-60/speaker/3000/10/150/165/900