SmartSDR v3.8.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
SmartSDR TCP/IP Commands - Messaging
I am trying to write code for a message to pop up on SmartSDR when a client attaches. The only issue I am having is the command sequence requires the message to be enclosed in quotes. I need to put a variable in the message as it is not hard coded. I have not been able to figure out how to add the variable and it always shows up as the variable name . For example this command :
msg2 = {payload:"c16|message severity=info code=0x000010 \"${clientA} is logged on\"\r"};
shows up as
Hoping maybe Tim or someone else has an answer.
Regards
Comments
-
Hi Mick, try this:
msg2 = {payload:"c16|message severity=info code=0x000010 \"" + ${clientA} + "is logged on\"\r"};
0 -
Len,
Appreciate the help. unfortunately your code copied as is throws a javascript func error in Node-Red. I substituted the beginning and end quotes for ticks and Node-Red liked it but back to same problem ...Here is the revised code and the output..
msg2 = {payload:'c16|message severity=info code=0x000010 \"" + ${clientA} + "is logged on\"\r'};
Output...
0 -
So I have messed with it and so far nothing seems to work...Really would like the Flex guys school me on this.. Since they send out a message with the tcp/ip address of everyone who logs in...It has to be a variable...I know the variable is there...
Regards...
0 -
Sorry Mick, I forgot to ask what language... In C++, the "+" symbol can be used for string concatenation. Check to see what you do to concatenate strings in Node-Red, and do that instead of the plus signs of C++.
Also, I noticed that you changed out the first and last double quotes with single quotes. The quote pairs no longer match up. The second quote after the / needs to be the same as the first quote. You were close before, I would start with all double quotes, just replace the plus signs with whatever Node Red uses.
Maybe Dave, WO2X will chime in with the definitive answer...
0 -
Yes I am doing it in Node-Red and the recommended syntax is 'string ${variable}' . However this does not work when connecting to the Flex on port 4992. Once again maybe Tim can chime in with words of wisdom.
0 -
Hi Mick, I would be very surprised to see Flex jump in and try to debug user-written code. The Node Red IO group probably has folks who can get you going.
0 -
Dave said he is going to look at it. It really should not be this hard. Flex pushes the api but the documentation is sparse and lacking. Frustrating to see a simple issue like this taking hours instead of minutes.
Regards
0 -
I am in hour 8 of a power failure. When power is restored I will check into this.
my power company is Jersey Central Power & Light or JCP&L. We call it Just **** Power & Light.
Definitely getting a whole house generator with auto transfer switch after this …..
73
Dave wo2x
Somewhere in the darkness of New Jersey
0 -
With the help of Mark Hanson I was able to get the code working.... Here is the correct syntax..
msg2 = {payload:'c16|message severity=info code=0x000010 \"' + clientA + ' is logged on\"\r'};
Gives the following message on SmartSDR
1 -
Glad you got it working!
0 -
I so need to do this
0 -
A follow up note. I have the code working now that shows when clientA or clientB connects to the Flex. I got an idea to show the slice letter and ended up with this..
I have more testing to do before I put this into prod. It's coming along.
Regards
0 -
Since the other guy’s slice gives you no information about frequency or band, it might be a good idea to provide band/freq instead of pan/slice .
1 -
Ted,
Actually it does, we have a Node-Red station dashboard that show the information on both slices.. You use the drop down arrow to select the client.
0 -
Sorry :-) Not aware of the other things provided around this widget! I should turn one of my spare Pi’s over to Node Red and try it out.
1 -
Ted, it is addictive!
check out the groups.io site. That’s where we lurk.
73 Dave wo2x
0
Leave a Comment
Categories
- All Categories
- 289 Community Topics
- 2.1K New Ideas
- 534 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 146 SmartSDR for Maestro and M models
- 360 SmartSDR for Mac
- 249 SmartSDR for iOS
- 230 SmartSDR CAT
- 172 DAX
- 352 SmartSDR API
- 8.8K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 26 FLEX-8000 Signature Series
- 850 Maestro
- 44 FlexControl
- 847 FLEX Series (Legacy) Radios
- 796 Genius Products
- 416 Power Genius XL Amplifier
- 277 Tuner Genius XL
- 103 Antenna Genius
- 243 Shack Infrastructure
- 166 Networking
- 404 Remote Operation (SmartLink)
- 130 Contesting
- 631 Peripherals & Station Integration
- 125 Amateur Radio Interests
- 870 Third-Party Software