Devialet Chat

Full Version: finally integrated into home automation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
UPDATED: 

https://github.com/da2001/phantom-bridge





i finally got rid of my devialet remote and integrated the volume control into my home automation setup.
Next step is to change the input and controls like start/pause.

heres howto:

URL: 
Code:
http://IP_OF_Bridge:36933

Path: 
Code:
/Control/LibRygelRenderer/RygelRenderingControl

Header: 
Code:
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:2#SetVolume"


Content: 
Code:
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
     <u:SetVolume xmlns:u="urn:schemas-upnp-org:service:RenderingControl:2">
        <InstanceID>0</InstanceID>
        <Channel>Master</Channel>
        <DesiredVolume>15</DesiredVolume>
     </u:SetVolume>
  </s:Body>
</s:Envelope>


Change the <DesiredVolume> from 15 into a Number between 0-100. This is the Volume in percentage.
What control system are you using ?

Im controlling the dev for years now via RS232
(25-Nov-2017, 06:53)no32 Wrote: [ -> ]Im controlling the dev for years now via RS232

For the expert models maybe really basic, but not for the phantoms. there is no rs232 available.
i replaced the devialet remote with a neeo remote. 
[Image: ?format=500w]
(24-Nov-2017, 22:18)da2001 Wrote: [ -> ]i finally got rid of my devialet remote and integrated the volume control into my home automation setup.
Next step is to change the input and controls like start/pause.

This sounds very exciting! I‘m not a programmer, but guess that adding such code to some Roon extension could facilitate volume change from within that extension. I‘m thinking about Mike‘s Roon Web Controller.
as is see, the web controller uses nodejs. it should be no problem to add it there.
you can change the code from that script by yourself, but it will be lost on every update.
so better to do this by the developer of the roon web controller.

streamy, its untested, but it should look like this: (volume slider not included)
Code:
####################

var phantomBridge = "192.168.0.123";
var Volume = "20";

####################
            
var body = '<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">' +
  <s:Body>' +
     <u:SetVolume xmlns:u="urn:schemas-upnp-org:service:RenderingControl:2">' +
        <InstanceID>0</InstanceID>' +
        <Channel>Master</Channel>' +
        <DesiredVolume>'+Volume+'</DesiredVolume>' +
     </u:SetVolume>' +
  </s:Body>' +
</s:Envelope>';


var postRequest = {
    host: phantomBridge,
    path: "/Control/LibRygelRenderer/RygelRenderingControl",
    port: 36933,
    method: "POST",
    headers: {
    "Accept": "text/xml",
    "Content-length": Buffer.byteLength(body),
    "Content-Type": "text/xml;charset=UTF-8",
    "SOAPAction": "urn:schemas-upnp-org:service:RenderingControl:2#SetVolume",
    }
};

var buffer = "";

var req = http.request( postRequest, function( res )    {

   console.log( res.statusCode );
   var buffer = "";
   res.on( "data", function( data ) { buffer = buffer + data; } );
   res.on( "end", function( data ) { console.log( buffer ); } );

});

req.on('error', function(e) {
    console.log('problem with request: ' + e.message);
});

req.write( body );
req.end();
(26-Nov-2017, 09:26)da2001 Wrote: [ -> ]as is see, the web controller uses nodejs. it should be no problem to add it there.
you can change the code from that script by yourself, but it will be lost on every update.
so better to do this by the developer of the roon web controller.

streamy, its untested, but it should look like this: (volume slider not included)

You‘re amazing! I‘ll try if I manage to add the code in node.js of Mike‘s extension. Then, with your permission I will contact Mike on the Roon forum to ask him to integrate your code in his extension to add Phantom volume control as a feature. I think this could also interest some other Phantom/Roon users.
for shure. feel free
Hello, this was really good news, maybe there is hope for me to..........

I use my phantom in a setup with tv, blueray, atv and more, and everything exept the phantom is remote controlled with a logitech harmony remote. I bought a pair of ec-living speakers from electrocompaniet, and thanks to this link;
https://forum.kodi.tv/showthread.php?tid=206433 i managed to remote control the volume of these through a raspberry pi. 

Would it be possible to do the same thing with the phantoms using you findings ? 

in my raspberry lircd config files i have this for the ec living;

lircrc; ec living

begin
    button = KEY_VOLUMEUP
    prog = irexec
#    config = /usr/bin/pactl -- set-sink-volume 0 +2%  # vol+
     config = curl -g 'http://192.168.70.99/jsonrpc?request=\{%22jsonrpc%22:%22$
    repeat = 2
end

begin
    button = KEY_VOLUMEDOWN
    prog = irexec
    config = curl -g  'http://192.168.70.99/jsonrpc?request=\{%22jsonrpc%22:%22$
#    config = /usr/bin/pactl -- set-sink-volume 0 -2%  # vol-
    repeat = 2
end

I would really appreciate help to achive the same with my phanthom.

best regards Lars
you need to set a specific value from 0-100. there is no step up/down. maybe you can add +5 or -5 with every press.

i´m sorry to say, but i found a little problem. The Port "36933" wich i said, it not fixed. After a reboot of the bridge, mine changed to a new port Sad
(26-Nov-2017, 20:56)da2001 Wrote: [ -> ]you need to set a specific value from 0-100. there is no step up/down. maybe you can add +5 or -5 with every press.

i´m sorry to say, but i found a little problem. The Port "36933" wich i said, it not fixed. After a reboot of the bridge, mine changed to a new port Sad

What is the easiest way to find the right port? Can it be progammically searched?
Pages: 1 2 3 4 5