Skip to content

Instantly share code, notes, and snippets.

@benarent
Created November 27, 2018 20:03
Show Gist options
  • Save benarent/10cd90bab4f0f297ac4a908800350769 to your computer and use it in GitHub Desktop.
Save benarent/10cd90bab4f0f297ac4a908800350769 to your computer and use it in GitHub Desktop.
Philip air purifier API?

I've been recently looking for an API for Philip Air Purifier 2000i. I've noticed that I can ping the IP at http://10.0.1.51 which returns {"error":"Badly formed (DI Comm) request "}

After setting up the mobile app and inspecting the traffic I've noticed a few endpoints but I'm currently getting a strange base64 application/octet-stream out of the device.

I've put this here to help others.

GET: User Info

http://10.0.1.51/di/v1/products/0/userinfo

  • Returns 200 but base64 Content-Type: application/octet-stream

GET: Device

http://10.0.1.51/di/v1/products/1/device

  • Returns 200 but base64 Content-Type: application/octet-stream

PUT: Air

http://10.0.1.51:80/di/v1/products/1/air This is the API that controls the purifier, I can repeat the command and it'll start the fan.

GET: UPNP

http://10.0.1.51/upnp/description.xml UPnP Description, returns XML

<?xml version="1.0"?><root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>1</minor></specVersion><device><deviceType>urn:philips-com:device:DiProduct:1</deviceType><friendlyName>Living Room</friendlyName><manufacturer>Royal Philips Electronics</manufacturer><modelName>AirPurifier</modelName><modelNumber>AC2889</modelNumber><UDN>uuid:12345678-1234-1234-1234-e8c1d7002005</UDN><cppId>e8c1d7fffe002005</cppId></device></root>
@doppelhelix23
Copy link

This is the solution: https://github.com/rgerganov/py-air-control. Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment