0
Answered

Data collecting, best way?

Martin Lang 9 years ago in Server Solutions updated 9 years ago 4

hi,


we want to collect data within i3 server pro like the power consumtion

of a house, the current temperatures on the solar panels, heating temperatures, etc.


what is the best way to do that so that it is possible to show a chart of about a specified

timerange on the panels, and be able to have access to values from the past too, and be

able to export/download/etc. the values to a txt file, csv file or so on?


should we do that by letting i3 pro pull the data via for example custom http/tcpip requests from the 3rd party system (i build that hardware too arduino/raspberry etc.) to collect data every 5min or so. or should the external device push the data to i3 pro server in any way at that time a new value is present? or, should we realize this via a perl/php script on an external machine that puts the data in a file or mysql database and i3 pro server connects to this, or via a http request on another small webserver?


there are many ways to communicate that, so, can you tell me whats the best way to to that optimized for the i3 server?


as i wrote above, the one thing is to show the client a chart of for example the last 7 days. on the other hand, all collected data should be stored somewhere to process it later with other programms like excel. or to be able to take a quick look what the power consumption was on that specific date.


thx!


with best regards,

martin

Answered

Hello Martin


iRidium Server stores the data in DB by 2 principles:

(http://dev.iridiummobile.net/Editor_Server_Tools/en#Building_graphs)


  • DB Save Strategy - the event at which a record appears in the database
    • Deadband - the minimal change. The record is created if the variable changes to the value which is more than the indicated one
      • Deadband (Value) - the minimal change of the variable which requires to be recorded in the database
    • Interval - the periodic recording. The record is created with the indicated time interval
      • Interval (sec) - the record interval in second


So, I don't think you need some external tool to optimize data, it is already there. You can change the settings of graph in GUI with JS or just open the web-interface of server to scroll the graphics

but should the data be pulled by i3 server or should it be pushed to the i3 server? is pushing even possible?


so, lets say an arduino is holding temperature informations and is accessable via tcp/ip interface. should we write a tcp/ip driver in iridium to pull that data from the arduino like a hdl-bus device or similar? and, i3 server pulls the data in an interval.


but how to access all the collected data later to use it in other software tools? or should the data be collected in two separate machines so i3 server can do "his" own thing with the data, and additional pushing the value to a mysql database for example.

+1

i just saw in the documentation, that it is possible to make a


AV & Custom Systems (TCP Server):

var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_SERVER_TCP, "iRidium TCP Server",

{Port: 2323,MaxClients: 10 // maximum of clients connected at the same time

});

thats nice!!!

so, when including this in the project, i would be able to make a tcp connection from a client directly to i3 server and send some data to it?


should the "iRidium TCP Server" be created also in the devicelist to add some feedback channels?


or could these feedback channels be automatically created with the


IR.GetDevice(driver).AddTag(name, data)


method?