{"id":15406354,"url":"https://github.com/otherguy/esp8266weatherstation","last_synced_at":"2026-01-27T11:32:18.446Z","repository":{"id":98594839,"uuid":"359271698","full_name":"otherguy/ESP8266WeatherStation","owner":"otherguy","description":"A tiny weather forecast station using a NodeMCU ESP8266 and 3 MAX7219 8×8 LED matrices","archived":false,"fork":false,"pushed_at":"2024-10-31T14:33:08.000Z","size":6268,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-18T10:10:19.520Z","etag":null,"topics":["8x8-led-matrix","esp8266","hardware","micropython","micropython-esp8266","nodemcu","nodemcu-esp8266","weather-station"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/otherguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-18T23:09:11.000Z","updated_at":"2024-10-31T14:33:35.000Z","dependencies_parsed_at":"2024-10-01T16:21:37.042Z","dependency_job_id":"95cbb20a-1491-4a18-adc4-2670218e7312","html_url":"https://github.com/otherguy/ESP8266WeatherStation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/otherguy/ESP8266WeatherStation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otherguy%2FESP8266WeatherStation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otherguy%2FESP8266WeatherStation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otherguy%2FESP8266WeatherStation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otherguy%2FESP8266WeatherStation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otherguy","download_url":"https://codeload.github.com/otherguy/ESP8266WeatherStation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otherguy%2FESP8266WeatherStation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["8x8-led-matrix","esp8266","hardware","micropython","micropython-esp8266","nodemcu","nodemcu-esp8266","weather-station"],"created_at":"2024-10-01T16:21:29.179Z","updated_at":"2026-01-27T11:32:18.430Z","avatar_url":"https://github.com/otherguy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🌤 ESP8266 Weather Station\n\n## Hardware\n\n### Bill of Materials (BOM)\n\nThe following components are required (all through hole):\n\n| Qty. | Item                       | Value          | Label      | Footprint | Price    |\n|----------|------------------------|----------------|------------|-----------|----------|\n| 1    | ESP8266 NodeMCU v3 board (4MB flash)     | -              |            | -         | US$ 2.05 |\n| 3    | MAX7219 8×8 SPI LED matrix | -              |            | -         | US$ 3.14 |\n| 1    | DC Female Power Socket     | 5.5 × 2.1mm    | `J1`       | PTH       | US$ 0.07 |\n| 1    | Trimmer potentiometer      | 3mm, 1kΩ       | `R1`       | DIP-3 PTH | US$ 0.04 |\n| 1    | LED                        | green, 3mm     | `LED1`     | THT       | US$ 0.02 |\n| 1    | LED                        | yellow, 3mm    | `LED2`     | THT       | US$ 0.02 |\n| 1    | Resistor (axial)           | 4.7kΩ, ¼W, ±5% | `R2`       | THT       | US$ 0.01 |\n| 2    | Resistor (axial)           | 100Ω, ¼W, ±5%  | `R3`, `R4` | THT       | US$ 0.01 |\n\nI used [RobotDyn yellow/amber colored modules](https://www.aliexpress.com/item/32732745628.html). A lot\nof other modules will also work, but they need to be 5-pin SPI chainable modules. Be aware of the pinout!\n\nFor the ESP8266 board, I used a [KeyeStudio NodeMCU](https://www.aliexpress.com/item/32668574859.html) but any\nother NodeMCU V2 or V3 board also works.\n\nThe knockoff V3 boards are better because they use a CH340 USB controller chip and have the `A0` pin reference\nvoltage set at `3.3V` instead of `1.0V`, meaning no voltage divider circuit is needed.\n\n### Circuit Board\n\nThe circuit board is very simple and just holds the ESP8266 and the 3 LED matrices as\nwell as the power jack and a trimpot to adjust the LED brightness.\n\nI had 10 boards (1.6mm FR4 ENIG, RoHS, black solder mask) manufactured by [JLPCB](https://jlcpcb.com) for\nUS$ 44.00 including shipping in April 2021. The black solder mask makes it easy to prevent reflections inside\nthe case (and it looks gorgeous).\n\nThe [Fritzing file](hardware/NodeMCUWeatherStation.fzz) as well as the exported\n[Gerber files](hardware/NodeMCUWeatherStation_Gerber.zip) can be found in the [hardware](hardware) folder.\n\n![Finished PCB](resources/jlcpcb_boards.jpg \"JLCPCB Finished PCB\")\n\n![Breadboard View](resources/NodeMCUWeatherStation_bb.png \"Breadboard View\")\n\n![Schema View](resources/NodeMCUWeatherStation_schema.png \"Schema View\")\n\nThe [`robotdyn-max7219-LED-matrix.fzpz`](hardware/robotdyn-max7219-LED-matrix.fzpz) Fritzing part was made\nby [`@vanepp`](https://forum.fritzing.org/u/vanepp) on the Fritzing forums.\n\n### Outer Case\n\n[TBD]\n\n## Software\n\n### Prerequisites\n\nInstall [`esptool`](https://github.com/espressif/esptool) and [`ampy`](https://github.com/scientifichackers/ampy).\n\n```bash\n$ pip3 install --user esptool\n$ pip3 install --user adafruit-ampy\n```\n\n### Install MicroPython\n\nDownload the latest [MicroPython firmware for ESP8266](https://micropython.org/download/esp8266/) and flash it to the NodeMCU.\n[`esp8266-20220117-v1.18.bin`](firmware/esp8266-20220117-v1.18.bin) and flash it to the ESP8266.\n\n_Note:_ Since July 2024, when using the OpenWeatherMap API, you need to use a custom build of MicroPython with a larger TLS buffer. See the section below for more details.\n\n_Note:_ The USB serial device (`/dev/tty.usbserial-1430`) will be different, depending on your operating\nsystem, USB controller and port you use.\n\n\n```bash\n$ esptool.py --port /dev/tty.usbserial-1430 erase_flash\n$ esptool.py --port /dev/tty.usbserial-1430 --baud 460800 write_flash --flash_size=detect -fm dio 0x00 firmware/ESP8266_GENERIC-20240602-v1.24.0.bin\n```\n\n### Workaround for TLS buffer overflow in axtls\n\nOpenWeatherMap switched to a new SSL certificate in July 2024 which is too large for the default buffer size in the ESP8266's MicroPython TLS implementation with axTLS. This causes the ESP8266 to crash when trying to fetch weather data.\nTo address this, the buffer size needs to be increased by recompiling the firmware with appropriate settings. More\ndetails can be found in [this GitHub issue](https://github.com/micropython/micropython/issues/3279).\n\nI have provided a precompiled firmware image with the necessary changes in the [firmware](firmware) folder. The firmware\nis based on MicroPython `1.24.0` and has a larger TLS buffer size of 8192 bytes. Simply use the [`ESP8266_GENERIC-20240602-v1.24.0-tls-buffer-8192.bin`](firmware/ESP8266_GENERIC-20240602-v1.24.0-tls-buffer-8192.bin)\nfile instead of [`ESP8266_GENERIC-20240602-v1.24.0.bin`](firmware/ESP8266_GENERIC-20240602-v1.24.0.bin).\n\nYou can also compile the firmware for ESP8266 yourself with the following steps:\n\n```bash\ngh repo clone micropython/micropython\ncd micropython\ngit checkout v1.24.0\nmake -C ports/esp8266 submodules\ndocker run --rm -v $HOME:$HOME -u $UID -w $PWD -e GIT_DISABLE_UNTRACKED_CACHE=1 larsks/esp-open-sdk make -j8 -C mpy-cross\ncd ports/esp8266\ndocker run --rm -v $HOME:$HOME -u $UID -w $PWD -e GIT_DISABLE_UNTRACKED_CACHE=1 larsks/esp-open-sdk make -j8 AXTLS_DEFS_EXTRA=\"-Dabort=abort_ -DRT_MAX_PLAIN_LENGTH=1024 -DRT_EXTRA=8192\" BOARD=\"ESP8266_GENERIC\"\n```\n\nThe firmware can then be found at `build-ESP8266_GENERIC/firmware.bin`.\n\n### Configure Settings\n\nEdit [`secrets.py`](src/secrets.py) and configure the values for your WiFi network (`WIFI_SSID` and `WIFI_PASSWORD`).\n\nNext, sign up for a free account on [OpenWeather](https://openweathermap.org/), generate\n[an API key](https://home.openweathermap.org/api_keys) and set it in the `OW_API_KEY` constant in [`secrets.py`](src/secrets.py).\n\nFind the location you want to display weather data for on [OpenWeather](https://openweathermap.org/) and set the\n`GEO_NAME`, `GEO_LAT` and `GEO_LON` constants in [`secrets.py`](src/secrets.py). `GEO_NAME` is not really used at the\nmoment, so it's only a reminder for you so you know what place you're looking at.\n\n`DISPLAY_OFF_START` and `DISPLAY_OFF_END` are used to control when the display is turned off, e.g. at night. The value\nis the hour in 24-hour format, in UTC. Adjust accordingly. If you're in New York City and you want the display to turn\noff from 11pm to 7am, you might want to set `DISPLAY_OFF_START` to `3` and `DISPLAY_OFF_END` to `11`. Set both values\nto `0` if you never want to turn off the display.\n\n### Upload Software\n\nUse [Adafruit's `ampy` tool](https://github.com/adafruit/ampy) to upload the software to the ESP8266. Adjust the\nport according to your operating system and USB controller.\n\n```bash\n$ ampy --port /dev/tty.usbserial-1430 --baud 115200 put src/boot.py\n$ ampy --port /dev/tty.usbserial-1430 --baud 115200 put src/max7219.py\n$ ampy --port /dev/tty.usbserial-1430 --baud 115200 put src/symbols.py\n$ ampy --port /dev/tty.usbserial-1430 --baud 115200 put src/secrets.py\n$ ampy --port /dev/tty.usbserial-1430 --baud 115200 put src/main.py\n```\n\n## Other\n\n### Trimmer Potentiometer\n\nThe trimmer potentiometer at `R1` is used to adjust the brightness of the display. The brightness is always\nforced to be at the lowest value when the power jack is unplugged. Whe `DISPLAY_OFF_START` and `DISPLAY_OFF_END`\nare set to any other value than `0`, the display will be turned off during the specified time period and the\npotentiometer value is ignored.\n\n### LEDs\n\n`LED 1` is used to indicate network activity, while connecting to WiFi or fetching weather data.\n\n`LED 2` is used for debugging purposes. It blinks every 2 seconds (or whatever you set in `BLINK_DELAY`). If it\ndoes not blink, it means that the display is not updating and the ESP8266 has locked up.\n\n### Weather Icons\n\nThe weather icons were custom designed using this excellent [LED Matrix Editor](https://git.io/J3N9M).\n\n![Weather Icons](resources/weather-icons.png \"Custom Weather Icons: #185a66bddb663c00|894218bc3d184291|001ea1a919a6c0ec|00007e818999710e|152a547e8191710e|0a04087e8191710e|55aa55aa55aa55aa|a542a51818a542a5|180018183c3c1800|1800183860663c00\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotherguy%2Fesp8266weatherstation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotherguy%2Fesp8266weatherstation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotherguy%2Fesp8266weatherstation/lists"}