api - curl

Hello,

I used api-curl php script to read out the real time data from my flukso logger.

My 3 sensors (electricity, water,gas) are read out correctly, the only thing is that I can't read the wright units?

For electricity it's in watt OK
Water / Gas in liter ? , the only unit that work is watt ?

How can I used the wright unit's in php script for water or gas ?

Thanks,
Sven

icarus75's picture

Hi Sven,

Congratulations for hooking up your water and gas sensors. The latest firmware does support water and gas on it's local real-time API. It outputs the measurements for both water and gas in lperday, so you should set the 'unit' parameter in the api call accordingly.

Sven Rombouts's picture

Hi,

I set the unit to lperday but I don`t understand the value that the API call give me back.

I want to have read the realtime liter.

Or amount l / day is also ok.

Regards,
Sven

icarus75's picture

Hi Sven,

We're measuring a flow, which always has a dimension of 'unit' per 'time'. This can be e.g. Joule/s (= Watt), liter/s, etc.

As such an electricity reading will give you 'watts'. As even a liter/min dimension would give very small values, we decided to return the values in liter/day. When fetching data via the real-time local API, you get 60 measurements, each for a second interval. Within each of these second intervals you get the flow in l/day. So if you want to get it in l/s divide the value by 24 * 60 * 60 = 86400.

Cheers,
Bart.