¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date

Re: Node-Red msg notification

 

Thanks..i am taking a break this evening.? I will get back on it tomorrow..

Mick



On Sun, Oct 11, 2020, 6:34 PM Alan Blind, WA9WUD <a.alan.blind@...> wrote:
Mick

For the function to work comparing msg.inputs, you need to first add each message to a context variable so they both exist at the same time within the function. ?"Node" variables exist within the same node (function node in this case).? You could also use "Flow" or "Global" context variables.?

Var1 = context.var1 || 0 ? // sets Var1 to contents of context.var1 or 0
Var2 = context.var2 || 0

Assign each msg input to the function node a unique "topic' and use the topic to set up a unique Var name within the function.? Var1 and Var2.?

if(msg.topic.xxx) {context.var1 = msg.payload. ? //msg.payload with topic xxx

if(msg.topic.yyy) {context.var2 = msg.payload. ? //msg.payload with topic yyy


?Then:

If(Var1==Var2) {msg.payload = true}. // boolean
If(Var1>Var2) {msg.payload = "big} //string
If(Var < Var2) {msg.payload = "small"} //string
If(Var - Var2 >0) {msg.payload = 25} // number

else

{msg.payload = false}; ?//boolean

Take a look at this video:



Alan

PS, my coding is for illustration, not tested code.



Re: Node-Red msg notification

 

Mick

For the function to work comparing msg.inputs, you need to first add each message to a context variable so they both exist at the same time within the function. ?"Node" variables exist within the same node (function node in this case).? You could also use "Flow" or "Global" context variables.?

Var1 = context.var1 || 0 ? // sets Var1 to contents of context.var1 or 0
Var2 = context.var2 || 0

Assign each msg input to the function node a unique "topic' and use the topic to set up a unique Var name within the function.? Var1 and Var2.?

if(msg.topic.xxx) {context.var1 = msg.payload. ? //msg.payload with topic xxx

if(msg.topic.yyy) {context.var2 = msg.payload. ? //msg.payload with topic yyy


?Then:

If(Var1==Var2) {msg.payload = true}. // boolean
If(Var1>Var2) {msg.payload = "big} //string
If(Var < Var2) {msg.payload = "small"} //string
If(Var - Var2 >0) {msg.payload = 25} // number

else

{msg.payload = false}; ?//boolean

Take a look at this video:



Alan

PS, my coding is for illustration, not tested code.



Re: Node-Red msg notification

 

Thanks Alan,

I took several steps backwards today.? I realized my flow to inhibit TX does not work.? Thinking I need to do this in a function? to compare TUNE and MOX.? If Tune is ON and MOX is on,? I would ignore the TX inhibit,? but if just MOX is on I would not ignore it.? I tried to use the gate func, but it beat me up...I am presently trying to figure out how to get the MOX / Tune payloads into a variable so I can do an if statement on this... If this was only sql I would be flying through it..

Mick

On Sun, Oct 11, 2020 at 4:21 PM Alan Blind, WA9WUD <a.alan.blind@...> wrote:
Mick

Note the subtle difference between "Client" and "Clients".

"Client" is a command to the Flex Server to?bind to a client "name".?



"Clients" request information from the Flex Server.? This is how the flow builds the list of clients connected to the Flex Server, from which you can choose to bind FRStack to.


Screen Shot 2020-10-11 at 4.06.48 PM.png

Alan
WA9WUD


Re: Node-Red msg notification

 

Mick

Note the subtle difference between "Client" and "Clients".

"Client" is a command to the Flex Server to?bind to a client "name".?



"Clients" request information from the Flex Server.? This is how the flow builds the list of clients connected to the Flex Server, from which you can choose to bind FRStack to.


Screen Shot 2020-10-11 at 4.06.48 PM.png

Alan
WA9WUD


Re: Node-Red msg notification

 

Thank you, Mick.? Another lesson under my belt.? Got the missing nodes loaded and able to display the console on the dashboard.
Thanks again and 73, Bob, KN4HH

On Sunday, October 11, 2020, 12:48:23 PM EDT, Mick <w8bea2b2c2@...> wrote:


Bob,

You probably?don't have the gate node in your pallet.? You will need to go to manage Palette and load the gate Palette.? Here is what I loaded.?

image.png


Re: Node-Red msg notification

 

Bob,

You probably?don't have the gate node in your pallet.? You will need to go to manage Palette and load the gate Palette.? Here is what I loaded.?

image.png


Re: Node-Red msg notification

 

Alan,
#UdaMan...

I had to modify my logic...yours was spot on... Instead of GetClients,? I had to use GetClient...go figure...


Re: Node-Red msg notification

 

Good day.? Beginner here.? Just got node red running and created a few very basic flows.? I tried importing Alan's flow and I received an error message "Unknown node type Gate".
I would appreciate a point in the right direction.

73, Bob, KN4HH

On Sunday, October 11, 2020, 10:07:02 AM EDT, Alan Blind, WA9WUD <a.alan.blind@...> wrote:


Add a gate. ?This will give you the idea:




[{"id":"26463a39.8eb58e","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"d3fda263.3853b8","type":"change","z":"26463a39.8eb58e","name":"TXANT","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TXANT","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":268,"y":104,"wires":[["4a80dc91.28339c","55fc750b.55a534"]]},{"id":"4a80dc91.28339c","type":"ui_text","z":"26463a39.8eb58e","group":"fc0ab7c9.239048","order":3,"width":2,"height":1,"name":"TXANT","label":"<font size = 5, font color = red>TX ","format":"<font color = red>{{msg.payload}}","layout":"col-center","x":498,"y":125,"wires":[]},{"id":"55fc750b.55a534","type":"switch","z":"26463a39.8eb58e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"neq","v":"ANT1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":361,"y":235,"wires":[["e1651f62.da3268","945e136.4f2a6f"]]},{"id":"e1651f62.da3268","type":"change","z":"26463a39.8eb58e","name":"SetAntTX-Ant1","rules":[{"t":"set","p":"payload","pt":"msg","to":"ANT1","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"$globalContext(\"frstackurl\") & \"/\" & $flowContext(\"stype\") & \"/TXANT?param=\" & msg.payload","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":596,"y":225,"wires":[[]]},{"id":"7f6082e.762fa7c","type":"ui_toast","z":"26463a39.8eb58e","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":1115,"y":663,"wires":[]},{"id":"fd8507f9.1d02b8","type":"change","z":"26463a39.8eb58e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Invalid TX ANT Selected - Flex","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":326,"y":505,"wires":[["ad1c9a96.2476c"]]},{"id":"13286bd3.dcf6c4","type":"switch","z":"26463a39.8eb58e","name":"","property":"url","propertyType":"msg","rules":[{"t":"nnull"},{"t":"null"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":342,"wires":[["fd8507f9.1d02b8","15d5a86d.168758"],["42c75df4.0e3eb4"]]},{"id":"13030dfa.66806a","type":"http request","z":"26463a39.8eb58e","name":"GetClients","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":396,"y":332,"wires":[["13286bd3.dcf6c4"]]},{"id":"945e136.4f2a6f","type":"change","z":"26463a39.8eb58e","name":"getclientsUrl","rules":[{"t":"set","p":"url","pt":"msg","to":"$globalContext(\"frstackurl\") & \"/Radio/CLIENTS\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":212,"y":327,"wires":[["13030dfa.66806a"]]},{"id":"ad1c9a96.2476c","type":"gate","z":"26463a39.8eb58e","name":"","controlTopic":"control","defaultState":"open","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","persist":false,"x":1105,"y":487,"wires":[["7f6082e.762fa7c"]]},{"id":"15d5a86d.168758","type":"change","z":"26463a39.8eb58e","name":"open","rules":[{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":310,"wires":[["ad1c9a96.2476c"]]},{"id":"42c75df4.0e3eb4","type":"change","z":"26463a39.8eb58e","name":"close","rules":[{"t":"set","p":"payload","pt":"msg","to":"close","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":868,"y":377,"wires":[["ad1c9a96.2476c"]]},{"id":"fc0ab7c9.239048","type":"ui_group","z":"","name":"Flex - Active Slice","tab":"367c1bb9.ba774c","order":2,"disp":true,"width":"6","collapse":false,"info":"Active Slice "},{"id":"367c1bb9.ba774c","type":"ui_tab","z":"","name":"SVARC Station Control","icon":"dashboard","order":2,"disabled":false,"hidden":false}]


Re: Node-Red msg notification

 

Add a gate. ?This will give you the idea:




[{"id":"26463a39.8eb58e","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"d3fda263.3853b8","type":"change","z":"26463a39.8eb58e","name":"TXANT","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TXANT","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":268,"y":104,"wires":[["4a80dc91.28339c","55fc750b.55a534"]]},{"id":"4a80dc91.28339c","type":"ui_text","z":"26463a39.8eb58e","group":"fc0ab7c9.239048","order":3,"width":2,"height":1,"name":"TXANT","label":"<font size = 5, font color = red>TX ","format":"<font color = red>{{msg.payload}}","layout":"col-center","x":498,"y":125,"wires":[]},{"id":"55fc750b.55a534","type":"switch","z":"26463a39.8eb58e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"neq","v":"ANT1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":361,"y":235,"wires":[["e1651f62.da3268","945e136.4f2a6f"]]},{"id":"e1651f62.da3268","type":"change","z":"26463a39.8eb58e","name":"SetAntTX-Ant1","rules":[{"t":"set","p":"payload","pt":"msg","to":"ANT1","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"$globalContext(\"frstackurl\") & \"/\" & $flowContext(\"stype\") & \"/TXANT?param=\" & msg.payload","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":596,"y":225,"wires":[[]]},{"id":"7f6082e.762fa7c","type":"ui_toast","z":"26463a39.8eb58e","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":1115,"y":663,"wires":[]},{"id":"fd8507f9.1d02b8","type":"change","z":"26463a39.8eb58e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Invalid TX ANT Selected - Flex","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":326,"y":505,"wires":[["ad1c9a96.2476c"]]},{"id":"13286bd3.dcf6c4","type":"switch","z":"26463a39.8eb58e","name":"","property":"url","propertyType":"msg","rules":[{"t":"nnull"},{"t":"null"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":342,"wires":[["fd8507f9.1d02b8","15d5a86d.168758"],["42c75df4.0e3eb4"]]},{"id":"13030dfa.66806a","type":"http request","z":"26463a39.8eb58e","name":"GetClients","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":396,"y":332,"wires":[["13286bd3.dcf6c4"]]},{"id":"945e136.4f2a6f","type":"change","z":"26463a39.8eb58e","name":"getclientsUrl","rules":[{"t":"set","p":"url","pt":"msg","to":"$globalContext(\"frstackurl\") & \"/Radio/CLIENTS\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":212,"y":327,"wires":[["13030dfa.66806a"]]},{"id":"ad1c9a96.2476c","type":"gate","z":"26463a39.8eb58e","name":"","controlTopic":"control","defaultState":"open","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","persist":false,"x":1105,"y":487,"wires":[["7f6082e.762fa7c"]]},{"id":"15d5a86d.168758","type":"change","z":"26463a39.8eb58e","name":"open","rules":[{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":310,"wires":[["ad1c9a96.2476c"]]},{"id":"42c75df4.0e3eb4","type":"change","z":"26463a39.8eb58e","name":"close","rules":[{"t":"set","p":"payload","pt":"msg","to":"close","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":868,"y":377,"wires":[["ad1c9a96.2476c"]]},{"id":"fc0ab7c9.239048","type":"ui_group","z":"","name":"Flex - Active Slice","tab":"367c1bb9.ba774c","order":2,"disp":true,"width":"6","collapse":false,"info":"Active Slice "},{"id":"367c1bb9.ba774c","type":"ui_tab","z":"","name":"SVARC Station Control","icon":"dashboard","order":2,"disabled":false,"hidden":false}]


Node-Red msg notification

 

I am trying to get fancy with my flows... I have a flow set up to do notify on the toolbar if the invalid TX ANT is selected...see below:


It work great until the client disconnects and then is pushing the notification out every second.? ?I tried to adjust the logic to look for an active client but it does not work as I thought.? ?I am getting the client info and have a switch to look for null vs non null client values and on debug the switch seems to work,? however the notifications keep on coming.? ?

Here is the nodes that perform the task:



Below is the json?

[{"id":"6b6416c.020dbe8","type":"change","z":"16c64a20.2371d6","name":"TXANT","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TXANT","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":420,"wires":[["8a76cad1.78b0c8","d08b3593.24a3d8"]]},{"id":"8a76cad1.78b0c8","type":"ui_text","z":"16c64a20.2371d6","group":"a0a82b44.43e2a8","order":3,"width":2,"height":1,"name":"TXANT","label":"<font size = 5, font color = red>TX ","format":"<font color = red>{{msg.payload}}","layout":"col-center","x":960,"y":420,"wires":[]},{"id":"d08b3593.24a3d8","type":"switch","z":"16c64a20.2371d6","name":"","property":"payload","propertyType":"msg","rules":[{"t":"neq","v":"ANT1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":910,"y":480,"wires":[["d5bb047e.bea518","12916002.fece5"]]},{"id":"d5bb047e.bea518","type":"change","z":"16c64a20.2371d6","name":"SetAntTX-Ant1","rules":[{"t":"set","p":"payload","pt":"msg","to":"ANT1","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"$globalContext(\"frstackurl\") & \"/\" & $flowContext(\"stype\") & \"/TXANT?param=\" & msg.payload","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":480,"wires":[["3497dda0.8d8b32"]]},{"id":"ed5b03f5.712c9","type":"ui_toast","z":"16c64a20.2371d6","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":1130,"y":620,"wires":[]},{"id":"bd7a91bd.ecb69","type":"change","z":"16c64a20.2371d6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Invalid TX ANT Selected - Flex","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":620,"wires":[["ed5b03f5.712c9"]]},{"id":"4033d9b6.d9ed48","type":"switch","z":"16c64a20.2371d6","name":"","property":"url","propertyType":"msg","rules":[{"t":"nnull"},{"t":"null"}],"checkall":"true","repair":false,"outputs":2,"x":1130,"y":540,"wires":[["bd7a91bd.ecb69"],[]]},{"id":"fb87f752.56e148","type":"http request","z":"16c64a20.2371d6","name":"GetClients","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":970,"y":540,"wires":[["4033d9b6.d9ed48"]]},{"id":"12916002.fece5","type":"change","z":"16c64a20.2371d6","name":"getclientsUrl","rules":[{"t":"set","p":"url","pt":"msg","to":"$globalContext(\"frstackurl\") & \"/Radio/CLIENTS\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":540,"wires":[["fb87f752.56e148"]]},{"id":"a0a82b44.43e2a8","type":"ui_group","z":"","name":"Flex - Active Slice","tab":"c12e4347.15e8","order":2,"disp":true,"width":"6","collapse":false,"info":"Active Slice "},{"id":"c12e4347.15e8","type":"ui_tab","z":"","name":"SVARC Station Control","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

Hopefully some one can see where the flow is taking a wrong turn...

Mick


Re: File /Flex TX Power Limiter, By Band/Amp Power Limit.json uploaded #file-notice

 

Thank-You, Mick.

Alan


Re: File /Flex TX Power Limiter, By Band/Amp Power Limit.json uploaded #file-notice

 

Alan,

I take it you have?a PG-XL.? ?To? me that is a dream amp...Your flows are clean and impressive.

Mick

On Sat, Oct 10, 2020 at 5:54 PM [email protected] Notification <[email protected]> wrote:

The following files have been uploaded to the Files area of the [email protected] group.

By: Alan Blind, WA9WUD

Description:
Added a new file to the Amp Band Limit Flow set. This new flow complements the "Amp Band Select" flow by adding a "High", "Mid", and "Low" setting for the PG-XL "Maximum Allowed Watts Out. There is a separate "Setup" dashboard with "sliders" to set the maximum PG-XL Watts out for each range. If the PG-XL puts out a higher value of Watts in MOX, the flow will "run-back" the Flex TX power to match the "Max PG-XL Watts" setpoint. Using these flows together, you have three definable ranges for TX Maximum Setpoint and for Maximum PG-XL Watts. The flow will run the TX setpoint below the lowest value. If the Flex Setpoint is below both TX Setpoint and PG-XL Watts limits, the flow will allow the Flex TX Setpoint to control.


Re: File /Flex TX Power Limiter, By Band/Amp Power Limit.json uploaded #file-notice

 

I added a new file to the Amp Band Limit Flow set. This new flow complements the "Amp Band Select" flow by adding a "High", "Mid", and "Low" setting for the PG-XL "Maximum Allowed Watts Out.?

There is a separate "Setup" dashboard with "sliders" to set the maximum PG-XL Watts out for each range.?

If the PG-XL puts out a higher value of Watts in MOX, the flow will "run-back" the Flex TX power to match the "Max PG-XL Watts" setpoint.?

Using these flows together, you have three definable ranges for TX Maximum Setpoint and for Maximum PG-XL Watts. The flow will run the TX setpoint below the lowest value. If the Flex Setpoint is below both TX Setpoint and PG-XL Watts limits, the flow will allow the Flex TX Setpoint to control.

Here is a screenshot of the "control panel" used to set PG-XL Max Power for each range:

Screen Shot 2020-10-10 at 5.58.16 PM.png

And, here is a screen-shot of my station dashboard showing the consolidated "Limiter" buttons / Indications:

Screen Shot 2020-10-10 at 5.53.53 PM.png

Alan
WA9WUD


File /Flex TX Power Limiter, By Band/Amp Power Limit.json uploaded #file-notice

[email protected] Notification
 

The following files have been uploaded to the Files area of the [email protected] group.

By: Alan Blind, WA9WUD

Description:
Added a new file to the Amp Band Limit Flow set. This new flow complements the "Amp Band Select" flow by adding a "High", "Mid", and "Low" setting for the PG-XL "Maximum Allowed Watts Out. There is a separate "Setup" dashboard with "sliders" to set the maximum PG-XL Watts out for each range. If the PG-XL puts out a higher value of Watts in MOX, the flow will "run-back" the Flex TX power to match the "Max PG-XL Watts" setpoint. Using these flows together, you have three definable ranges for TX Maximum Setpoint and for Maximum PG-XL Watts. The flow will run the TX setpoint below the lowest value. If the Flex Setpoint is below both TX Setpoint and PG-XL Watts limits, the flow will allow the Flex TX Setpoint to control.


File /SteppIR Using FR Stack/SDA100 AutoTrack Settings.json uploaded #file-notice

[email protected] Notification
 

The following files have been uploaded to the Files area of the [email protected] group.

By: Alan Blind, WA9WUD

Description:
Added a companion Flow to the SteppIR Flow. "SDA100 AutoTrack Settings" provides a space to enter the Auto Track Delta Frequency, the same as entered into the SDA100 Settings. Delta Frequency is entered per each operating band and controls when the Dashboard will indicate the need to command the antenna to move, the same as will occur from the SDA100 to move the antenna.


Minimum hardware

 

I hope to start dabbling with Node Red soon. I see hardware requirements called out but some vagueness remains particularly relative to amount of RAM needed.
I have a Pi 3B with 1GB... is that going to be sufficient to get me started?
Where I want to end up with is FRstack running. Control functions otherwise are relatively simple and primarily all discretes (power control, Flex off/on, antenna switches...).
If I buy a Pi 4, how much RAM do I really need?
My apologies if I missed more-detailed discussion already held on this topic, but I didn't find it.
73
Steve AK0M


Re: Node-Red Ui Header - Add Raspi Temp

 

Now you are getting the hang of it.

In the FRStack download file, there is an HTML file called "Read Me". Perhaps you already?used that for install instructions.? Included in the Read me?are all of the REST commands and their formats.? You should see you have simply built the TX stop REST command in Node-Red.

To illustrate, put a debug node on the outlet of the node where you built the url command in JASONata.? Set the debug node for "msg.url".? Copy the debug output (should be the "TX off" REST command) from the debug window and paste that into a browser's address bar.? Hit return.? Your browser?will now send the command and you should see the Flex respond.? Change the "param" to 1 for TX on, 2 for TX off.

Back to the slices.? Mark has "active slice" and A,B,C and D slices.? He does not have a TX slice.? I built a flow to "derive" the TX slice.? I prefer to control the TX slice vs the "Active" slice. ? Here is a link the folder with my?slices,?TX slice on the bottom.


Alan


Re: Node-Red Ui Header - Add Raspi Temp

 

I did it...I figured out a way to disable xmit on swr higher than 2.0.? The key was flow.stype.? ?

image.png
image.png

image.png


On Tue, Oct 6, 2020 at 4:07 PM M Stutler via <w8bea2b2c2=[email protected]> wrote:
I feel like Edison testing light bulbs.

I know exactly how you feel.? thanks so much...


Re: Node-Red Ui Header - Add Raspi Temp

 

I feel like Edison testing light bulbs.

I know exactly how you feel.? thanks so much...


Re: Node-Red Ui Header - Add Raspi Temp

 

"M".

On your SWR node, I built a similar?flow.? I have three sources of SWR, Flex, HF-Auto, and PG-XL amp.? My flow has a tile for each device, with color changes and one tile that shows the "highest" SWR with background?color changes.? It may give you some ideas for your own. It is uploaded to the forum files:


On your idea to inhibit TX on high SWR, I have found the "Gate" node useful for such actions. ? To stop TX, you would need to inject constant?steam?of "TX Stop" commands, held back by a closed gate, until the hight SWR opens the gate.

I also considered such a high?SWR interlock, but decided the Flex and PG-XL already had such functionality, so why duplicate it.

Here are all of the tiles on their separate?dashboard:

Screen Shot 2020-10-06 at 3.39.58 PM.png

Here is the single, "High SWR" on my station control dashboard.? My idea is to reduce the number of tiles on the mainboard, but continue to have the same info:

Screen Shot 2020-10-06 at 3.39.10 PM.png

I saw your post to the forum for help adding the Pi CPU Temp to the Tool Bar.? So far, no responses.

I did some reading on the "Template" Node and writing XML.? Just getting started.? I was able to get a variable "temp" ?(178) to display on the toolbar:

Screen Shot 2020-10-06 at 3.15.58 PM.png
Here is the modified script:
Screen Shot 2020-10-06 at 3.12.44 PM.png
I tried both string and numeric variables.? The script worked with both.

Problem was, I could not find a way to get the outside "cpu.msg" into the script.

I tried a message variable from the CPU Temperature flow, msg.temp.? Did not work.

I tried a context variable.? I moved the CPU Temperature, to a context variable, "flow.set("temp", msg.temp") and within the script, a line, "temp = flow.set("temp"), thinking the script could not see the preceding "msg" nodes but could bring in a context variable from within the script. ? ?Did not work.

I feel like Edison testing light bulbs.

Alan
WA9WUD