I have a pulse count electricity meter reader which works well, but I want to only take a meter reading once per month. I figured this out using a cronplus node addition. I then want to place this once per month reading into InfluxDB.
I have looked at the instructions in various places but cannot figure out how I set up “measurements”. As a trial I have used an inject node and debug to get the reading from HA, which returns a correct value. But I just cannot understand how I have to then setup the payload etc, so it will then put into InfluxDB. (I can configure the appropriate access to InfluxDB ok - no problems with that)
I just seem to be going round in circles. I have looked at exampled but this is mainly script, which is just so confusing. Does/can anyone to tell me how to set up the Node-Red flow to achieve this. I know I am so close but a lot of the functions don’t make much sense, even after reading much of the info.
rror
name: “Error”
message: string
A 404 Not Found error occurred: {“error”:“database not found: "database"”}
stack: string
Error: A 404 Not Found error occurred: {“error”:“database not found: "database"”}
at IncomingMessage.<anonymous> (/opt/node_modules/influx/lib/src/pool.js:50:38)
at IncomingMessage.emit (node:events:520:35)
at endReadableNT (node:internal/streams/readable:1729:12)
at processTicksAndRejections (node:internal/process/task_queues:90:21)
As you can see the debug info is OK and returning values, but when I look at InfluxDB explorer I see no info an the query, so I guess it is just the formatting of the info that is necessary.
I will keep reading, but I am struggling, can anyone help with suggestions how I need to format the data to go into InfluxDB Please?
It is very embarrassing but I am really struggling with this. I have the flow working in the Node-Red but after looking at multiple YouTube tutorials and other instruction manuals on Node-red website I just cannot understand what information I need to “change” in the node to get it accepted by InfluxDB.
There is lots of info about generating this random number and that random number in JSON, but nothing for taking the reading from an actual entity and changing it to be accepted by InfluxDB.
Can someone please explain in simple language what I need to change and into what. I have very little JSON knowledge and maybe this is why I am struggling.