Skip to content

Instantly share code, notes, and snippets.

Avatar

Niklas Fondberg fondberg

View GitHub Profile
View sonoff_mini_esphome.md

These steps are for Mac OS X, a lot of this is copied from https://blog.bilka.sk/how-to-flash-sonoff-mini-in-mac-os/ but added docker and removed the need for adding own AP.

  1. solder or put jumper between OTA and GND
  2. Entering the Compatible Pairing Mode (AP) by long press the paring button for 5 seconds after power on
  3. Connecting the Access Point named ITEAD-XXXXXXXX with default password 12345678 via mobile phone or PC
  4. Browser visits http://10.10.7.1/
  5. Filling in the existing WiFi network SSID and password and hit save
View Split array into N number of arrays
const splitArray = (inArray, buckets) => {
return inArray.reduce((retArr, value, index) => {
const bucket = index % buckets;
if (!retArr[bucket]) {
retArr[bucket] = [];
}
retArr[bucket].push(value)
return retArr
}, [[]]);
}
You can’t perform that action at this time.