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

1456810

Comments

  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 21
    It shouldn’t be difficult to do. The hardest part is finding out what format to send data, then parse the data returned. For example, with the KPA1500 I send a string of commands "msg.payload = "^BN;^WS;^TM;^FS;^OS;^VI;^FC;^ON;^FL;^AN;"↵ return msg;" Each command ^BN, ^WS, etc is querying the amp every second. For Elecraft the command is ^ folloed by two capital letters and a semi colon. The amp will return a string with values for each command sent. For the wattmeter it is ^WS to interrogate the peak power out (important to use peak value vs instant power). The amp returns a one buffer with the results for each command sent. This is sent from the amp every second. I convert the buffer to a string using function "msg.payload = msg.payload.toString('utf8');↵ return msg;" Then I have a string of imformation with the results for each starting with ^ so I split based on ^ I then use a switch node with each line containing one of the two letters for the commands I sent. Line 1 in the switch is Contains BN. Line two is Contains WS, etc. Now I have distinct outputs for status of each command I sent. The wattmeter happens to be line 6 of my switch node (Contains WS) and I have that connected to a function node. Now I need to parse the info from the string which is WS1462. I want it in a whole number so I use a function msg.payload = parseInt(msg.payload.substr(2,4)) return msg; This sets the msg.payload out to 1462. It starts at the third character ( first character starts at zero) and uses the four numbers starting at the third character of the string. Now I have a dashboard meter icon to display the power in horizontal bar graph format. This is assuming that peak power out was 1462 watts at time it polled the amp. I also use peak output since I am taking a “snapshot “ of the power out every second. I took the time to explain my KPA1500 wattmeter portion of the flow so you can get an idea on how to create flows to send and receive commands. During the building of the flow I use the debug node along each step so I can see how the data is being manipulated. First thing you need to do is establish communications to the meter. Once that is done it is just a matter of sending commands and parsing the info returned. I suggest try with a basic command to the meter and go from there. Give it a shot. It is rewarding when you get the first flow working. We’re here to help you along the way. The more flows, the more data the Pi is processing. I am not sure if anyone has come close to starting to max out the cpu or ram on a Pi 3b+. I built mine on a Pi 4b+ with 4 GB ram. Future proofed it. Sorry for the long post but wanted to give you a peek inside my thinking. Tomorrow morning I will upload my flows to Github. Got tied up today with family comittments. You can then download my KPA1500 and Flex Radio flows to get a better idea on command structure. For anyone else thinking of building a Pi with Node Red - it is a lot of fun and a good learning experience. I learned it and wrote most of my flows laying in a hospital bed or on the couch when my leg was immobilized for 10 weeks. There are people on here who are willing to share ideas and flows. Give it a try! 73 Dave wo2x
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 21
    Gotta give it to Dave!!! He fixed the flow sending data to HF Auto and Green Heron Antenna Switch. They are both working great. Now I can benefit for both auto hardware without needing FRStack in the middle. Santiago
  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭
    edited June 21
    Thanks! I do not have either the HF Auto or Green Heron Everywhere but I liked the challenge to make it work. I am creating a Github account now to upload my flows. I will be working with Alan to add functionality to the SteppIR flow. Stay tuned! Dave wo2x
  • Mike-VA3MWMike-VA3MW FlexRadio Employee, Community Manager admin
    edited June 22
    Hey all, in case you missed it on the broadcast on Friday this community is going to be terminated at the end of the month unfortunately it is 100% out of our control.We are working on options but they will take time and then there will be a gap of no community.This is the reason I highly recommended the other day that you take your code and post it on github so that we have a track of it and others can reference it we wantMike
  • Johan _ SE3XJohan _ SE3X Member ✭✭
    edited June 21
    Community Will be terminated? Will disapear? What THE ****???
  • Neal Pollack, N6YFMNeal Pollack, N6YFM Member ✭✭
    edited June 21
    Mike:

    A community forum exists for the user/customer to exchange questions, ideas, and share how to operate and accomplish things with the radio stations and products.   That is exactly what is going on here.   What does FRS not understand about this?

    Neal

  • Neal Pollack, N6YFMNeal Pollack, N6YFM Member ✭✭
    edited June 21
    I have just gone to each of the three page tabs for this forum thread, and clicked
    PRINT AS PDF.    It is a real shame that FRS does not understand the value of a forum thread like this, and the way in which it keeps the FRS customers engaged and interacting about interesting ways of using FRS products.

  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 21
    If you read what Michael is saying (and was addressed last Friday) is that the outsourced company that handled the community platform is going out and it will take time to properly come up with the alternative. FRS knows that the community is a huge part of the company and it’s success. I’ll say we give them the benefit of the doubt and hope this won’t be long. Santiago
  • KD0RCKD0RC Member ✭✭✭
    edited June 21
    Hi Mike, I did miss this.  I would suggest that it be displayed on a banner like new versions of software are.  A note about what is being done about it would be welcome as well.  Will the existing threads be imported into whatever replaces this forum?
    73,
    Len, KD0RC
  • Mike-VA3MWMike-VA3MW FlexRadio Employee, Community Manager admin
    edited June 22
    Neal and all

    We actually seriously understand the importance and investment.  Communities such as this cost thousands of dollars per month to run and that is just for the hosting charges.  That doesn't even include the number of man-hours that are also involved.   Sadly, they don't come free and the funding for the community has to come from the profit of each radio sold.  Standard business economics.  

    FRS's commitment is serious with regards to the community.   This is the last thing we wanted and we are all going to have to work with the gap in coverage.   

    This was a big surprise for us and it has chewed up more than 1 man person of work to move forward at a time when bandwidth was tight.

    We are still vetting a few new suppliers but also moving as fast as we can.

    Mike

  • KD0RCKD0RC Member ✭✭✭
    edited June 22
    We all want fast, but going fast and getting a **** platform is not in anyone's best interest. I would rather wait a little to be sure the new service meets the community's needs and can be sustained into the foreseeable future. 73, Len, KD0RC
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 22
    Michael, hello. Now I'm moving to temperature and humidity in my remote site.

    I understand that you have multiple LM75 sensors connected to a single point in your Raspi..is that correct? How were you able to do it? Do you jumper wires?

    Santiago
  • Neal Pollack, N6YFMNeal Pollack, N6YFM Member ✭✭
    edited June 23
    Hi Dave:   I would be interested in seeing the flow to learn how to query the radio without using FRstacks in the middle.   Did you post a link to where you uploaded the flow on GitHub?

    73

    Neal
    N6YFM
  • Mike-VA3MWMike-VA3MW FlexRadio Employee, Community Manager admin
    edited June 24
    I finally found them.  

    On the boards I had, there are 3 jumpers:  A0 A1 and A2.

    I hope this helps.

    73

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

    I have uploaded my flows to Github
    https://github.com/wo2x/NodeRed.git 

    Please read the readme.md file and read the comments in each flow as some flows require changing IP addresses, ports or username and password. If anyone has something they are working on and would like some help or if you want to get started and don't know where to start contact me direct and I will assist. My email is good on QRZ.

    I currently have flows for KPA1500 amp, rotor control through PSTRotator AZ, Flex Radio VITA 49 and radio commands, UDP broadcast for W1TR's HF Auto program and Green Heron Everywhere antenna switch, and Data Loggers Web Switch Pro for AC control of shack equipment.

    There is work being done to finish code for communicating to the SteppIR SDA100 controller.
    Also going to start on Wave Node wattmeter integration.

    If anyone has additional flows they would like to share please send me a link direct and I'd be happy to add them to my GitHub repository and make sure you are credited as the author.

    73
    Dave wo2x

  • AlanAlan Member ✭✭
    edited June 30
    In Mike's "Remote Station Walkthrough" video and followup discussion on the same, the topic of using Node-Red to shut down the station if there were nearby lightning came up.  For those of you who watched Mike's video, he briefly shows us his lightning detector.

    I did some research on how to get a trigger into Node-Red from Mike's system.  Mike gave me a web link to the program.  Unfortunately, I could not see how to set up a link from that source.

    I did find another option, "OpenWeatherMap.com".   Open Weather Map provides free API keys to allow access to their data.  Here is a link to the page describing the API Key I selected.   https://openweathermap.org/api/one-call-api   They have other availble keys, but this key provided a field called "weather" and "detail"  

    As luck would have it, there is a Node-Red node for Open Weather Map.  https://flows.nodered.org/node/node-red-node-openweathermap

    Here is my test flow with all of the available, free, data shown in the debug node:




    Here is a screenshot of just the the "weather" output:




    Here is a list of "weather", "details" outputs for Thunderstorm.



    So, now we can build our triggers, in Node-Red, from words in the "weather" and "detail" fields from the JSON string.

    Alan
  • Santiago Mejia - HI8SMXSantiago Mejia - HI8SMX Member ✭✭
    edited June 30
    This shall be one of the last posts on this community. So far I have not been able to make the nodes to trigger anything with the OWM flow. I am looking into getting an email or message, a light on the dashboard and also to turn off webswitch (that are on a separate flow). Still looking on ways to do it. Will post to facebook if I find anything.

    73,

    Santiago
  • AlanAlan Member ✭✭
    edited June 30
    Santiago

    I sent a Weather with Trigger Flow to your QRZ.com e-mail address.

    We can Team View if you need more help

    Alan
    [email protected]
    WA9WUD
             
  • Hi everybody. Happy to see the community is up and running. So far I´m liking what I´m seeing.

    73, de Santiago

  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭

    Yes. Good to see the community back!


    Dave wo2x

  • John ChmielewskiJohn Chmielewski Member ✭✭
    Is anyone using Node Red with a pc running windows 10? I am thinking of using this combination. Keep in mind that I don't know a Rasberry Pi from strawberry jam. Any help would be great. Thanks.

    John N2XD
  • AlanAlan Member ✭✭
    edited August 20

    Here is a link to the Node-Red Web site:

    I do not see an option to install Node-Red on Windows.

    Its not hard to set up a Raspberry Pi. Dave, WO2X has written detailed instructions, you can download here:

    Loading FR Stack is optional, so if you want to build a pi, only with Node-Red, complete the steps for:

    • Download and Install Raspberry Pi OS
    • Boot and Configure Pi
    • Install Node Red on RPi
    • Install x11vnc: (Only needed for Pi4 arm64 installs

    Run all the steps if you want to include FRStack on your install, more advance for a beginner but is recommended for a full set up Flex Radio Flows already built .

    Node-Red runs on the Raspberry Pi, however, you access Node-Red via any type of web browser, including whatever you use on Windows.

    Alan WA9WUD

  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭

    Yes, the WiKi on the groups.io site Alan mentioned has step by step instructions to load the Pi operating system, Node Red and optional ASPNet and FRStack. I am going to update a couple of things on the WiKi later.


    Dave wo2x

  • N5YTN5YT Member ✭✭

    I currently have mine on Windows.


    https://nodered.org/docs/getting-started/windows

  • PCRoverPCRover Member
    I have used node-red on Windows in the past with good results. Just follow the online installation procedure and it should work fine.
  • thomasmschaeferthomasmschaefer Member ✭✭
    Hello - I have been cheating a bit to get started and trying to load some the flows pasted into messages here. Not many import successfully though. I get errors as such as SyntaxError: JSON Parse error: Unterminated string or missing }. I can debug these but I wonder if there could be a formatting issue when the messages were converted to the new site.

    Put another way, is there a repository of all these wonderful flows kept anywhere one can download and learn from?

    Tom NY4I
  • David Decoons, wo2xDavid Decoons, wo2x Member ✭✭✭

    Hi Tom,


    yes. We have a group on groups.io. The file section has flows from different users, myself included.


    73

    dave wo2x

  • thomasmschaeferthomasmschaefer Member ✭✭
    Hi Dave - My posts about installing it on my Pi show I know where that is. :) While I saw a few flows in the files section on groups.io, I did not see as many as were posted in the messages here. Thanks
  • thomasmschaeferthomasmschaefer Member ✭✭
    I should have said I saw some flows in here (from Mike for example) that are not in the files section over there. But I see a nice assortment of flows on groups.io.

    I'm curious if anyone else has the issue of importing flows that are posted here in messages. Maybe there is some formatting error happening.
  • WX7YWX7Y Member ✭✭

    Thomas, are you Copying the TEXT then in NODE RED in the upper right corner where the 3 line are select Import then in the text window hit CTRL V to past the full body of the text in the window then hit import in the flow.

    If this is a new installation you may have to add several Pallets under the "manage Pallets" section to get the flows to run then edit them for your local information.

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.