pi_awning_webthing
A web based patio awning control on Raspberry Pi.
Currently supported are TB6612FNG powered motors as DGO-3512ADA. 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.
To install this software, you can use the Docker or 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"
},
...
]
}
Metadata
Release files for pi-awning-webthing 3.19
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_awning_webthing-3.19.tar.gz | 10.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pi_awning_webthing-3.19-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.1 kB
Release files / pi_awning_webthing-3.19.tar.gz
| Download URL | pi_awning_webthing-3.19.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72b7b2940d947bde83da4b631f17614c8cbb807cd2a76db3f826cc1f4ca467dd
|
|
BLAKE2b-256 checksum How to use checksums |
46358646842765876340854648f3a5143d661a395de601ebb81b455c779a5ed8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Release files / pi_awning_webthing-3.19-py3-none-any.whl
| Download URL | pi_awning_webthing-3.19-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
102a3599cdc198ef5f0c3a29757739c21a1dfb49a9fa41bf9adce276a4fa3ceb
|
|
BLAKE2b-256 checksum How to use checksums |
6620ed0a7dace6b5c8d4bc9b6b83da4b4551c11535217591eed494eeb950687e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Security for pi-awning-webthing 3.19
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.