29-Jan-2022, 08:35
(29-Jan-2022, 08:19)scotthar Wrote: Re: R1 API doc - https://help.devialet.com/hc/en-us/artic...5207423378
The first example does not seem to work for me, and strange '/identify' is the example call, This i assume is either a typo or is maybe against a future version of the firmware. /Identify is not otherwise documented and seems to return a 404. (which indicates /identify is a valid call against a FUTURE firmware version, i.e. this is hitting the promised backwards compatibiltiy of older firmwares, mabye thyis example is actually a unit test for that case.. :-)
http://192.168.1.20/ipcontrol/v1/devices...t/identify
The follwoing would have been a better up front at the top of the doc getting started example for 2.14
http://192.168.1.20/ipcontrol/v1/devices/current
/identify does not show up anywhere else in the docs that i can find...
Note some of the sections are stubs for 2.16 we are running 2.14 today so dont spend too much time trying to reboot your speakers yet...
I did find this worked on windows as a quick test...
curl -g -4 http://IP:80/ipcontrol/v1/devices/current
where IP is one of the IPs registered as an '-=ipcontrol' endpoint
using mDSNs / Bonjour on Windows.
type this> dns-sd -B _http._tcp
returns something like this:
2:28:29.233 Add 3 23 local. _http._tcp. Bedroom(L)
2:28:29.233 Add 3 23 local. _http._tcp. Bedroom(L)-ipcontrol
2:28:29.233 Add 3 23 local. _http._tcp. Gold Phantom-Left
2:28:29.237 Add 3 23 local. _http._tcp. Gold Phantom-Left-ipcontrol
2:28:29.238 Add 3 23 local. _http._tcp. Dialog-5584
2:28:29.239 Add 3 23 local. _http._tcp. Bedroom-ipcontrol
2:28:29.240 Add 3 23 local. _http._tcp. Bedroom
2:28:29.241 Add 3 23 local. _http._tcp. Gold Phantom-Right
2:28:29.241 Add 2 23 local. _http._tcp. Gold Phantom-Right-ipcontrol
then type this> dns-sd -L "Gold Phantom-Left-ipcontrol" _http._tcp
returns something like this:
Lookup Gold Phantom-Left-ipcontrol._http._tcp.local
2:29:00.453 Gold\032Phantom-Left-ipcontrol._http._tcp.local. can be reached at PhantomIGold-N07P000734U10.local.:80 (interface 23)
ipControlVersion=1 manufacturer=Devialet path=/ipcontrol/v1
But i'm probably for now going to just go the static IP route and leave the discovery for a future sprint...
FUTURE LOOKING: 2.16 - If you have access to a network you will in theory be able to reset the speaker with something like this...
curl -H 'Content-Type:' -X POST -d {} -g -4 http://192.168.0.15:80/ipcontrol/v1/devi...rySettings.
WHOOPS. /resetToFactorySettings thats a mistake! IMO.
I hope they take that out of 2.16 or think about that.
The http endpoint is not authenticated so if you have network access you can reset the speaker with a simple post command.
Though you can already do that with the button on the web interface. so its not really new.... something you could do by driving the web page with selenium automation for example. just something to think about in a connected world.... given this wipes the network creds and otherwise can muck up a working system...