Skip to content

morelab/toad_sp_data

Repository files navigation

IoToad SmartPlug data collector

Build Status codecov Python 3.8 PEP8 black Checked with mypy

Development requirements

The development dependencies are listed in requirements_dev.txt and should be installed alongside requirements.txt.

There are two services that need to be started before running tests: MQTT and ETCD.

MQTT

The following shell command creates and runs a mosquitto container.

docker run \
--name=mosquittoc \
--publish 1883:1883 \
--network=host \
toke/mosquitto\
"

ETCD

Note: The ETCD database might need to be populated

Create a permanent storage folder:

mkdir -p $HOME/.var/lib

And run the ETCD docker container:

VOL_DIR="$HOME/.var/lib"
ETCD_ADDR="127.0.0.1"
ETCD_DIR="${VOL_DIR}/etcd"

docker run \
--name=etcdc \
--network=host \
--mount type=bind,src=${ETCD_DIR},dst=/etcd-data \
quay.io/coreos/etcd \
/usr/local/bin/etcd \
--data-dir=/etcd-data --name etcd_node \
--initial-advertise-peer-urls http://${ETCD_ADDR}:2380 --listen-peer-urls http://0.0.0.0:2380 \
--advertise-client-urls http://${ETCD_ADDR}:2379 --listen-client-urls http://0.0.0.0:2379 \
--initial-cluster etcd_node=http://${ETCD_ADDR}:2380 \
"

About

Smartplug data collection agent for IoToad

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages