Giter Site home page Giter Site logo

node-red-contrib-nordpool-api-plus's People

Contributors

imgbot[bot] avatar lgtm-com[bot] avatar spannebuen avatar zinen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

node-red-contrib-nordpool-api-plus's Issues

Fails extracting data for March 28th

This first looked like a random bug, but as it happens for both 2021 and 2022 I guess there's something going on.

I am extracting data for SE* areas and this works great.
Sending in the desired extraction date in the msg.date field.
But on March 28th this fails.

Not a huge problem for me personally, I just detect the stalled extract and move on, but it still looks like a bug.

Cannot install on mac

Cannot install via node-red GUI and neither in MacOS terminal, get:

0 verbose cli [ '/usr/local/bin/node', 0 verbose cli '/usr/local/bin/npm', 0 verbose cli 'i', 0 verbose cli 'node-red-contrib-nordpool-api-plus' ] 1 info using [email protected] 2 info using [email protected] 3 timing config:load:defaults Completed in 2ms 4 timing config:load:file:/Users/meg/.config/yarn/global/node_modules/npm/npmrc Completed in 1ms 5 timing config:load:builtin Completed in 1ms 6 timing config:load:cli Completed in 2ms 7 timing config:load:env Completed in 1ms 8 timing config:load:file:/Users/meg/.node-red/.npmrc Completed in 0ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:/Users/meg/.npmrc Completed in 0ms 11 timing config:load:user Completed in 0ms 12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms 13 timing config:load:global Completed in 1ms 14 timing config:load:cafile Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:setUserAgent Completed in 1ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 10ms 19 verbose npm-session fb7623aa608f656c 20 timing npm:load Completed in 24ms 21 http fetch GET 200 https://registry.npmjs.org/npm 339ms 22 timing arborist:ctor Completed in 2ms 23 timing idealTree:init Completed in 169ms 24 timing idealTree:userRequests Completed in 4ms 25 silly idealTree buildDeps 26 timing idealTree Completed in 177ms 27 timing command:install Completed in 199ms 28 notice 28 notice New major version of npm available! 7.5.2 -> 9.1.2 28 notice Changelog: https://github.com/npm/cli/releases/tag/v9.1.2 28 notice Run npm install -g [email protected] to update! 28 notice 29 verbose stack Error: Invalid tag name ""~"1.3.0": Tags may not have any characters that encodeURIComponent encodes. 29 verbose stack at invalidTagName (/Users/meg/.config/yarn/global/node_modules/npm/node_modules/npm-package-arg/npa.js:91:15) 29 verbose stack at fromRegistry (/Users/meg/.config/yarn/global/node_modules/npm/node_modules/npm-package-arg/npa.js:296:13) 29 verbose stack at Function.resolve (/Users/meg/.config/yarn/global/node_modules/npm/node_modules/npm-package-arg/npa.js:81:12) 29 verbose stack at Arborist.[nodeFromEdge] (/Users/meg/.config/yarn/global/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:873:22) 29 verbose stack at Arborist.[buildDepStep] (/Users/meg/.config/yarn/global/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:824:36) 29 verbose stack at Arborist.[buildDeps] (/Users/meg/.config/yarn/global/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:682:31) 29 verbose stack at Arborist.buildIdealTree (/Users/meg/.config/yarn/global/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:209:29) 30 verbose cwd /Users/meg/.node-red 31 verbose Darwin 21.6.0 32 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "node-red-contrib-nordpool-api-plus" 33 verbose node v10.16.0 34 verbose npm v7.5.2 35 error code EINVALIDTAGNAME 36 error Invalid tag name ""~"1.3.0": Tags may not have any characters that encodeURIComponent encodes. 37 verbose exit 1

Connection lost!

Any known issue here?
I am getting "Lost connection to server".

3 Apr 20:12:09 - [error] TypeError: node.done is not a function
at nordpoolAPIPlus._inputCallback (C:\Users\username\node_modules\node-red-contrib-nordpool-api-plus\nordpool-api-plus.js:65:12)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Error after upgrading to 4.5.0

Occurs for call with timestamp set. Crashed Node-Red

2023/12/14 21:44:12	stdout	    at processImmediate (node:internal/timers:466:21)
2023/12/14 21:44:12	stdout	    at Immediate.<anonymous> (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:815:21)
2023/12/14 21:44:12	stdout	    at deliverMessageToDestination (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:799:40)
2023/12/14 21:44:12	stdout	    at nordpoolAPIPlus.Node.receive (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:494:10)
2023/12/14 21:44:12	stdout	    at nordpoolAPIPlus.Node.emit (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25)
2023/12/14 21:44:12	stdout	    at nordpoolAPIPlus.Node._emitInput (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11)
2023/12/14 21:44:12	stdout	    at Object.trigger (/usr/src/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
2023/12/14 21:44:12	stdout	    at /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26
2023/12/14 21:44:12	stdout	    at nordpoolAPIPlus._inputCallback (/data/node_modules/node-red-contrib-nordpool-api-plus/nordpool-api-plus.js:36:24)
2023/12/14 21:44:12	stdout	14 Dec 21:44:12 - [error] TypeError: date.toISOString is not a function 

I get the same prices on SE2, 3 and 4

I am runing your node and experience trouble, i want to retrieve all 4 of the Swedish areas in the same flow and I have added 4 separate nodes and set them to different areas. Hovewer i get the same pricevalues in response from SE2, 3 and 4 only SE1 area gives an OK price response and are the same as presented at Nordpool I choosen 'SEK' as currency

Could you please check and update if something is wrong

missing data in msg timestamp

var msg1 = {} for (var i = 0; i<msg.payload.length;i++){ msg1 = { topic:msg.payload[i].currency, payload:msg.payload[i].price, timestamp:msg.payload[i].timestamp, } node.send(msg1) }

in my debug on Home Assistant instalation i only get msg.payload[i].currency and msg.payload[i].price , the msg.payload[i].timestamp is missing as in the outputs bellow..

2021-12-05 16:36:54node: 5202401d336f3d43
DKK : msg.payload : number
963.63
2021-12-05 16:36:54node: 5202401d336f3d43
DKK : msg.payload : number
971.59
2021-12-05 16:36:54node: 5202401d336f3d43
DKK : msg.payload : number
995.46
2021-12-05 16:36:54node: 5202401d336f3d43
DKK : msg.payload : number
1662.47
2021-12-05 16:36:54node: 5202401d336f3d43
DKK : msg.payload : number
1864.5

Wrong timestamp i

Hi!
When I use Nordpool API in node red and gets back data från API I get a string with non complete data.
Example: inject timestamp (date) 2022-11-27 and then the first array [0] shows: timestamp: "2022-11-26T23:00:00.000Z"
And the last array [23] shows: timestamp: "2022-11-27T22:00:00.000Z"
So first timestamp is from yesterday and the last one is not T23:00.

Nordpool_API

Why is it like this?

Node red crash when data fetching fails Error: connect ETIMEDOUT

In case of data tried to fetch but internet connection is down (many possible reason for that), the errors are not handled and this ends of node-red server crash.

There is no way to catch those errors in node-red, must be done at node level somehow.

Node-red log after crash:

Trace: Error: connect ETIMEDOUT xx.xxx.x.xx:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: 'xx.xxx.x.xx',
port: 80
}
at Request._callback (C:\Users\endele.node-red\node_modules\nordpool\lib\prices.js:89:15)
at self.callback (C:\Users\endele.node-red\node_modules\request\request.js:185:22)
at Request.emit (events.js:310:20)
at Request.onRequestError (C:\Users\endele.node-red\node_modules\request\request.js:877:8)
at ClientRequest.emit (events.js:310:20)
at Socket.socketErrorListener (_http_client.js:426:9)
at Socket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
12 Nov 15:36:49 - [red] Uncaught Exception:
12 Nov 15:36:49 - TypeError: Cannot read property 'data' of undefined
at Request._callback (C:\Users\endele.node-red\node_modules\nordpool\lib\prices.js:92:21)
at self.callback (C:\Users\endele.node-red\node_modules\request\request.js:185:22)
at Request.emit (events.js:310:20)
at Request.onRequestError (C:\Users\endele.node-red\node_modules\request\request.js:877:8)
at ClientRequest.emit (events.js:310:20)
at Socket.socketErrorListener (_http_client.js:426:9)
at Socket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

Error at install

Nice application, but got error at instal.

Solved with => sudo chown -R 1000:1000 "/home/pi/.npm" but maybe there is a fix so this doesn't appear ?
/Mats


2023-08-05T07:37:33.843Z Install : node-red-contrib-nordpool-api-plus 4.4.0

2023-08-05T07:37:34.016Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2023-08-05T07:37:40.264Z [err] npm
2023-08-05T07:37:40.269Z [err]
2023-08-05T07:37:40.270Z [err] WARN
2023-08-05T07:37:40.270Z [err]
2023-08-05T07:37:40.271Z [err] config
2023-08-05T07:37:40.273Z [err] production Use --omit=dev instead.
2023-08-05T07:37:51.832Z [err] npm
2023-08-05T07:37:51.833Z [err]
2023-08-05T07:37:51.834Z [err] ERR!
2023-08-05T07:37:51.836Z [err] code
2023-08-05T07:37:51.837Z [err] EACCES
2023-08-05T07:37:51.838Z [err] npm
2023-08-05T07:37:51.838Z [err] ERR! syscall link
2023-08-05T07:37:51.840Z [err] npm
2023-08-05T07:37:51.841Z [err] ERR! path /home/pi/.npm/_cacache/tmp/80fea041
2023-08-05T07:37:51.841Z [err] npm ERR!
2023-08-05T07:37:51.842Z [err] dest /home/pi/.npm/_cacache/content-v2/sha512/e1/b5/420c7318336ba732c2f505fe032d97ff64dd4b0eadb21552777ff66f290072b2b3d72557efd36cce439ce464fb567782a4d234c625a23256ad687ab876fd
2023-08-05T07:37:51.845Z [err] npm
2023-08-05T07:37:51.846Z [err] ERR! errno -13
2023-08-05T07:37:51.860Z [err] npm
2023-08-05T07:37:51.860Z [err] ERR!
2023-08-05T07:37:51.860Z [err] npm ERR! Your cache folder contains root-owned files, due to a bug in
2023-08-05T07:37:51.860Z [err] npm ERR!
2023-08-05T07:37:51.861Z [err] previous versions of npm which has since been addressed.
2023-08-05T07:37:51.861Z [err] npm
2023-08-05T07:37:51.862Z [err]
2023-08-05T07:37:51.862Z [err] ERR!
2023-08-05T07:37:51.862Z [err] npm
2023-08-05T07:37:51.863Z [err] ERR! To permanently fix this problem, please run:
2023-08-05T07:37:51.863Z [err] npm ERR! sudo chown -R 1000:1000 "/home/pi/.npm"
2023-08-05T07:37:51.878Z [err]
2023-08-05T07:37:51.879Z [err] npm
2023-08-05T07:37:51.880Z [err] ERR! A complete log of this run can be found in:
2023-08-05T07:37:51.880Z [err] npm ERR! /home/pi/.npm/_logs/2023-08-05T07_37_40_027Z-debug-0.log
2023-08-05T07:37:51.923Z rc=243
Nordpool_error.txt

Not getting prices between 22:00 - 24:00

Hello,

I have a flow that grabs the prices every 15 minutes and extracts the price for the current hour. I noticed that the flow fails to get the prices everyday between 22:00 - 24:00.. Is this a limitation for the nordpool public API?

below is the file saved from last night for region Kr.sand

Wed Feb 14 2024 19:19:13 GMT+0000 (Coordinated Universal Time)839.33
Wed Feb 14 2024 19:34:13 GMT+0000 (Coordinated Universal Time)839.33
Wed Feb 14 2024 19:49:13 GMT+0000 (Coordinated Universal Time)839.33
Wed Feb 14 2024 20:04:13 GMT+0000 (Coordinated Universal Time)763.83
Wed Feb 14 2024 20:19:15 GMT+0000 (Coordinated Universal Time)763.83
Wed Feb 14 2024 20:34:13 GMT+0000 (Coordinated Universal Time)763.83
Wed Feb 14 2024 20:49:13 GMT+0000 (Coordinated Universal Time)763.83
Wed Feb 14 2024 21:04:13 GMT+0000 (Coordinated Universal Time)747.3
Wed Feb 14 2024 21:19:13 GMT+0000 (Coordinated Universal Time)747.3
Wed Feb 14 2024 21:34:13 GMT+0000 (Coordinated Universal Time)747.3
Wed Feb 14 2024 21:49:13 GMT+0000 (Coordinated Universal Time)747.3
Thu Feb 15 2024 00:04:11 GMT+0000 (Coordinated Universal Time)673.87
Thu Feb 15 2024 00:19:11 GMT+0000 (Coordinated Universal Time)673.87
Thu Feb 15 2024 00:34:11 GMT+0000 (Coordinated Universal Time)673.87
Thu Feb 15 2024 00:49:12 GMT+0000 (Coordinated Universal Time)673.87
Thu Feb 15 2024 01:04:11 GMT+0000 (Coordinated Universal Time)664.67
Thu Feb 15 2024 01:19:11 GMT+0000 (Coordinated Universal Time)664.67
Thu Feb 15 2024 01:34:11 GMT+0000 (Coordinated Universal Time)664.67
Thu Feb 15 2024 01:49:11 GMT+0000 (Coordinated Universal Time)664.67
Thu Feb 15 2024 02:04:11 GMT+0000 (Coordinated Universal Time)662.97
Thu Feb 15 2024 02:19:11 GMT+0000 (Coordinated Universal Time)662.97
Thu Feb 15 2024 02:34:11 GMT+0000 (Coordinated Universal Time)662.97
Thu Feb 15 2024 02:49:11 GMT+0000 (Coordinated Universal Time)662.97
Thu Feb 15 2024 03:04:11 GMT+0000 (Coordinated Universal Time)675.57
Thu Feb 15 2024 03:19:11 GMT+0000 (Coordinated Universal Time)675.57
Thu Feb 15 2024 03:34:11 GMT+0000 (Coordinated Universal Time)675.57
Thu Feb 15 2024 03:49:11 GMT+0000 (Coordinated Universal Time)675.57
Thu Feb 15 2024 04:04:11 GMT+0000 (Coordinated Universal Time)693.28
Thu Feb 15 2024 04:19:11 GMT+0000 (Coordinated Universal Time)693.28
Thu Feb 15 2024 04:34:43 GMT+0000 (Coordinated Universal Time)693.28
Thu Feb 15 2024 04:49:11 GMT+0000 (Coordinated Universal Time)693.28
Thu Feb 15 2024 05:04:11 GMT+0000 (Coordinated Universal Time)702.7
Thu Feb 15 2024 05:19:11 GMT+0000 (Coordinated Universal Time)702.7
Thu Feb 15 2024 05:34:11 GMT+0000 (Coordinated Universal Time)702.7
Thu Feb 15 2024 05:49:11 GMT+0000 (Coordinated Universal Time)702.7
Thu Feb 15 2024 06:04:11 GMT+0000 (Coordinated Universal Time)897.28
Thu Feb 15 2024 06:19:11 GMT+0000 (Coordinated Universal Time)897.28
Thu Feb 15 2024 06:34:11 GMT+0000 (Coordinated Universal Time)897.28
Thu Feb 15 2024 06:49:11 GMT+0000 (Coordinated Universal Time)897.28
Thu Feb 15 2024 07:04:11 GMT+0000 (Coordinated Universal Time)909.31
Thu Feb 15 2024 07:19:11 GMT+0000 (Coordinated Universal Time)909.31

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.