Closed hklages closed 3 years ago
The Unprocessed
event on each service should do just that. That way you can parse the data if you think this library does it incorrectly.
You're probably looking for something like this:
const XmlHelper = require('../lib/helpers/xml-helper').default;
const SonosDevice = require('../lib/').SonosDevice
const ServiceEvents = require('../lib/models/service-event').ServiceEvents;
const device = new SonosDevice('192.168.x.x');
device.ZoneGroupTopologyService.Events.on(ServiceEvents.Unprocessed, data => {
//console.log('ZoneGroupTopology data %s', JSON.stringify(data))
console.log('ZoneGroupState from event', JSON.stringify(XmlHelper.DecodeAndParseXml(data[0].ZoneGroupState, ''), null, 2))
})
but I would rather see that this isn't needed, and just have the library provide the needed information.
what would even better get the raw data in any Service event. Then I can parse/tranform as I need it.
:tada: This issue has been resolved in version 2.4.1-beta.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 2.4.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Is your feature request related to a problem? Please describe
No
Describe the solution you'd like
Get GroupID in ZoneGroup event and what would even better get the raw data in any Service event. Then I can parse/tranform as I need it.
Describe alternatives you've considered
Additional context
Low priority - GroupID is useful to sort players by group.