This module establishes a connection between SignalSQL and a one-wire server from owapi.
To establish a connection, it is necessary to insert a row into the OWSERVER table, including the IP address of the server.
CREATE TABLE OWSERVER (
ID INT AUTO_INCREMENT PRIMARY KEY, -- The id of the OWSERVER record
Host VARCHAR(255), -- IP-address or hostname the owserver is running on
Port INT, -- Port. If NULL or zero the default port 4304 will be used
Status VARCHAR(255) -- Will contain the status of the connection between SignalSQL and owserver.
-- INIT|CONNECTING|CONNECTED|ERROR
);
After a successful connection has been established SignalSQL will query the owserver for all connected devices. For every found device one row will be added to the OWDEVICE table
CREATE TABLE OWDEVICE (
ID VARCHAR(255) PRIMARY KEY, -- The physical id of this OWSDEVICE
OwServer INT, -- The id of the OWSERVER for this device
Type VARCHAR(255), -- The type of the OWDEVICE
-- SERIAL_NUMBER|SWITCH|THERMOMETER|
-- AD_CONVERTER|BATTERY_MONITOR|RTC
);
The ID column holds the unique physical ID presented by the unit.
The OwServer column references a row in the OWSERVER table.
The Type column contains a string describing the device type.
Most of the devices present in the OWDEVICE table will also be described in the INPUT or OUTPUT tables. The name of the rows in INPUT/OUTPUT will be in the form owdevice/{id}