Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IP Control V1 2.14 interface notes
#1
There is a lot of good information in the API document here.

https://help.devialet.com/hc/en-us/artic...5207423378

That is the authoritative source but find it hard to parse and created this cheat sheet.

note to self: Should not hardcore ipcontrol or v1 these will change, do a look up with the mDNS discovery.

for Firmware version 2.14

BaseURL: http://<IP>/ipcontrol/v1/

Namespaces:
/devices{instance}
/systems{instance}
/groups{instance}

Instance: Only 'current' is "currently" supported.  future looking you may need to 'look this up'


Endpoints:
/devices/current/ {get} - this gives you device properties  
/systems/current/ {get} - this gives you system properties

/{groups|systems}/current/sources/current/soundControl/volume  {get} {post} {notification}
-get returns the volume - post with the following request data sets the volume.
Request Body
{
"volume": 35
}

/{groups|systems}/current/sources/current/soundControl/volumeUp {post} - turn it up
/{groups|systems}/current/sources/current/soundControl/volumeDown {post} - turn it down

/{groups|systems}/current/sources {get}  - this gives you a list of sources for the group or system.
/{groups|systems}/current/sources/current {get} - this gives you the current state of the group or system.

To Select a Source, use the SourceID from groups or systems /current/sources

"groups/current/sources/" + {SourceID} + "/playback/play"

/groups/current/sources/current/playback/play {post}
/groups/current/sources/current/playback/pause {post}
/groups/current/sources/current/playback/mute {post}
/groups/current/sources/current/playback/unmute {post}

Based on that you can do the basics of finding the devices and selecting a source to play along with changing the volume.

Still working through my implementation but those all work at some level with the caveat the Dialog is either hard to find or there is a bug.



regards
scott-
Reply
#2
Hi there,

Forgive me for being a bit dumb and I’m not sure this is the right place to ask this question, but here goes.

I get the main point of the new http api feature but don’t have enough knowledge to actually start fiddling with it. Would it be an idea to post something on the forum for beginners to read up on? So the basics of using web api and those kind of code commands. I’m sure I’m not the only person who sees the potential of this feature (using my smart home devices in combination with phantoms e.g.), but not sure how to implement and use it.

Thanks for any reply!
Reply
#3
(01-Feb-2022, 13:41)JustinR Wrote: Hi there,

Forgive me for being a bit dumb and I’m not sure this is the right place to ask this question, but here goes.

I get the main point of the new http api feature but don’t have enough knowledge to actually start fiddling with it. Would it be an idea to post something on the forum for beginners to read up on? So the basics of using web api and those kind of code commands. I’m sure I’m not the only person who sees the potential of this feature (using my smart home devices in combination with phantoms e.g.), but not sure how to implement and use it.

Thanks for any reply!

Hi there - How you might approach the coding depends somewhat on the environment you are targeting. Win, Mac, Nix, Mobile (ios, droid) and what languages you are familiar with or want, need to use.  This ranges from simple scripting to you could build an app around the API, much like the Devialet app or integrate Devialet control 'natively' into Roon, Spotifiy. in fact some of the 2.16 metadata (track information) additions seem tailored specifically for such a provider to use.

But what to learn to get started: - generically learn about making POST and GET calls to WEB API/REST urls this part works the same regardless of the platform. 
Aside from that understand Groups, Systems, Devices and how these entities relate to each other. Groups manage systems containing devices.

Postman is a great place to start , you dont have to write any code and can see what POST or GET on a URL returns.  The request body contains information  you want to send to the URL the response body is what you get back. Most of the interactions occur based on the url, the exact and full path of the URL you use, but some of them take parameters sent in the request body. 

In postman
do a get on this URL for example http://<ipofaphantom>/ipcontrol/v1/devices/current
that will return some information in the response body.
that has info about that device.
This is where it starts getting hard again, or HARD CODED.

That's not a step by step... but hopefully useful to demystify a tiny bit.

regard
scott-
Reply
#4
Here are a few very simple examples of what you can do.  This was the first thing I did on my iphone.

I created a shortcut (in the Shortcuts App)

