🎇 FlexDash alpha release - round 2

New release:

9 Dec 19:55:34 - [info] Node-RED FlexDash plugin version 0.4.121                        
9 Dec 19:55:36 - [info] Node-RED FlexDash version 0.4.121                               
9 Dec 19:55:36 - [info] Node-RED FD Core Widgets version 0.4.53                         
9 Dec 19:55:38 - [info] FlexDash UI version 0.4.74                                      

Paul, now that you have practice rolling back you can install without worry :stuck_out_tongue_winking_eye: :joy:

The double-message should be fixed, although I don't fully know what caused it :face_with_head_bandage:. It made no sense to me, but there were other issues caused by package updates. When I fixed those the problem seemed to have gone away, so I suspect that there was a collateral damage effect. Not entirely satisfying.

Update: I noticed that some errors in the custom widget code are not well displayed... They only appear in the Node-RED debug pane. I'll have a fix tomorrow, too tired now to do another release...
I've also had the hot-reload spew weird errors into the browser console. The fix is to reload the page. I need to re-read how Vite does hot-reload to see which tricks I'm missing...

1 Like

With my poor tech skills, I do need the practice!

v0.4.121 installed & working fine :smiley:

PS. Just wondered why the contents of @flexdash/node-red-fd-corewidgets are not integrated into @flexdash/node-red-flexdash?
The core widgets repo, doesn't appear to contain the widget's code, just references, and the build process for them.
I'm sure that you have a good reason to structure it this way, but maybe integrating the two would cut down your work duplicating publishing, and also keep their functions in sync.

1 Like

The widgets are part of the FlexDash repo.
The node-red-fd-corewidgets package is one way to expose them in Node-RED, but I didn't want to enforce that. For example, someone could build a variant that exposes a single "any widget" node, or that only exposes a subset if they don't want, say, the TimePlot stuff.
Maybe I'm indeed making it too complicated...

The issue I have with releases is:

  • the whole version bumping and git and github actions doesn't play well together
  • to do a clean test, I need to push something to NPM so I can launch NR and have it do a clean install, but that shouldn't be a release

Speaking of releases:

10 Dec 16:50:09 - [info] Node-RED FlexDash plugin version 0.4.124                       
10 Dec 16:50:11 - [info] Node-RED FlexDash version 0.4.124                              
10 Dec 16:50:11 - [info] Node-RED FD Core Widgets version 0.4.53                        
10 Dec 16:50:12 - [info] FlexDash UI version 0.4.76                                     

Custom-widget fixes:

  • display errors in FlexDash when parsing Vue file server-side
  • fix issues with scoped styles
1 Like

Hi @tve

you can always give your beta / testing versions tags like 0.4.125-beta or -test etc... so they are not "latest"...

And then also in npm you can publish them like that also - npm publish --tag test

see Adding dist-tags to packages | npm Docs

That stops a generic npm i your package just picking it up - but someone can install it using the correct tag. You can also just run npm pack locally which will give you a .tgz file to install locally using npm.

Of course they could also install direct from github (if the compiled/fully packaged code is there) which means you don't have to "pollute" npm at all. This is what Bart does for a lot of his test packages - eg see Announce node-red-contrib-http-logger

5 Likes

I've messed up & broken my Flexdash :rage:
I forked your @flexdash/node-red-fd-corewidgets repo, and deleted 2 nodes in the package.json file; wind-plot & tree-view in my removenodes branch.

Then installed my branch;
pi@raspberrypi:~/.node-red $ npm i https://github.com/Paul-Reed/node-red-fd-corewidgets#removenodes.

Restarted node-RED, and got -

stopped

So realising that I'd messed up.... I re-installed corewidgets again from your repo, restarted node-RED, but got the same result. Still broken :sleepy:

1 Like

No errors in the node-red log? It must be complaining about something...

If you're actually modifying corewidgets you need to regenerate them (./scripts/generate-nodes.sh) but that's not needed if you're just editing package.json, hmmm

Thanks for the tips! I've been publishing to a dev tag which allows me to do a final test and then promote the identical pkgs to latest. I just get caught in 3 inter-dependent repos, 2 servers to test on, different release processes, etc. :roll_eyes:

1 Like

Well the log shows;

11 Dec 17:50:38 - [info] Node-RED version: v3.0.2
11 Dec 17:50:38 - [info] Node.js  version: v16.18.1
11 Dec 17:50:38 - [info] Linux 5.10.103-v7+ arm LE
11 Dec 17:50:40 - [info] Loading palette nodes
11 Dec 17:50:41 - [info] Node-RED FlexDash plugin version 0.4.124
11 Dec 17:50:44 - [info] Node-RED FlexDash version 0.4.124
11 Dec 17:50:44 - [info] Node-RED FD Core Widgets version 0.4.53
11 Dec 17:50:50 - [info] Dashboard version 3.2.3 started at /ui
11 Dec 17:50:50 - [warn] ------------------------------------------------------
11 Dec 17:50:50 - [warn] [@flexdash/node-red-fd-corewidgets/flexdash datetime] Error: Cannot find module '/home/pi/.node-red/node_modules/@flexdash/node-red-fd-corewidgets/datetime.js'
Require stack:
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
11 Dec 17:50:50 - [warn] [@flexdash/node-red-fd-corewidgets/flexdash dropdown-select] Error: Cannot find module '/home/pi/.node-red/node_modules/@flexdash/node-red-fd-corewidgets/dropdown-select.js'
Require stack:
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js

// Plus the same message for all of the other widgets, followed by;

11 Dec 17:50:50 - [info] Server now running at https://127.0.0.1:8443/
11 Dec 17:50:50 - [info] Waiting for missing types to be registered:
11 Dec 17:50:50 - [info]  - fd-push-button
11 Dec 17:50:50 - [info]  - fd-spark-line
11 Dec 17:50:50 - [info]  - fd-stat
11 Dec 17:50:50 - [info]  - fd-time-plot-raw
11 Dec 17:50:50 - [info]  - fd-time-plot
11 Dec 17:50:50 - [info]  - fd-toggle

and

pi@raspberrypi:~ $ ls ~/.node-red/node_modules/@flexdash/node-red-fd-corewidgets
examples  LICENSE  node_modules  package.json  package-lock.json  README.md  scripts

Regenerating the nodes gives;

 $ ./generate-nodes.sh
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead

added 130 packages in 24s
Downloading FlexDash 0.4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  CurrentDload  Upload   Total   Spent    Left  Speed
100  376k  100  376k    0     0   369k      0  0:00:01  0:00:01 --:--:--  370k
Got flexdash   "version": "0.4.76",
cp: cannot stat './node_modules/uplot': No such file or directory
1 Like

Thanks for the node-red log, that almost always clarifies things :wink:
I bet you installed node-red-fd-corewidgets from github instead of from npm. The files it claims are missing, starting with datetime.js, are in the NPM package but not the github repo.

Edit:
You installed your version from github, which doesn't work, then probably changed Paul-Reed in the URL to flexdash...
For it to work, unless you just install the npm package and then manually hack it, you need to generate the corewidgets. That shouldn't fail the way it did for you. I'm looking into that...

Edit2: you need to cd to the top-level of the corewidgets dir and run ./scripts/generate-nodes.sh. Not cd into the scripts dir...
(You may want to cd scripts and rm -r node_modules to clean up...)

Ah OK... yes I did, now I'm confused :wink:
I used npm i .... so thought that the result would have been the same?

But if the corewidgets must be installed via npm, does that mean that if users want to create their own corewidgets, they have to actually npm publish them first?
That could be a lot of flexdash nodes being added to the node-RED library, or am I misunderstanding.

I've uninstalled the corewidgets node via cmd prompt, and npm kindly reinstalled it again when I restarted node-RED, and full functionality has now returned (Phew!).

:+1:

Hi @tve , first :nice job !


Secund : when I try to avoid my widget the edit window is offscreen!

12 Dec 10:28:12 - [info] Node-RED FlexDash plugin version 0.4.124
12 Dec 10:28:13 - [info] Node-RED FlexDash version 0.4.124
12 Dec 10:28:13 - [info] Node-RED FD Core Widgets version 0.4.53

I used PALETTE to install @flexdash/node-red-fd-corewidgets and @flexdash/node-red-flexdash

NODE RED is running on a WIN10 pc. I display FLEXDASH on EDGE
I did the same tests on a NODE RED on an RPI and displays FLEXDASH on chrome and the same thing.

image
third: the curves do not increase with the wind plot example. I have to restart NODE RED ...

image
and if I do F5 it's worse: the curve is erased.

1 Like

What do you mean by "avoid my widget"?

The edit panel positioning has been a problem since the upgrade to Vuetify 3 and I filed several issues. I have not gone back since the 'final' Vuetify 3 release to see where things ended up, except that it has worked "OK" to me. I think I need to change the concept but have not had the time to do that.

There is indeed some issue with the wind plot not updating properly. I'll have to look into it, thanks for pointing it out!

@SuperNinja To be clear about what you are describing, could you please give us a screenshot of what you are experiencing.

1 Like

@Paul-Reed sorry for the bad translation, I am French :wink: . I meant that when I try to edit my Dashboard : clic on the Cogwheel in the top right, and I choose "EDIT", the options are off screen.

@Paul-Reed look at the first photo: I'm in Edit mode: the pencil is displayed at the top right of each widget but the setting options are off screen.

OK so i'm waiting ...


another example of curve updating problem: every minute I send the temperature of the house to the Time plot widget. Since 2:23 p.m. the curve has not changed while the Number Field node displays the current temperature (19.2°c).
EDIT:

we see in the date time widget example the time when I restarted Node Red: the curve is displayed with the points recorded before ... but not after!?

2 Likes

Feel free to write in French :wink: I probably won't be able to respond in French, but I can read it just fine. (I can summarize for others.)

The cog icon brings up a menu, when you click on it the menu should pop-up just below and a bit to the left:

image

This allows you to toggle the edit mode on/off, i.e., the pencil icons. I'm not sure what is not working for you.

WRT the TimePlots there is a low-level issue having to do with reactivity in Vue and uPlot. Something changed in the recent Vue upgrade and affects all the incrementally updated plots (sending just one data point to append to a plot as opposed to sending it all the data). Virtually all my plots are database-backed so I always send the whole data, which is why I haven't noticed. I'll get it fixed asap, just need to figure out the details...

1 Like

Looking at @SuperNinja's first post above, his screenshot shows that 'Edit' has been selected (because each widget is displaying a 'pencil' icon, instead of the 2 arrows to expand the view). But the edit props are not being displayed.

So maybe this is a UI confusion? He needs to click on a pencil icon to bring up the edit panel for that widget. The edit mode only switches between pencils and regular.

1 Like

New release with fix for TimePlots not updating.
This also has changes towards being able to send data to specific connected dashboards and starts to use cookies for this purpose. This stuff is not ready for prime time quite yet, I'm mentioning it in case something breaks in this area...

12 Dec 22:33:28 - [info] Node-RED FlexDash plugin version 0.4.126                   
12 Dec 22:33:30 - [info] Node-RED FlexDash version 0.4.126                          
12 Dec 22:33:30 - [info] Node-RED FD Core Widgets version 0.4.54                    
12 Dec 22:33:31 - [info] FlexDash UI version 0.4.77                                 

Note that the core widgets needs to be upgraded and any open browser window must be reloaded after the upgrade.

I haven't really thought about that... At a minimum, they have to build the corewidgets and then npm install their built source dir.

2 Likes

Super , la courbe s'incrémente ! :tada:

Un autre bug :
ScreenRecorderProject12
Si on veux agrandir la courbe en plein ecran , il n'y a qu'un point d'affiché.

"If you magnify a chart only one point is shown"

This is another effect of a known issue:

I started to put some of the functions in place to fix that but it still needs more work. If you send the TimePlot/WindPlot node the full graph the magnification works properly.

But maybe I need to revisit how I implement the magnification... Right now FD creates a second widget that consumes the same data. Here it fails because the widget has internal state (the old data points that were incrementally sent) and the second widget doesn't have access to that. It would be better to move the one widget to the pop-up. I'm not sure that's actually possible in Vue.

1 Like