Skip to content

Instantly share code, notes, and snippets.

View fondberg's full-sized avatar

Niklas Fondberg fondberg

  • Stockholm
View GitHub Profile
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
}, [[]]);
}
@fondberg
fondberg / sonoff_mini_esphome.md
Last active September 28, 2020 07:46
sonoff mini

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