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 refer to the product documentation or 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

1356710

Comments

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited October 2019
    Just to share, this is what my Dashboard looks like --- today.  Tomorrow it may be different.  

    I'm just looking at the 'Template' in the Dashboard so I can see what I can do there.

    image
  • Joe N3HEE
    Joe N3HEE Member ✭✭
    edited October 2019
    Sending CW and tuning the radio is pretty easy.  I need to play with the audio API commands to see if I can get audio to Node-Red.  There is a audio node for Node-Red that should work to get audio to the browser.

    The guys at Beloud.US have developed a web interface for Flex on their pay for play stations.  That will be coming soon ! 
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited October 2019
  • Joe N3HEE
    Joe N3HEE Member ✭✭
    edited October 2019
  • Joe N3HEE
    Joe N3HEE Member ✭✭
    edited October 2019
    The sky is the limit with what you can do with this radio when it comes to software development. 
  • Joe N3HEE
    Joe N3HEE Member ✭✭
    edited October 2019
    Got Speech to Morse working tonight via IBM Watson speech to text node on Node-Red !  This is really cool but will have to figure out how to send punctuation and other Morse code prosigns and abbreviations.  Good start for now.
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited October 2019
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited April 2020
  • Alan
    Alan Member ✭✭✭✭
    edited October 2019
  • Joe N3HEE
    Joe N3HEE Member ✭✭
    edited October 2019
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited October 2019
    Like Joe said.   

    This is what the Flow looks like and it sends the TX Status to an MQTT server (not as hard as it sounds).  This seemed to be the easier way for me to change the topic to a control topic.  

    image

    This flow is a work in progress and I use it for a lot of testing.  

    Here is the code.  Give a try and see if it helps you out  I think N6NU started this and I expanded on it.  You will have to change the IP address for the radio and the MQTT server.

    Mike


    [{"id":"a5a6f35f.a0a62","type":"tab","label":"FlexRadio","disabled":false,"info":""},{"id":"5332910e.2f411","type":"tcp in","z":"a5a6f35f.a0a62","name":"","server":"client","host":"192.168.110.76","port":"4992","datamode":"stream","datatype":"utf8","newline":"\\n","topic":"","base64":false,"x":203.01953125,"y":158.00390625,"wires":[["32af30a0.da29c","784db465.9bedfc","21676014.64315","4bb65a81.899f44"]]},{"id":"9f0dc4f.232cd38","type":"tcp out","z":"a5a6f35f.a0a62","host":"","port":"","beserver":"reply","base64":false,"end":false,"name":"","x":1003.01953125,"y":198.00390625,"wires":[]},{"id":"167dc49a.68cbab","type":"split","z":"a5a6f35f.a0a62","name":"","splt":" ","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":323.01953125,"y":418.00390625,"wires":[["66b580f3.0a7a4"]]},{"id":"66b580f3.0a7a4","type":"switch","z":"a5a6f35f.a0a62","name":"","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^freq=","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":1,"x":463.01953125,"y":418.00390625,"wires":[["8d5baf1.32b805"]]},{"id":"8d5baf1.32b805","type":"function","z":"a5a6f35f.a0a62","name":"ParseFreq","func":"\nmsg.payload= msg.payload.split('=')[1]*100000;\n\nflow.set(\"FlexTXFreq\",msg.payload);\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":420,"wires":[["b4944ad5.44dbd8"]]},{"id":"d63d2770.e41758","type":"mqtt out","z":"a5a6f35f.a0a62","name":"","topic":"FlexStatus","qos":"","retain":"","broker":"201e7171.0af3ee","x":1110,"y":500,"wires":[]},{"id":"b4944ad5.44dbd8","type":"function","z":"a5a6f35f.a0a62","name":"Devide Frequency by 100","func":"var Frequency=msg.payload/100;\n\n\n\nmsg.payload= parseFloat(Frequency).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"x":890,"y":420,"wires":[["d63d2770.e41758","b2a55269.8a30c","59f3c5b7.c2fbec"]]},{"id":"32af30a0.da29c","type":"trigger","z":"a5a6f35f.a0a62","op1":"C173|sub tx all","op2":"C173|sub tx all","op1type":"str","op2type":"str","duration":"60","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":563.01953125,"y":158.00390625,"wires":[["5039d92.c1ba328","5868bc45.056d54","12af30a0.75d09f","163c43e3.a5302c"]]},{"id":"b2a55269.8a30c","type":"trigger","z":"a5a6f35f.a0a62","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":false,"units":"s","reset":"","name":"","x":730,"y":500,"wires":[["d63d2770.e41758"]]},{"id":"5039d92.c1ba328","type":"function","z":"a5a6f35f.a0a62","name":"SUB SLICE ALL","func":"// C172|sub slice all\nmsg.payload = \"C172|sub slice all\\r\"; \nreturn msg;","outputs":1,"noerr":0,"x":793.01953125,"y":178.00390625,"wires":[["9f0dc4f.232cd38"]]},{"id":"5868bc45.056d54","type":"function","z":"a5a6f35f.a0a62","name":"SUB CLIENT ALL","func":"// C172|sub slice all\nmsg.payload = \"C173|sub client all\\r\"; \nreturn msg;","outputs":1,"noerr":0,"x":803.01953125,"y":218.00390625,"wires":[["9f0dc4f.232cd38"]]},{"id":"12af30a0.75d09f","type":"function","z":"a5a6f35f.a0a62","name":"SUB TX ALL","func":"// C172|sub slice all\nmsg.payload = \"C202|sub tx all\\r\"; \nreturn msg;","outputs":1,"noerr":0,"x":783.01953125,"y":138.00390625,"wires":[["9f0dc4f.232cd38"]]},{"id":"784db465.9bedfc","type":"switch","z":"a5a6f35f.a0a62","name":"transmit","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"|transmit","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":173.01953125,"y":418.00390625,"wires":[["167dc49a.68cbab"]]},{"id":"163c43e3.a5302c","type":"function","z":"a5a6f35f.a0a62","name":"SUB RADIO ALL","func":"// C172|sub slice all\nmsg.payload = \"C73|sub radio all\\r\"; \nreturn msg;","outputs":1,"noerr":0,"x":810,"y":260,"wires":[["9f0dc4f.232cd38"]]},{"id":"2cdb975d.660f78","type":"inject","z":"a5a6f35f.a0a62","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":410.51171875,"y":58.94921875,"wires":[["12af30a0.75d09f"]]},{"id":"59f3c5b7.c2fbec","type":"ui_text","z":"a5a6f35f.a0a62","group":"2dbe67ac.f10de8","order":9,"width":0,"height":0,"name":"","label":"6600 Freq","format":"{{msg.payload}}","layout":"row-spread","x":1130,"y":420,"wires":[]},{"id":"21676014.64315","type":"switch","z":"a5a6f35f.a0a62","name":"rfpower","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"|transmit","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":180,"y":560,"wires":[["35cc47b5.351a98"]]},{"id":"35cc47b5.351a98","type":"split","z":"a5a6f35f.a0a62","name":"","splt":" ","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":350,"y":560,"wires":[["e7e8db4.377d128"]]},{"id":"e7e8db4.377d128","type":"switch","z":"a5a6f35f.a0a62","name":"","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^rfpower=","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":1,"x":490,"y":560,"wires":[["edb3c81.600ee38"]]},{"id":"edb3c81.600ee38","type":"function","z":"a5a6f35f.a0a62","name":"ParsePWR","func":"\nmsg.payload= msg.payload.split('=')[1];\n\nflow.set(\"FlexTXPWR\",msg.payload);\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":560,"wires":[["6e9b14da.a6563c"]]},{"id":"6e9b14da.a6563c","type":"ui_text","z":"a5a6f35f.a0a62","group":"2dbe67ac.f10de8","order":10,"width":0,"height":0,"name":"","label":"TX Power","format":"{{msg.payload}}","layout":"row-spread","x":1140,"y":560,"wires":[]},{"id":"4d6cb5be.c9a64c","type":"comment","z":"a5a6f35f.a0a62","name":"","info":" state=TRANSMITTING\n  state=READY","x":1620,"y":200,"wires":[]},{"id":"4bb65a81.899f44","type":"switch","z":"a5a6f35f.a0a62","name":"TX/RX State","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"state","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":170,"y":660,"wires":[["50ad74fe.67e61c"]]},{"id":"50ad74fe.67e61c","type":"split","z":"a5a6f35f.a0a62","name":"","splt":" ","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":310,"y":660,"wires":[["3b771b3c.5215e4"]]},{"id":"3b771b3c.5215e4","type":"switch","z":"a5a6f35f.a0a62","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"TRANSMITTING","vt":"str"},{"t":"cont","v":"READY","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":660,"wires":[["7d3c7d0d.97c674"],["ae295af8.9e4b38"]],"inputLabels":["i/p"],"outputLabels":["PTT Requested","UnKey"]},{"id":"7d3c7d0d.97c674","type":"change","z":"a5a6f35f.a0a62","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"close","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":640,"wires":[["74bc71a6.a2d9e"]],"info":"The msg.payload is set to open or closed and\nsent to MQTT so that the Steppir controller\nwill know to open or close the gate.\n\nWhen Closed, the Steppir code will not send commands\nto the controller and hopefully not cause the \nSteppir to actually move while in TX"},{"id":"ae295af8.9e4b38","type":"change","z":"a5a6f35f.a0a62","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":680,"wires":[["74bc71a6.a2d9e"]],"info":"The msg.payload is set to open or closed and\nsent to MQTT so that the Steppir controller\nwill know to open or close the gate.\n\nWhen Closed, the Steppir code will not send commands\nto the controller and hopefully not cause the \nSteppir to actually move while in TX"},{"id":"74bc71a6.a2d9e","type":"mqtt out","z":"a5a6f35f.a0a62","name":"To Steppir Control","topic":"control","qos":"","retain":"","broker":"201e7171.0af3ee","x":1010,"y":660,"wires":[],"info":"To Steppir Code"},{"id":"201e7171.0af3ee","type":"mqtt-broker","z":"","name":"","broker":"192.168.110.111","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"2dbe67ac.f10de8","type":"ui_group","z":"","name":"RF Info","tab":"d6ba9a2a.f3f0d8","order":2,"disp":true,"width":"5","collapse":false},{"id":"d6ba9a2a.f3f0d8","type":"ui_tab","z":"","name":"VA3MW Shack Control","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
  • Alan
    Alan Member ✭✭✭✭
    edited October 2019
    Thanks, Mike

    I am able to understand everything in the flow except for how the commands to and from the Flex are formated.  Still working on that. 

    I too have started using MQTT via Mosequeto on a Rasberry Pi.  It was easy to set up.

    Your's and other's sharing are helping me to jump-start my understanding.  Thanks.

    Alan
    WA9WUD
  • Joe N3HEE
    Joe N3HEE Member ✭✭
    edited October 2019
  • Bob G   W1GLV
    Bob G W1GLV Member ✭✭
    edited June 2020
  • Joe N3HEE
    Joe N3HEE Member ✭✭
    edited October 2019
    I've had no luck getting Alexa to work with Node Red.  Has anyone been successful ?
  • Alan
    Alan Member ✭✭✭✭
    edited October 2019
  • Roberto EA2CNU
    Roberto EA2CNU Member ✭✭
    edited October 2019
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited October 2019
    Hi Alan

    That is interesting.  I don't see the same impact on the graphs.  I run several for temperature yet my CPU load stays about zero-ish.

    I wonder what could be different.

    Mike

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited October 2019
    The Steppir control is complicated and it was written by Andreas, N6NU.  I can email it to you if you wish.  It does require that you use MQTT.

    I need to add some TX inhibit code to the Steppir so that if the Steppir is tuning that turn on TX Inhibit to keep the radio out of TX.  This, of course is a problem when using a 6600 when I want Ant 2/ Steppir to tune but still allow me to TX on Ant 1.

    Have you started playing with NR yet?  If not, get familiar with it first before I share it.  If you jump in on the Steppir code you might find it a bit frustrating.

    Mike 
  • Alan
    Alan Member ✭✭✭✭
    edited October 2019
    Mike

    I explained the observation and asked for help on the Node-Red forum.  Several responses came back saying that the Node-Red Graphs were know to be CPU and memory inefficient.  That is where I got the recommendation to look at Grafana.

    Alan
  • Alan
    Alan Member ✭✭✭✭
    edited October 2019
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited October 2019
    Nice!  The video is well done too.  I will have to migrate to that for the remote for the point when the SD card crashes.
  • Roberto EA2CNU
    Roberto EA2CNU Member ✭✭
    edited October 2019
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited October 2019
    Hi Roberto  

    I don't think MQTT is really necessary, but by using it allowed for multiple stations to see what the steppir was tuned to.    Andreas may be able to explain why he did it that way, but his station is used for Multi-Multi operations.  

    Mike 
  • Roberto EA2CNU
    Roberto EA2CNU Member ✭✭
    edited November 2019
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited November 2019
    Roberto

    That is the beauty of it.  You get to design it any way you wish and you are dependent on another persons preferences.  
  • Martin Boroff
    Martin Boroff Member ✭✭
    edited November 2019
  • W7NIK
    W7NIK Member ✭✭
    edited December 2019
    I have couple questions,
     I have windows running on my system , what is the benefit for  Rasberry PI ?
    If i  purchase a RPI  install it in the shack i can connect it to the network hub .

    For  me to control the station, i will need to go thru windows . I do not want another monitor :) 

    Basically the RPI is remote computer  and i control the station with one system? 
    Now i have to start PSTrotator,  Wave node, software ,  smartsdr, , N!MM, 
    this would be one mini computer with everything connected ? 
    I am deciding if i should try it? 
  • John - K3MA
    John - K3MA Member ✭✭
    edited December 2019
    You do not need another monitor.  You can run the RPi without a monitor and telnet into it from you windows computer if you need to.  That is one of the advantages of the RPi along with the low power consumption, small size, low price and many more.  For $40 +/- it should not be a stressful decision if you want to experiment.
  • Martin Boroff
    Martin Boroff Member ✭✭
    edited December 2019
    Or you can use VNC to get to the desktop of the Pi. One of the advantages of using node-red on the Pi , the UI is browser based and most functions don’t (maybe shouldn’t) require you to constantly look at them..

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.