Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume and Mute nodes issue WebOS 2021 #51

Open
mreyad opened this issue Nov 29, 2022 · 0 comments
Open

Volume and Mute nodes issue WebOS 2021 #51

mreyad opened this issue Nov 29, 2022 · 0 comments

Comments

@mreyad
Copy link

mreyad commented Nov 29, 2022

I was using this node for some years with my 8 years old LG TV, recently I bough new LG TV 2021 (NANO86) which seems using newer version of WebOS.

In the last couple of days I was trying to find the API documentation that you used to build your node, unfortunatly I could not find it.
The reason that I started to get errors after deploying the "Volume" or "Mute" nodes and connect them to the new TV, after invertigation I found that the array objects in the old WebOS are different than the new one.

In LG website where they have listed the references for thei WebOS API, the response for "getVolume" array is as follows:

{"returnValue":true,"volumeStatus":{"activeStatus":true,"adjustVolume":true,"maxVolume":100,"muteStatus":true,"volume":12,"mode":"normal","soundOutput":"tv_external_speaker"},"callerId":"com.webos.service.apiadapter","mute":true,"volume":12}

comparing to the array that used in the old WebOS:
{"returnValue":true,"scenario":"mastervolume_tv_speaker","volume":98,"mute":false}

I did a small change on the volume.js and mute.js as follows:

volume.js

Line 19:
if (!err && res) {

Line 20:

// node.send({payload: res.volume});
if (res.volume !== undefined){
	node.send({payload: res.volume});
}
if (res.volumeStatus !== undefined){
	node.send({payload: res.volumeStatus.volume});
}

Line 27:

// node.send({payload: res.volume});
if (res.volume !== undefined){
	node.send({payload: res.volume});
}
if (res.volumeStatus !== undefined){
	node.send({payload: res.volumeStatus.volume});
}

similar changes I made to mute.js.

Are you willing to do these changes on the node and publish it, to that it will be compatible with the old WebOS and the new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant