Hey all,
Well, I’ve made a bit of progress. I’ve been able to capture the SmartDry app on iOS as it talks via the API to the server. Now I’m working on reverse engineering the API code itself. For anyone interested, here is what I’ve found:
- The SmartDry sensor appears to just send updates with it’s serial number to a central store regularly. These are then stored
- The iOS application sends an API call with the registered serial number and fetches the current “state” (the last update) from the server
The status update looks like this:
[
{
"Dry": 83,
"LessDry": 80,
"VeryDry": 85,
"active": 1,
"avgCount": 10,
"datalog": 1,
"delicateTemp": 52,
"dtSum": 7986170,
"failCode": 0,
"firstDataFlag": 0,
"heartBeat": null,
"heartBeatFlag": 0,
"hubHeartBeat": null,
"hubName": "[REDACTED]",
"humAvg": 21.5022,
"humidity": 21.98,
"idDryerballList": 302,
"lastReminder": null,
"linkActive": 1,
"loadCount": 128,
"loadStart": 0,
"loadWeek": 126,
"moveCount": 2,
"multiUser": 0,
"name": "[REDACTED]",
"notifyAlexa": 1,
"notifyDelicate": 1,
"notifyDelicateShd": 1,
"notifyDry": 1,
"notifyDryShd": 1,
"notifyHighHeat": 0,
"notifyHighHeatShd": 1,
"notifyLessDry": 1,
"notifyLessDryShd": 1,
"notifyLowBat": 0,
"notifyLowBatShd": 0,
"notifySleep": 1,
"notifySleepShd": 1,
"notifyStop": 1,
"notifyStopShd": 1,
"notifyVeryDry": 1,
"notifyVeryDryShd": 1,
"npoints": 1070,
"phoneEndpoint": "arn:aws:sns:us-east-1:074171373810:endpoint/APNS/SmartDryProduction/[REDACTED]",
"phoneToken": "[REDACTED]",
"phoneType": 1,
"processStep": 0,
"rDate": 1593295030222,
"reminder": 1,
"reset": 811,
"resetCount": 0,
"rowLock": 0,
"shake": 0,
"shakeCount": 4,
"stDate": 1593295025313,
"stEnable": 1,
"tempAvg": 40.7517,
"tempUnits": 0,
"temperature": 40.33,
"vbat": 130
}
]
I [REDACTED] sensitive information about my particular setup, but you can see the section for the APNS and what I redacted from that line. That’s the line that is passed in the API as an “auth token”.
I’ve also been able to replicate the API call outside of the iOS application and appear to be receiving updates normally. This means that I have everything I need to create a REST API within Home Assistant and have it actually polling their cloud service and returning current status.
Unfortunately, the API appears to be authenticated with your iOS device APNS (Apple Push Notification Service) ID, which I assume is saved by the server for your SmartDry at registration and thereafter is used as an “authentication key”.
It’s possible you could capture this over-the-air, as the API call itself is over HTTP (no TLS), and a HA component could then be built with those two variables and work properly. But this is a non-trivial exercise for most people.
I’m going to build a REST API call for myself and see if I can have it working reliably. If so, then we can look at a programmatic way to get the APNS ID.
-Rob