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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qtoggleserver_thingspeak-1.3.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qtoggleserver_thingspeak-1.3.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file qtoggleserver_thingspeak-1.3.2.tar.gz.

File metadata

File hashes

Hashes for qtoggleserver_thingspeak-1.3.2.tar.gz
Algorithm Hash digest
SHA256 b0ee46c1cce0f274bc41d9bf482bf82a080d14a7987a326801973c42efca664f
MD5 618f75a1318a0350102a1cd73c4c2858
BLAKE2b-256 d18bbca5a14e32dd9aa8b64b5245f5cc4338f313fed3b198a7c2a0140b23678c

See more details on using hashes here.

File details

Details for the file qtoggleserver_thingspeak-1.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for qtoggleserver_thingspeak-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b9e9372f2138b0504a22639f8c478a331090fe7d80c165b0c61d0f37cf4eadc
MD5 3d16e13f23727dc44bfafc5bc654fddc
BLAKE2b-256 f9b0b8978ca241f1c1da73b27424ac5d83ac3710895fa414d9bf2f4a6225ac7d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.5

1 file

1.1.4

1 file

1.1.3

1 file

1.1.2

1 file

1.0.1

1 file

1.0.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page