Dev corner

Calling all engineers, tinkerers, hackers and geeks.

Node-red data receiving MQTT and like to store daily data

Hi all,
I got my second hand FLM V2 I think and I know basics of Raspberry Pi and Node-red.
My setup is this:
A. 1 clamp is on the internal consumption
B. 1 clamp is on the first solar panel convertor
C. 1 clamp is on the second solar panel convertor

In Node-red I did read the FLM with MQTT and it works well.
I made 3 gauges.
1 total internal consumption.
1 sum of the 2 solar convertors
1 Deduction of total consumption - solar convertors.

Now I would like to store the daily data into node-red and here my knowledge stops.
It needs to be with db I think.
Is there here somebody with a working Node-red Flow?

PS: it is not possible to add an image to this post. Sorry

HTTPError using Flukso Credentials

Hello,

I'm trying out tmpo-py and when using the Flukso credentials my script throws the following exeption:

Exception has occurred: HTTPError 401 Client Error: Unauthorized for url: https://api.flukso.net/sensor/d9c7e8e07d05628ff407e0909e22cd34/tmpo/sync...

This happens in the following line:

import tmpo
s = tmpo.Session()
s.debug = True
s.add("fed676021dacaaf6a12a8dda7685be34", "b371402dc767cc83e41bc294b63f9586")
s.sync() #<-- HERE

The same issue when using a sensorID and token from my flukso counter.
Thanks!

api.flukso.net version number?

The most up to date manual I can find on using the Fluksometer dates from Mar 2013 so I suspect that some parts may now be out of date.

Specifically I am trying to call the api.flukso.net to fetch sensor readings for a water meter (which are being accurately displayed on the online dashboard).

As per the instructions in the manual, I am setting X-Version to 1.0 (& have also tried passing it as a query parameter version=1.0) but am getting a "wrong version number" error. Unfortunately I cant find any more recent documentation that confirms what the newer API version number is (I tried 1.1 :-).

See the attached. Thanks

v3 local API?

I would like to fetch the electricity sensor readings at a greater frequency than used to publish to the online dashboard (which I believe is every 15 minutes).

I know that the Fluksometer v2 used to support a local REST API to fetch sensor data for the last minute at second intervals.

I also know that V3 publishes the same data via MQTT which is great if you have an MQTT client but I dont (I am using Fibaro Home Center 2 and Lua to collect data from other devices via REST APIs and the Fibaro predates MQTT so doesnt support it, without having to build a "man in the middle" type solution with a Raspberry Pi or similar.

So my question is: Is the local REST API still available under V3 but disabled? and if so, what would I need to do to enable/access it? Thanks for your help.

Running other commands

Am i able to run other commands on the flukso like call a script with cron?
I want to put my data from inverter on pvoutput and dont want to have to purchase another meter for the flukso to read the inverter. I Was wondering if i could get cron to run my script to upload my inverter to pvoutput while flukso takes care of all my consumption