I called it "Start Phantoms" (don't use the word "play", as your phone will start playing music from Phantom of the opera or something !)
Add action "Get Contents of URL" with the URL
Code:
http://10.0.1.227/ipcontrol/v1/groups/current/sources/current/playback/play

Change the method to POST

Save it

Now you can say Hey Siri Start Phantoms

Same thing for pause/stop - use the word STOP, not pause,
with the URL
Code:
http://10.0.1.227/ipcontrol/v1/groups/current/sources/current/playback/pause


Now you can say "Hey Siri Stop Phantoms"

"Hey Siri increase Phantom Volume" (need the word phantom in there or Siri will try to increase the volume of the phone)
Code:
http://10.0.1.227/ipcontrol/v1/systems/current/sources/current/soundControl/Up


"Hey Siri Decrease Phantom Volume"
Code:
http://10.0.1.227/ipcontrol/v1/systems/current/sources/current/soundControl/volumeDown


Remember to replace the IP address with the ip address of any one of your phantoms
Reply
#5
Hi all,

Thanks for all the help. I've been trying some things out recently in combination with my smart home device "Homey". One of the things I've managed to do is when the door (with a sensor, connected to Homey) is opened between a certain time, play Spotify on Phantoms. It's already a lot of fun.

One thing I was wondering, it's not possible to actually turn the Phantoms on is it? Same reason why you can't turn them on or off via the app I suppose. Just checking in case I've missed that part.

Justin
Reply
#6
Hi JustinR,
Devialet documentation says that the turn on / off will come with DOS 2.16, I can't wait, this is the point driving me crazy (having speakers using 25W each when not in-use)

Edit:
it actually won't even be possible to turn it back on without pressing the button, unbelievable.. that's what the doc is saying:
Device manipulation
/devices/{deviceId}/powerOff
POST
Turn off the device.
Minimal version:
- DOS >= 2.16
Parameters:
none
Note: Exiting OFF mode is only possible by pressing a physical button on the device.
Reply
#7
(24-Feb-2022, 13:43)s3kelman Wrote: re  Note: Exiting OFF mode is only possible by pressing a physical button on the device.

That caught my attention also.  so of course had to test it out. Smile

Discovered a workaround sort of, if you turn them off,  then cycle the main power (as in switch it off and on) they come back on.
without pushing the button.
Reply
#8
(25-Feb-2022, 08:05)scotthar Wrote:
(24-Feb-2022, 13:43)s3kelman Wrote: re  Note: Exiting OFF mode is only possible by pressing a physical button on the device.

That caught my attention also.  so of course had to test it out. Smile

Discovered a workaround sort of, if you turn them off,  then cycle the main power (as in switch it off and on) they come back on.
without pushing the button.

I have been struggling to find a way to put them in standby as I don't have access to the button, maybe I will do an automation like: "put in standby, wait 2 minutes, cut power" to make things a bit more "clean" than just powering off these (I have a bunch of homekit plugs) but it bothers me a lot that there is no auto-standby / wake on these things, I mean it's 2022, how is that still possible, moreover for a product that expensive
Reply
#9
(25-Feb-2022, 11:12)s3kelman Wrote: RE:  I have been struggling to find a way to put them in standby as I don't have access to the button.

One workaround is to use the 'new' remote. It actually makes it quite easy to turn them off with a Long press at the top of the dial.

With (pending release) 2.16 firmware as previously noted - in theory it will be possible to turn them OFF using using the API.
Then if you had a remote control power plug, cycle that off and on to get them to pop back on.
That in theory, should be as clean as pushing the button then unplugging them and plugging them back in.
Reply
#10
(25-Feb-2022, 23:06)scotthar Wrote:
(25-Feb-2022, 11:12)s3kelman Wrote: RE:  I have been struggling to find a way to put them in standby as I don't have access to the button.

One workaround is to use the 'new' remote. It actually makes it quite easy to turn them off with a Long press at the top of the dial.

With (pending release) 2.16 firmware as previously noted - in theory it will be possible to turn them OFF using using the API.
Then if you had a remote control power plug, cycle that off and on to get them to pop back on.
That in theory, should be as clean as pushing the button then unplugging them and plugging them back in.
Yes that's the idea, waiting for 2.16 to try that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)