I would like to make use of node.js and specific modules ( sonos and hue) in Appstudio, but cannot find out clearly how.
Is there a documented example ?
The following script which I found works when I load the javascript library jsHue.js as a code
> Button1.onclick=function(){
> var hue = jsHue();
> hue.discover().then(bridges => {
> if(bridges.length === 0) {
> Textarea1.value= 'No bridges found 1';
> }
> else {
> bridges.forEach(b => Textarea1.value = 'Bridge found at IP address :'+ b.internalipaddress);
> }
> }).catch(e => console.log('Error finding bridges', e));
>
> }
But when trying with sonos js libraries I fail using them, clearly because I don’t do things as they should…
and cannot move forward due to lack of know-how.
Thank you