Ignition Maker v. 8.0.14
Designer running on Ubuntu 18.04
I have a few ESP8266 modules with DHT22 sensors around the house.
Each device runs a small HTTP server, and can be queried for sensor data with a GET to a path (i.e. http://device-ip/temp)
What I want to do is have Ignition query each device every x seconds, and store the data to the DB, for use in historical graphs later.
I have not found an easy way of doing this, so at the moment I have created expression-tags, and set the expression to the following, with a fixed pull-rate and history enabled.
runScript("system.net.httpGet('http://device-ip/temp')")
This works okay, but I was wondering if this is the most efficient way?
I have also thought about writing a script, which pulls the data and store it in the corresponding tags, but I don’t like the idea of having the tag and script separated.
Another way for me to do this, would be to rewrite the code on the ESP8266’s, and then read the data with the TCP driver using the OPC-UA server.
Am I missing something obvious here? Still quite new to Ignition, but loving it so far!
Thank you in advance.