Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

NodeRed nodes for FlexRadio (without the need for extra software)

N1SH
N1SH Member ✭✭
edited September 14 in SmartSDR API

I've been working on some easy to use "nodes" for NodeRed to connect and control the FlexRadio's. Most of the discussion is going on on groups.io where there is an active community of people using NodeRed with their radios (even... non-flex radios!). The above image is an example dashboard (web page) that shows some of the capability of NodeRed and the nodes in action.

If you are wanting to take a look and perhaps join in on the fun:

Groups.IO group = https://groups.io/g/nodered-hamradio/topics

GitHub page/source for the project = https://github.com/stephenhouser/node-red-contrib-flexradio

We are up to version 0.7, still in beta but getting close to something that could be called v1.0. I'm happy to entertain ideas on how to develop the nodes and underlying JavaScript code so it is as useful and easy as possible.

Stephen

Comments

  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator

    Stephen has been doing nice work to streamline the ability to access the radio via the API in Node Red. We have a couple of flows that work with his nodes.

    Dave wo2x

  • Ken Wells
    Ken Wells Community Manager admin

    I am a total noob at node-red.

    How do I get the flow to import into my newly-installed node-red?

    (Node-red version 2.0.6; Node.js version v15.5.1)

  • Alan
    Alan Member ✭✭✭

    Ken

    e-mail me and we can set up a screen share. I can walk you thru the process.

    Alan. WA9WUD [email protected]

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin

    Ken

    I can do a screen share with you too if you like.


  • N1SH
    N1SH Member ✭✭
    edited September 14

    If you are wanting to install the nodes themselves, use the "Manage Palette" on that screenshot and then select the "install" tab and search for 'flexradio'.

    If you are wanting to install some example flows, then that "Import" Mike shows, then select "Examples" and expand the "node-red-contrib-flexradio" item and there are some samples.

    This video might help as well -- https://youtu.be/x9Ga6DZKIGI

  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator

    I did a Zoom call tonight on basics of Node Red for Ham Radio. I am uploading it to YouTube and it will take a while to process the HD, right now only in 360P.

    Here is the link. Hopefully in a few hours the HD rendering will be done.


    73

    Dave wo2x



  • Ken Wells
    Ken Wells Community Manager admin

    I try to deploy the flow and am getting this error:

    Flows stopped due to missing node types.

    • amqp-server

    But I can't seem to get amqp-server to load.....

  • N1SH
    N1SH Member ✭✭

    I want to be careful to separate the incredible work Dave has in his flows from the base node-red-contrib-flexradio nodes (which are new). Dave uses a bunch more nodes in his flows and may have a number of other dependencies. The node-red-contrib-flexradio nodes are self-contained and designed to handle the lower level (lower level than Dave’s flows) communication with the FlexRadio.

    Long post longer, I think that amqp-server might be from Dave’s flows and not from the underlying node-red-contrib-flexradio nodes.

  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator

    I have not heard of amqp-server node.

    Ken, the FlexRadio v9b4 flow on the Node Red Groups.io site in the file section under Flows by Type/radio/Flows for use with N1 SH nodes.

    After you load the Pi with the OS and Node Red, the WiKi has a readme file with recommended additional nodes that are used in some of the common flows. It includes instructions on installing the nodes. Once you load the nodes stop Node Red by connecting via a terminal window or Putty and type Node-Red-Stop. Then restart Node Red by typing Node-Red-Start. Then load the flow.

    The flow is designed to work with the new FlexRadio nodes version 0.77 or newer.

    73

    Dave wo2x

  • Ken Wells
    Ken Wells Community Manager admin

    Hi Dave, et. al. I am starting my experiments by running Node-Red on my windows desktop.


    I have been able to import the proper flow (s) and the nodes, etc. but nothing runs. it keeps giving me an error:  Waiting for missing types to be registered:  - amqp-server


    I can't seem to find where this is and why it can't get going. But it is blocking my flows from running or begin able to open the Dashboard.

  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator

    I am not sure which flow is trying to use that node. Doing a Google search this is what I came up with.

    You will need to have NOM installed on Windows. Sorry I can’t be much more help but all of my Node Red work has been using a Raspberry Pi.


    73

    Dave

  • Ken Wells
    Ken Wells Community Manager admin

    Found it! Deleted it! the Flow is running! Whoo Hoo!

  • N1SH
    N1SH Member ✭✭

    I created and posted an Introduction and Overview of the node-red-contrib-flexradio nodes to give a brief overview of the nodes included, how to install, and the basics of how they are designed to work. I'll make some additional videos about each node and/or specific flow creation, like I did with the Discovery Dashboard video.

    Intro and Overview: https://youtu.be/8TXno7R7i2Y

    Discovery Node/Dashboard: https://youtu.be/H-ZRe6NGHHc

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    Very nicely done videos, Stephen!

  • N1SH
    N1SH Member ✭✭

    Thanks Len. I kept messing them up in one way or another. Took something like 5-6 tries each :-(

    Success in the end is what counts.

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    Hi Stephen, I was fooling around with Node-Red and got things working. One thing that I noticed is that you have to manually enter the radio IP address for meter, request, message, etc, even though the IP is known from Discovery. Is there a way to specify the IP gathered in Discovery so that it can be applied to the other functions? It seems like an input to these functions containing the connected radio would be handy.

    Is there a way to look at / modify the code underlying the Node-Red code boxes? I also wonder what language it is written in (or does it have its own syntax and compiler/interpreter?).

  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator

    Hi Len,

    just wondering what use case for having IP set from the discovery packets? Also, what about multiple radios on the same subnet?

    The only use case I could see is making things a little easier for single radio network where the router properly handles uPNP for SmartLink. My network has DHCP reservations for all major components (PC, radio, amp, tuner, antenna switch, etc). So doing a one time setup of the nodes in Node Red.

    By the way on the Node Red groups.io site in the files section under !1!Files by Type/Radios there is a folder with flows designed to work with Stephen’s nodes.

  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator

    Also, Stephen has done a great job in creating these dedicated nodes making parsing internal meter data easier.

    73

    Dave wo2x

  • N1SH
    N1SH Member ✭✭

    Len,

    I had considered the use case you describe, using the discovery node to configure the radio in the flow and see the appeal of a self-configuring system as you do. Ultimately, I decided not to implement it.

    There are a few things working against the idea that brought me to the current design. I patterned the nodes on existing nodes in NodeRed (like the MQTT nodes) and these node do not have that type of auto-configuration design. I also consulted with Dave, Alan, and others using NodeRed with their radios (see Dave's note above) and no one seemed to think it was a strong use-case. Most folks have just one radio and can set a fixed IP address in their LAN for it. If you do have multiple radios, you would probably want to be certain which one you had connected to before sending commands to it. Lastly, I wasn't sure how I would accomplish it with any sort of stability given that discovery packets arrive continually. That is, does it constantly reset the connection? Would you have to put a filter node in? Would there be some form of special "reconfigure" node or a special command that does that reconfiguration?

    I'm happy to keep the idea open and alive, but it's not on my immediate to-do list. There's a number of other changes, updates, and tweaks (and other projects) that I have in mind and feel like have more immediate uses.

    The source for the nodes hosted on GitHub, written in JavaScript, with an MIT open source license. I'm happy to consider pull requests if you or anyone is so inclined. You can find it at https://github.com/stephenhouser/node-red-contrib-flexradio

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    I was thinking more of a global variable that could be used. If it was an array, you could do a radio chooser when there is more than one IP address in the array. If only element 0 is filled in, then just do the connect.

    My current project (TeensyMaestro), just connects to the first radio it finds. If I ever get my hands on a second Flex, I will take the array approach and build in a simple radio selector screen.

    I did a similar thing with multiple clients. My gizmo binds to the first client in the array. Then I have a menu that shows all connected clients and lets me select the one I want. That way in a multi-operator environment, the TeensyMaestro(s) will control the desired client(s). I was thinking along these lines when I asked my question.

    Thanks for the info. I will take a look at GitHub to see what it all looks like. It was a stretch for me to learn C++ and use it in an Arduino environment after a lifetime of PL/I, Fortran and COBOL. I don't know if I will have the energy to jump into Java, but I am interested to see what is behind the scenes.

    Your library of Flex functions is really great, and I was able to get a bunch of items working right away (including an S-meter). I got a slider to do volume, but I don't see a way to get control reciprocity (i.e. the Node-Red control follows the value of the SmartSDR control). The way I have it working is fun to see in operation, but not very useful in real life. I wonder if this is inherent in the design of the controls, or if I am just missing a step to get that to work.

  • N1SH
    N1SH Member ✭✭

    Len,

    I like the design you laid out, with an array or similar. In thinking forward to other ways I'm hoping to use the library, I might reconsider where this feature is on my todo list.

    I have a few flows that control the audio level and power output in the way you describe. It follows the slice on the radio and you can adjust either in NodeRed or on the Radio. My intent is to make a video about building that flow in the near future. Essentially you have to bind to the client (I think you and I talked about this previously in another thread), then feed the messages from that slice into a UI component (for updates) and feed the output of the UI component to a request node (to change the value). The UI component has a checkbox (un-checkbox?) to avoid loopback problems.


  • Alan
    Alan Member ✭✭✭

    Stephen

    I just finished my multiplex Node - Red flow, and am able to comment on your plans to add audio controls.

    Regarding audio type commands, the command must be directed to a specific slice (number 0 through 6). The commands use "set' which is a number derived from the order the client(s) was connected, then the order of pan adapters added, then last, order of slices added, then associated to the bound client.

    This is where having the "msg.handle", included in each of the different Flex message packets, is very useful to set up these alignments. (so....do not remove the "msg.handle" message!)

    >>>>>>msg.payload = "slice set " + slice_a_set + " audio_mute=" + msg.payload<<<<. where slice set is a number 0 to 6, and msg.payload is "0" or "1"

    Commands that control the radio, such as Tune or MOX, go to the "bound client".

    My plans were to do more testing and post my flows, when you send out Flex Node v1.0

    Let me know if you want an advance copy.

    Alan

  • Alan
    Alan Member ✭✭✭

    Stephen

    I just finished my multiplex Node - Red flow.

    Regarding audio type commands, the command must be directed to a specific slice (number 0 through 6). The commands use "set' which is a number derived from the order the client was connected, then the order of pan adapters added, then last, order of slices added, then associated to the bound client.

    This is where having the "msg.handle", included in each of the different Flex message packets, is very useful to set up these alignments. (so....do not remove the "msg.handle" message!)

    >>>>>>msg.payload = "slice set " + slice_a_set + " audio_mute=" + msg.payload<<<<. where slice set is a number 0 to 6, and msg.payload is "0" or "1"

    Commands that control the radio, such as Tune or MOX, go to the "bound client".

    My plans were to do more testing and post my flows, when you send out Flex Node v1.0

    Let me know if you want an advance copy.

    Alan

  • N1SH
    N1SH Member ✭✭

    Alan, et. al.

    Good information about directing commands (like audio) to a slice. That's a problem for a level above my nodes.

    ...always happy to pass problems "up the stack" :-)

    Stephen

  • N1SH
    N1SH Member ✭✭

    Alan,

    Yes on looking over your flow. You have my email address, send it along. Not sure when I will look at it, but it would be good to see how things have changed in your flows and how you are using things.

    Stephen

    pretty sure [email protected] works too.

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    Hi Stephen, Thanks for the info on setting the sliders with info from the radio, I appreciate it. Am up camping, so I can't look at that further right now, but will do some more experimenting when I get back. I may get a Raspberry Pi and see if I can do some of the things with it and Node-Red that I did with my Teensy (Arduino work-alike) project. Dave and Alan suggested this a while back, but I was too preoccupied with the Teensy project to take on anything else.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.