pi_anwing_webthing
A web connected patio awnings controller on Raspberry Pi
Currently supported are TB6612FNG driven motors such as DGO-3512ADA. The concrete motor configuration(s) are defined by using a config file such s 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 TB6612FNG driven motors the filename has to include the term tb6612fng such as tb6612fng_motors.config. Regarding the hardware setup and wiring please refer example hardware setup
To install this software you may use PIP package manager such as shown below
sudo pip install pi-anwing-webthing
After this installation you may start the webthing http endpoint inside your python code or via command line using
sudo anwing --command listen --hostname 192.168.0.23 --port 9500 --filename /etc/anwing/tb6612fng_motors.config
Here, the webthing API will be bind to hostname 192.168.0.23 on the local port 9500
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 anwing --command register --hostname 192.168.0.23 --port 9500 --filename /etc/anwing/tb6612fng_motors.config
The anwing service exposes an http webthing endpoint supporting the anwing 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:anwing-TB6612FNG",
"title":"AnwingControl",
"@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"
},
...
]
}
Metadata
Release files for pi-anwing-webthing 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pi_anwing_webthing-0.1.3.tar.gz | 8.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pi_anwing_webthing-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / pi_anwing_webthing-0.1.3.tar.gz
| Download URL | pi_anwing_webthing-0.1.3.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c10604b7ab6f338a9e24ff3fd51b771ea7761c105316b38b03b4980f77cb9081
|
|
BLAKE2b-256 checksum How to use checksums |
4cf2061dbc07a99f19fbbeb605d4b2c5e0fa19a1d4a5a29117dfeeeb72fedccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / pi_anwing_webthing-0.1.3-py3-none-any.whl
| Download URL | pi_anwing_webthing-0.1.3-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dab7d4041eac7cfbfa72b26eee300a74053b40765657d88694b7306eac717650
|
|
BLAKE2b-256 checksum How to use checksums |
91299e697c64bff77c523e8db964bbf1de150158bcf0414594e5a8d258425269
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Security for pi-anwing-webthing 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.