{"id":19144953,"url":"https://github.com/ldab/node-red-energy-harvesting-dashboard","last_synced_at":"2025-06-21T05:36:53.371Z","repository":{"id":109150291,"uuid":"191965169","full_name":"ldab/Node-RED-Energy-Harvesting-dashboard","owner":"ldab","description":"Node-RED Energy Harvesting dashboard example, weather forecast, temperature and humidty measurement. MQTT, ESP32, u-blox NINA-W10, HTU21D, IBM Cloud, CloudMQTT","archived":false,"fork":false,"pushed_at":"2019-08-26T08:10:18.000Z","size":5397,"stargazers_count":9,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-15T12:06:05.897Z","etag":null,"topics":["esp32","ibm-bluemix","ibm-cloud","iot","mqtt","node-red","temperature-monitoring","temperature-sensor","u-blox","ublox","weather","weather-forecast","weather-station"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/ldab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-14T15:18:49.000Z","updated_at":"2024-10-23T05:59:45.000Z","dependencies_parsed_at":"2023-05-09T20:00:26.930Z","dependency_job_id":null,"html_url":"https://github.com/ldab/Node-RED-Energy-Harvesting-dashboard","commit_stats":{"total_commits":17,"total_committers":3,"mean_commits":5.666666666666667,"dds":0.4117647058823529,"last_synced_commit":"46d4fa67b5e14ba08c7aa05aa5fe535968bf9a0d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ldab/Node-RED-Energy-Harvesting-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldab%2FNode-RED-Energy-Harvesting-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldab%2FNode-RED-Energy-Harvesting-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldab%2FNode-RED-Energy-Harvesting-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldab%2FNode-RED-Energy-Harvesting-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldab","download_url":"https://codeload.github.com/ldab/Node-RED-Energy-Harvesting-dashboard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldab%2FNode-RED-Energy-Harvesting-dashboard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261070524,"owners_count":23105421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["esp32","ibm-bluemix","ibm-cloud","iot","mqtt","node-red","temperature-monitoring","temperature-sensor","u-blox","ublox","weather","weather-forecast","weather-station"],"created_at":"2024-11-09T07:37:08.971Z","updated_at":"2025-06-21T05:36:48.358Z","avatar_url":"https://github.com/ldab.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node-RED-Energy-Harvesting-dashboard\n\nNode-RED Energy Harvesting dashboard example, weather forecast, temperature and humidty measurement. MQTT, ESP32, u-blox NINA-W10, HTU21D, IBM Cloud, CloudMQTT\n\n[![GitHub version](https://img.shields.io/github/release/ldab/Node-RED-Energy-Harvesting-dashboard.svg)](https://github.com/ldab/Node-RED-Energy-Harvesting-dashboard/releases/latest)\n[![Build Status](https://travis-ci.org/ldab/Node-RED-Energy-Harvesting-dashboard.svg?branch=master)](https://travis-ci.org/ldab/Node-RED-Energy-Harvesting-dashboard)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/ldab/Node-RED-Energy-Harvesting-dashboard/blob/master/LICENSE)\n\n[![GitHub last commit](https://img.shields.io/github/last-commit/ldab/Node-RED-Energy-Harvesting-dashboard.svg?style=social)](https://github.com/ldab/Node-RED-Energy-Harvesting-dashboard)\n\n[![dashboard](./pics/dashboard.png)](https://www.u-blox.com/en/product/nina-W10-series)\n\n## Sumary\n\n1. [How to build PlatformIO based project](/README.md#How-to-build-PlatformIO-based-project)\n2. [TODO](/README.md#TODO)\n3. [Energy Harvesting](/README.md#Energy-Harvesting)\n4. [MQTT Broker](/README.md#MQTT-Broker)\n5. [IBM Node-RED Hosting](/README.md#IBM-Node-RED-Hosting)\n6. [Node-RED Flow](/README.md#Node-RED-Flow)\n7. [OpenWeatherMap API](/README.md#OpenWeatherMap-API)\n8. [Node-RED Notification](/README.md#Node-RED-Notification)\n9. [Programming](/README.md#Programming)\n10. [Calibrating ADC for ESP32](/README.md#Calibrating-ADC-for-ESP32)\n11. [Partition Table and Flash size](/README.md#Partition-Table-and-Flash-size)\n12. [Erase Flash](/README.md#Erase-Flash)\n13. [Power Measurement](/README.md#Power-Measurement)\n14. [PCB](/README.md#PCB)\n15. [Final Thoughts or Improvements](/README.md#Final-Thoughts-or-Impovements)\n16. [Credits](/README.md#Credits)\n\n## How to build PlatformIO based project\n\n* More information can be found on their comprehensive [Docs](https://docs.platformio.org/en/latest/ide/vscode.html). But Basically:\n\n  0. Download and install official Microsoft Visual Studio Code. PlatformIO IDE is built on top of it\n  1. **Open** VSCode Package Manager\n  2. **Search** for official `platformio-ide` [extension](https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide)\n  3. **Install** PlatformIO IDE.\n\n![PlatformIO installation](https://docs.platformio.org/en/latest/_images/platformio-ide-vscode-pkg-installer.png)\n\n## TODO\n\n- [x] More detailed IBM deploy;\n- [ ] Details on the flows;\n- [x] Node to be installed;\n- [ ] Energy Harvesting details;\n\n## Energy Harvesting\n\n### Energy Budget\n\n#### While Communicating\n\nComponent | ~Typ mA\n----------|--------\nNINA-W102 |120\n\n#### While Sleep (TPL5110)\n\nComponent | ~Typ μA\n----------|--------\nTPL5110   |0.035\nCap leak  |30\nLDO       |1\nPassive   |5\n\n* The code takes in average 2000ms to execute;\n* Wakes up every hour;\n* 10 hours of charging soruce;\n\n![energy budget](./pics/supercap%20budget.png)\n\n## MQTT Broker\n\nThe MQTT Broker used is [CloudMQTT](https://www.cloudmqtt.com/) they offer Free accounts 😉 that works just fine.\n\n## IBM Node-RED Hosting\n\nThe process was a bit tedious and took a while to get it properly running as of today (2019/06/15) the information provided on the tutorial had few broken links.\n\n[https://nodered.org/docs/platforms/bluemix](https://nodered.org/docs/platforms/bluemix)\n\n1. Sign-up/Log in to [https://cloud.ibm.com/](https://cloud.ibm.com/);\n2. Using the top search bar, search for `Node-RED Starter`;\n3. Fill the required fields, `App name`, `Host name`, etc...\n4. Select `Lite` for `SDK for Node.js` and `Cloudant`, those are free, you can upgrade later if required;\n5. Click `Create` at the bottom right, the circle will spin, take few seconds;\n6. You will be redirected to the next page and should see `running` when everything is ready for use:\n\n![IBM Cloud Start](./pics/ibmcloud.png)\n\n7. Go to your App URL, something like [http://AppName.eu-gb.mybluemix.net](http://AppName.eu-gb.mybluemix.net) and complete the initial set-up;\n8. The Node-Red GUI Flow Editor is available at [http://AppName.eu-gb.mybluemix.net/red](http://AppName.eu-gb.mybluemix.net/red)\n\n* After installing the Node desbribed below, Your Node-red Dashboard is available at [http://AppName.eu-gb.mybluemix.net/ui](http://AppName.eu-gb.mybluemix.net/ui)\n\n## Node-RED Flow\n\n### Install required nodes\n\n* Menu -\u003e Manage Palette -\u003e Install tab. You will need `node-red-node-openweathermap` and `node-red-dashboard`\n\n### Import Node example\n\n* Copy the flow below and import to your Nore-RED available at `yournode.eu-gb.mybluemix.net/red` Import \u003e Clipboard, paste it.\n\nYou will find the flow.json [here](./Node-RED%20flow/flows.json).\n\n![Node-RED Flow](./pics/screenshot.png)\n\n### Cloudant Credentials for cleaning database\n\n* Generally Cloudant autheticate via IBM cloud therefore we need to create new Credentials and use the username and password for authentication on the `delet inputs on database` node.\n\n![IBM Cloudant Credentials](./pics/credentials.png)\n\n## OpenWeatherMap API\n\n* In order to get the weather forecast information for the OpenWeatherMap node, you will need to get your API at [https://openweathermap.org/api](https://openweathermap.org/api)\n* Then define your location and the information you would like to show on the \"Forecast String\" node:\n```\n{\n  \"coord\":{\"lon\":139,\"lat\":35},\n  \"sys\":{\"country\":\"JP\",\"sunrise\":1369769524,\"sunset\":1369821049},\n  \"weather\":[{\"id\":804,\"main\":\"clouds\",\"description\":\"overcast clouds\",\"icon\":\"04n\"}],\n  \"main\":{\"temp\":289.5,\"humidity\":89,\"pressure\":1013,\"temp_min\":287.04,\"temp_max\":292.04},\n  \"wind\":{\"speed\":7.31,\"deg\":187.002},\n  \"rain\":{\"3h\":0},\n  \"clouds\":{\"all\":92},\n  \"dt\":1369824698,\n  \"id\":1851632,\n  \"name\":\"Shuzenji\",\n  \"cod\":200\n}\n```\n\n## Node-RED Notification\n\n* Via the `catch` node, you can enable notification, for your phone for example. Below I have quickly show few options:\n\n1. Email\n\n  * Use the `email` output, configured with your email provider info;\n\n2. PushSafer\n\n  * Offers several customizations, sound, vibration, icons, etc:\n  * GET request url: `https://www.pushsafer.com/api?k=YOURKEY\u0026c=%23ff0000\u0026v=1\u0026a=1\u0026m={{payload}}`\n\n5. Twilio SMS\n\n  * SMS API, built-in to the Node-RED and IBM example;\n\n6. IFTT\n\n  * If this than that, with android and iOS apps can be accesible via webhooks;\n  * GET `https://maker.ifttt.com/trigger/YOUR_EVENT/with/key/YOUR_KEY?value1=MESSAGE`\n\n## NINA-W1 Programming\n\n* An external 3.3V UART/USB Converter is required in combination with jumper configuration and button pressing:\n  1. Remove the 2 jumpers and set it to `Flash` Position:\n\n  ![board flashing](./pics/flashing.png)\n  \n  2. Power or reset the board while keeping `BOOT` low/pressed.\n\n* In order to program the Nano Timer `TPL5110` the DIP switch needs to be set **before** connecting power/supercap.\n\n## Calibrating ADC for ESP32\n\n* ADC on ESP32 has been reported being innacurate, therefore one can use ```adc2_vref_to_gpio( GPIO_NUM_25 );``` to route `Vref` to `GPIO_NUM_25` that can be measured over `NINA PIN 16 -\u003e R7` in order to calibrate during ADC measurement.\n* Calling for `esp_adc_cal_characterize(ADC_UNIT_1, ADC_ATTEN_DB_6, ADC_WIDTH_BIT_11, Vref, adc_chars);`\n\n## Partition Table and Flash size\n\n* You can create a custom partitions table (CSV) following [ESP32 Partition Tables](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/partition-tables.html) documentation.\n\n* Partitions examples are available at [GitHub arduino-esp32](https://github.com/espressif/arduino-esp32/tree/master/tools/partitions)\n\n* `minimal.csv` is the default defined on [nina_w10.json](https://github.com/platformio/platform-espressif32/blob/master/boards/nina_w10.json) however I changed it in order to free some space up used by spiffs found on `partitions_custom.csv` [here](./partitions_custom.csv)\n  * No OTA;\n  * No SPIFFS;\n  * No EEPROM;\n\n## Erase Flash\n\n`pio run -t erase` - \u003e all data will be replaced with 0xFF bytes.\n\n## Power Measurement\n\n* The overall power/current can be measure by diconeting the Storage element and connecting the meter in series;\n* Alternativelly, to analyze NINA-W1 power profile, remove `Vbat` jumper and measure the current on the following position:\n\n![](./pics/power.png)\n\n## PCB\n\n![3D board u-blox E-PEAS](./pics/MoreE%20u-blox%20E-PEAS.png)\n\n### Schematic\n\n\u003cimg src=\"./extras/schematic1.svg\" alt=\"u-blox E-PEAS\" width=\"50%\"\u003e \n\n\u003cimg src=\"./extras/schematic2.svg\" alt=\"u-blox E-PEAS\" width=\"50%\"\u003e \n\n### Enclosure\n\n\u003cimg src=\"./pics/enclosure.png\" alt=\"u-blox E-PEAS\" width=\"50%\"\u003e \n\n### BOM\n\n[BOM u-blox E-PEAS](./extras/BOM.csv)\n\n\u003cimg src=\"./extras/BOM.png\" alt=\"u-blox E-PEAS\" width=\"50%\"\u003e \n\n## Final Thoughts or Improvements\n\n* Use 3.0V LDO, HT7830;\n* Replace LDO for a smaller drop-out voltage or lower power-down current;\n* Use a Buck/Boost converter instead of LDO in order to discharge super cap until 2.8V;\n\n## Credits\n\nGitHub Shields and Badges created with [Shields.io](https://github.com/badges/shields/)\n\nWeather information from [OpenWeatherMap](https://openweathermap.org)\n\nWebcam picture from [webcam.travel](https://www.webcams.travel)\n\nAdafruit HTU21D GitHub [Library](https://github.com/adafruit/Adafruit_HTU21DF_Library)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldab%2Fnode-red-energy-harvesting-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldab%2Fnode-red-energy-harvesting-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldab%2Fnode-red-energy-harvesting-dashboard/lists"}