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.

Mute Status When Using The API

Alan
Alan Member ✭✭✭

I now have the "Mute" API command working, including multiplex.

Next, I want to use the "audio_mute" Flex Message, from the slice subscription, to show the current "Mute" status.

Here is the question.

When I change the mute status, on a slice, from a "GUI client", I received the "audio_mute" status on the "Non GUI Client's, slice subscription......good

When I command a mute status change, on a slice, from a "Non GUI Client, using the API command, I do not receive the "audio_mute" message, on that same "Non GUI Client's slice subscription......not good.

Interesting, when I command a mute status change, on a slice, from a different "Non GUI Client, and look for the "audio_mute" message on a different "Non GUI Client's slice message, I do get the response......good.

To eliminate any errors in the Non-GUI clients, I reversed the device issuing the command and the device listening for the slice subscription response, and got the same response / "non-response" pattern.

Has anyone seen this before? Are there other ways to get "mute" status? Is this a bug?

Alan. WA9WUD

Best Answers

  • Dan-N7HQ
    Dan-N7HQ FlexRadio Employee, Community Manager admin
    Answer ✓

    Alan,

    Subscriptions allow you to receive a notification when attributes on objects, like a slice, are changed by other clients so you can track the state. Since you own the client making the change, it is assumed you will update your local state to reflect the change(s) you made, provided, of course, you receive a SUCCESS result from your command.

    If your code is asynchronous (I suspect it is), you will need to track what you send and match the response. The good news is that the decimal number immediately after the command prefix's C (or CD) is returned in the response (R) prefix.

    73,

    Dan

  • Alan
    Alan Member ✭✭✭
    Answer ✓

    Thanks, Dan

    I was looking for a response to confirm the mute status change. Understand I should look at the command, "success", response rather than the slice subscription attribute change, and build my own local state.

    Good explanation.

    Alan

Answers

  • Dan-N7HQ
    Dan-N7HQ FlexRadio Employee, Community Manager admin

    Alan, can you please supply the set of API commands you use to create the Non-Gui client? Please include any subscription commands as well.


    73,

    Dan

  • Alan
    Alan Member ✭✭✭

    Hi Dan. Thanks for taking a look. Sure.

    For subscribing to the slice messages I use, "sub slice all"

    I command the mute with , "slice set <number> audio_mute=<1or 0>"

    To bind the non-GUI client to the GUI Client, I use, "client bind client_id=<big number>"

    Alan. WA9WUD

  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator

    Hi Alan,


    This is one shortcoming of Stephen’s new nodes. He filters out the success/failure response and you do not know the sequential number to look for.


    Dave wo2x

  • N1SH
    N1SH Member ✭✭

    Dave,

    Just saw this. The success or failure codes are there on the flexradio-request node along with any response message. It just gets complicated when you send multiple commands into the same request node. You will need to determine which one goes with which. 

    …perhaps some form of tagging mechanism, e.g. pass along a topic or other message attribute from input (request) to output (response). Right now I do pass along the formatted request to the output, but I can see where an extra tag might be helpful.

    Stephen

  • Alan
    Alan Member ✭✭✭

    I solved this problem.

    Stephen includes the "sent" command, in the Flex response (msg.request), along with the associated "success/failure" code (msg.status_code) response from the Flex Radio Server.

    My solution was to match up the command I sent, with Flex Request Node's Response JSON object, with the same "msg.request". If the same JSON object has a "msg.status_code" == 0 (success), I update that variables value in the Non-GUI variable's context, with whatever the Non-GUI client commanded the GUI-Client.

    Really, same as matching the "C" with the "R", if they were both available.

    Alan. WA9WUD

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.