Use this web-server to control earphones from your software or scripts
Right-click on required action link and copy their URL. So you can trigger them from any app or script, for exmaple, via curl:
curl -s http://localhost:19823/mode_cancellation
fetch(
"http://localhost:19823/__rpc__/set_property", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Secret": "SECRET_KEY_IF_ENROLLED",
},
body: JSON.stringify({
"args": ["anc", "mode", "awareness"],
"kwargs": {},
}),
}
)
.then(d => d.json())
.then(r => console.log(r))
To access this page through other devices in network, make sure that you're enabled "Remote access" in GUI settings.
If you plan to do that, it's strongly recommended to also enable secret key verification, and set strong, random key, to prevent unauthorized access to your devices.