I2C and 1-Wire sensors¶
/stm.cgi?dswrite¶
Read or set DS ID depending on parameters.
To read subsequent IDs to variable <--#dsid-->, which can be find under key dsid in /json/dsi2c.json:
GET /stm.cgi?dswrite=0
To set DS ID on chosen position:
GET /stm.cgi?dswrite=A:B
Adetermines for which position the ID is set, integer1-8(DS1-DS8)Bis the ID to set, string (in form ofXX:XX:XX:XX:XX:XX:XX:XX, whereXis0-9, A-F)
Example:
http://192.168.1.100/stm.cgi?dswrite=1:0:0:0:0:0:0:0:0
/stm.cgi?i2csensors¶
Set up the I2C sensors.
GET /stm.cgi?i2csensors=A
Adetermines which sensors are selected, integer1-24(5 bits - first four are primary sensor NONE, BME280, AM2320, HTS221, of which only one can be set to1at the time, the 5th one is secondary sensor SPS30)
Example:
http://192.168.1.100/stm.cgi?i2csensors=1
/stm.cgi?i2csfreq¶
Set the communication frequency with the I2C sensor.
GET /stm.cgi?i2csfreq=A
Ais the frequency in kHz, integer5-100
Example:
http://192.168.1.100/stm.cgi?i2csfreq=20