Devialet Phantom integration

Hello, thanks for the reply. I didn’t fix my flow although using your info I did manage to set the volume with push buttons but the slider is odd, when I adjust it it sets the speaker volume to zero. Can you export your flow so I can see what I’m missing please?

Is there any progress with this? I have a Phantom II and would really love having the control of my Devialet in HA

I’ve got some pushbuttons to control the volume in Node Red which work but is a clumsy way of doing it. I couldn’t get the volume slider to work properly as in the post from @fwestenberg , in my version the volume always changes back to zero. I’ll share what I have and perhaps between us we can get to the bottom of it?

[{"id":"b89afd18.83e3a8","type":"inject","z":"58e5b5dd.6717dc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":980,"wires":[["cec60287.79ef98"]]},{"id":"cec60287.79ef98","type":"http request","z":"58e5b5dd.6717dc","name":"Get Devialet Volume","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.2.71/ipcontrol/v1/systems/current/sources/current/soundControl/volume","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":340,"y":980,"wires":[["283b23e6fbcab37e"]]},{"id":"4099fe03.57e99","type":"api-call-service","z":"58e5b5dd.6717dc","name":"","server":"d81dfb02.85eee","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.devialet_volume"],"data":"{\"value\": payload}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":790,"y":980,"wires":[[]]},{"id":"283b23e6fbcab37e","type":"split","z":"58e5b5dd.6717dc","name":"","splt":"\" \"","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":530,"y":980,"wires":[["4099fe03.57e99"]]},{"id":"fbf7ef3a9fd2ca0c","type":"comment","z":"58e5b5dd.6717dc","name":"Read devialet volume and update helper","info":"Uses HTTP request to pull in volume level, the payload is split to remove the systemVolume from the output.","x":200,"y":940,"wires":[]},{"id":"ef47af2f19a0b5c0","type":"server-state-changed","z":"58e5b5dd.6717dc","name":"Volume changed","server":"d81dfb02.85eee","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.devialet_volume","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":1060,"wires":[["db52c3a160b69a24"]]},{"id":"db52c3a160b69a24","type":"switch","z":"58e5b5dd.6717dc","name":"User input","property":"data.new_state.context.user_id","propertyType":"msg","rules":[{"t":"neq","v":"0a135a35cf904c108c5d178c57fcc2e7","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":1060,"wires":[["310be873b19b2b87"]]},{"id":"310be873b19b2b87","type":"change","z":"58e5b5dd.6717dc","name":"Payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"systemVolume\": payload }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":1060,"wires":[["cdb33ca65f357ade"]]},{"id":"cdb33ca65f357ade","type":"http request","z":"58e5b5dd.6717dc","name":"Set devialet volume","method":"POST","ret":"obj","paytoqs":"ignore","url":"http://192.168.2.71/ipcontrol/v1/systems/current/sources/current/soundControl/volume","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"credentials":{},"x":730,"y":1060,"wires":[["cec60287.79ef98"]]},{"id":"467de2c082a93718","type":"ha-button","z":"58e5b5dd.6717dc","name":"Volume 10","version":0,"debugenabled":false,"outputs":1,"entityConfig":"4e9d8ebcc8608ee0","outputProperties":[{"property":"payload","propertyType":"msg","value":"10","valueType":"num"}],"x":260,"y":1340,"wires":[["310be873b19b2b87"]]},{"id":"ead9656dc40fdf7c","type":"ha-button","z":"58e5b5dd.6717dc","name":"Volume 20","version":0,"debugenabled":false,"outputs":1,"entityConfig":"087790cdea925fc9","outputProperties":[{"property":"payload","propertyType":"msg","value":"20","valueType":"num"}],"x":260,"y":1400,"wires":[["310be873b19b2b87"]]},{"id":"7b6ef9806dc164d7","type":"ha-button","z":"58e5b5dd.6717dc","name":"Volume 30","version":0,"debugenabled":false,"outputs":1,"entityConfig":"3aa7c76ea00fc4d5","outputProperties":[{"property":"payload","propertyType":"msg","value":"30","valueType":"num"}],"x":260,"y":1460,"wires":[["310be873b19b2b87"]]},{"id":"2e61f7c1f00e56ce","type":"ha-button","z":"58e5b5dd.6717dc","name":"Volume 40","version":0,"debugenabled":false,"outputs":1,"entityConfig":"5fd8dc91c0e8e3e3","outputProperties":[{"property":"payload","propertyType":"msg","value":"40","valueType":"num"}],"x":260,"y":1520,"wires":[["310be873b19b2b87"]]},{"id":"a1c14ad1d80762ae","type":"ha-button","z":"58e5b5dd.6717dc","name":"Volume 50","version":0,"debugenabled":false,"outputs":1,"entityConfig":"1cdec3c6d4a0b46f","outputProperties":[{"property":"payload","propertyType":"msg","value":"50","valueType":"num"}],"x":260,"y":1580,"wires":[["310be873b19b2b87"]]},{"id":"83886cfd8e46e327","type":"ha-button","z":"58e5b5dd.6717dc","name":"Volume 55","version":0,"debugenabled":false,"outputs":1,"entityConfig":"63f33b114f306a80","outputProperties":[{"property":"payload","propertyType":"msg","value":"55","valueType":"num"}],"x":260,"y":1640,"wires":[["310be873b19b2b87"]]},{"id":"f84a0c3d26a5788b","type":"ha-button","z":"58e5b5dd.6717dc","name":"Volume 60","version":0,"debugenabled":false,"outputs":1,"entityConfig":"a3d8763910ec01bd","outputProperties":[{"property":"payload","propertyType":"msg","value":"60","valueType":"num"}],"x":260,"y":1700,"wires":[["310be873b19b2b87"]]},{"id":"7c7a3d4baebaddcf","type":"ha-button","z":"58e5b5dd.6717dc","name":"Devialet Mute","version":0,"debugenabled":false,"outputs":1,"entityConfig":"536b8541a97d85f8","outputProperties":[{"property":"payload","propertyType":"msg","value":"0","valueType":"num"}],"x":270,"y":1280,"wires":[["310be873b19b2b87"]]},{"id":"68d39602e4ed2164","type":"link in","z":"58e5b5dd.6717dc","name":"","links":["2e5209b7d40f9ddb"],"x":135,"y":1180,"wires":[["94a35febd50b3d4b"]]},{"id":"94a35febd50b3d4b","type":"api-render-template","z":"58e5b5dd.6717dc","name":"Set 45 for quiet wakeup","server":"d81dfb02.85eee","version":0,"template":"45","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":310,"y":1200,"wires":[["310be873b19b2b87"]]},{"id":"d81dfb02.85eee","type":"server","name":"Home Assistant","version":2,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30},{"id":"4e9d8ebcc8608ee0","type":"ha-entity-config","server":"d81dfb02.85eee","name":"Devialet_10","version":2,"haConfig":[{"property":"name","value":"Devialet 10"},{"property":"icon","value":"mdi:volume-plus"},{"property":"device_class","value":""}],"entityType":"button"},{"id":"087790cdea925fc9","type":"ha-entity-config","server":"d81dfb02.85eee","name":"Devialet_20","version":2,"haConfig":[{"property":"name","value":"Devialet 20"},{"property":"icon","value":"mdi:volume-plus"},{"property":"device_class","value":""}],"entityType":"button"},{"id":"3aa7c76ea00fc4d5","type":"ha-entity-config","server":"d81dfb02.85eee","name":"Devialet_30","version":2,"haConfig":[{"property":"name","value":"Devialet 30"},{"property":"icon","value":"mdi:volume-plus"},{"property":"device_class","value":""}],"entityType":"button"},{"id":"5fd8dc91c0e8e3e3","type":"ha-entity-config","server":"d81dfb02.85eee","name":"devialet_40","version":2,"haConfig":[{"property":"name","value":"Devialet 40"},{"property":"icon","value":"mdi:volume-plus"},{"property":"device_class","value":""}],"entityType":"button"},{"id":"1cdec3c6d4a0b46f","type":"ha-entity-config","server":"d81dfb02.85eee","name":"devialet_50","version":2,"haConfig":[{"property":"name","value":"Devialet 50"},{"property":"icon","value":"mdi:volume-plus"},{"property":"device_class","value":""}],"entityType":"button"},{"id":"63f33b114f306a80","type":"ha-entity-config","server":"d81dfb02.85eee","name":"devialet_55","version":2,"haConfig":[{"property":"name","value":"Devialet 55"},{"property":"icon","value":"mdi:volume-plus"},{"property":"device_class","value":""}],"entityType":"button"},{"id":"a3d8763910ec01bd","type":"ha-entity-config","server":"d81dfb02.85eee","name":"devialet_60","version":2,"haConfig":[{"property":"name","value":"Devialet 60"},{"property":"icon","value":"mdi:volume-vibrate"},{"property":"device_class","value":""}],"entityType":"button"},{"id":"536b8541a97d85f8","type":"ha-entity-config","server":"d81dfb02.85eee","name":"devialet_mute","version":2,"haConfig":[{"property":"name","value":"Devialet Mute"},{"property":"icon","value":"mdi:volume-off"},{"property":"device_class","value":""}],"entityType":"button"}]

Can you place a debug node just after the Set Payload step?
Probably the value is incorrect, a decimal perhaps?

This is my payload:
image

1 Like

Indeed, when I set with a button there are no " " and the number has no decimal place but when I set with a number helper I have the second result. I have no idea how to fix it.
image

You can use JSONata to cast the string to Int and also the round function to round with 0 decimals. Check out $parseInteger() here: Numeric functions · JSONata

1 Like

Thanks! When I was looking at my flow I had the ‘volume changed’ state node state type set to string, I changed it to number and it worked, the slider now controls the volume and doesn’t return to zero, thanks for your help!

Did anyone’s Devialet ‘integrations’ stop working since the speaker update this week?

Same here. They changed the JSON a little, systemVolume is renamed to volume:

{
    "volume": 31
}
1 Like

Thanks for figuring it out!

Great news! I worked on the integration yesterday and today. I have a (almost) full working integration, but still a lot to improve. You can download the custom component here

1 Like

Oooh! I’m going to have a look right now! Thanks!

Does this integration work with Devialet amplifiers also? For example D200?

Probably not. It’s worth a try, but it seems like they don’t use the (same) API.