It's the same with me, on a mac computer.
It is only the first time, if 1 & 0 is inserted, it is changed back to true & false, after that 1 & 0 can be inserted again.
But if you start with e.g. 5 & 3, they are accepted and there are no errors.
Last login: Thu Sep 22 08:46:06 on ttys000
poulborg@Poul-MacBook-Pro ~ % node-red
22 Sep 09:26:18 - [info]
Welcome to Node-RED
===================
22 Sep 09:26:18 - [info] Node-RED version: v3.0.1
22 Sep 09:26:18 - [info] Node.js version: v14.18.0
22 Sep 09:26:18 - [info] Darwin 21.6.0 x64 LE
22 Sep 09:26:18 - [info] Loading palette nodes
22 Sep 09:26:19 - [info] Node-RED FlexDash plugin version 0.4.107
22 Sep 09:26:19 - [info] Node-RED FlexDash version 0.4.107
22 Sep 09:26:19 - [info] Node-RED FD Core Widgets version 0.4.48
22 Sep 09:26:19 - [info] Dashboard version 3.2.0 started at /ui
22 Sep 09:26:19 - [info] Settings file : /Users/poulborg/.node-red/settings.js
22 Sep 09:26:19 - [info] Context store : 'default' [module=memory]
22 Sep 09:26:19 - [info] User directory : /Users/poulborg/.node-red
22 Sep 09:26:19 - [warn] Projects disabled : editorTheme.projects.enabled=false
22 Sep 09:26:19 - [info] Flows file : /Users/poulborg/.node-red/flows.json
22 Sep 09:26:19 - [info] FlexDash UI version 0.4.61
22 Sep 09:26:19 - [info] Server now running at http://127.0.0.1:1880/
22 Sep 09:26:19 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
22 Sep 09:26:19 - [info] Starting flows
22 Sep 09:26:19 - [info] [flexdash dashboard:FlexDash] path : /flexdash
22 Sep 09:26:19 - [info] [flexdash dashboard:FlexDash] flexdash : /Users/poulborg/.node-red/node_modules/@flexdash/node-red-flexdash/flexdash
22 Sep 09:26:19 - [info] [flexdash dashboard:FlexDash] socket.io : /flexdash/io/
22 Sep 09:26:19 - [info] [flexdash dashboard:FlexDash] sio options: {"cors":{"origin":true,"methods":["GET","POST"],"credentials":true},"path":"/flexdash/io/"}
22 Sep 09:26:19 - [info] [flexdash dashboard:FlexDash] port : Node-RED port
22 Sep 09:26:19 - [info] [flexdash dashboard:FlexDash] FlexDash ready!
FD f887b71172c0c3e7 dashboard "FlexDash"
75bd8ba5d801c98c missing node config
8b6f65fdbeaafcb5 flexdash tab "Wintergarden_Tab"
6b7ab15067ef2196 flexdash tab "Ny_Tab"
FD 8b6f65fdbeaafcb5 tab "Wintergarden_Tab" fd=f887b71172c0c3e7
03650882b85546b3 flexdash container "Fan_Grid"
64b78693b66f29a8 flexdash container "Ny_Container1"
FD 6b7ab15067ef2196 tab "Ny_Tab" fd=f887b71172c0c3e7
e2c48cc94e728a99 flexdash container "Ny_Grid"
6f1f4b7856f632b3 flexdash container "Ny_Grid1"
FD e2c48cc94e728a99 StdGrid "Ny_Grid" tab=6b7ab15067ef2196
7f4ed4893a27af68 flexdash container "Ny_container_Panel"
FD 7f4ed4893a27af68 Panel "Ny_container_Panel" parent=e2c48cc94e728a99 tab=8b6f65fdbeaafcb5
add8bc748eb4426e fd-push-button "test"
da9e8ce76c987913 fd-push-button "test"
FD 64b78693b66f29a8 StdGrid "Ny_Container1" tab=8b6f65fdbeaafcb5
5c1d741e5f65137d flexdash container "Container_Panel"
FD 6f1f4b7856f632b3 StdGrid "Ny_Grid1" tab=6b7ab15067ef2196
fc52f188aecfe533 fd-push-button "test"
65f596312cc7678a fd-push-button "test"
FD 03650882b85546b3 StdGrid "Fan_Grid" tab=8b6f65fdbeaafcb5
e77a7833a0f93ef3 flexdash container "Container_panel1"
FD 5c1d741e5f65137d Panel "Container_Panel" parent=64b78693b66f29a8
84af736ee075f753 fd-push-button "Fan Light"
bca6bae91813d1aa fd-push-button "Fan Off"
cea9306ba0eace50 fd-push-button "Fan Low"
b51cacc5e04d1208 fd-push-button "Fan Mid"
afe465fab8e13774 fd-push-button "Fan High"
FD e77a7833a0f93ef3 Panel "Container_panel1" parent=03650882b85546b3 tab=adf8ed265a01336a
26ba53d8c285a12d fd-push-button "Fan Off"
ed340d89a70482d2 fd-push-button "Fan Low"
cfac873b75158ec4 fd-push-button "Fan Mid"
7e96c342633da0bf fd-push-button "Fan High"
450ffa3780393a8f fd-label "Label"
22 Sep 09:26:19 - [info] Started flows
22 Sep 09:26:20 - [info] Upgrade request for /comms got /flexdash/io/
22 Sep 09:26:22 - [info] Upgrade request for /ui/socket.io/ got /flexdash/io/
Thanks for flagging me, however, this has nothing to do with FlexDash
I just launched NR 3.0.1 with nothing but node-red-dashboard installed (all in a clean docker container). I dragged a button node into the flow, created the group & tab and deployed.
Then I dragged a switch node into the flow. First odd thing is that it has the warning triangle even though when you edit it everything looks fine. If I just click Done it continues to show the triangle and if I reopen the on/off values are highlighted.
Then I drag another button node in. It has the red triangle (not sure why). Open it and hit done and the triangle goes away.
If I edit the switch node I can't make it have the bad state again. If I drag a new switch node into the flow it also behaves correctly.
The whole thing is not trivial to reproduce, small changes in the order of actions makes the problem go away. If I had to place a bet it would be that there's a race condition due to the async loading of nodes...
This error is related in some way to the installation of Flexdash.
There is a simple and viable work-around
Well it's not trivial because it requires a clean Node-red installation which takes time. Simple and reproducible though.
On a fresh installation of Raspberry PiOS, with Node-red and node-red-dashboard, no VM, no Docker:
Steps to test for the problem:
Drag switch node onto editor
Create new dashboard tab and group
Enter Payload as number 1 and 0
Done
Does the node show the error notification?
If you go back into the config have the Payloads reverted to true and false?
On the fresh installation the switch node does not show an error.
cd ~/,node-red; npm install @flexdash/node-red-fd-corewidgets Now the error occurs.
cd ~/,node-red; npm uninstall @flexdash/node-red-fd-corewidgets The error persists.
What did I do to cause the error? I installed Flexdash.
I think that's just because a new dashboard node is not associated with a tab/group and is unrelated to this issue.
I don't understand "the async loading of nodes" but in the above tests there are no flows and no nodes deployed.
My guess is that there is a different version of a file common to Dashboard installed with Flexdash which leads to the error. I can't identify this file anywhere in ~/.node-red or /lib/node_modules.
I don't know where else to look.
I have not tested first installing Flexdash then Dashboard.
Rename it so that when node-red restarts it will make a new one with empty flows. Then after the tests you can remove the new one and rename the original back again. If there is nothing of importance in the current .node-red folder then you can just delete it.
After deleting the .node-red directory, the problem still occurs when a switch node is configured.
Same result after deleting .node-red and re-running the Node-red install script.
In fact I'm having trouble finding a circumstance in which the error does not show up.
There was a point yetsterday when I had one RPi showing the problem and one not.
Not any more. At some point I did sudo apt update && sudo apt -y full-upgrade, no idea if it's relevant, nor which packages were updated.
I have not reported it. I didn't think that "This happens but I can't really describe what triggers it" would be much use, and only one other person says they see the problem.
I can't test it at the moment as I am away. I thought we had determined that it can be reliably reproduced by removing the .node-red folder and restarting node red.