Set State Commands in IF Connect v2

All …

I have a question about using SetState commands with IF Connect v2.

For all state commands, is it possible to send a SetState command for all commands or only for certain commands? And, if a subset, is there a way to distinguish these purely from the manifest (i.e. can only commands with numeric data types/boolean data types be used with SetState or some other indicator in the manifest)?

Thanks in advance for any help.

1 Like

Hey man,

There’s only some states that will accept it, but unfortunately it’s not properly documented anywhere. I will be working on some documentation for this over the coming weeks/months, but until then it’s mostly a case of trial and error, as well as a bit of common sense. For example, you’re not going to be allowed to set the state containing the aircraft name. I know that’s not ideal, but feel free to drop me a DM or make a post in here with anything you’re not sure about and I’ll check it out for you.



Thanks. That’s sort of what I suspected.

So — two follow-up questions if I may:

  1. If I try to set a state for a command that doesn’t allow it will the API return any type of message/data that indicates this wasn’t allowed?

  2. Do any of the commands with String or Long data types allow SetState? If so, is the format of the string the same as when performing GetState (ie with the extra integer indicating string length)?

Thanks again.

1 Like
  1. I don’t believe so
  2. I’ll double check with Laura on that one but I think you should be able to just send the string

It’s [int][string], unless it’s changed.

For the list of states, as Kai mentioned, we’re going to publish a list of all the states, types as well as their read/write properties.

I have done some work on that part, so some states that were read only before now have write available as well.

1 Like

@KaiM @Laura

Thanks both. Very helpful. I look forward to that list of states/properties – that will be very useful indeed.

We do have a spreadsheet that I can send you, it’s just not super accurate for much other than name, ID, and type. Eventually we’ll generate something with a bunch of things like read/write availability, units, description etc but it’s still just an idea at this point. Lots of things to come with this though.

If you’re happy to share it would probably useful for both the Node module I’m building for the v2 Connect API and the PanelNinja app I’ve been working on which uses the v2 API.


Side thought: It might be where you are headed in this space, but would it be worth that data set becoming an API/web service itself so when someone is building something with the v2 API they can query this service to find out what commands are available and the various read/write/data flag data for the command. I’m thinking of this given the manifest itself doesn’t return the additional details (such as read/write) and without fetching the manifest one can’t know what states/commands an aircraft supports.

Yeah that’s absolutely what we’re looking into, but partly because there’s also some bigger projects in the works that it’ll be useful for.

1 Like

Sounds promising. Looking forward to it.

@KaiM If I send a SetState command to IF Connect v2, should I expect any response from IF confirming success failure ever? I’m still not 100% clear on this one.

We don’t send a response currently when setting a state via Connect v2, you need to check that state again to see if it has update

Perfect. Thanks. I suspected as much but wanted to be 100% sure.

Are there plans to provide acknowledgement responses or confirmations of success in future versions of the API?

No immediate plans but we can definitely look into it, thanks for the feedback :)

1 Like