Skip to main content

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.

Metadata

Release files for qtoggleserver-thingspeak 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qtoggleserver-thingspeak 1.3.2
File Size Uploaded
qtoggleserver_thingspeak-1.3.2.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qtoggleserver-thingspeak 1.3.2
File Interpreter ABI Platform
qtoggleserver_thingspeak-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / qtoggleserver_thingspeak-1.3.2.tar.gz

Download URL qtoggleserver_thingspeak-1.3.2.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b0ee46c1cce0f274bc41d9bf482bf82a080d14a7987a326801973c42efca664f
BLAKE2b-256 checksum
How to use checksums
d18bbca5a14e32dd9aa8b64b5245f5cc4338f313fed3b198a7c2a0140b23678c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / qtoggleserver_thingspeak-1.3.2-py3-none-any.whl

Download URL qtoggleserver_thingspeak-1.3.2-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b9e9372f2138b0504a22639f8c478a331090fe7d80c165b0c61d0f37cf4eadc
BLAKE2b-256 checksum
How to use checksums
f9b0b8978ca241f1c1da73b27424ac5d83ac3710895fa414d9bf2f4a6225ac7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page