nightowlengineer / sonos-api-java Goto Github PK
View Code? Open in Web Editor NEWUnofficial Java client for the Sonos API
License: MIT License
Unofficial Java client for the Sonos API
License: MIT License
Describe what's going wrong
Just found a wrong namespace
Exception in thread "main" SonosGlobalError{errorCode=ERROR_UNSUPPORTED_NAMESPACE, reason='Namespace not found'}
at engineer.nightowl.sonos.api.resource.GroupResource.modifyGroupMembers(GroupResource.java:105)
String.format("/v1/groups/%s/modifyGroupMembers", groupId)
must be
String.format("/v1/groups/%s/groups/modifyGroupMembers", groupId)
same with setGroupMembers
described in https://developer.sonos.com/reference/control-api/groups/modifygroupmembers/
Environment:
Sorry for this question type of issue, but I'm currently looking at which Java library to use for a Sonos project I'm planning. Compared to this (a bit dated) library, whose basic usage is to simply run List<SonosDevice> devices = SonosDiscovery.discover();
, the prerequisites for this library seem rather complex. Is this due to Sonos having changed something on their side (and that dated library would not work anymore), or is it due to this library doing something different than the other library, or is it due to something else?
Thanks for any insights!
Describe what's going wrong
Couln't use the library: "Invalid token". Please describe what the sonos applicationId is. Do we need other settings e.g. event callback url or something else?
Log
15:25:09.713 INFO [main] e.nightowl.sonos.api.SonosApiClient - Initialising sonos-api-java:0.0.9
15:25:09.717 DEBUG [main] e.nightowl.sonos.api.SonosApiClient - Using default HttpClient
15:25:10.161 DEBUG [main] e.n.sonos.api.resource.GroupResource - Sending request to https://api.ws.sonos.com/control/api/v1/households/householdId/groups
Exception in thread "main" engineer.nightowl.sonos.api.exception.SonosApiClientException: Invalid token
at engineer.nightowl.sonos.api.resource.BaseResource.callApi(BaseResource.java:81)
at engineer.nightowl.sonos.api.resource.BaseResource.getFromApi(BaseResource.java:178)
at engineer.nightowl.sonos.api.resource.GroupResource.getGroups(GroupResource.java:51)
at SonosTest.main(SonosTest.java:21)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.