top of page

InDriver tasks utilize a JavaScript engine powered by the InDriver API to enable efficient programming.
Available InDriver API
File Read/Write API
Mbus API
OPC UA Server API
Serial Port API
SMTPApi
Process API
Socket API
TCPServer API
OpenCV API
Example of InDriver task code
/*
Retrieve JSON data from a Smart Energy Meter using a REST API and store it in an Azure SQL database
*/
RestApi.sendRequest('Shelly');
if (RestApi.isSucceeded()) {
const energyData = RestApi.getData('Shelly');
// add processing code if needed
let ts = InDriver.hookTs().toISOString();
InDriver.sqlExecute("azureserver", "insert into public.energy (source, ts, data) values ( 'Shelly','"+ts+"',$$"+energyData+"$$);"
}
bottom of page

