pi-dht-webthing


Namepi-dht-webthing JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/grro/pi_dht_webthing
SummaryA web connected DHT sensor reading temperature and humidity values on Raspberry Pi
upload_time2024-12-01 07:36:44
maintainerNone
docs_urlNone
authorGregor Roth
requires_pythonNone
licenseMIT
keywords webthings dht dht11 dht22 home automation humidity sensor temperature sensor raspberry pi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pi_dht_webthing
A web connected humidity and temperature sensor

This project provides a [webthing API](https://iot.mozilla.org/wot/) to a [DHT11 or DHT22](https://learn.adafruit.com/dht) humidity and temperature sensor 
running on a Raspberry Pi. As a webthing, the DHT sensor can be discovered and used by 
*home automation systems* or custom solutions supporting the webthing API.  

The pi_dht_webthing exposes an http webthing endpoint which supports reading the humidity and temperature sensor values via http. E.g. 
```
# webthing has been started on host 192.168.0.23

curl http://192.168.0.23:8070/properties 

{
   "temperature" : 17.3,
   "humidity" : 79.9
}
```

A RaspberryPi/DHTxx hardware setup and wiring may look like [DHT22 example](docs/layout.png). 

To install this software you may use [Docker](https://phoenixnap.com/kb/docker-on-raspberry-pi) or [PIP](https://realpython.com/what-is-pip/) package manager such as shown below

** Docker approach**
```
sudo docker run --privileged -p 8070:8070 -e gpio=2 grro/pi_dht_webthing:0.1.0
```

**PIP approach**
```
sudo pip install pi_dht_webthing
```

After this installation you may start the webthing http endpoint inside your python code or via command line using
```
sudo dht --command listen --h--port 8070 --gpio 2
```
Here, the webthing API will be bind on port 8070 and be connected to the DHTxx signal pin using gpio 2

Alternatively to the *listen* command, you can use the *register* command to register and start the webthing service as systemd unit. 
By doing this the webthing service will be started automatically on boot. Starting the server manually using the *listen* command is no longer necessary. 
```
sudo dht --command register --port 8070 --gpio 2
```  



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/grro/pi_dht_webthing",
    "name": "pi-dht-webthing",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "webthings, dht, dht11, dht22, home automation, humidity sensor, temperature sensor, raspberry, pi",
    "author": "Gregor Roth",
    "author_email": "gregor.roth@web.de",
    "download_url": "https://files.pythonhosted.org/packages/3d/94/cde2a6ad77a2ebb6935c32f33c88efed399388f6eb3a08d36f47667e039b/pi_dht_webthing-0.1.2.tar.gz",
    "platform": null,
    "description": "# pi_dht_webthing\nA web connected humidity and temperature sensor\n\nThis project provides a [webthing API](https://iot.mozilla.org/wot/) to a [DHT11 or DHT22](https://learn.adafruit.com/dht) humidity and temperature sensor \nrunning on a Raspberry Pi. As a webthing, the DHT sensor can be discovered and used by \n*home automation systems* or custom solutions supporting the webthing API.  \n\nThe pi_dht_webthing exposes an http webthing endpoint which supports reading the humidity and temperature sensor values via http. E.g. \n```\n# webthing has been started on host 192.168.0.23\n\ncurl http://192.168.0.23:8070/properties \n\n{\n   \"temperature\" : 17.3,\n   \"humidity\" : 79.9\n}\n```\n\nA RaspberryPi/DHTxx hardware setup and wiring may look like [DHT22 example](docs/layout.png). \n\nTo install this software you may use [Docker](https://phoenixnap.com/kb/docker-on-raspberry-pi) or [PIP](https://realpython.com/what-is-pip/) package manager such as shown below\n\n** Docker approach**\n```\nsudo docker run --privileged -p 8070:8070 -e gpio=2 grro/pi_dht_webthing:0.1.0\n```\n\n**PIP approach**\n```\nsudo pip install pi_dht_webthing\n```\n\nAfter this installation you may start the webthing http endpoint inside your python code or via command line using\n```\nsudo dht --command listen --h--port 8070 --gpio 2\n```\nHere, the webthing API will be bind on port 8070 and be connected to the DHTxx signal pin using gpio 2\n\nAlternatively to the *listen* command, you can use the *register* command to register and start the webthing service as systemd unit. \nBy doing this the webthing service will be started automatically on boot. Starting the server manually using the *listen* command is no longer necessary. \n```\nsudo dht --command register --port 8070 --gpio 2\n```  \n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A web connected DHT sensor reading temperature and humidity values on Raspberry Pi",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/grro/pi_dht_webthing"
    },
    "split_keywords": [
        "webthings",
        " dht",
        " dht11",
        " dht22",
        " home automation",
        " humidity sensor",
        " temperature sensor",
        " raspberry",
        " pi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02e400670fafa1caaac802978ab75c21041460557f10fa5c829b6d009fe6d182",
                "md5": "aa5725d8340afc411f3be5914c177c21",
                "sha256": "3d09af90e606ee22e3a534360a1ef6e01dbdffa47124edfd87590afe021bd702"
            },
            "downloads": -1,
            "filename": "pi_dht_webthing-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aa5725d8340afc411f3be5914c177c21",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10710,
            "upload_time": "2024-12-01T07:36:31",
            "upload_time_iso_8601": "2024-12-01T07:36:31.819987Z",
            "url": "https://files.pythonhosted.org/packages/02/e4/00670fafa1caaac802978ab75c21041460557f10fa5c829b6d009fe6d182/pi_dht_webthing-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d94cde2a6ad77a2ebb6935c32f33c88efed399388f6eb3a08d36f47667e039b",
                "md5": "1fe41bafa024e97355c9d41dedf04aba",
                "sha256": "cbaf819b23e18f2dbc90adc765a6f23255e636733fda95cf8d7f63c88ab0ef38"
            },
            "downloads": -1,
            "filename": "pi_dht_webthing-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1fe41bafa024e97355c9d41dedf04aba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5442,
            "upload_time": "2024-12-01T07:36:44",
            "upload_time_iso_8601": "2024-12-01T07:36:44.538854Z",
            "url": "https://files.pythonhosted.org/packages/3d/94/cde2a6ad77a2ebb6935c32f33c88efed399388f6eb3a08d36f47667e039b/pi_dht_webthing-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-01 07:36:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "grro",
    "github_project": "pi_dht_webthing",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pi-dht-webthing"
}
        
Elapsed time: 1.72006s