Skip to content

GPIO configuration

Gunnar Skjold edited this page Jan 23, 2023 · 6 revisions

HAN

Select the pin that your meter is connected to. There will be two different types of serial devices in the list:

  • UART - These are available hardware serial ports. It is recommended to use hardware serial for stability
  • GPIO - General pin on your ESP. Software serial will be set up for this pin

On ESP8266, UART2 is pin swap of UART0.

AP button

A button that can be used to swap between normal WiFi mode and AP mode (for configuration). For known devices that have a suitable button, this will be configured by the selection of board type in initial setup. For generic board type this will not be configured by default. The reason behind this is that different development cards may have voltage dividers and pull up/down resistors connected to the configured pin which in turn could render the software unresponsive.

LED

Configuration of the pin where LED is connected. The LED is used to indicate when valid data is received, errors and AP mode

  • LED - A general LED that can be used when a colored LED is not available. Set pin number and check "inv" is signal should be inverted
  • RGB - Color LED used to indicate received data, errors and AP mode. Set pin number and check "inv" is signal should be inverted
    • Green - Valid data received from meter
    • Yellow - AP mode
    • Red - Error messages
      • If no message received from AMS in 30 sec, blink once
      • If MQTT error, blink twice
      • If WiFi not connected, blink three times

Temperature

Configure where DS18B20 sensors are connected. Read more in the Temperature sensors section

Analog temp - Pin where a analog temperature sensor is connected. Read more in the Temperature sensors section

Vcc

Voltage sensing for the power supply for the unit (3.3v). For ESP8266, the internal voltage sensor is enabled. Some ESP8266 development cards have a voltage divider connected to A0 which will disturb the internal sensor. In these cases, use offset and multiplier to get correct reading.

  • Pin - For ESP32, set a pin where Vcc sensor is connected. A voltage divider should be used
  • GND resistor - The value of the resistor between the pin and GND, in kohm
  • Vcc resistor - The value of the resistor between the pin and Vcc, in kohm
  • Multiplier - Vcc multiplier. Mostly used by ESP8266 with internal sensor, but can also be used instead of voltage divider config
  • Offset - To offset a incorrect 0 value for Vcc
  • Boot limit - If the voltage is below this limit during boot, the software goes into deep sleep for 10 seconds