/
Sensor readings script
Sensor readings script
Sensor values download script for Linux bash.
Edit correct HOSTIP, and PARAM (if needed) and save the file (“sensors.sh” for example). Execute it from the Linux console. Sensors values are saved in a “dump.xml” file.
Parameters:
id - Dump for sensor with the specified ID;
txt=true - CSV dump;
#!/bin/sh
# measurements result script
# host address
HOSTIP="192.168.1.190"
# user name
USERNAME="guest"
# user password
PASSWORD="guest"
# dumplog file
DUMPFILE="dump.xml"
# parametrs
PARAM=""
#here: dump - in text form, only for sensor with id=1001
# PARAM="&txt=true&id=1001"
# 1) hash
HASH=`echo -n ${PASSWORD} | openssl dgst -sha1 | awk '{print $NF}'`
# 2) authorization
RESPONSE=`curl -s -d "querytype=auth&name=${USERNAME}&h=${HASH}" "${HOSTIP}/engine.htm"`
# 3) session key
KEY=`echo -n ${RESPONSE} | awk -F"\"" '{print $4}'`
# 4) unloading dump
curl -s "${HOSTIP}/dump.htm?k=${KEY}${PARAM}" -o ${DUMPFILE}
, multiple selections available,
Related content
Discrete Sensors
Discrete Sensors
More like this
LoRaWAN sensors
LoRaWAN sensors
More like this
VT450 Pressure, humidity and temperature sensor
VT450 Pressure, humidity and temperature sensor
More like this
Integration of Vutlan monitoring system in NMS
Integration of Vutlan monitoring system in NMS
Read with this
VT225t Room monitoring unit
VT225t Room monitoring unit
More like this
VT855t Data Center Monitoring System
VT855t Data Center Monitoring System
More like this