{"id":19396552,"url":"https://github.com/costastf/temperature_sensor_mqtt","last_synced_at":"2025-04-24T05:30:57.615Z","repository":{"id":70676698,"uuid":"90737275","full_name":"costastf/temperature_sensor_mqtt","owner":"costastf","description":"A micropython project for wemos d1 mini with wemos SHT30 sensor using mqtt as transport ","archived":false,"fork":false,"pushed_at":"2017-11-28T09:56:32.000Z","size":21242,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T23:12:45.057Z","etag":null,"topics":["humidity","micropython","mqtt","sht30","temperature","wemos-d1-mini"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/costastf.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":"2017-05-09T11:17:37.000Z","updated_at":"2022-10-15T15:38:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e829ded-2bac-4120-a506-83f8f8b06d08","html_url":"https://github.com/costastf/temperature_sensor_mqtt","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/costastf%2Ftemperature_sensor_mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/costastf%2Ftemperature_sensor_mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/costastf%2Ftemperature_sensor_mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/costastf%2Ftemperature_sensor_mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/costastf","download_url":"https://codeload.github.com/costastf/temperature_sensor_mqtt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250572188,"owners_count":21452326,"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":["humidity","micropython","mqtt","sht30","temperature","wemos-d1-mini"],"created_at":"2024-11-10T10:36:03.235Z","updated_at":"2025-04-24T05:30:57.602Z","avatar_url":"https://github.com/costastf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Temperature and humidity measuring published on mqtt\nA micropython project for wemos d1 mini with wemos SHT30 sensor using mqtt as transport\n\nThe implementation of the sensor is taken from here [SHT30](https://github.com/rsc1975/micropython-sht30) \n\nIn order to use this an mqtt server must be set up. The one used for this \nproject is [mosquitto](https://hub.docker.com/_/eclipse-mosquitto/) and has \nbeen setup to run on docker.\n \nThis project does not use authentication since it is build for a local deployment. If this does not \nwork for you, edit accordingly. \n\nThis assumes that you are using a linux box and was done on one running \nubuntu.\n\n# Physical Connection\n\nThe sensor is just stacked on top of the wemos d1. Keep in mind that it picks\n up temperature from the board so the reading is not true if used without \n some form of insulation. Even with insulation the sensor picks up a lot of \n heat from the board so the code puts the board in deepsleep instead of a \n while loop. The board waking from deep sleep reconnects to the wifi, to the \n mqtt sends the message, disconnects and sleeps again. For the board to wake \n up from deep sleep a connection has to be made between gpio16 (D0) and RST.\n \n# Configuration\n \n Rename configuration_sample.json to configuration.json and edit accordingly.\n  Everything else should just work out of the box.\n\nTo load this project the wemos d1 needs to be running micropython and you \ncould probably use ampy.\n\n# Flashing micropython\n\nRequired tools:\n    \n   [esptool](https://github.com/espressif/esptool)    \n   [micropython](http://micropython.org/download) # Firmware for ESP8266 \n   boards, get latest.  \n  \n  \n  With the board connected to a usb port of your linux box assuming that the \n  port is ttyUSB0 (check with dmesg after connecting to see what is assigned)\n    \n    esptool.py --port /dev/ttyUSB0 erase_flash\n    esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20170108-v1.8.7.bin\n   \n  I have had some d1 boards having trouble flashing with the above with \n  garbage on the serial and the led staying on. On those boards this command \n  works.\n    \n    esptool.py --port /dev/ttyUSB0 write_flash -fm dio -fs 32m 0 esp8266-20170108-v1.8.7.bin\n   \n   \n# Loading the project\n\nRequired tools:\n\n   [ampy](https://github.com/adafruit/ampy)\n   \n    export AMPY_PORT=/dev/ttyUSB0\n    ampy put drivers/\n    ampy put configuration.json \n    ampy put main.py \n    ampy put boot.py \n\n# Checking output\n\n   On an ubuntu box you can install mosquitto clients with:\n    \n    sudo apt-get install mosquitto-clients\n    \n   For other distros or platforms please search what is required.\n   Checking messages:\n   \n    mosquitto_sub -h MQTT_SERVER_IP -v -t \"CONFIGURED_TOPIC\"\n    \n   should show something like this every however long the configuration is \n   set to:\n    \n    CONFIGURED_TOPIC {\"humidity\": 27.65392, \"temperature\": 27.68366}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcostastf%2Ftemperature_sensor_mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcostastf%2Ftemperature_sensor_mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcostastf%2Ftemperature_sensor_mqtt/lists"}