pi-awning-webthing


Namepi-awning-webthing JSON
Version 3.19 PyPI version JSON
download
home_pagehttps://github.com/grro/pi_awning_webthing
SummaryA web connected terrace awning controller on Raspberry Pi
upload_time2024-05-26 14:15:51
maintainerNone
docs_urlNone
authorGregor Roth
requires_pythonNone
licenseMIT
keywords webthings awning control pation terrace
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pi_awning_webthing
A web based patio awning control on Raspberry Pi.

Currently supported are [TB6612FNG powered](https://www.pololu.com/product/713) motors as
[DGO-3512ADA](https://www.ebay.co.uk/itm/Gear-Motor-Direct-Current-6-12V-Electric-With-Removable-Crank-DGO-3512ADA-/183375290396).
The specific motor configuration(s) are defined using a configuration file as shown below.
```
# name, gpio_forward, gpio_backward, step_duration_in_sec
lane1, 2, 3, 0.5
lane2, 19, 26, 0.5
lane3, 5, 6, 0.5
lane4, 10, 9, 0.5
```
For motors with TB6612FNG, the file name must contain the term *tb6612fng*, e.g. tb6612fng_motors.config. Concerning the
hardware setup and wiring please read [Example Hardware Setup](doc/dgo-3512ada.md).

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

**Docker approach**
```
sudo docker run --privileged -p 9500:9500 -v /etc/awning/:/etc/awning/ -e filename=/etc/awning/tb6612fng_motors.config  grro/pi_awning_webthing:0.2.0
```

**PIP approach**
```
sudo pip install pi-awning-webthing
```

After installation, you can start the Webthing http endpoint in your Python code or from the command line by typing
```
sudo awning --command listen--port 9500 --filename /etc/awning/tb6612fng_motors.config
```
This binds the Webthing API to the local port 9500.

As an alternative to the *list* command, you can also use the *register* command to register and start the webthing service as a systemd entity.
This will automatically start the webthing service at boot time. Starting the server manually with the *listen* command is no longer necessary.
```
sudo awning --command register --port 9500 --filename /etc/awning/tb6612fng_motors.config 
```

The awning service provides an http webthing endpoint that supports the awning properties. E.g. 
```
# webthing has been started on host 192.168.0.23

curl http://192.168.0.23:9500/properties 

{
 [
    {
       "id":"urn:dev:ops:awning-TB6612FNG",
       "title":"AwningControl",
       "@context":"https://iot.mozilla.org/schemas",
       "properties":{
          "target_position":{
             "@type":"LevelProperty",
             "title":"awning lane1 target position",
             "type":"integer",
             "minimum":0,
             "maximum":100,
             "description":"awning lane1 target position",
             "links":[
                {
                   "rel":"property",
                   "href":"/0/properties/target_position"
                }
             ]
          },
          "current_position":{
             "@type":"LevelProperty",
             "title":"awning lane1 current position",
             "type":"integer",
             "minimum":0,
             "maximum":100,
             "readOnly":true,
             "description":"awning lane1 current position",
             "links":[
                {
                   "rel":"property",
                   "href":"/0/properties/current_position"
                }
             ]
          },
          "retracting":{
             "@type":"OnOffProperty",
             "title":"lane1 is retracting",
             "type":"boolean",
             "readOnly":true,
             "description":"lane1 is retracting",
             "links":[
                {
                   "rel":"property",
                   "href":"/0/properties/retracting"
                }
             ]
          },
          "extending":{
             "@type":"OnOffProperty",
             "title":"lane1 is extending",
             "type":"boolean",
             "readOnly":true,
             "description":"lane1 is extending",
             "links":[
                {
                   "rel":"property",
                   "href":"/0/properties/extending"
                }
             ]
          }
       },
       "actions":{

       },
       "events":{

       },
       "links":[
          {
             "rel":"properties",
             "href":"/0/properties"
          },
          {
             "rel":"actions",
             "href":"/0/actions"
          },
          {
             "rel":"events",
             "href":"/0/events"
          },
          {
             "rel":"alternate",
             "href":"ws://192.168.0.23:9500/0"
          }
       ],
       "description":"A web connected patio awnings controller on Raspberry Pi",
       "@type":[
          "MultiLevelSensor"
       ],
       "href":"/0",
       "base":"http://192.168.0.23:9500/0",
       "securityDefinitions":{
          "nosec_sc":{
             "scheme":"nosec"
          }
       },
       "security":"nosec_sc"
    },
    ...
 ]
}
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/grro/pi_awning_webthing",
    "name": "pi-awning-webthing",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "webthings, awning, control, pation, terrace",
    "author": "Gregor Roth",
    "author_email": "gregor.roth@web.de",
    "download_url": "https://files.pythonhosted.org/packages/46/35/8646842765876340854648f3a5143d661a395de601ebb81b455c779a5ed8/pi_awning_webthing-3.19.tar.gz",
    "platform": null,
    "description": "# pi_awning_webthing\nA web based patio awning control on Raspberry Pi.\n\nCurrently supported are [TB6612FNG powered](https://www.pololu.com/product/713) motors as\n[DGO-3512ADA](https://www.ebay.co.uk/itm/Gear-Motor-Direct-Current-6-12V-Electric-With-Removable-Crank-DGO-3512ADA-/183375290396).\nThe specific motor configuration(s) are defined using a configuration file as shown below.\n```\n# name, gpio_forward, gpio_backward, step_duration_in_sec\nlane1, 2, 3, 0.5\nlane2, 19, 26, 0.5\nlane3, 5, 6, 0.5\nlane4, 10, 9, 0.5\n```\nFor motors with TB6612FNG, the file name must contain the term *tb6612fng*, e.g. tb6612fng_motors.config. Concerning the\nhardware setup and wiring please read [Example Hardware Setup](doc/dgo-3512ada.md).\n\nTo install this software, you can use the [Docker](https://phoenixnap.com/kb/docker-on-raspberry-pi) or [PIP](https://realpython.com/what-is-pip/) package manager as shown below\n\n**Docker approach**\n```\nsudo docker run --privileged -p 9500:9500 -v /etc/awning/:/etc/awning/ -e filename=/etc/awning/tb6612fng_motors.config  grro/pi_awning_webthing:0.2.0\n```\n\n**PIP approach**\n```\nsudo pip install pi-awning-webthing\n```\n\nAfter installation, you can start the Webthing http endpoint in your Python code or from the command line by typing\n```\nsudo awning --command listen--port 9500 --filename /etc/awning/tb6612fng_motors.config\n```\nThis binds the Webthing API to the local port 9500.\n\nAs an alternative to the *list* command, you can also use the *register* command to register and start the webthing service as a systemd entity.\nThis will automatically start the webthing service at boot time. Starting the server manually with the *listen* command is no longer necessary.\n```\nsudo awning --command register --port 9500 --filename /etc/awning/tb6612fng_motors.config \n```\n\nThe awning service provides an http webthing endpoint that supports the awning properties. E.g. \n```\n# webthing has been started on host 192.168.0.23\n\ncurl http://192.168.0.23:9500/properties \n\n{\n [\n    {\n       \"id\":\"urn:dev:ops:awning-TB6612FNG\",\n       \"title\":\"AwningControl\",\n       \"@context\":\"https://iot.mozilla.org/schemas\",\n       \"properties\":{\n          \"target_position\":{\n             \"@type\":\"LevelProperty\",\n             \"title\":\"awning lane1 target position\",\n             \"type\":\"integer\",\n             \"minimum\":0,\n             \"maximum\":100,\n             \"description\":\"awning lane1 target position\",\n             \"links\":[\n                {\n                   \"rel\":\"property\",\n                   \"href\":\"/0/properties/target_position\"\n                }\n             ]\n          },\n          \"current_position\":{\n             \"@type\":\"LevelProperty\",\n             \"title\":\"awning lane1 current position\",\n             \"type\":\"integer\",\n             \"minimum\":0,\n             \"maximum\":100,\n             \"readOnly\":true,\n             \"description\":\"awning lane1 current position\",\n             \"links\":[\n                {\n                   \"rel\":\"property\",\n                   \"href\":\"/0/properties/current_position\"\n                }\n             ]\n          },\n          \"retracting\":{\n             \"@type\":\"OnOffProperty\",\n             \"title\":\"lane1 is retracting\",\n             \"type\":\"boolean\",\n             \"readOnly\":true,\n             \"description\":\"lane1 is retracting\",\n             \"links\":[\n                {\n                   \"rel\":\"property\",\n                   \"href\":\"/0/properties/retracting\"\n                }\n             ]\n          },\n          \"extending\":{\n             \"@type\":\"OnOffProperty\",\n             \"title\":\"lane1 is extending\",\n             \"type\":\"boolean\",\n             \"readOnly\":true,\n             \"description\":\"lane1 is extending\",\n             \"links\":[\n                {\n                   \"rel\":\"property\",\n                   \"href\":\"/0/properties/extending\"\n                }\n             ]\n          }\n       },\n       \"actions\":{\n\n       },\n       \"events\":{\n\n       },\n       \"links\":[\n          {\n             \"rel\":\"properties\",\n             \"href\":\"/0/properties\"\n          },\n          {\n             \"rel\":\"actions\",\n             \"href\":\"/0/actions\"\n          },\n          {\n             \"rel\":\"events\",\n             \"href\":\"/0/events\"\n          },\n          {\n             \"rel\":\"alternate\",\n             \"href\":\"ws://192.168.0.23:9500/0\"\n          }\n       ],\n       \"description\":\"A web connected patio awnings controller on Raspberry Pi\",\n       \"@type\":[\n          \"MultiLevelSensor\"\n       ],\n       \"href\":\"/0\",\n       \"base\":\"http://192.168.0.23:9500/0\",\n       \"securityDefinitions\":{\n          \"nosec_sc\":{\n             \"scheme\":\"nosec\"\n          }\n       },\n       \"security\":\"nosec_sc\"\n    },\n    ...\n ]\n}\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A web connected terrace awning controller on Raspberry Pi",
    "version": "3.19",
    "project_urls": {
        "Homepage": "https://github.com/grro/pi_awning_webthing"
    },
    "split_keywords": [
        "webthings",
        " awning",
        " control",
        " pation",
        " terrace"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6620ed0a7dace6b5c8d4bc9b6b83da4b4551c11535217591eed494eeb950687e",
                "md5": "f505933284c20a7ff5a2d10b0f2d7df2",
                "sha256": "102a3599cdc198ef5f0c3a29757739c21a1dfb49a9fa41bf9adce276a4fa3ceb"
            },
            "downloads": -1,
            "filename": "pi_awning_webthing-3.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f505933284c20a7ff5a2d10b0f2d7df2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 15345,
            "upload_time": "2024-05-26T14:15:49",
            "upload_time_iso_8601": "2024-05-26T14:15:49.702129Z",
            "url": "https://files.pythonhosted.org/packages/66/20/ed0a7dace6b5c8d4bc9b6b83da4b4551c11535217591eed494eeb950687e/pi_awning_webthing-3.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "46358646842765876340854648f3a5143d661a395de601ebb81b455c779a5ed8",
                "md5": "eb0908997442982040c4169ebd2f8c65",
                "sha256": "72b7b2940d947bde83da4b631f17614c8cbb807cd2a76db3f826cc1f4ca467dd"
            },
            "downloads": -1,
            "filename": "pi_awning_webthing-3.19.tar.gz",
            "has_sig": false,
            "md5_digest": "eb0908997442982040c4169ebd2f8c65",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10712,
            "upload_time": "2024-05-26T14:15:51",
            "upload_time_iso_8601": "2024-05-26T14:15:51.409936Z",
            "url": "https://files.pythonhosted.org/packages/46/35/8646842765876340854648f3a5143d661a395de601ebb81b455c779a5ed8/pi_awning_webthing-3.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-26 14:15:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "grro",
    "github_project": "pi_awning_webthing",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pi-awning-webthing"
}
        
Elapsed time: 1.48093s