0.0.38 • Published 8 months ago

@rectrix/iotcore-drivers v0.0.38

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

IotCoreDriver

SerialConnection

  • It is using one address to read the data
  • default -- SERIAL_PORT = COM4 -- BAUD_RATE = 9600 -- PARITY = None -- STOP_BITS = 1 -- Client ID = 1 - hardcoded -- Timeout = 1 second

Calling collect data reads input registers on the given address.

TCP Connection -- MODBUS_HOST=127.0.0.1 -- MODBUS_PORT=5020 -- MODBUS_TIMEOUT=5000

Before using the MariaDb database Create the table to store the data manually

CREATE DATABASE rectrixIotDb;

CREATE TABLE sensor_data_table ( id INT AUTO_INCREMENT PRIMARY KEY, sensorID VARCHAR(255) NOT NULL, data TEXT NOT NULL, timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP );