2.0.3 • Published 6 years ago

homebridge-sonoff-4ch v2.0.3

Weekly downloads
19
License
Rade Bebek
Repository
github
Last release
6 years ago

homebridge-sonoff-4CH INSTRUCTIONS

Sonoff 4 CH or Sonoff 4 CH PRO

Features

  • Switch 4 Lights on / off
  • Outlet 4 Lights on / off
  • Light 4 Lights on / off

You can now ask Siri to turn on / off any lights or somthing else with Outlets and Switch. Functionality is the same, it is just a representation of the application icon in accordance with the service.

Instructions flash for SonOff 4CH PRO
  1. Set Sonoff 4 CH or Sonoff 4 CH Pro in programing mode, and flash ESPEasy firmware

  2. Video instructions link for PRO: https://www.youtube.com/watch?v=hOFvbdYkOII

Firmware Download Link : https://github.com/letscontrolit/ESPEasy/releases Flash Tool Download Link: https://randomnerdtutorials.com/flashing-nodemcu-firmware-on-the-esp8266-using-windows/ Version Firmware: Release v2.0.0-dev12 Sonoff 4 CH or Sonoff 4 CH PRO

Configuration Tool: Sonoff 4 CH or Sonoff 4 CH PRO Sonoff 4 CH or Sonoff 4 CH PRO Sonoff 4 CH or Sonoff 4 CH PRO

After flash reboot and go to Configuration SonOff 4CH or Sonoff 4CH PRO

Instructions flash for SonOff 4CH
  1. Set Sonoff 4CH or Sonoff 4 CH Pro in programing mode, and flash ESPEasy firmware
  • For Sonoff 4CH you must press GPIO0 and hold and in same time connect power (usb serial).
  • GPIO0 is first white button

Firmware Download Link : https://github.com/letscontrolit/ESPEasy/releases Flash Tool Download Link: https://randomnerdtutorials.com/flashing-nodemcu-firmware-on-the-esp8266-using-windows/ Version Firmware: Release v2.0.0-dev12 Sonoff 4 CH or Sonoff 4 CH PRO

Configuration Tool: Sonoff 4 CH or Sonoff 4 CH PRO Sonoff 4 CH or Sonoff 4 CH PRO Sonoff 4 CH or Sonoff 4 CH PRO

After flash reboot and go to Configuration SonOff 4CH or Sonoff 4CH PRO

Configuration SonOff 4CH or Sonoff 4CH PRO
  1. Sonoff 4ch/4chpro will creates a new Wi-Fi access point called ESP_0.

  2. Connect your PC to the network with password configesp.

  3. Open web browser and go to http://192.168.4.1 or some assigned ip addres.

  4. Go through the setup to connect Sonoff to your Wi-Fi network.

  5. Now, go to HARDWARE section, select GPIO-13 (D7) for Wifi Status Led to enable the green LED light on Sonoff. Change SDA and SCL to GPIO-16 (D0) GPIO-14 (D3). Sonoff 4 CH or Sonoff 4 CH PRO Submit changes

  6. Go to DEVICES section, edit Task #1. Insert the values:

Device: Switch input
Name: Light1
1st GPIO: Gpio 4
Switch Type: Switch
Switch Button Type: Normal Switch

Go to DEVICES section, edit Task #2. Insert the values:

Device: Switch input
Name: Light2
1st GPIO: Gpio 5
Switch Type: Switch
Switch Button Type: Normal Switch

Go to DEVICES section, edit Task #3. Insert the values:

Device: Switch input
Name: Light3
1st GPIO: Gpio 12
Switch Type: Switch
Switch Button Type: Normal Switch

Go to DEVICES section, edit Task #4. Insert the values:

Device: Switch input
Name: Light4
1st GPIO: Gpio 15
Switch Type: Switch
Switch Button Type: Normal Switch

Sonoff 4 CH or Sonoff 4 CH PRO Submit changes

  1. We have enabled the hardware GPIO to work, now we need to configure the rules for HTTP request. You enabled section rules in sectio Tool->Advance->Enable Rules Submit changes

  2. Go to RULES section, insert the following codes and submit.

On 4PowerOn Do
  gpio,4,1
EndOn

On 4PowerOff Do
  gpio,4,0
EndOn

On 5PowerOn Do
  gpio,5,1
EndOn

On 5PowerOff Do
  gpio,5,0
EndOn

On 12PowerOn Do
  gpio,12,1
EndOn

On 12PowerOff Do
  gpio,12,0
EndOn

On 15PowerOn Do
  gpio,15,1
EndOn

On 15PowerOff Do
  gpio,15,0
EndOn
  1. In config file:
  Type 1 is Light.
  Type 2 is Switch.
  Type 3 is Outlet.
  1. Finally, the Sonoff basic switch is fully customized. Connect it to a live socket.

Wiring schema

FOR SONOFF 4CH Simple scheme for wiring. Dont work in same time with wall switch.

Sonoff 4 CH or Sonoff 4 CH PRO

FOR SONOFF 4CH PRO Complex schema for wiring. You can use Home app and wall switch at the same time. Wall switch must be alternate.

Sonoff 4 CH or Sonoff 4 CH PRO

Installation

  1. Install required packages.

    npm i homebridge-sonoff-4ch

  2. Add following lines to config.json.

      "accessories": [
        {
          "accessory": "sonoff4ch",
          "name": "NAME_OF_LIGHT_1",
          "ip": "IP_ADDRESS_OF_THE_SONOFF_4CH",
          "gpio": "4",
          "type": "1"
        },
        {
          "accessory": "sonoff4ch",
          "name": "NAME_OF_LIGHT_2",
          "ip": "IP_ADDRESS_OF_THE_SONOFF_4CH",
          "gpio": "5",
          "type": "1"
        },
        {
          "accessory": "sonoff4ch",
          "name": "NAME_OF_LIGHT_3",
          "ip": "IP_ADDRESS_OF_THE_SONOFF_4CH",
          "gpio": "12",
          "type": "1"
        },
        {
          "accessory": "sonoff4ch",
          "name": "NAME_OF_LIGHT_4",
          "ip": "IP_ADDRESS_OF_THE_SONOFF_4CH",
          "gpio": "15",
          "type": "1"
        }
      ]
  3. Restart Homebridge, and your Sonoff basic a will be added to Home app.