simpleiot

package module
v0.15.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

README

Go Reference Go Scc Count Badge Go Report Card Slack Widget

Simple Iot enables you to add remote sensor data, telemetry, configuration, and device management to your project or product.

Implementing IoT systems is hard. Most projects take way longer and cost more than they should. The fundamental problem is getting data from remote locations (edge) to a place where users can access it (cloud). We also need to update data and configuration at the edge in real time from any location. Simple IoT is an attempt to solve these problems by embracing the fact that IoT systems are inherently distributed and building on simple concepts that scale.

Simple IoT provides:

  • a single application with no dependencies that can be run in both cloud and edge instances
  • efficient synchronization of data in both directions
  • a flexible UI to view configuration and current values
  • a rules engine that runs on all instances that can trigger notifications or set data
  • extensive support for Modbus -- both server and client
  • support for the Linux 1-wire subsystem.
  • flexible graph organization of instances, users, groups, rules, and configuration
  • integration with other services like InfluxDB and Twilio
  • a system that is easy to extend in any language using NATS
  • a number of useful Go packages to use in your custom application

See vision, architecture, and integration for addition discussion on these points.

See detailed documentation for installation, usage, and development information.

Motivation

This project was developed while building real-world IoT applications and has been driven by the following requirements:

  • Data (state or configuration) can be changed anywhere — at edge devices or in the cloud and this data needs to be synchronized seamlessly between instances. Sensors, users, rules, etc. can all change data. Some edge systems have a local display where users can modify the configuration locally as well as in the cloud. Rules can also run in the cloud or on edge devices and modify data.
  • Data bandwidth is limited in some IoT systems — especially those connected with Cat-M modems (< 100kb/s). Additionally, connectivity is not always reliable, and systems need to continue operating if not connected.

Core ideas

The process of developing Simple IoT has been a path of reducing what started as a fairly complex IoT system to simpler ideas. This is what we discovered along the way:

  1. treat configuration and state data the same for purposes of storage and synchronization.
  2. represent this data using simple types (Nodes and Points).
  3. organize this data in a graph.
  4. all data flows through a message bus.
  5. run the same application in the cloud and at the edge.
  6. automatically sync common data between instances.

Design is the beauty of turning constraints into advantages. -- Ava Raskin

These constraints have resulted in Simple IoT becoming a flexible distributed graph database optimized for IoT datasets. We'll explore these ideas more in the documentation.

Support, Community, Contributing, etc.

Pull requests are welcome -- see development for more thoughts on architecture, tooling, etc. Issues are labelled with "help wanted" and "good first issue" if you would like to contribute to this project.

For support or to discuss this project, use one of the following options:

License

Apache Version 2.0

Contributors

Thanks to contributors:

Made with contrib.rocks.

Documentation

Overview

Package simpleiot is a collection of Go code that is useful for implementing cloud and edge applications.

See the Simple Iot Project Documentation for more information.

To develop a new client, see the [client.Client] documentation.

Directories

Path Synopsis
Package api implments the SIOT http interface.
Package api implments the SIOT http interface.
Package assets includes generated code from embedded assets (frontend, etc).
Package assets includes generated code from embedded assets (frontend, etc).
Package client contains utilties for creating Simple IoT clients.
Package client contains utilties for creating Simple IoT clients.
cmd
edge
Example SIOT client application
Example SIOT client application
fetch
test download program
test download program
mdns-test
mdns test
mdns test
modbus
example modbus client application
example modbus client application
modbus-client
example modbus client application
example modbus client application
modbus-server
example modbus server application
example modbus server application
point-size
test size of point encoding
test size of point encoding
send-sms
example of sending SMS message
example of sending SMS message
serial-encode
serial encode test
serial encode test
siot
This is the main Simple IoT Program
This is the main Simple IoT Program
tof10120
TOF10120 test application
TOF10120 test application
Package contrib contains systemd example service files, etc.
Package contrib contains systemd example service files, etc.
Package data contains common data structures that are used throughout the project.
Package data contains common data structures that are used throughout the project.
Package file contains file utilties.
Package file contains file utilties.
Package frontend includes web UI frontend code.
Package frontend includes web UI frontend code.
Package gps contains code to parse GPS data.
Package gps contains code to parse GPS data.
Package internal include protobuf definitions.
Package internal include protobuf definitions.
pb
Package modbus contains modbus RTU/TCP client/server code.
Package modbus contains modbus RTU/TCP client/server code.
Package msg is used to send messages vi Twillio, SMTP, etc
Package msg is used to send messages vi Twillio, SMTP, etc
Package network contains drivers to manage various network interfaces including modems.
Package network contains drivers to manage various network interfaces including modems.
Package node contains functionality to manage different types of nodes.
Package node contains functionality to manage different types of nodes.
Package particle is used to interface with devices through the particle.io cloud.
Package particle is used to interface with devices through the particle.io cloud.
Package respreader provides a convenient way to frame response data from devices that use prompt/response protocols such as Modbus, other RS485 protocols, and modem AT commands.
Package respreader provides a convenient way to frame response data from devices that use prompt/response protocols such as Modbus, other RS485 protocols, and modem AT commands.
Package sensors implements code to read various sensors.
Package sensors implements code to read various sensors.
Package server is used to start up the SIOT server, which includes NATS, the store, various built in clients, and HTTP API.
Package server is used to start up the SIOT server, which includes NATS, the store, various built in clients, and HTTP API.
Package sim contains simulation code
Package sim contains simulation code
Package store implements the SIOT data store and processes messages.
Package store implements the SIOT data store and processes messages.
Package system implements system specific functionality.
Package system implements system specific functionality.
Package test contains test utilities
Package test contains test utilities
Package tools is use to lock down versions of various tool packages we use.
Package tools is use to lock down versions of various tool packages we use.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL