Announce: node-red-contrib-ui-heatmap (beta release)

What dashboard/node-red/node/npm version are you running ?
Flow works here.

The "latest and greatest"

and the rest?

node/npm

well one version behind the latestā€¦

1 Like

Thanks for pointing that out. Originally I ran Node-RED in the IBM Cloud. There I have no contorl over which version is deployed. I installed Node-RED locally, upgraded to v1.0 and now it works (locally). So I'll wait till on the IBM Cloud it's also upgraded to v 1.0 and then use it there as well. Thanks for your support guys!

Hey guys,
Thanks for your assistance!! I have no clue why it doesn't work on Node-RED 0.20.8 ...

Are you sure you are not now using a different version of nodejs?

As I said before I used Node-RED managed by the IBM Cloud so I couldn't see which Nodejs version ran underneath or force an upgrade to 1.0


Colin

1 October
Are you sure you are not now using a different version of nodejs?

I am sure it is possible to see which version of nodejs is running on IBM Cloud. My point was that it may not have been the upgrade to version 1.0 of node-red that fixed it, but the fact that you are now running with a later version of nodejs (if you are).

1 Like

On the IBM Cloud I still get the same error "TypeError: Cannot read property 'push' of undefined" as soon as I deploy the heatmap ui node on the editor surface. My versions are the following:

Node-RED: v.1.0.2
Node.js: v. 10.16.3
npm: v. 6.9.0
node-red-dashboard: v. 2.17.1
node-red-contrib-ui-heatmap: v. 2.1.2

Hi Raphael,
Looks like everything is on recent versions. No clue on which line the error is caused...
Suppose I create a dedicated version for you on Github with lots of extra logging, are you able to install that via "npm install ..." on Bluemix? Or can you access my html and js files, to overwrite them manually by my new temporary version?

Raphael,

I have no spend more than two hours trying to reproduce your error message in the debug window, but I never get that same error :weary:

Have put this all over the place:

var undefinedVariable;
undefinedVariable.push("something");

So let's focus on your error a bit more:

image

  • That node 336d7e3a.c614f2 is that my heatmap node, or the function node (because that also contains a push statement)?

  • In the inject node please unselect the checkbox:

    image

    When you deploy now, is there also an error? Or does the error now only is being displayed as soon as you inject a message? If so, you get the same error every time a new message is injected?

  • Can you please add a debug node, and let me know what that debug message contains (see debug window)?

    image

    Just to make sure that the input message doesn't contain an empty payload or whatever ...

1 Like

Hey there
Thanks for your enormous efforts! I really appreciate your help. I tried to reproduce what you asked me to do. Uncheck the periodic injection and adding another debug node. The TypeError comes from your heat map node as soon as I deploy it. The function node sends an array with 200 random indices as it should do on msg.payload (see following screenshot)

What surprises me is that on my local machine the heat map works just fine. I even deleted the Cloud Node-RED service and reinstalled everything with the latest versions as I showed you above and only installed the dashboard and heatmap nodes to not have any interferences. Still I get the same issue...

Could it be some sort of security issue that the module doesn't work on the IBM Cloud? Did you manage to create an IBM Cloud account and run Node-RED there to install your heatmap module? it's all possible with a free account and no credit card required, if you wanna give it a try?

1 Like

No. I spend all my free evenings already in developing nodes for free for the community, after a full time job & my familly & my non-hobby related todos. When I need (on top of that) learn and experiment with all platforms where my nodes run, is rather impossible. Will see if I have some time left next week...
Had hoped that somebody could give me tip, based on your screenshot ...

I have create an IBM cloud account and installed the heatmap node.
Indeed I get the same error when the flow is deployed:

image

Have been trying a couple of things, but I have no clue how I could debug this. Does anybody have an idea how to get started here? E.g. can I change the source code of my node to add a debugger; statement somehow?

well worst case - there are only 4 .push in the lib/heatmap.js library and 1 in your js file. I can't see yours being incorrect so must be one of the others being called for some reason....

@dceejay,
Thanks! But I only have a flow editor, and no dashboard at the moment. So I thought it couldn't be the heatmap library, since that is only used in the dashboard (not in the flow editor and not on server side). The heatmap instance is created here:

$scope.$watch('msg', function(msg) {
   ...
   $scope.heatMapInstance = h337.create($scope.h337Config);
   ...
}

Which is dashboard side code...

So it seems to me that it is in the client side (flow editor side) OR in the server side of my node. But I'm also not sure whether a server side error would be displayed like in the screenshot. And no clue how to debug anything on IBM Cloud ...

I'm pretty certain that error comes from server side Bart.

Id put some extra try catch code everywhere in the server side stuff and call node.error(e, msg) in the catch part.
This way, a catch node in your flow with have much richer error info.

1 Like

Hey Steve,
Thanks a lot !!!!!!!!!!!!!!!!!!!!
Will try that tomorrow.

P.S. I forgot to mention here that I have opened another discussion for the IBM cloud problem. Otherwise users reading about heatmaps will get lost in non-heatmap related stuff...

1 Like

Dear all
I came across a behavior of the heat map that I can't really explain to myself. The goal was to display different sensors and their temperature. It seems that when I scale the heat map size big, the colors will not be displayed the same way as if the heat map is small. My temperatures range from 18Ā°C to 32Ā°C where 18 should be blue and 32 red. As you can see from the following screenshots, the red color is only correctly displayed if the overall size of the heat map is small? Furthermore, the legend shows a violet kind of color for the middle temperature which actually should be green? 25 is around the middle and will be displayed greenish in the heat map but the legend shows a violet color for that temperature?

The radius was the same in all three scenarios. I only changed the over all node size. It seems like the color depends on how much space there is between other values and the border? Is there a way to solve this issue?

1 Like