sensor-emulator

command module
v0.0.0-...-d5213e9 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

Sensor Emulator

This is a simple sensor emulator software implemented for IoT experiments. It emulates sensors sending data to an MQTT broker.

Features

  • This can emulate a number of sensors based on the performance of the emulation machine
The following parameters can be defined for each sensors
  • Sensor type: Ex: temperature, humidity, traffic, co2 etc.
  • Frequency: The number of records per second
  • Source: The source text file containing the tuples representing sensor readings

Requirements

  • Go compiler if you want to download and compile the code.
  • MQTT broker for the simulator to send data to.

Configuring the sensors

The sensors to be emulated can be configured by editing the sensoremulator.yml file

deviceid: semu01
messaging:
  protocol: mqtt
  data_topic: sensordata
  command_topic: command1
  broker: localhost:1883
  dataratereadseconds: 10

sensors:
  sensor01:
    type: temperature
    freq: 600
    file: ./data/sensor01.dat
  sensor02:
    type: vibration
    freq: 400
    file: ./data/sensor02.dat
  sensor03:
    type: no2
    freq: 100
    file: ./data/sensor03.dat

Compiling the code

git clone 
go build -o emulator main.go

Running the compiled program

./emulator run

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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