Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

3.1 KiB

Firmware

Build the firmware

The project is ready to be build using PlatformIO. Please refer to their web page for instructions on how to install the builder.

If you are using PlatformIO /strongly recommended) it will take care of the library dependencies. Otherwise you will have to install them manually:

And my own libraries:

  • JustWifi
  • FauxmoESP (required if compiling with WeMo emulation support: -DENABLE_FAUXMO)
  • HLW8012 (required if compiling for Sonoff POW: -DENABLE_POW)
  • EmonLiteESP (required if compiling with Energy Monitoring support: -DENABLE_EMON)
  • NoFUSS (required if compiling with NoFUSS Automatic OTA support: -DENABLE_NOFUSS)

Note: The fauxmoESP library requires the staging version of Arduino Core for ESP8266. Either you are using Arduino IDE or PlatformIO you will have to manually install this. Check the documentation for the fauxmoESP library for more info.

Once you have all the code, you can check if it's working by:

> pio run -e node-debug

If it compiles you are ready to flash the firmware.

Flash your board

Wire your board (check the Hardware page) and flash the firmware (with upload):

> pio run -t upload -e sonoff

(or any other environment, depending on the board you are working with).

Library dependencies are automatically managed via PlatformIO Library Manager or included via submodules and linked from the "lib" folder.

Once the firmware is uploaded next step is to upload the web interface. Check how to build and flash the filesystem.