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.

Remote operating and Node Red

1457910

Comments

  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 18
    Thanks Dave for sharing not only the flows but also for spending quite a long time with me helping me sort things out. Really appreciate it. That's the spirit I like about Flex community.

    I'm still having issues with my HF Auto flow, because It's not reading frequency although it's showing "UserCAT" on green (connected). But the Flex flow is working fine. I'm looking for a way to send that same info to my Green Heron Select 8 server for automatically antenna switching. Currently I use FRStack to send radio info to HF Auto and GH Switch but this could soon be done by Node Red.

    Thanks everybody for making this community great.

    73, Santiago
  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 18
    See my post right below and check your email for a new HF Auto flow that I tested and is working when used with my new Flex Radio flow.

    73
    Dave wo2x

  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 18
    Hi All,

    I have now debugged the HF Auto flow. When used with my Flex Radio flow it will interrogate the TX frequency of the radio and send it to W1TR's HF Auto app every two seconds.

    You will need to do the following:

    In the HF Auto program go to tools/edit config file and choose the hfautoapp.ini

     

    Search for  USER.XML_DocName= and change whatever it is currently set for to NODERED

    Save the file

     

    Stop whatever was streaming UDP packets to HF Auto app and then import the new HF Auto flow.

    In the HF Auto flow in Node Red change the UDP node to the IP address where the HF Auto app is installed.

    Restart the HF Auto app.


    Here is a picture of the flow along with the code.

    73
    Dave wo2x



    [
        {
            "id": "17cb3572.db00cb",
            "type": "tab",
            "label": "HF Auto",
            "disabled": false,
            "info": ""
        },
        {
            "id": "4f57a5a8.72361c",
            "type": "change",
            "z": "17cb3572.db00cb",
            "name": "Change global TX Freq to payload",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "TXFreq",
                    "tot": "global"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 200,
            "y": 140,
            "wires": [
                [
                    "d52bdd5a.1a3cf"
                ]
            ]
        },
        {
            "id": "2ee96ddc.f290f2",
            "type": "inject",
            "z": "17cb3572.db00cb",
            "name": "Send Freq to HF Auto every 2 seconds",
            "topic": "",
            "payload": "",
            "payloadType": "date",
            "repeat": "2",
            "crontab": "",
            "once": false,
            "onceDelay": 0.1,
            "x": 240,
            "y": 80,
            "wires": [
                [
                    "4f57a5a8.72361c"
                ]
            ]
        },
        {
            "id": "887ec032.b83d2",
            "type": "udp out",
            "z": "17cb3572.db00cb",
            "name": "",
            "addr": "10.4.0.119",
            "iface": "",
            "port": "12070",
            "ipv": "udp4",
            "outport": "",
            "base64": false,
            "multicast": "false",
            "x": 200,
            "y": 320,
            "wires": []
        },
        {
            "id": "7acb62a3.6e637c",
            "type": "function",
            "z": "17cb3572.db00cb",
            "name": "Format XML Document packet for HF Auto",
            "func": "msg.payload = '<?xml version=\"1.0\" encoding=\"utf-8\"?><NODERED><FREQ>' + msg.payload + \"</FREQ></NODERED>\";\nreturn msg;",
            "outputs": 1,
            "noerr": 0,
            "x": 210,
            "y": 260,
            "wires": [
                [
                    "887ec032.b83d2"
                ]
            ]
        },
        {
            "id": "d52bdd5a.1a3cf",
            "type": "function",
            "z": "17cb3572.db00cb",
            "name": "Multiply Freq x 1000000",
            "func": "msg.payload = msg.payload*1000000;\nreturn msg;",
            "outputs": 1,
            "noerr": 0,
            "x": 190,
            "y": 200,
            "wires": [
                [
                    "7acb62a3.6e637c"
                ]
            ]
        }
    ]
  • AlanAlan Member ✭✭
    edited June 18
    Hi Dave

    It works just as you say.  HF-Auto uses the frequency from Node-Red.  Nice work.   Thanks.


    Now, we need to be able to select the frequency's origin (slice) to be able to fully use Node-Red as the frequency input to HF-Auto.


    Alan
    WA9WUD
  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 18
    It should track active slice. Try selecting TX on a different slice. If it does not update, try changing the frequency on the newly selected slice. i will check this in a couple of hours. I do not have an HF Auto but can see the UDP packets being sent. 73 Dave wo2x
  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 18
    I just tested it using two slices on different bands on the iPad SmartSDR app. I used a debug node right before the UDP node and it shows frequency follows whichever slice is set to TX. Remember, it takes up to two seconds to update when changing slices. 73 Dave wo2x
  • AlanAlan Member ✭✭
    edited June 18
    Thanks, Dave.  

    Gave it a try looking at the TX Slice Frequency.  Yes, it works just like you say.

    Also, it works with multiplex as expected showing the TX Slice Frequency of the "bound" client. (Last client to TX).

    Alan


  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 18
    Thanks a lot Dave. Tested new HF Flow and it's working fine. Now HF Auto follows radio thru Node Red. 

    I started reading about Green Heron Switch to see if I can do the same. Green Heron uses UDP from N1MM and N3JFP for automatic antenna switch following radio frequency, so it's possible, just need to know how Green Heron receive the packet.

    Santiago
  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 18
    Which port or ports will Green Heron receive UDP packets on? you can change the port number in the HF Auto flow then edit the config file for HF Auto app to make sure that port is enabled to receive UDP packets. As far as multiFlex, it should follow the client that has TX control of the radio. I need to look into this because if client A is on 80 meters and client B is on 40 meters and both bands need the tuner, there will be a delay while the tuner tunes. That is a logistic problem you will need to discuss with your multiFlex users. In other words it is a limitation of the tuner when switching bands. I use the tuner in the KPA1500 and luckily I only need the tuner on one band. 73 Dave wo2x
  • AlanAlan Member ✭✭
    edited June 18
    or.....add a second or third UDP broadcast node pointed to the other IP:port(s) you want to receive the same frequency broadcasts from Node-Red.

    Alan
    WA9WUD
  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 18
    I prefer to keep things simple when possible. If a single UDP port can be used by both HF Auto and Green Heron then change the port number in the HF Auto flow. Change the port on the UDP node to 12060. Change Green Heron to receive on 12060 (it is in the Green Heron manual). The HF Auto app should have receive on 12060 already set. Next step for me is to bind to specific clients to be able to parse info specific to clients. I already have successfully binded to a client and receive client specific info. It is just a matter of parsing the info. This will allow updating of the TX Power without transmitting first. When I run remote that is something I check before setting the amp to operate. If there is other info you would like to see from the radio let me know and I will see what I can do. 73 Dave wo2x
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 18
    Yes, that was my first attempt. I duplicated the UDP out node to transmit to the GH's listening port (12061) but it doesn't work. 

    Green Heron is able to receive UDP on 12061 (via N1MM or FRStack) and also on 127.0.0.1:13040 via N3FJP. I simulated N1MM with FRStack to Port 12061 and it was working, but when sending the same with Node Red is not. I guess there is a protocol involved that I'm not aware of. Been reading Green Heron documents but not much help there.

    My hope is to get it working so I don't have to open FRStack to automatically use GH., instead doing it with Node Red.
  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 18
    Giving it some more thought, if GHE is set to loopback you would need a second UDP send node. Check your inbox in a few minutes. Dave wo2x
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 19
    Ok, I'm still on the low side of the learning curve but thanks to the community support (specially Dave) I'm getting somewhere. I took Michael's host monitor flow and made some small changes with some gauges and leds only to make it more appealing to the sight (no technical upgrades). 

    Here are some pictures and the flow.

    Hope you like it and build on that. If anybody want it let me know and I'll email it.

    73, Santiago

    [    {
            "id": "3f1c9fe7.0d59",
            "type": "tab",
            "label": "Host Monitor",
            "disabled": false,
            "info": ""
        },
        {
            "id": "9cf5a84d.80f168",
            "type": "ping",
            "z": "3f1c9fe7.0d59",
            "mode": null,
            "name": "Internet",
            "host": "www.google.com";,
            "timer": "20",
            "inputs": 0,
            "x": 90,
            "y": 60,
            "wires": [
                [
                    "adcf621e.f490d",
                    "43b23702.cf5958",
                    "7f1aff2e.f214f"
                ]
            ]
        },
        {
            "id": "d57e7d2e.0fbd7",
            "type": "ui_text",
            "z": "3f1c9fe7.0d59",
            "group": "4221903.033657",
            "order": 6,
            "width": 4,
            "height": 1,
            "name": "",
            "label": "Internet",
            "format": "{{msg.payload}}",
            "layout": "row-spread",
            "x": 580,
            "y": 100,
            "wires": []
        },
        {
            "id": "60fbb453.7f8fcc",
            "type": "ping",
            "z": "3f1c9fe7.0d59",
            "mode": null,
            "name": "Flex 6300",
            "host": "10.0.0.78",
            "timer": "60",
            "inputs": 0,
            "x": 90,
            "y": 280,
            "wires": [
                [
                    "f58a8a20.b1a668",
                    "12d644dc.22692b",
                    "9176ce20.c2771"
                ]
            ]
        },
        {
            "id": "83df546d.31b038",
            "type": "ui_text",
            "z": "3f1c9fe7.0d59",
            "group": "4221903.033657",
            "order": 5,
            "width": 4,
            "height": 1,
            "name": "",
            "label": "Flex 6300",
            "format": "{{msg.payload}}",
            "layout": "row-spread",
            "x": 450,
            "y": 280,
            "wires": []
        },
        {
            "id": "5b98a76e.6849c8",
            "type": "ping",
            "z": "3f1c9fe7.0d59",
            "mode": null,
            "name": "PC",
            "host": "10.0.0.78",
            "timer": "60",
            "inputs": 0,
            "x": 110,
            "y": 460,
            "wires": [
                [
                    "ce924da3.2868",
                    "e86e1695.a399a8",
                    "ead5e84e.a022a8"
                ]
            ]
        },
        {
            "id": "f241c77f.16b6a8",
            "type": "ui_text",
            "z": "3f1c9fe7.0d59",
            "group": "4221903.033657",
            "order": 7,
            "width": 4,
            "height": 1,
            "name": "PC",
            "label": "PC",
            "format": "{{msg.payload}}",
            "layout": "row-spread",
            "x": 490,
            "y": 460,
            "wires": []
        },
        {
            "id": "e44234cf.99d758",
            "type": "ping",
            "z": "3f1c9fe7.0d59",
            "mode": null,
            "name": "RPI - Modem",
            "host": "10.0.0.30",
            "timer": "60",
            "inputs": 0,
            "x": 90,
            "y": 640,
            "wires": [
                [
                    "dac19e9.6a8686",
                    "62f9b93c.592788",
                    "426b7a06.d95b44"
                ]
            ]
        },
        {
            "id": "e3a0151c.7bb618",
            "type": "ui_text",
            "z": "3f1c9fe7.0d59",
            "group": "4221903.033657",
            "order": 8,
            "width": 4,
            "height": 1,
            "name": "RPI - Modem",
            "label": "RPI - Modem",
            "format": "{{msg.payload}}",
            "layout": "row-spread",
            "x": 540,
            "y": 640,
            "wires": []
        },
        {
            "id": "adcf621e.f490d",
            "type": "smooth",
            "z": "3f1c9fe7.0d59",
            "name": "",
            "property": "payload",
            "action": "mean",
            "count": "1",
            "round": "1",
            "mult": "single",
            "x": 280,
            "y": 80,
            "wires": [
                [
                    "f8b8bba.34e0348",
                    "d57e7d2e.0fbd7"
                ]
            ]
        },
        {
            "id": "f58a8a20.b1a668",
            "type": "smooth",
            "z": "3f1c9fe7.0d59",
            "name": "",
            "property": "payload",
            "action": "mean",
            "count": "2",
            "round": "1",
            "mult": "single",
            "x": 290,
            "y": 280,
            "wires": [
                [
                    "83df546d.31b038"
                ]
            ]
        },
        {
            "id": "ce924da3.2868",
            "type": "smooth",
            "z": "3f1c9fe7.0d59",
            "name": "",
            "property": "payload",
            "action": "mean",
            "count": "1",
            "round": "2",
            "mult": "single",
            "x": 320,
            "y": 460,
            "wires": [
                [
                    "f241c77f.16b6a8"
                ]
            ]
        },
        {
            "id": "dac19e9.6a8686",
            "type": "smooth",
            "z": "3f1c9fe7.0d59",
            "name": "",
            "property": "payload",
            "action": "mean",
            "count": "2",
            "round": "1",
            "mult": "single",
            "x": 320,
            "y": 640,
            "wires": [
                [
                    "e3a0151c.7bb618"
                ]
            ]
        },
        {
            "id": "f8b8bba.34e0348",
            "type": "ui_chart",
            "z": "3f1c9fe7.0d59",
            "name": "",
            "group": "ba3d6868.2d2ac8",
            "order": 1,
            "width": 6,
            "height": 4,
            "label": "Internet",
            "chartType": "line",
            "legend": "false",
            "xformat": "HH:mm:ss",
            "interpolate": "linear",
            "nodata": "",
            "dot": false,
            "ymin": "",
            "ymax": "",
            "removeOlder": 1,
            "removeOlderPoints": "",
            "removeOlderUnit": "3600",
            "cutout": 0,
            "useOneColor": false,
            "useUTC": false,
            "colors": [
                "#1f77b4",
                "#aec7e8",
                "#ff7f0e",
                "#2ca02c",
                "#98df8a",
                "#d62728",
                "#ff9896",
                "#9467bd",
                "#c5b0d5"
            ],
            "useOldStyle": false,
            "outputs": 1,
            "x": 580,
            "y": 140,
            "wires": [
                []
            ]
        },
        {
            "id": "b9cb793c.bb9a48",
            "type": "ui_led",
            "z": "3f1c9fe7.0d59",
            "group": "4221903.033657",
            "order": 16,
            "width": 2,
            "height": 1,
            "label": "Raspi",
            "labelPlacement": "left",
            "labelAlignment": "left",
            "colorForValue": [
                {
                    "color": "red",
                    "value": "false",
                    "valueType": "bool"
                },
                {
                    "color": "green",
                    "value": "true",
                    "valueType": "bool"
                }
            ],
            "allowColorForValueInMessage": false,
            "name": "Raspi",
            "x": 530,
            "y": 580,
            "wires": []
        },
        {
            "id": "62f9b93c.592788",
            "type": "function",
            "z": "3f1c9fe7.0d59",
            "name": "",
            "func": "
    var trueMsg = { payload: true };
    var falseMsg = { payload: false };


    if(msg.payload===false)
    {
       return falseMsg;
    }
    else{
           return trueMsg;

    }


    ",
            "outputs": 1,
            "noerr": 0,
            "x": 310,<br alt="
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 19
    Alan, was trying out this flow but I'm not receiving any information from FRStacks. Any idea?

    Santiago
  • AlanAlan Member ✭✭
    edited June 19
    Start, by checking your UDP Broadcast settings in FRStack.  View-options-UDP:

     1-I used the general UDP broadcast by adding a ".255" as the last number in my(your) unique IP address of the machine running Node-Red.  Be sure the Radio Meter Info is checked:

    image

    Set up the "UDP In" node on Node-Red to match the settings from FRStack



    image

    Alan
    WA9WUD
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 19
    Thanks Alan. The fix was simple, I forgot to direct FRStack to the Raspi Ip address. As soon as I checked on that everything started working. Made some adjustments to meters (animation, peak holding, etc.,) to make a bit more mine.

    Thanks a lot.

    73,
    Santiago
  • Mike-VA3MWMike-VA3MW FlexRadio Employee, Community Manager admin
    edited June 21
    Hey All

    Can I make a recommendation that if you have Flows you like and want to share that you take some time to add them to GitHub so that others can just pull them from Git?

    Even if you haven't used it, you'll find it pretty simple and it is free.

    thanks

  • AlanAlan Member ✭✭
    edited June 19
    Mike

    I have looked at GitHub and even have an account.  However, to me, it looks to be more suited for developers to collaborate on projects rather than sharing simple text files.

    Can you point me to a video or similar, to understand better what you suggest we use it for?  I found several "how-to" videos that seem focused on developers.

    I was hoping for a simple file sharing service.

    Alan
    WA9WUD
  • Mike-VA3MWMike-VA3MW FlexRadio Employee, Community Manager admin
    edited June 19
    Hi Alan

    Yes but it is more that that.  We actually use it for Document collaboration as well.  So, for NodeRed files it is just fine.

    There are several YouTube videos about using GitHub.  I don't have the skills with it yet to show anyone, but I am sure others might.

    Mike
  • AlanAlan Member ✭✭
    edited June 19
    OK, here goes.  I uploaded all of my Node-Red Flows to GitHub.....I think.

    Here is the link:  https://github.com/n61ab/Node-Red-Flows-WA9WUD.git

    I invite others to look and let me know if this worked?

    If yes, feel free to copy and modify as you like.  As you can see, I did the same in building my flows.  Any questions are welcome.

    Alan


  • WX7YWX7Y Member ✭✭
    edited June 19
    Santiago, your FLOW looks very cool and was wondering if you would share it with me and if you could Email me the File for this FLOW. I tried the text in the message but it didn't come through and is trunkated.

    Thanks a lot
    Bret
    WX7Y
    [email protected]

  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 19
    Sure thing. Just sent it, check your email.

    Santiago
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 19
    Just made mine, but not sure if it is working. Below is the link:

     https://github.com/hi8smx/hamradio/settings

    Santiago
  • AlanAlan Member ✭✭
    edited June 19
    Santiago

    I think you used the web link to your account page.  I cannot log into your account.  

    Rather, you need to copy the link to your files to allow others to see:

    image

    Alan
    WA9WUD
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 19
    My bad. Thanks Alan. Think I fixed it.

    https://github.com/hi8smx/hamradio.git

    Santiago
  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 20
    I will upload my flows this afternoon. I want to see if I can fix the Green Heron Everywhere UDP broadcast. I do not have one so will need Santiago’s help to test. Dave wo2x
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 20
    Sure, count me in. Whatever you need.
  • WX7YWX7Y Member ✭✭
    edited June 21
    This is a great idea and will help us all but If I may suggest when uploading Flow's to Get-HUB if a brief description and picture of what the FLOW does would really help us new-BE's. I have had a lot of help From Alan, Dave and Santiago and so far I have an amazing (to Me) Node-Red site 
  • WX7YWX7Y Member ✭✭
    edited June 21
    Has anyone built a FLOW for a Wave Node2 Watt meter?
    I have the Information from the manufacture of the data transfer format for all Wavenode meters over the USB interface he sent me today with a blessing to have it work on Node-Red if any code writers want to tackle it. 
    I am a real new-be for sure as I have said before

    Thanks everyone for ALL your excellent and hard work

    Bret
    WX7Y

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.