Skip to content

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
    
    • A determines for which position the ID is set, integer 1-8 (DS1-DS8)
    • B is the ID to set, string (in form of XX:XX:XX:XX:XX:XX:XX:XX, where X is 0-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
    
    • A determines which sensors are selected, integer 1-48 (sum of values for SPS and one of the others)

      {
          "1": "NONE",
          "2": "BME280",
          "4": "AM2320",
          "8": "HTS221",
          "16": "SPS30",
          "32": "BME680", // added in SW 1.40
      }
      

    Example:

    # NONE (1)
    http://192.168.1.100/stm.cgi?i2csensors=1
    # BME680 + SPS30 (32 + 16 = 48)
    http://192.168.1.100/stm.cgi?i2csensors=48
    

/stm.cgi?i2csfreq

  • Set the communication frequency with the I2C sensor.

    GET /stm.cgi?i2csfreq=A
    
    • A is the frequency in kHz, integer 5-100

    Example:

    http://192.168.1.100/stm.cgi?i2csfreq=20
    

Last update: 2021-05-13
Back to top