Page 1 of 1

Working with data in a text file accessing by http:\\....

Posted: Tue Dec 08, 2015 11:57 pm
by astroghost
Hello ,

i'm trying to accessing data from a sensor.

The data file could be accessed to this address :

http://127.0.0.1:4444/bySerial/LIGHTMK2 ... Sensor.txt

Data are like this in the text file :

*** lightSensor
logicalName: ""
advertisedValue: "17.5"
unit: "lx"
currentValue: 17.6
lowestValue: 3.5
highestValue: 82.6
currentRawValue: 17.617
logFrequency: 1/s
reportFrequency: OFF
calibrationParam: 0,
resolution: 0.1
measureType: HUMAN_EYE


So i would like to make a module that can read this text file each minute then get the datas on line 6,7,8 line ( lowestValue
highestValue
currentRawValue )

How can i make this module in flowstone.

Thanks for your answers

François

Re: Working with data in a text file accessing by http:\\...

Posted: Sun Dec 13, 2015 9:52 pm
by Tronic
Can you give more information on what kind of hardware are you using?

Re: Working with data in a text file accessing by http:\\...

Posted: Thu Dec 31, 2015 9:35 am
by JB_AU
So you have a file of sensor data on your local server, you could treat this as a normal file/folder & build a path to it, import the data into a string array, index 5,6 & 7 holds the required information, lucky for you there is a ':' delimiter, so you only require float data from index 5 after ':' delimiter.

All the information you require is in the user example subsection :)

Re: Working with data in a text file accessing by http:\\...

Posted: Wed Mar 30, 2016 10:53 am
by frontfitters123
If you know a little bit how to work with php and Html then you can easily make a program that will read this text file after a giver time will update your database. All you need and ISR system, ISR 2.3.0 will work.