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

Options
1235710

Comments

  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    These do up to 26 volts and 3.2 amps.   I do not use for amps but have several set up for volts.    Operates on the I2C data bus.  Node-Red has a node just for the INA219 which interfaces with this board with no issues.  You can add jumpers on the board to have up to four unique I2C addresses.

    https://www.adafruit.com/product/904

    For current, I wanted to be able to "lug" #8 cable, so I use these.  The output is a voltage so you will also need the INA219 board to get the volts into Node-Red.   I then use a simple y=mx+b function (within a Node-Red Function Node), to convert volts to amps.  They are available in multiple sizes if you need more or less capacity.

    https://www.amazon.com/gp/product/B017B66R48/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

    Alan
    WA9WUD
  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    I never, or not often, shut down the 12VDC supply to the Flex.  I believe this is the "Flex" preference (others can jump in here).   

    I monitor the amp draw to the Flex and if you want to know the "boot status", you could use that to see when the Flex boots down.  Here are some typical values I see:

    - 12 VDC off:   0 amps
    - 12 VDC on, but not booted up;   0.5 amps
    - 12 VDC on, booted up:     1.8 amps
    - 12 VDC on, booted up, transmitting:  depends on the power level selected.

    I am sure you could use the Flex Server API commands to ascertain the radio status.  One idea is to use the UDP-VITA49  broadcasts as an indicator.    Whenever the Flex has power, booted or not, it is doing the UDP-VITA49 broadcast.  A few nodes to detect the "absence" of the broadcast, will give you something you can work with.   Point a Node-Red UDP listener to port 4992 and you will see the broadcasts.

    On second thought, the lack of UDP broadcast would not tell you boot up or boot down, only no 12 VDC.

    I input the amps to my Node-Red Dashboard.  That seems your best solution to know boot status.

    Alan
  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    Another idea;

    I believe that if you ping the Flex, it will not return the ping if the Flex is not booted up.    Easy to test.

    Just by chance, I built a flow today to operate a LED when a Raspberry Pi loses power.  I accomplished that by sending the Raspberry Pi "pings" and using that result to operate the LED and send me an e-mail.    Here is the flow.

    Alan
    WA9WUD

    [{"id":"390c4ef2.7a235a","type":"ping","z":"dfd69853.2c6458","name":"Satellite Board RPi","host":"192.168.50.183","timer":"5","x":218,"y":315,"wires":[["b1703ff7.a9ef7"]]},{"id":"b1703ff7.a9ef7","type":"switch","z":"dfd69853.2c6458","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":486,"y":329,"wires":[["3423e754.b44ec8"],["51af8a1b.c941fc"]]},{"id":"3423e754.b44ec8","type":"change","z":"dfd69853.2c6458","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":705,"y":293,"wires":[["cec41006.1b3918"]]},{"id":"51af8a1b.c941fc","type":"change","z":"dfd69853.2c6458","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":699,"y":383,"wires":[["cec41006.1b3918","935f69f9.a46fe"]]},{"id":"cec41006.1b3918","type":"ui_led","z":"dfd69853.2c6458","group":"8dc53cce.7e2b7","order":2,"width":0,"height":0,"label":"Satellite Board","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"name":"Satellite","x":997,"y":298,"wires":[]},{"id":"d7d3767b.56f47","type":"e-mail","z":"dfd69853.2c6458","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"wa9wud@gmail.com","dname":"","x":1077,"y":138,"wires":[]},{"id":"a9aa48f7.470a18","type":"change","z":"dfd69853.2c6458","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"RPi Failure","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Satellite Board RPi Failure","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1084,"y":380,"wires":[["a9d873cc.0d28f"]]},{"id":"a9d873cc.0d28f","type":"link out","z":"dfd69853.2c6458","name":"Sat  RPi Board Fail","links":["efe17435.004f7"],"x":1219,"y":385,"wires":[]},{"id":"efe17435.004f7","type":"link in","z":"dfd69853.2c6458","name":"Send RPI Mail","links":["554c02c4.707c8c","a9d873cc.0d28f"],"x":823,"y":125,"wires":[["d7d3767b.56f47"]]},{"id":"902c4b3f.768f28","type":"inject","z":"dfd69853.2c6458","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":798,"y":499,"wires":[["a9aa48f7.470a18"]]},{"id":"935f69f9.a46fe","type":"rbe","z":"dfd69853.2c6458","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":892,"y":385,"wires":[["a9aa48f7.470a18"]]},{"id":"8dc53cce.7e2b7","type":"ui_group","z":"","name":"Pi Ping","tab":"9eea655f.d6a268","order":5,"disp":true,"width":"6","collapse":false},{"id":"9eea655f.d6a268","type":"ui_tab","z":"","name":"RPi Info","icon":"dashboard","order":6,"disabled":false,"hidden":false}]

  • Stephan Kregel
    Stephan Kregel Member
    edited April 2020
    Options
    Hello, can anyone help me with the interface between 4992 and 4991 and Node-Red? I have already been able to implement individual values according to the specifications here in the forum. I would like to be able to see whether the Flex has been connected and which client is currently accessing it. Current voltage, PATemp, SWR, RFPower should also be displayed.
    Since the Flex can only be reached remotely and there is a RaspberryPi already in use for controlling the power supply and antenna switch, I wanted to expand this node.
    Everything works via FRStack and the corresponding RadioStream - but I don't have a Windows PC at the remote location.

    I would be happy about new ideas. Stay healthy.
    73 de Stephan
    DG1HXJ
  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    Stephan.    Here is the flow to get the 4992 broadcasts.

    Alan

    [{"id":"c1b2ea43.a27758","type":"tab","label":"VITA 49","disabled":false,"info":"[
       {
           ""id"": ""d57b9411.1021b8"",
           ""type"": ""tab"",
           ""label"": ""Vita49"",
           ""disabled"": true,
           ""info"": """"
       },
       {
           ""id"": ""5a3b2151.55e69"",
           ""type"": ""udp in"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": """",
           ""iface"": """",
           ""port"": ""4992"",
           ""ipv"": ""udp4"",
           ""multicast"": ""false"",
           ""group"": """",
           ""datatype"": ""utf8"",
           ""x"": 229,
           ""y"": 274,
           ""wires"": [
               [
                   ""fa1aa25b.c8587"",
                   ""970d0b1d.bd16a8""
               ]
           ]
       },
       {
           ""id"": ""8dc0d160.314d5"",
           ""type"": ""switch"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": """",
           ""property"": ""payload"",
           ""propertyType"": ""msg"",
           ""rules"": [
               {
                   ""t"": ""regex"",
                   ""v"": ""^model="",
                   ""vt"": ""str"",
                   ""case"": false
               }
           ],
           ""checkall"": ""true"",
           ""repair"": false,
           ""outputs"": 1,
           ""x"": 543,
           ""y"": 278,
           ""wires"": [
               [
                   ""957b81c7.e5a2d""
               ]
           ]
       },
       {
           ""id"": ""fa1aa25b.c8587"",
           ""type"": ""split"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": """",
           ""splt"": "" "",
           ""spltType"": ""str"",
           ""arraySplt"": 1,
           ""arraySpltType"": ""len"",
           ""stream"": false,
           ""addname"": """",
           ""x"": 387,
           ""y"": 276,
           ""wires"": [
               [
                   ""8dc0d160.314d5"",
                   ""bcfe457d.549f28"",
                   ""c7172d37.396f7"",
                   ""48d66a17.51c914""
               ]
           ]
       },
       {
           ""id"": ""8cdc97f6.80e1a8"",
           ""type"": ""ui_text"",
           ""z"": ""d57b9411.1021b8"",
           ""group"": ""43b5a859.82e898"",
           ""order"": 6,
           ""width"": 0,
           ""height"": 0,
           ""name"": ""Vita49"",
           ""label"": """",
           ""format"": ""{{msg.payload}}"",
           ""layout"": ""col-center"",
           ""x"": 913,
           ""y"": 284,
           ""wires"": []
       },
       {
           ""id"": ""957b81c7.e5a2d"",
           ""type"": ""function"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": ""ParseModel"",
           ""func"": ""\nmsg.payload= msg.payload.split('-')[1];\n\nflow.set(\""Model\"",msg.payload);\n\n\n\nreturn msg;"",
           ""outputs"": 1,
           ""noerr"": 0,
           ""x"": 714,
           ""y"": 283,
           ""wires"": [
               [
                   ""8cdc97f6.80e1a8""
               ]
           ]
       },
       {
           ""id"": ""970d0b1d.bd16a8"",
           ""type"": ""debug"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": """",
           ""active"": false,
           ""tosidebar"": true,
           ""console"": false,
           ""tostatus"": false,
           ""complete"": ""false"",
           ""x"": 616,
           ""y"": 137,
           ""wires"": []
       },
       {
           ""id"": ""bcfe457d.549f28"",
           ""type"": ""switch"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": """",
           ""property"": ""payload"",
           ""propertyType"": ""msg"",
           ""rules"": [
               {
                   ""t"": ""regex"",
                   ""v"": ""^callsign="",
                   ""vt"": ""str"",
                   ""case"": false
               }
           ],
           ""checkall"": ""true"",
           ""repair"": false,
           ""outputs"": 1,
           ""x"": 535,
           ""y"": 361,
           ""wires"": [
               [
                   ""cc13a1cf.f5e15""
               ]
           ]
       },
       {
           ""id"": ""cc13a1cf.f5e15"",
           ""type"": ""function"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": ""ParseCallSign"",
           ""func"": ""\nmsg.payload= msg.payload.split('=')[1];\n\nflow.set(\""Callsign\"",msg.payload);\n\n\n\nreturn msg;"",
           ""outputs"": 1,
           ""noerr"": 0,
           ""x"": 736,
           ""y"": 362,
           ""wires"": [
               [
                   ""9084e1c1.41f58""
               ]
           ]
       },
       {
           ""id"": ""9084e1c1.41f58"",
           ""type"": ""ui_text"",
           ""z"": ""d57b9411.1021b8"",
           ""group"": ""43b5a859.82e898"",
           ""order"": 6,
           ""width"": 0,
           ""height"": 0,
           ""name"": ""Vita49"",
           ""label"": """",
           ""format"": ""{{msg.payload}}"",
           ""layout"": ""col-center"",
           ""x"": 917,
           ""y"": 360,
           ""wires"": []
       },
       {
           ""id"": ""c7172d37.396f7"",
           ""type"": ""switch"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": """",
           ""property"": ""payload"",
           ""propertyType"": ""msg"",
           ""rules"": [
               {
                   ""t"": ""regex"",
                   ""v"": ""^inuse_ip="",
                   ""vt"": ""str"",
                   ""case"": false
               }
           ],
           ""checkall"": ""true"",
           ""repair"": false,
           ""outputs"": 1,
           ""x"": 527,
           ""y"": 434,
           ""wires"": [
               [
                   ""cfb17f30.757ef""
               ]
           ]
       },
       {
           ""id"": ""cfb17f30.757ef"",
           ""type"": ""function"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": ""ParseIP"",
           ""func"": ""\nmsg.payload= msg.payload.split(',')[1];\n\nflow.set(\""IPadd\"",msg.payload);\n\n\n\nreturn msg;"",
           ""outputs"": 1,
           ""noerr"": 0,
           ""x"": 708,
           ""y"": 435,
           ""wires"": [
               [
                   ""8c2a7b09.8c3058""
               ]
           ]
       },
       {
           ""id"": ""8c2a7b09.8c3058"",
           ""type"": ""ui_text"",
           ""z"": ""d57b9411.1021b8"",
           ""group"": ""43b5a859.82e898"",
           ""order"": 6,
           ""width"": 0,
           ""height"": 0,
           ""name"": ""Vita49"",
           ""label"": """",
           ""format"": ""{{msg.payload}}"",
           ""layout"": ""col-center"",
           ""x"": 909,
           ""y"": 433,
           ""wires"": []
       },
       {
           ""id"": ""48d66a17.51c914"",
           ""type"": ""switch"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": """",
           ""property"": ""payload"",
           ""propertyType"": ""msg"",
           ""rules"": [
               {
                   ""t"": ""regex"",
                   ""v"": ""^gui_client_stations="",
                   ""vt"": ""str"",
                   ""case"": false
               }
           ],
           ""checkall"": ""true"",
           ""repair"": false,
           ""outputs"": 1,
           ""x"": 551,
           ""y"": 513,
           ""wires"": [
               [
                   ""fa6cc07d.26f95""
               ]
           ]
       },
       {
           ""id"": ""fa6cc07d.26f95"",
           ""type"": ""function"",
           ""z"": ""d57b9411.1021b8"",
           ""name"": ""ParseClients"",
           ""func"": ""\nmsg.payload= msg.payload.split('=')[1];\n\nflow.set(\""Clients\"",msg.payload);\n\n\n\nreturn msg;"",
           ""outputs"": 1,
           ""noerr"": 0,
           ""x"": 699,
           ""y"": 511,
           ""wires"": [
               [
                   ""674509e2.b62b18""
               ]
           ]
       },
       {
           ""id"": ""674509e2.b62b18"",
           ""type"": ""ui_text"",
           ""z"": ""d57b9411.1021b8"",
           ""group"": ""43b5a859.82e898"",
           ""order"": 6,
           ""width"": 0,
           ""height"": 0,
           ""name"": ""Vita49"",
           ""label"": """",
           ""format"": ""{{msg.payload}}"",
           ""layout"": ""col-center"",
           ""x"": 890,
           ""y"": 509,
           ""wires"": []
       },
       {
           ""id"": ""43b5a859.82e898"",
           ""type"": ""ui_group"",
           ""z"": """",
           ""name"": ""6600 Status"",
           ""tab"": ""3459151d.04344a"",
           ""disp"": true,
           ""width"": ""6"",
           ""collapse"": false
       },
       {
           ""id"": ""3459151d.04344a"",
           ""type"": ""ui_tab"",
           ""z"": """",
           ""name"": ""WO2X Shack Control"",
           ""icon"": ""dashboard"",
           ""order"": 1,
           ""disabled"": false,
           ""hidden"": false
       }
    ]"},{"id":"6186a5f7.ca58dc","type":"ui_text","z":"c1b2ea43.a27758","group":"fad4ed94.c508d","order":8,"width":0,"height":0,"name":"Client Name","label":"Client Names","format":"{{msg.payload}}","layout":"row-spread","x":750,"y":280,"wires":[]},{"id":"23983a46.8f5336","type":"function","z":"c1b2ea43.a27758","name":"ParseClients","func":"
    msg.payload= msg.payload.split('=')[1];

    flow.set(""Clients"",msg.payload);



    return msg;","outputs":1,"noerr":0,"x":570,"y":280,"wires":[["6186a5f7.ca58dc"]]},{"id":"24f64ece.aceaa2","type":"switch","z":"c1b2ea43.a27758","name":"","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^gui_client_stations=","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":280,"wires":[["23983a46.8f5336"]]},{"id":"5ed736b4.13abc8","type":"split","z":"c1b2ea43.a27758","name":"6600 Data","splt":" ","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":250,"y":100,"wires":[["f97066a.eaab898","ac1fe78c.bf91a8","24f64ece.aceaa2","452737ce.19e848","5ac2a3d5.d35aac"]]},{"id":"65bd0c3f.d2d574","type":"udp in","z":"c1b2ea43.a27758","name":"Flex VITA 49","iface":"","port":"4992","ipv":"udp4","multicast":"false","group":"","datatype":"utf8","x":70,"y":100,"wires":[["5ed736b4.13abc8","59d3d4d1.74f574"]]},{"id":"f97066a.eaab898","type":"switch","z":"c1b2ea43.a27758","name":"","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^model=","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":100,"wires":[["f3f96e35.8f9c8"]]},{"id":"ac1fe78c.bf91a8","type":"switch","z":"c1b2ea43.a27758","name":"","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^callsign=","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":160,"wires":[["fb7b889b.4f98d8"]]},{"id":"452737ce.19e848","type":"switch","z":"c1b2ea43.a27758","name":"inuse_ip=","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^inuse_ip=","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":1,"x":420,"y":220,"wires":[["a186a752.670458"]]},{"id":"f3f96e35.8f9c8","type":"function","z":"c1b2ea43.a27758","name":"ParseModel","func":"
    msg.payload= msg.payload.split('-')[1];

    flow.set(""Model"",msg.payload);



    return msg;","outputs":1,"noerr":0,"x":570,"y":100,"wires":[["4de0be2e.ed98a"]]},{"id":"fb7b889b.4f98d8","type":"function","z":"c1b2ea43.a27758","name":"ParseCallSign","func":"
    msg.payload= msg.payload.split('=')[1];

    flow.set(""Callsign"",msg.payload);



    return msg;","outputs":1,"noerr":0,"x":580,"y":160,"wires":[["b64e56b4.9a2578"]]},{"id":"a186a752.670458","type":"function","z":"c1b2ea43.a27758","name":"ParseIP","func":"
    msg.payload= msg.payload.split('=')[1];

    flow.set(""InUseIp"",msg.payload);



    return msg;","outputs":1,"noerr":0,"x":560,"y":220,"wires":[["9a2d42c3.6d82"]]},{"id":"4de0be2e.ed98a","type":"ui_text","z":"c1b2ea43.a27758","group":"fad4ed94.c508d","order":7,"width":0,"height":0,"name":"Model","label":"Radio Model","format":"Flex Radio  {{msg.payload}}","layout":"row-spread","x":730,"y":100,"wires":[]},{"id":"b64e56b4.9a2578","type":"ui_text","z":"c1b2ea43.a27758","group":"fad4ed94.c508d","order":10,"width":0,"height":0,"name":"Radio Name","label":"Radio Name","format":"{{msg.payload}}","layout":"row-spread","x":750,"y":160,"wires":[]},{"id":"9a2d42c3.6d82","type":"ui_text","z":"c1b2ea43.a27758","group":"fad4ed94.c508d","order":9,"width":0,"height":0,"name":"Client IP","label":"Client IP's","format":"{{msg.payload}}","layout":"row-spread","x":740,"y":220,"wires":[]},{"id":"5ac2a3d5.d35aac","type":"debug","z":"c1b2ea43.a27758","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":422,"y":32,"wires":[]},{"id":"59d3d4d1.74f574","type":"debug","z":"c1b2ea43.a27758","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":633,"y":596,"wires":[]},{"id":"fad4ed94.c508d","type":"ui_group","z":"","name":"Radio Info","tab":"60c7eab7.e319e4","order":2,"disp":true,"width":"6","collapse":false},{"id":"60c7eab7.e319e4","type":"ui_tab","z":"","name":"Flex 6600","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    And....for the Flex meter data, Flex includes the actual data embedded within the VITA49 CODEC.   Decoding this CODEC is beyond my Node-Red abilities.

    Mark of FRStack came to the rescue.  On the FRStack Options page, you can set up UDP broadcasts of the  Flex meter data.   Here is a flow I made for using the FRStack UDP Meter data, within Node-Red.

    Alan
    WA9WUD

    [{"id":"75467659.1d9028","type":"tab","label":"FR STack UDP Data","disabled":false,"info":""},{"id":"2f675157.d87f2e","type":"udp in","z":"75467659.1d9028","name":"FRStack Radio Data","iface":"","port":"12073","ipv":"udp4","multicast":"false","group":"","datatype":"utf8","x":115,"y":298,"wires":[["4509879e.0fef","95fe39b2.68a29"]]},{"id":"4509879e.0fef","type":"xml","z":"75467659.1d9028","name":"","property":"payload","attr":"","chr":"","x":324,"y":98,"wires":[["8c7dad91.1d6828","2ce82ec4.a51462"]]},{"id":"8c7dad91.1d6828","type":"debug","z":"75467659.1d9028","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"jsonata","x":560,"y":40,"wires":[]},{"id":"968a7d15.13dad","type":"udp in","z":"75467659.1d9028","name":"FRStack Meter Data","iface":"","port":"13000","ipv":"udp4","multicast":"false","group":"","datatype":"utf8","x":123,"y":410,"wires":[["ccb0ff15.e27bf","677ae4c7.73190c"]]},{"id":"95fe39b2.68a29","type":"debug","z":"75467659.1d9028","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":368,"y":297,"wires":[]},{"id":"ccb0ff15.e27bf","type":"json","z":"75467659.1d9028","name":"","property":"payload","action":"","pretty":false,"x":221,"y":1069,"wires":[["592adb9d.f0d374","6454e486.37fe6c","af68ff1d.a25c88","e6cb4908.3f4828","367b5223.b7f286","2dc2a413.a04e2c"]]},{"id":"592adb9d.f0d374","type":"debug","z":"75467659.1d9028","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":535,"y":495,"wires":[]},{"id":"6454e486.37fe6c","type":"change","z":"75467659.1d9028","name":"PA Temp","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.meters.PATEMPC","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":496,"y":711,"wires":[["5b71cc45.761544"]]},{"id":"af68ff1d.a25c88","type":"change","z":"75467659.1d9028","name":"Flex PA Voltage","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.meters[""+13.8A""]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":467,"y":1150,"wires":[["8642ac41.0f827","8f97ff13.a55c68","f3061743.6cacb8"]]},{"id":"8f1d3658.c11ac8","type":"debug","z":"75467659.1d9028","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":892,"y":1188,"wires":[]},{"id":"e4443ce1.22675","type":"influxdb out","z":"75467659.1d9028","influxdb":"b5efa8f3.874f78","name":"","measurement":"Flex_PA_Volts","precision":"","retentionPolicy":"","x":997,"y":1323,"wires":[]},{"id":"8642ac41.0f827","type":"function","z":"75467659.1d9028","name":"String to Number","func":"var c = msg.payload;
    var f;
    f = (c*1);
    msg.payload = f;
    return msg;","outputs":1,"noerr":0,"x":707,"y":1243,"wires":[["8f1d3658.c11ac8","e4443ce1.22675","b9fe596f.c675d8"]]},{"id":"c17dfb59.e5c838","type":"debug","z":"75467659.1d9028","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":971,"y":906,"wires":[]},{"id":"8c507e44.4c432","type":"influxdb out","z":"75467659.1d9028","influxdb":"b5efa8f3.874f78","name":"","measurement":"Flex_PA_Temp","precision":"","retentionPolicy":"","x":1084,"y":979,"wires":[]},{"id":"5e730e1.83c32f","type":"function","z":"75467659.1d9028","name":"String to Number","func":"var c = msg.payload;
    var f;
    f = (c*1);
    msg.payload = f;
    return msg;","outputs":1,"noerr":0,"x":687,"y":871,"wires":[["c17dfb59.e5c838","8c507e44.4c432","a5e8061b.0eac98"]]},{"id":"5b71cc45.761544","type":"function","z":"75467659.1d9028","name":"function","func":"

       //Take msg.payload of the temp celcus and save it to a var
       var tempc = msg.payload;

       //Convert temp celcus to Fahrenheit
       var tempf = tempc * 9/5 + 32;

       //round the number to get rid of all them decimals
       tempf = Math.round(tempf * 10000) / 10000;

       //set msg.payload to Fahrenheit
       msg.payload = tempf;

       //send it!!!!!!!
       return msg;
    ","outputs":1,"noerr":0,"x":808,"y":697,"wires":[["4c47631d.3f2834","5e730e1.83c32f","c9889cf2.87186","b0580c64.89644"]]},{"id":"e6cb4908.3f4828","type":"change","z":"75467659.1d9028","name":"Flex FWD Power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.meters.FWDPWR","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":473,"y":1456,"wires":[["766c8f5d.28d1c8","c08d9177.6332b"]]},{"id":"367b5223.b7f286","type":"change","z":"75467659.1d9028","name":"Flex REV Power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.meters.REVPWR","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":472,"y":1586,"wires":[["94ef17a9.5ba5d","a7f96da0.a021"]]},{"id":"2dc2a413.a04e2c","type":"change","z":"75467659.1d9028","name":"Flex SWR","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.meters.SWR","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":444,"y":1718,"wires":[["84e594d0.11644","ab037df1.a07a8"]]},{"id":"677ae4c7.73190c","type":"debug","z":"75467659.1d9028","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":368,"y":407,"wires":[]},{"id":"c9889cf2.87186","type":"mqtt out","z":"75467659.1d9028","name":"Flex_PA_Temp","topic":"Flex PA Temp","qos":"","retain":"","broker":"1e127ffc.3be278","x":1142,"y":765,"wires":[]},{"id":"f3061743.6cacb8","type":"mqtt out","z":"75467659.1d9028","name":"Flex PA Volts","topic":"Flex_PA_Volts","qos":"","retain":"","broker":"1e127ffc.3be278","x":1178,"y":1137,"wires":[]},{"id":"c08d9177.6332b","type":"mqtt out","z":"75467659.1d9028","name":"Flex Power","topic":"Flex_Power","qos":"","retain":"","broker":"1e127ffc.3be278","x":1153,"y":1497,"wires":[]},{"id":"a7f96da0.a021","type":"mqtt out","z":"75467659.1d9028","name":"Flex Reverse Power","topic":"Flex_REV_Power","qos":"","retain":"","broker":"1e127ffc.3be278","x":1160,"y":1631,"wires":[]},{"id":"ab037df1.a07a8","type":"mqtt out","z":"75467659.1d9028","name":"Flex SWR","topic":"Flex_SWR","qos":"","retain":"","broker":"1e127ffc.3be278","x":1127,"y":1765,"wires":[]},{"id":"8f97ff13.a55c68","type":"ui_level","z":"75467659.1d9028","group":"485a61b3.73f5a8","order":1,"width":0,"height":0,"name":"Volts","label":"PA Volts","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":"15","segWarn":"","segHigh":"","unit":"V","layout":"sh","channelA":"","channelB":"","decimals":"1","animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"off","peakmode":false,"peaktime":3000,"x":1159,"y":1070,"wires":[]},{"id":"4c47631d.3f2834","type":"ui_level","z":"75467659.1d9028","group":"485a61b3.73f5a8","order":1,"width":0,"height":0,"name":"PA Temp","label":"PA Temp","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":"150","segWarn":"100","segHigh":"120","unit":"F","layout":"sh","channelA":"","channelB":"","decimals":"1","animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"off","peakmode":false,"peaktime":3000,"x":1116,"y":690,"wires":[]},{"id":"766c8f5d.28d1c8","type":"ui_level","z":"75467659.1d9028","group":"485a61b3.73f5a8","order":1,"width":0,"height":0,"name":"Forward Power","label":"Forward Power","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":"100","segWarn":"","segHigh":"","unit":"W","layout":"sh","channelA":"","channelB":"","decimals":"1","animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"off","peakmode":false,"peaktime":3000,"x":1148,"y":1447,"wires":[]},{"id":"94ef17a9.5ba5d","type":"ui_level","z":"75467659.1d9028","group":"485a61b3.73f5a8","order":1,"width":0,"height":0,"name":"Reverse Power","label":"Reverse Power","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":"25","segWarn":"","segHigh":"","unit":"W","layout":"sh","channelA":"","channelB":"","decimals":"1","animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"off","peakmode":false,"peaktime":3000,"x":1141,"y":1580,"wires":[]},{"id":"84e594d0.11644","type":"ui_level","z":"75467659.1d9028","group":"485a61b3.73f5a8","order":1,"width":0,"height":0,"name":"SWR","label":"SWR","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":"15","segWarn":"","segHigh":"","unit":"","layout":"sh","channelA":"","channelB":"","decimals":"1","animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"off","peakmode":false,"peaktime":3000,"x":1109,"y":1708,"wires":[]},{"id":"2ce82ec4.a51462","type":"change","z":"75467659.1d9028","name":"Radio 3","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.RadioInfo.RadioNr[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":140,"wires":[["1a298f17.d93441","a28ab73b.d6828"]]},{"id":"67435e62.f7c75","type":"debug","z":"75467659.1d9028","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":950,"y":80,"wires":[]},{"id":"b9fe596f.c675d8","type":"influxdb out","z":"75467659.1d9028","influxdb":"a7b3266f.4fde58","name":"","measurement":"Flex_PA_Volts","precision":"s","retentionPolicy":"","x":1000,"y":1380,"wires":[]},{"id":"a5e8061b.0eac98","type":"influxdb out","z":"75467659.1d9028","influxdb":"a7b3266f.4fde58","name":"","measurement":"Flex_PA_Temp","precision":"s","retentionPolicy":"","x":1080,"y":1020,"wires":[]},{"id":"b0580c64.89644","type":"debug","z":"75467659.1d9028","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1060,"y":640,"wires":[]},{"id":"1a298f17.d93441","type":"change","z":"75467659.1d9028","name":"Radio 3","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.RadioInfo.Freq[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":100,"wires":[["67435e62.f7c75"]]},{"id":"a28ab73b.d6828","type":"debug","z":"75467659.1d9028","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":200,"wires":[]},{"id":"b5efa8f3.874f78","type":"influxdb","z":"","hostname":"192.168.50.137","port":"8086","protocol":"http","database":"alan","name":"","usetls":false,"tls":"29143eee.ae7202"},{"id":"1e127ffc.3be278","type":"mqtt-broker","z":"","name":"","broker":"192.168.50.137","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"485a61b3.73f5a8","type":"ui_group","z":"","name":"Meters","tab":"98776d43.fc5c58","order":1,"disp":true,"width":"6","collapse":false},{"id":"a7b3266f.4fde58","type":"influxdb","z":"","hostname":"192.168.50.143","port":"8086","protocol":"http","database":"alan","name":"","usetls":false,"tls":""},{"id":"29143eee.ae7202","type":"tls-config","z":"","name":"local-tls","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","verifyservercert":false},{"id":"98776d43.fc5c58","type":"ui_tab","z":"","name":"Flex","icon":"dashboard","order":7,"disabled":false,"hidden":false}]
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited April 2020
    Options
    Alan

    Thanks for both of this and the reminder about FRStack broadcasts.  I see an upgrade to my Dashboard coming.

    73
  • Stephan Kregel
    Stephan Kregel Member
    edited April 2020
    Options
    Hi Alan, thanks for the flows. It seems as if I have to operate FRStack directly at the remote location in order to realize all my wishes. The processed FRStack stream is very, very good.

    Thanks for the quick help.
    73 de Stephan
    DG1HXJ


  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    Stephan

    Yes, you must run FRStack local to the Flex Server.   But, as you probably know, you can open a port thru the firewall to the Node-Red Raspberry Pi and access the data outside your LAN.

    I bought this little Windows machine for running apps necessary for off-site remote operation.   Of course, you cannot run Flex SDR on it, but it works very nicely for the third-party apps which need to be on the same LAN as the Flex Server.   This allows my desktop computer to remain "behind the firewall". 

    https://www.amazon.com/gp/product/B07MNLRJK9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

    I have also opened up certain ports through the firewall to this little Windows 10 machine allowing me to access several apps that have server/client options but where the server-side must be on the LAN or have physical RS232 connections.  One example is PST-Rotor.   This allows me to run PST rotor remote, when away from home.  

    I use Team Viewer to access the " Headless" little Machine.  Also, allows starting up necessary apps when not home.


    Alan
    WA9WUD
  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    Hi Mike:

    Could you send me a copy of your SteppIR Node-Red Flow?

    I am preparing to install a Stepp IR Vertical.....in preparation for that PG-XL.

    My e-mail is:    a.alan.blind@gmai.com

    Alan
    WA9WUD
  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    Hi Mike:

    Could you send me a copy of your SteppIR Node-Red Flow?

    I am preparing to install a Stepp IR Vertical.....in preparation for that PG-XL.

    My e-mail is:    a.alan.blind@gmai.com

    Alan
    WA9WUD
  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    Hi Mike:

    Could you send me a copy of your SteppIR Node-Red Flow?

    I am preparing to install a Stepp IR Vertical.....in preparation for that PG-XL.

    My e-mail is:    a.alan.blind@gmail.com

    Alan
    WA9WUD
  • Neal Pollack, N6YFM
    Neal Pollack, N6YFM Member ✭✭
    edited April 2020
    Options
    Hi Guys:

    After getting my station remote power control setup going using the DLI Web Power Switch Pro, I decided to next work on the rotor.   I purchased an ERC-M rotor kit to convert my old Yaesu G450a into a remote controllable rotor.  That was easy enough.  Then, I extended the thing over the LAN and tried the rotor program that came with it.   Works fine, but boring program.   Next, I downloaded PSTrotator that a bunch of you mentioned here, and tried the free demo.  I read that PSTrotator can send and receive UDP network commands to control the rotor and read the position.    David **** shared his flow for that, and in 15 minutes, I could see how to configure it, move buttons around and change values for my location and desired compass points.  I like it!

    QUESTION:   The Node Red compass-guage that shows the azimuth numbers and pointer, has a readable font for the azimuth numbers, but the font that says "Degrees" is so small you would need a jewelers loop or microscope to read it, and I do NOT even have a 4K display yet :-)     Has anyone on this forum thread figured out where Node Red lets you set the font and font size for a label like the "Degrees" on that compass widget?

    Thanks & 73,

    Neal
    N6YFM

  • Alan
    Alan Member ✭✭✭✭
    edited April 2020
    Options
    Neal;

    Regarding font size.   Add your desired font information formated like this;    <font size = 10px color = red>   in front of the label text.   Here is a screenshot of an example where I adjusted the font for the "Value".   You can do the same for "Label", or any other text you want to modify.



    Alan
    WA9WUD
  • Neal Pollack, N6YFM
    Neal Pollack, N6YFM Member ✭✭
    edited April 2020
    Options
    Hi Michael Walker:

    I noticed from your earlier post of your UI, months ago, that you also have a rotor control GUI.
    Alan was kind enough to share his, and I modified it for my needs.
    But your GUI looks to also have the manual CW and CCW switches on it, I assume
    for manual use to steer the rotor where you want it?    Can you share your flow so I can
    see what you are doing differently than Alan?   

    Cheers,

    Neal
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited April 2020
    Options
    Hi Neal

    Here it is so paste it into a new flow.  I think it is just 2 entry fields.  

    For those looking at this, it is only 1/2 the rotor control.  

    It requires MQTT as well.

    What we need now is someone to come up with a new 360 display.  Maybe bigger.  That part is well beyond my programming ability.  :)

    Mike va3mw


    [{"id":"7f1fb2f4.a12d3c","type":"tab","label":"Rotator Display","disabled":false,"info":""},{"id":"e03486bc.be8318","type":"ui_button","z":"7f1fb2f4.a12d3c","name":"","group":"9e7dbc36.1a2a4","order":3,"width":"2","height":"1","passthru":false,"label":"EU - 50","tooltip":"","color":"","bgcolor":"","icon":"","payload":"50","payloadType":"num","topic":"","x":226,"y":198,"wires":[["b8e7571.2fd91a8","dbece460.d0d7f8","22a3f1e6.5f6dee"]]},{"id":"b8e7571.2fd91a8","type":"mqtt out","z":"7f1fb2f4.a12d3c","name":"","topic":"Rotator1cmd","qos":"","retain":"","broker":"201e7171.0af3ee","x":575,"y":198,"wires":[]},{"id":"dbece460.d0d7f8","type":"ui_text_input","z":"7f1fb2f4.a12d3c","name":"","label":"HDG","tooltip":"","group":"9e7dbc36.1a2a4","order":10,"width":"4","height":"2","passthru":false,"mode":"text","delay":"0","topic":"","x":236,"y":418,"wires":[["22a3f1e6.5f6dee","b8e7571.2fd91a8"]]},{"id":"22a3f1e6.5f6dee","type":"ui_numeric","z":"7f1fb2f4.a12d3c","name":"","label":"HDG","tooltip":"","group":"9e7dbc36.1a2a4","order":9,"width":"4","height":"1","passthru":false,"topic":"","format":"{{value}}","min":0,"max":"360","step":"5","x":235,"y":475,"wires":[["b8e7571.2fd91a8","dbece460.d0d7f8","a179f201.fc6c1"]]},{"id":"74c4771b.a177e8","type":"ui_button","z":"7f1fb2f4.a12d3c","name":"","group":"9e7dbc36.1a2a4","order":7,"width":"2","height":"1","passthru":false,"label":"JA - 330","tooltip":"","color":"","bgcolor":"","icon":"","payload":"330","payloadType":"num","topic":"","x":226,"y":278,"wires":[["b8e7571.2fd91a8","dbece460.d0d7f8","22a3f1e6.5f6dee"]]},{"id":"a04f41ec.b1893","type":"ui_button","z":"7f1fb2f4.a12d3c","name":"","group":"9e7dbc36.1a2a4","order":4,"width":"2","height":"1","passthru":false,"label":"SA - 150","tooltip":"","color":"","bgcolor":"","icon":"","payload":"150","payloadType":"num","topic":"","x":226,"y":318,"wires":[["b8e7571.2fd91a8","dbece460.d0d7f8","22a3f1e6.5f6dee"]]},{"id":"deff2015.09f9f","type":"ui_button","z":"7f1fb2f4.a12d3c","name":"","group":"9e7dbc36.1a2a4","order":5,"width":"2","height":"1","passthru":false,"label":"US -  200","tooltip":"","color":"","bgcolor":"","icon":"","payload":"200","payloadType":"num","topic":"","x":226,"y":238,"wires":[["b8e7571.2fd91a8","dbece460.d0d7f8","22a3f1e6.5f6dee"]]},{"id":"88460fee.645ce","type":"ui_button","z":"7f1fb2f4.a12d3c","name":"","group":"9e7dbc36.1a2a4","order":6,"width":"2","height":"1","passthru":false,"label":"VK - 300","tooltip":"","color":"","bgcolor":"","icon":"","payload":"300","payloadType":"num","topic":"","x":236,"y":364,"wires":[["b8e7571.2fd91a8","dbece460.d0d7f8","22a3f1e6.5f6dee"]]},{"id":"e334896b.37e748","type":"ui_button","z":"7f1fb2f4.a12d3c","name":"","group":"9e7dbc36.1a2a4","order":8,"width":"2","height":"1","passthru":false,"label":"STOP!","tooltip":"","color":"","bgcolor":"","icon":"","payload":"stop","payloadType":"str","topic":"","x":231,"y":578,"wires":[["b8e7571.2fd91a8"]]},{"id":"d9357f64.b6634","type":"mqtt in","z":"7f1fb2f4.a12d3c","name":"","topic":"Rotator1","qos":"2","datatype":"auto","broker":"201e7171.0af3ee","x":222.5,"y":135.1500015258789,"wires":[["3c4de0b0.02f45"]]},{"id":"b2e70b12.1ad948","type":"ui_gauge","z":"7f1fb2f4.a12d3c","name":"Compass","group":"9e7dbc36.1a2a4","order":2,"width":"4","height":"3","gtype":"compass","title":"Heading","label":"Deg","format":"{{value}}","min":0,"max":"360","colors":["#00b500","#f5eb00","#ca3838"],"seg1":"1500","seg2":"1700","x":754,"y":132,"wires":[]},{"id":"3c4de0b0.02f45","type":"rbe","z":"7f1fb2f4.a12d3c","name":"","func":"deadband","gap":"3%","start":"","inout":"out","property":"payload","x":552.5,"y":129,"wires":[["b2e70b12.1ad948","a73ee92e.f9b408","dfb3785b.413f68"]]},{"id":"a73ee92e.f9b408","type":"google_chart-gauge","z":"7f1fb2f4.a12d3c","name":"rotator","label":"","class":"","parent":"","width":"100%","height":"","topic":"","min":0,"max":"360","majorTicks":"45","minorTicks":"5","greenFrom":"","greenTo":"","greenColor":"#109618","yellowFrom":"","yellowTo":"","yellowColor":"#ff9900","redFrom":"","redTo":"","redColor":"#dc3912","x":760,"y":214,"wires":[]},{"id":"dfb3785b.413f68","type":"google_chart-gauge","z":"7f1fb2f4.a12d3c","name":"","label":"","class":"","parent":"","width":"100%","height":"","topic":"","min":0,"max":100,"majorTicks":"","minorTicks":2,"greenFrom":"","greenTo":"","greenColor":"#109618","yellowFrom":"","yellowTo":"","yellowColor":"#ff9900","redFrom":"","redTo":"","redColor":"#dc3912","x":776,"y":305,"wires":[]},{"id":"c9b8778c.537908","type":"inject","z":"7f1fb2f4.a12d3c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":80,"y":200,"wires":[["e03486bc.be8318"]]},{"id":"a179f201.fc6c1","type":"debug","z":"7f1fb2f4.a12d3c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":820,"y":360,"wires":[]},{"id":"9e7dbc36.1a2a4","type":"ui_group","z":"","name":"Rotator","tab":"d6ba9a2a.f3f0d8","order":3,"disp":true,"width":"4","collapse":true},{"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":"d6ba9a2a.f3f0d8","type":"ui_tab","z":"","name":"VA3MW Shack Control","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
  • Neal Pollack, N6YFM
    Neal Pollack, N6YFM Member ✭✭
    edited April 2020
    Options
    Hi Mike:
    Thanks.  But what is node "Google_Chart-Gauge"?  It does not show up inside Node Red palette install search.

    Cheers,

    Neal

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited April 2020
    Options
    Hi Neal

    I guess I could have written that better.

     Where do I reference that and I will try to find the pallette.  

    I think it is the Chart that is part of the  Dashboard.

    Mike
  • Neal Pollack, N6YFM
    Neal Pollack, N6YFM Member ✭✭
    edited May 2020
    Options
    Hi Team:

    After Alan taught me how to make a two-color button that changes text and background color when you turn it on and off, I figured I should next learn a little more, and take it farther.  I am going to post this example code/flow, because I am sure it can be improved or condensed.  But it works great.

    I wanted two improvements in the push button;

    1.  Only change the background color to OFF/Blue or ON/Red if the remote relay device actually 
         said it received the command.

    2.  Provide feedback that the button was actually clicked with the mouse, and perhaps stay that
         way on an error condition.

    So I modified Alan's button template to make the initial (SETUP), and also clicked state be Orange color.
    If the remote HTTP relay antenna switch receives the command, it replies with a HTTP status code
    of 200, OK.   I use that success code to then change the button color to ON/Red or OFF/Blue.  [Why do I choose Red and Blue?  Because Red and Green is the most error
    prone choice posssible.   Half of the equipment we have uses a green power-on light, and
    the other half uses a red power-on light.   Is it on or off?   Is it high or low?
    Node Red gauges even use Green towards the bottom and Red towards the top.  But
    then a green light means power on???      In my choice, it is a little more obvious that Red
    means HOT, ON, and Blue means sleeping/off/cold.]

    So, click the button, it turns Orange for half a second, then red or blue based on the command sent.
    It the remote end is failed, or the network fails, the button will simply stay Orange, alerting you to a problem to investigate.    I hope this is a useful improvement to someone.



    Here is the flow for this;

    [
        {
            "id": "93ea5bd6.288a38",
            "type": "tab",
            "label": "ANT SWITCH",
            "disabled": false,
            "info": ""
        },
        {
            "id": "d918f4c3.efe138",
            "type": "http request",
            "z": "93ea5bd6.288a38",
            "name": "ANT2-off",
            "method": "GET",
            "ret": "txt",
            "paytoqs": false,
            "url": "http://192.168.1.28/setswitch.htm?aa2";,
            "tls": "",
            "persist": false,
            "proxy": "",
            "authType": "",
            "x": 440,
            "y": 400,
            "wires": [
                [
                    "52a03d8e.2bccc4"
                ]
            ]
        },
        {
            "id": "a4df041c.e49998",
            "type": "debug",
            "z": "93ea5bd6.288a38",
            "name": "",
            "active": true,
            "tosidebar": true,
            "console": false,
            "tostatus": false,
            "complete": "true",
            "targetType": "full",
            "x": 1250,
            "y": 320,
            "wires": []
        },
        {
            "id": "e8da1504.096d68",
            "type": "http request",
            "z": "93ea5bd6.288a38",
            "name": "ANT2-on",
            "method": "GET",
            "ret": "txt",
            "paytoqs": false,
            "url": "http://192.168.1.28/setswitch.htm?ap2";,
            "tls": "",
            "persist": false,
            "proxy": "",
            "authType": "",
            "x": 440,
            "y": 540,
            "wires": [
                [
                    "d3ec9cf2.ac424"
                ]
            ]
        },
        {
            "id": "1f44c1ce.2ef1be",
            "type": "debug",
            "z": "93ea5bd6.288a38",
            "name": "",
            "active": true,
            "tosidebar": true,
            "console": false,
            "tostatus": false,
            "complete": "true",
            "targetType": "full",
            "x": 1250,
            "y": 480,
            "wires": []
        },
        {
            "id": "895389d.89bbe78",
            "type": "change",
            "z": "93ea5bd6.288a38",
            "name": "SET to Red",
            "rules": [
                {
                    "t": "set",
                    "p": "colour",
                    "pt": "msg",
                    "to": "red",
                    "tot": "str"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 850,
            "y": 460,
            "wires": [
                [
                    "7219beb1.663df"
                ]
            ]
        },
        {
            "id": "d3ec9cf2.ac424",
            "type": "switch",
            "z": "93ea5bd6.288a38",
            "name": "HTTP 200 OK",
            "property": "statusCode",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "eq",
                    "v": "200",
                    "vt": "str"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 1,
            "x": 660,
            "y": 460,
            "wires": [
                [
                    "895389d.89bbe78"
                ]
            ]
        },
        {
            "id": "52a03d8e.2bccc4",
            "type": "switch",
            "z": "93ea5bd6.288a38",
            "name": "HTTP 200 OK",
            "property": "statusCode",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "eq",
                    "v": "200",
                    "vt": "str"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 1,
            "x": 660,
            "y": 360,
            "wires": [
                [
                    "fb9c58e4.f7ac28"
                ]
            ]
        },
        {
            "id": "fb9c58e4.f7ac28",
            "type": "change",
            "z": "93ea5bd6.288a38",
            "name": "SET to Blue",
            "rules": [
                {
                    "t": "set",
                    "p": "colour",
                    "pt": "msg",
                    "to": "blue",
                    "tot": "str"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 850,
            "y": 360,
            "wires": [
                [
                    "a3a8e08e.db249"
                ]
            ]
        },
        {
            "id": "9b890efe.6ac45",
            "type": "comment",
            "z": "93ea5bd6.288a38",
            "name": "Push Button Flow - ANT 2",
            "info": "This has two states:\nA and B.\nAll future refrence is to these two state names.\n\nREQUIRED:\nInputs:\nButton background colour for state A.  msg.colurA\nButton background colour for state B.  msg.colourB\nButton text for state A.               msg.txtA\nButton text for state B.               msg.txtB\nFont colour for state A.               msg.txtclrA\nFont colour for state B.               msg.txtclrB\nPayload for state A.                   msg.payloadA\nPayload for state B.                   msg.payloadB\nTopic.                                 msg.topicSET\n\nOutputs:\nmsg.payload - this is used to control what ever you need.\nmsg.topic - this is if it is needed for control of the next node.\nmsg.colour - this sets the colour of the button.\nmsg.txt - this is the text to be displayed in the button.\nmsg.fontclr - this is the colour of the text on the button.\n",
            "x": 210,
            "y": 60,
            "wires": []
        },
        {
            "id": "d77b428c.f31a3",
            "type": "inject",
            "z": "93ea5bd6.288a38",
            "name": "Setup - Inject",
            "topic": "",
            "payload": "",
            "payloadType": "str",
            "repeat": "",
            "crontab": "",
            "once": true,
            "onceDelay": "3",
            "x": 190,
            "y": 130,
            "wires": [
                [
                    "b8cce1e8.c44ac"
                ]
            ]
        },
        {
            "id": "b8cce1e8.c44ac",
            "type": "function",
            "z": "93ea5bd6.288a38",
            "name": "Setup",
            "func": "msg = {\n    \"colourA\": \"DarkOrange\",\n    \"colourB\": \"DarkOrange\",\n    \"txtA\": \"ANTENNA 2\",\n    \"txtB\": \"ANTENNA 2\",\n    \"txtclrA\": \"white\",\n    \"txtclrB\": \"white\",\n    \"payloadA\": \"1\",\n    \"payloadB\": \"0\",\n}\nreturn msg;",
            "outputs": 1,
            "noerr": 0,
            "x": 160,
            "y": 230,
            "wires": [
                [
                    "a456ed98.1e9b1"
                ]
            ]
        },
        {
            "id": "a456ed98.1e9b1",
            "type": "function",
            "z": "93ea5bd6.288a38",
            "name": "Push Button",
            "func": "var state = context.get(\"STATE\")||0;\n\n//  Look for a !X message to get values.\nif (msg.payload != \"X\")     //Do this if the message is NOT \"X\"\n{\n    //\n    //  Background colours first.\n    //\n    context.set(\"ABGC\", msg.colourA);\n    context.set(\"BBGC\", msg.colourB);\n    //\n    //  Now do text.\n    //\n    context.set(\"Atxt\", msg.txtA);\n    context.set(\"Btxt\", msg.txtB);\n    //\n    //  Font colours.\n    //\n    context.set(\"AFC\",msg.txtclrA);\n    context.set(\"BFC\",msg.txtclrB);\n    //\n    //  Payloads.\n    //\n    context.set(\"PayloadA\", msg.payloadA);\n    context.set(\"PayloadB\", msg.payloadB);\n    //\n    //  Topic.\n    //\n    if (msg.topicSET !== null)\n    {\n        context.set(\"Topic\",msg.topicSET);\n    } else\n    {\n        context.set(\"Topic\",\"~\");\n    }\n    return;\n}\n//      Now on to the real stuff.\nif (msg.payload == \"X\")\n{\n    state = (state + 1)% 2;\n    //node.warn(state);\n    context.set(\"STATE\",state);\n}\nif (state === 0)\n{\n    //  Condition A\n    msg.payload = context.get(\"PayloadA\");\n    msg.colour = context.get(\"ABGC\");\n    msg.txt = context.get(\"Atxt\");\n    msg.fontclr = context.get(\"AFC\");\n} else\n{\n    //  Condition B\n    msg.payload = context.get(\"PayloadB\");\n    msg.colour = context.get(\"BBGC\");\n    msg.txt = context.get(\"Btxt\");\n    msg.fontclr = context.get(\"BFC\");\n}\nif (context.get(\"Topic\") == \"~\")\n{\n    msg.topic = \"\";\n} else\n{\n    msg.topic = context.get(\"Topic\");\n}\nreturn msg;\n",<br alt="" name="" rel="" target="" title="" type="" value="" /
  • Neal Pollack, N6YFM
    Neal Pollack, N6YFM Member ✭✭
    edited May 2020
    Options
    Apparently I posted that code/flow above without using the </> code formatting command.
    Let me try re-posting correctly below;

    [     {         "id": "8dabf827.c3eeb8",         "type": "http request",         "z": "90387577.4d54d8",         "name": "ANT2-off",         "method": "GET",         "ret": "txt",         "paytoqs": false,         "url": "http://192.168.1.28/setswitch.htm?aa2",         "tls": "",         "persist": false,         "proxy": "",         "authType": "",         "x": 440,         "y": 400,         "wires": [             [                 "e178fb3e.4d2b28"             ]         ]     },     {         "id": "94edb18d.c804c",         "type": "http request",         "z": "90387577.4d54d8",         "name": "ANT2-on",         "method": "GET",         "ret": "txt",         "paytoqs": false,         "url": "http://192.168.1.28/setswitch.htm?ap2",         "tls": "",         "persist": false,         "proxy": "",         "authType": "",         "x": 440,         "y": 540,         "wires": [             [                 "89b7e567.f93878"             ]         ]     },     {         "id": "f7d8735d.3e622",         "type": "change",         "z": "90387577.4d54d8",         "name": "SET to Red",         "rules": [             {                 "t": "set",                 "p": "colour",                 "pt": "msg",                 "to": "red",                 "tot": "str"             }         ],         "action": "",         "property": "",         "from": "",         "to": "",         "reg": false,         "x": 850,         "y": 460,         "wires": [             [                 "e679c118.92da2"             ]         ]     },     {         "id": "89b7e567.f93878",         "type": "switch",         "z": "90387577.4d54d8",         "name": "HTTP 200 OK",         "property": "statusCode",         "propertyType": "msg",         "rules": [             {                 "t": "eq",                 "v": "200",                 "vt": "str"             }         ],         "checkall": "true",         "repair": false,         "outputs": 1,         "x": 660,         "y": 460,         "wires": [             [                 "f7d8735d.3e622"             ]         ]     },     {         "id": "e178fb3e.4d2b28",         "type": "switch",         "z": "90387577.4d54d8",         "name": "HTTP 200 OK",         "property": "statusCode",         "propertyType": "msg",         "rules": [             {                 "t": "eq",                 "v": "200",                 "vt": "str"             }         ],         "checkall": "true",         "repair": false,         "outputs": 1,         "x": 660,         "y": 360,         "wires": [             [                 "4cf9ed8.fc9a114"             ]         ]     },     {         "id": "4cf9ed8.fc9a114",         "type": "change",         "z": "90387577.4d54d8",         "name": "SET to Blue",         "rules": [             {                 "t": "set",                 "p": "colour",                 "pt": "msg",                 "to": "blue",                 "tot": "str"             }         ],         "action": "",         "property": "",         "from": "",         "to": "",         "reg": false,         "x": 850,         "y": 360,         "wires": [             [                 "6e92c3a7.bf9bfc"             ]         ]     },     {         "id": "6328cd0d.dc8b94",         "type": "comment",         "z": "90387577.4d54d8",         "name": "Push Button Flow - ANT 2",         "info": "This has two states:\nA and B.\nAll future refrence is to these two state names.\n\nREQUIRED:\nInputs:\nButton background colour for state A.  msg.colurA\nButton background colour for state B.  msg.colourB\nButton text for state A.               msg.txtA\nButton text for state B.               msg.txtB\nFont colour for state A.               msg.txtclrA\nFont colour for state B.               msg.txtclrB\nPayload for state A.                   msg.payloadA\nPayload for state B.                   msg.payloadB\nTopic.                                 msg.topicSET\n\nOutputs:\nmsg.payload - this is used to control what ever you need.\nmsg.topic - this is if it is needed for control of the next node.\nmsg.colour - this sets the colour of the button.\nmsg.txt - this is the text to be displayed in the button.\nmsg.fontclr - this is the colour of the text on the button.\n",         "x": 210,         "y": 60,         "wires": []     },     {         "id": "176fd8e1.fa01d7",         "type": "inject",         "z": "90387577.4d54d8",         "name": "Setup - Inject",         "topic": "",         "payload": "",         "payloadType": "str",         "repeat": "",         "crontab": "",         "once": true,         "onceDelay": "3",         "x": 190,         "y": 130,         "wires": [             [                 "244344a0.e4938c"             ]         ]     },     {         "id": "244344a0.e4938c",         "type": "function",         "z": "90387577.4d54d8",         "name": "Setup",         "func": "msg = {\n    \"colourA\": \"DarkOrange\",\n    \"colourB\": \"DarkOrange\",\n    \"txtA\": \"ANTENNA 2\",\n    \"txtB\": \"ANTENNA 2\",\n    \"txtclrA\": \"white\",\n    \"txtclrB\": \"white\",\n    \"payloadA\": \"1\",\n    \"payloadB\": \"0\",\n}\nreturn msg;",         "outputs": 1,         "noerr": 0,         "x": 160,         "y": 230,         "wires": [             [                 "85e5096e.0d3458"             ]         ]     },     {         "id": "85e5096e.0d3458",         "type": "function",         "z": "90387577.4d54d8",         "name": "Push Button",         "func": "var state = context.get(\"STATE\")||0;\n\n//  Look for a !X message to get values.\nif (msg.payload != \"X\")     //Do this if the message is NOT \"X\"\n{\n    //\n    //  Background colours first.\n    //\n    context.set(\"ABGC\", msg.colourA);\n    context.set(\"BBGC\", msg.colourB);\n    //\n    //  Now do text.\n    //\n    context.set(\"Atxt\", msg.txtA);\n    context.set(\"Btxt\", msg.txtB);\n    //\n    //  Font colours.\n    //\n    context.set(\"AFC\",msg.txtclrA);\n    context.set(\"BFC\",msg.txtclrB);\n    //\n    //  Payloads.\n    //\n    context.set(\"PayloadA\", msg.payloadA);\n    context.set(\"PayloadB\", msg.payloadB);\n    //\n    //  Topic.\n    //\n    if (msg.topicSET !== null)\n    {\n        context.set(\"Topic\",msg.topicSET);\n    } else\n    {\n        context.set(\"Topic\",\"~\");\n    }\n    return;\n}\n//      Now on to the real stuff.\nif (msg.payload == \"X\")\n{\n    state = (state + 1)% 2;\n    //node.warn(state);\n    context.set(\"STATE\",state);\n}\nif (state === 0)\n{\n    //  Condition A\n    msg.payload = context.get(\"PayloadA\");\n    msg.colour = context.get(\"ABGC\");\n    msg.txt = context.get(\"Atxt\");\n    msg.fontclr = context.get(\"AFC\");\n} else\n{\n    //  Condition B\n    msg.payload = context.get(\"PayloadB\");\n    msg.colour = context.get(\"BBGC\");\n    msg.txt = context.get(\"Btxt\");\n    msg.fontclr = context.get(\"BFC\");\n}\nif (context.get(\"Topic\") == \"~\")\n{\n    msg.topic = \"\";\n} else\n{\n    msg.topic = context.get(\"Topic\");\n}\nreturn msg;\n",         "outputs": 1,         "noerr": 0,         "x": 340,         "y": 230,         "wires": [             [                 "b9d21431.2e3ff8",                 "4d79e72.bc62918"             ]         ]     },     {         "id": "b9d21431.2e3ff8",         "type": "ui_button",         "z": "90387577.4d54d8",         "name": "RBE Button 2",         "group": "2204584c.cd1948",         "order": 5,         "width": "0",         "height": "0",         "passthru": false,         "label": "{{msg.txt}}",         "tooltip": "",         "color": "{{msg.fontclr}}",         "bgcolor": "{{msg.colour}}",         "icon": "",         "payload": "X",         "payloadType": "str",         "topic": "",         "x": 580,         "y": 120,         "wires": [             [                 "85e5096e.0d3458"             ]         ]     },     {         "id": "4d79e72.bc62918",         "type": "switch",         "z": "90387577.4d54d8",         "name": "Payload 0 or 1",         "property": "payload",         "propertyType": "msg",         "rules": [             {                 "t": "eq",                 "v": "0",                 "vt": "str"             },             {                 "t": "eq",                 "v": "1",                 "vt": "str"             }         ],         "checkall": "true",         "repair": false,         "outputs": 2,         "x": 200,         "y": 440,         "wires": [             [                 "8dabf827.c3eeb8"             ],             [                 "94edb18d.c804c"             ]         ]     },     {         "id": "6e92c3a7.bf9bfc",         "type": "delay",         "z": "90387577.4d54d8",         "name": "1/2-sec dalay",         "pauseType": "delay",         "timeout": "0.5",         "timeoutUnits": "seconds",         "rate": "1",         "nbRateUnits": "1",         "rateUnits": "second",         "randomFirst": "1",         "randomLast": "5",         "randomUnits": "seconds",         "drop": false,         "x": 1050,         "y": 360,         "wires": [             [                 "b9d21431.2e3ff8"             ]         ]     },     {         "id": "e679c118.92da2",         "type": "delay",         "z": "90387577.4d54d8",         "name": "1/2-sec dalay",         "pauseType": "delay",         "timeout": "0.5",         "timeoutUnits": "seconds",         "rate": "1",         "nbRateUnits": "1",         "rateUnits": "second",         "randomFirst": "1",         "randomLast": "5",         "randomUnits": "seconds",         "drop": false,         "x": 1050,         "y": 460,         "wires": [             [                 "b9d21431.2e3ff8"             ]         ]     },     {         "id": "69170498.44397c",         "type": "comment",         "z": "90387577.4d54d8",         "name": "ON/OFF Button, ORANGE when you push button",         "info": "This is normally a two color button, where the SETUP node before it would define colorA as RED and colorB as BLUE, or your choice.  When you click the button they would change.\nBut I wanted two things better;  1.  Acknowledge click of the button by turning orange color, then only change color to ON (RED) or OFF (BLUE) by getting status from the remote end.  This could work with MQTT status query, but in this example I use HTTP and the HTTP response code (200 = OK) to then change the button color to on or off, red or blue.",         "x": 680,         "y": 80,         "wires": []     },     {         "id": "3819bb33.106dc4",         "type": "comment",         "z": "90387577.4d54d8",         "name": "Send HTTP command for relay ON or OFF",         "info": "",         "x": 280,         "y": 360,         "wires": []     },     {         "id": "8fc8e300.67514",         "type": "comment",         "z": "90387577.4d54d8",         "name": "IF HTTP succeeded, change button color.",         "info": "",         "x": 740,         "y": 520,         "wires": []     },     {         "id": "2b525139.db541e",         "type": "comment",         "z": "90387577.4d54d8",         "name": "After a short delay.",         "info": "",         "x": 1030,         "y": 520,         "wires": []     },     {         "id": "2204584c.cd1948",         "type": "ui_group",         "z": "",         "name": "Antenna Switch",         "tab": "3bf30c50.08a7a4",         "order": 4,         "disp": true,         "width": 3,         "collapse": false     },     {         "id": "3bf30c50.08a7a4",         "type": "ui_tab",         "z": "",         "name": "N6YFM - STATION DASHBAORD",         "icon": "dashboard",         "order": 3,         "disabled": false,         "hidden": false     } ] 
  • N5YT
    N5YT Member ✭✭
    edited May 2020
    Options
    This is too cool.  I'm just getting started with creating my dashboard. Ordered one of the KMtronic web relays today to control some things in the shack. Thanks for the snippets guys!
      
  • W7NIK
    W7NIK Member ✭✭
    edited June 2020
    Options
    I would love to do this , looks hard, I have windows 10 working great with UDP relays and  all remoted  . via  PSTrotator and  SPE amp. 
  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator
    edited May 2020
    Options
    It is not that hard when you look at some of the code examples. Dave wo2x
  • Tim N9PUZ
    Tim N9PUZ Member ✭✭
    edited June 2020
    Options
    Michael,

    I saw the mention of NodeRed in the video you posted about your remote station. This section of the forum is like drinking from a fire hose! I have a million questions more or less but a couple of simple ones to start:

    1. Which of the KMTronic web switches are you using?
    2. Is your switch connected right on the LAN or is it attached via USB or serial to one of the Raspberry Pi computers?
    Tim N9PUZ
  • W7NIK
    W7NIK Member ✭✭
    edited May 2020
    Options
    I have a good window system running, so I think node red is a better a Lynux System , I am open for a raspberry pi boardConnected to my lan system.
  • N5YT
    N5YT Member ✭✭
    edited June 2020
    Options
    I was able to add my amp to the mix today. 
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited May 2020
    Options
    That is awesome!
  • Neal Pollack, N6YFM
    Neal Pollack, N6YFM Member ✭✭
    edited May 2020
    Options
    Tim, if you have a million questions, and want to save some hours of reading, we should talk on the phone to get you kick-started. My email is good on QRZ.com. N6YFM. At. A R R L. Dot. Net Neal
  • Tim N9PUZ
    Tim N9PUZ Member ✭✭
    edited May 2020
    Options
    I appreciate that offer Neal. I'll email you to arrange a time.

    Tim N9PUZ
  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator
    edited May 2020
    Options
    Tim, welcome to the Node Red group. Good group of guys sharing ideas and programming flows. It is a lot of fun and good satisfaction when you get different flows working. Each person can and has addedtheir own customization to the project. Dave wo2x

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.