Send values from qToggleServer to ThingSpeak
Project description
About
This is an addon for qToggleServer.
It allows sending values from qToggleServer to ThingSpeak.
Install
Install using pip:
pip install qtoggleserver-thingspeak
Usage
You'll need to register your account on ThingSpeak, if you haven't done it already. After creating a new channel, you'll find a write API key; copy it and use it in the configuration below.
qtoggleserver.conf:
...
event_handlers = [
...
{
driver = "qtoggleserver.thingspeak.ThingSpeakEventHandler"
api_key = "FJ3U5TL443012EF7"
fields = {
"first_port_id" = 1 # association between port id and ThingSpeak field number
"second_port_id" = 2
}
min_period = 5 # don't specify both min_period and period!
period = 10
...
}
...
]
...
The fields option associates a port to one of the 8 available ThinkSpeak channel fields. The channel is indirectly
identified by the API key, so there's no direct reference to its id in the configuration. Make sure you're using double
quotes around port ids in fields mapping; ports containing dots in their id will break the configuration otherwise.
The optional min_period field, if specified, will gather samples from given ports during a period of specified
seconds. The following value change event will simply push gathered samples, together, to ThingSpeak. Only values
that have changed during this time window will be pushed.
The optional period field, if specified, indicates a fixed sampling period, in seconds. Given ports will be sampled
with regular cadence. The last port value at the moment of sampling will be sent to ThingSpeak.
You must specify one and only one of min_period and period, depending on the desired behavior.
For advanced event filtering, see Filter Event Handlers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qtoggleserver_thingspeak-1.2.0.tar.gz.
File metadata
- Download URL: qtoggleserver_thingspeak-1.2.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31dcd3247ddb6012e52f1fe09f7062af1e2680f4874742b0359d6446e54b925e
|
|
| MD5 |
b85cb64902767f6881f3af1c23be0307
|
|
| BLAKE2b-256 |
c47a30710e8cda9e43235d47b783222f68609dc4b3226d10ef7543ffa34798c7
|
File details
Details for the file qtoggleserver_thingspeak-1.2.0-py3-none-any.whl.
File metadata
- Download URL: qtoggleserver_thingspeak-1.2.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7a0dbb2d20382c9d35e01d6d4a7154adc324395b82c965a6c98bccd28e60a4b
|
|
| MD5 |
239a695d577af50ff8480adb71241218
|
|
| BLAKE2b-256 |
0f34f8a5186bbc3e16b16752d1594d764efb2168c2499b415150402a53546e11
|