svrooij / sonos-api-docs

🔊 📖 Sonos api documentation for the local UPNP api and a generator to generate clients based on service discovery
https://sonos.svrooij.io
MIT License
33 stars 7 forks source link

Supplemental event properties #38

Closed svrooij closed 1 year ago

svrooij commented 1 year ago
    @svrooij just did the re-generation, thank you!

One thing I noted was, it wiped away rendering control service's HeightChannelLevel that I added in this pr, which makes sense. It doesn't come back in the discovery doc, though it does actually get returned in the real world (I tested this).

Along these lines, is there a mechanism in place to supplement events properties that don't come back in the discovery doc?

Originally posted by @jkossis in https://github.com/svrooij/node-sonos-ts/issues/172#issuecomment-1315269049

svrooij commented 1 year ago

@jkossis there is no such way (at the moment). But I'm not saying that we should not create something like that.

The strange thing is dat currently it does show some EQ values in the event proerties like NightMode or DialogLevel. Perhaps this property is added later and isn't supported on the devices I used to generate the documentation with. And the ARC is currently not indexed I believe.

Could you try what happens if you index the ARC? If you index the arc (which is good to have anyway) it will create a discovery file for that device and maybe it's in there.

https://github.com/svrooij/sonos-api-docs/tree/main/generator/sonos-docs#sonos-docs-services-ip

If it isn't there, I'll modify the schema to allow addition event properties.

svrooij commented 1 year ago

@jkossis you need help with that?

# Clone repo
# go to correct folder
cd generator/sonos-docs

# install dependencies
npm install

# Execute service discovery (replace IP with arc ip)
./bin/run services 192.168.0.0
jkossis commented 1 year ago

@svrooij all good, should be able to get that change up in the next few hours.

svrooij commented 1 year ago

No worries, don't want to rush you.

jkossis commented 1 year ago

@svrooij here's the associated pr.

Unfortunately, it looks like the HeightChannelLevel still isn't showing as part of the Arc's discovery definition. 😞

svrooij commented 1 year ago

I really find it strange that for the EQ value it does not have the allowed values... That would make this so much easier....

image

Anyways, it seems not to be available. I propose a eventProperties array on the service level in the documentation. do you think that could work?

With something like this:

"eventProperties": [
  { "name": "HeightChannelLevel", "type": "i2"}
]
jkossis commented 1 year ago

Yup, that makes complete sense to me 👍.

Just cause I'm a little new to the docs repo and its different intermediate steps, are you opposed to adding it? No rush, either. Just feel you know the layout of things better.

svrooij commented 1 year ago

@jkossis sorry I missed your last response, and was enormously busy last week. Will be back behind my computer on Monday. Then I'll add a way to add additional event properties.

jkossis commented 1 year ago

All good @svrooij! I appreciate you being willing to take a look at it.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.1.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: