1

Unable to SUM/AVERAGE data from 2 sensors

(edited by nasnew 01/11/2019 12:17:48)

Topic: Unable to SUM/AVERAGE data from 2 sensors

Hello,

We have installed 2  fuel sensors on vehicles with 2 tanks and unfortunately both sensors are sending fuel data to Wialon in separate messages, because of this we are unable to sum and average fuel data of the two tanks. We are trying to create a single message for both fuel tanks device level but this wlll take some time, Any advise on a workaround is appreciated.

2

Unable to SUM/AVERAGE data from 2 sensors

Re: Unable to SUM/AVERAGE data from 2 sensors

nasnew, I guess if you create the third sensor and in this sensor sum up 2 sensors value it will work. Try it.

3

Unable to SUM/AVERAGE data from 2 sensors

Re: Unable to SUM/AVERAGE data from 2 sensors

I tried this actually, but this will only work incase if  data from the two sensors comes in a single message (row) from the device, it shows N/A if other wise

4

Unable to SUM/AVERAGE data from 2 sensors

Re: Unable to SUM/AVERAGE data from 2 sensors

Try to use hash sign before parameter name to get value from the previous message:

fls_param_ex1+#fls_param_ex2

@ Oleg Zharkovsky
Technical Consulting / Training Team
"Timely is the best. But still better late than never."
5

Unable to SUM/AVERAGE data from 2 sensors

(edited by nasnew 12/11/2019 12:45:32)

Re: Unable to SUM/AVERAGE data from 2 sensors

Thank you so much, this is very helpful. by the way can the same be applied to sensors, rather than parameters

6

Unable to SUM/AVERAGE data from 2 sensors

Re: Unable to SUM/AVERAGE data from 2 sensors

nasnew wrote:

by the way can the same be applied to sensors, rather than parameters

No, it can't be applied to sensors now.

@ Oleg Zharkovsky
Technical Consulting / Training Team
"Timely is the best. But still better late than never."
7

Unable to SUM/AVERAGE data from 2 sensors

Re: Unable to SUM/AVERAGE data from 2 sensors

nasnew wrote:

Hello,

We have installed 2  fuel sensors on vehicles with 2 tanks and unfortunately both sensors are sending fuel data to Wialon in separate messages, because of this we are unable to sum and average fuel data of the two tanks. We are trying to create a single message for both fuel tanks device level but this will take some time, Any advise on a workaround is appreciated.

There is a special channel in flespi called pipe-cache-params. It is designed as a part of message workflow to accumulate and cache specified parameters and inject them into message passing through the channel. As a result you may end up with the messages in Wialon containing parameters with the values of both fuel level sensors and you do not need any extra complex sensors math.
The messages flow is like this device => flespi original channel => flespi params pipe channel => stream to Wialon => flespi gateway or flespi device in Wialon. Here is more information on streaming from flespi to Wialon if you will implement this solution.

At the dark side of telematics...
8

Unable to SUM/AVERAGE data from 2 sensors

Re: Unable to SUM/AVERAGE data from 2 sensors

nasnew wrote:

by the way can the same be applied to sensors, rather than parameters

Not sure if it still actual for you, but I can give you a workaround for sensors:
* create "Sensor 1" based on formula -- fls_param_ex1
* create "Sensor 2" based on formula -- #fls_param_ex2
* create "Result sensor" based on formula -- [Sensor 1]+[Sensor 2]

@ Oleg Zharkovsky
Technical Consulting / Training Team
"Timely is the best. But still better late than never."