Skip to content

Repository files navigation

Domotic server

This server is intended to retrieve sample data from sensors, store it and provide an API to request it.

Samples

Sample categories can be either temperature or humidity.

Launch

Commands

CommandDescription
make run-dependenciesDocker pull and run all dependencies
make run-appBuild and run app
make runLaunch run-dependencies then run-app
make testRun all tests
make cleanClean all files

Environment variables

VariableDefault value
DISCOVERY_PERIOD1m
LOG_LEVELinfo
MQTT_HOST127.0.0.1
MQTT_PORT1883
MQTT_QUALITY_OF_SERVICE2
MONGODB_URImongodb://localhost:27017

Ports

MQTT Topics

TopicTypeDescription
discoveryPUBSends a message oftenly to discover new probes
discover/probesSUBSave new probe from id in payload
:probeID/samples/:categorySUBSave sample for the probe in category, timestamped

HTTP Routes

RouteMethodDescription
/probesGETList all available probes
/probes/:probeID/getLatestSample/:categoryGETGet last sample for probe in category
/samples/:categoryGETList all samples for category for each probe

About

Backend which retrieves and stores data from environment, stores and exposes an API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages