{"id":18785790,"url":"https://github.com/scott-the-programmer/esp8266-dh11-humidity-sensor","last_synced_at":"2025-12-21T23:30:11.099Z","repository":{"id":119522708,"uuid":"270241211","full_name":"scott-the-programmer/esp8266-dh11-humidity-sensor","owner":"scott-the-programmer","description":"A humidity sensor client / server application for the esp8266 chip ","archived":false,"fork":false,"pushed_at":"2020-06-14T00:12:36.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T12:42:09.901Z","etag":null,"topics":[],"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/scott-the-programmer.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-07T08:23:33.000Z","updated_at":"2024-09-09T20:29:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"fba214bd-a2dd-4e35-9614-05e92d0fc6be","html_url":"https://github.com/scott-the-programmer/esp8266-dh11-humidity-sensor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scott-the-programmer%2Fesp8266-dh11-humidity-sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scott-the-programmer%2Fesp8266-dh11-humidity-sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scott-the-programmer%2Fesp8266-dh11-humidity-sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scott-the-programmer%2Fesp8266-dh11-humidity-sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scott-the-programmer","download_url":"https://codeload.github.com/scott-the-programmer/esp8266-dh11-humidity-sensor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239702143,"owners_count":19683040,"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":[],"created_at":"2024-11-07T20:49:40.601Z","updated_at":"2025-12-21T23:30:11.002Z","avatar_url":"https://github.com/scott-the-programmer.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP8266 Humidity Sensor (DH11)\n\nSimple program to post humidity sensor data to a specified endpoint\n\nSupports both http and https\n\n## Prerequisites\n\n* [Arduino CLI](https://arduino.github.io/arduino-cli/installation/)\n* CP210x USB to UART Bridge VCP Driver\n* openssl\n* dotnet core sdk (3.1)\n\n## Getting Started\n\n### Run the example http server\n\n```bash\ncd ExampleHumidityServer\ndotnet build .\ndotnet run -p ExampleHumidityServer.csproj\n```\n\n### Download dependencies\n\nIn another terminal session, run the following script to list out your connected boards and update the ardunio-cli repository with the esp8266 index\n\n```bash\n./bootstrap.sh\n```\n\nExample output\n\n```bash\nThese are the boards connected\nPort                            Type              Board Name FQBN Core\n/dev/cu.usbserial-14310         Serial Port (USB) Unknown\n\nUpdating arduino index\nUpdating index: package_index.json downloaded\nUpdating index: package_esp8266com_index.json downloaded\nDownloading esp8266 dependencies\nesp8266:esp8266@2.7.1 already downloaded\nesp8266:xtensa-lx106-elf-gcc@2.5.0-4-b40a506 already downloaded\nesp8266:mkspiffs@2.5.0-4-b40a506 already downloaded\nesp8266:mklittlefs@2.5.0-4-fe5bb56 already downloaded\nesp8266:python3@3.7.2-post1 already downloaded\n```\n\nTake note of the port that you want to use, in this case, `/dev/cu.usbserial-14310`\n\n### Build \u0026 Run the code\n\nRun the following script to compile and run the code\n\n```bash\n./run.sh \"/dev/cu.usbserial-14310\" \"https://your-server-ip/humidity\" \"SSID\" \"password\"\n```\n\nExample output\n\n```bash\nCompiling code\nExecutable segment sizes:\nIROM   : 228492          - code in flash         (default or ICACHE_FLASH_ATTR)\nIRAM   : 26784   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...)\nDATA   : 1248  )         - initialized variables (global, static) in RAM/HEAP\nRODATA : 688   ) / 81920 - constants             (global, static) in RAM/HEAP\nBSS    : 24880 )         - zeroed variables      (global, static) in RAM/HEAP\nSketch uses 257212 bytes (24%) of program storage space. Maximum is 1044464 bytes.\nGlobal variables use 26816 bytes (32%) of dynamic memory, leaving 55104 bytes for local variables. Maximum is 81920 bytes.\nDeploying code to esp8266:esp8266:nodemcuv2:xtal=80  on /dev/cu.usbserial-143120\nNo new serial port detected.\nesptool.py v2.8\nSerial port /dev/cu.usbserial-143120\nConnecting....\nChip is ESP8266EX\nFeatures: WiFi\nCrystal is 26MHz\nMAC: 50:02:91:7a:1d:f2\nUploading stub...\nRunning stub...\nStub running...\nConfiguring flash size...\nAuto-detected Flash size: 4MB\nCompressed 261360 bytes to 192957...\nWrote 261360 bytes (192957 compressed) at 0x00000000 in 18.7 seconds (effective 111.8 kbit/s)...\nHash of data verified.\n\nLeaving...\nHard resetting via RTS pin...\n```\n\nRun the following command to read the serial output\n\n```bash\ncat \u003c \"/dev/cu.usbserial-14320\"\n```\n\nAt this point, you should see data hitting the example server\n\nServer:\n\n```bash\ninfo: ExampleHumidityServer.Controllers.HumidityController[0]\n      Received 58%\ninfo: ExampleHumidityServer.Controllers.HumidityController[0]\n      Received 58%\ninfo: ExampleHumidityServer.Controllers.HumidityController[0]\n      Received 59%\n```\n\nEsp8266:\n\n```bash\n{\"HumidityPercentage\": 58.00 }\nHTTP Response code: 202\n{\"HumidityPercentage\": 59.00 }\nHTTP Response code: 202\n{\"HumidityPercentage\": 59.00 }\nHTTP Response code: 202\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscott-the-programmer%2Fesp8266-dh11-humidity-sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscott-the-programmer%2Fesp8266-dh11-humidity-sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscott-the-programmer%2Fesp8266-dh11-humidity-sensor/lists"}