GPIO for 3-gang

  • 0: Top green LED
  • 16: Top blue LED
  • 14: Middle blue LED
  • 2: Bottom blue LED
  • 12: Top button
  • 3: Middle button
  • 5: Bottom button
  • 13: Top relay (L1)
  • 4: Middle relay (L2)
  • 15: Bottom relay (L3)

Notes

Using GPIO 1,3

If your device uses the GPIO pins 1 (serial0 TX) or 3 (serial0 RX)for channels, you need to disable logging via the serial port:

mos config-set debug.stderr_uart=-1 debug.stdout_uart=-1

Using ESP8285 or 1MB ESP8266

You need to flash with the following statement in mos.yml:

build_vars:
  FLASH_SIZE: 1048576

Note: OTA will not work on these devices, for lack of flash space for the alternate boot partition.

When updating these, ensure you have a copy of the timespec files:

mos get timespec.chan0
mos get timespec.chan1
mos get timespec.chan2
mos get timespec.chan3

After flashing, but them back:

mos put timespec.chan0
mos put timespec.chan1
mos put timespec.chan2
mos put timespec.chan3

Using Sonoff-4CH

Don't forget to copy the timespec files!

Sonoff 4CH uses a bunch of GPIO pins for the LEDs and pushbuttons, and as such has no space for sensors.

mos config-set app.config=sonoff-4ch.json sensors.dht_gpio=""
Description
No description provided
Readme 279 KiB
Languages
C 99.2%
Shell 0.6%
Makefile 0.2%