Skip to content

Plugins: Getting Started

Sean Shahkarami edited this page Oct 7, 2020 · 12 revisions

Plugins: Getting Started

Overview

pywaggle provides an implementation of the Waggle plugin interface to make it easy to hook existing code into the Waggle data pipeline.

Examples

Basic Publishing

We'll start with the basics of publishing. In this example, we make up a fake humidity value and publish it so it can be sent to beehive and other plugins.

import waggle.plugin as plugin
import time

plugin.init()

while True:
    # publish made up htu21d humidity value
    plugin.publish('env.humidity.htu21d', 12.34)
    time.sleep(1)

Clone this wiki locally