bdraco / nexia

Python library for connecting to nexia
Apache License 2.0
21 stars 13 forks source link

Work required to support XR724 #4

Open iskiselev opened 3 years ago

iskiselev commented 3 years ago

I have XR724 thermostat and looks like API to work with it is different from XR724.

Data about it is not visible with https://www.mynexia.com/houses/{HOUSE_ID}/xxl_thermostats request, but at least from web site UI can be accessed with request to https://www.mynexia.com/houses/{HOUSE_ID}/diagnostics/thermostats/{DEVICE_ID}

Sample of this data:

{
   "name":"Second floor",
   "temperature_scale":"c",
   "temperature":"24.5",
   "heat_setpoint":"24.0",
   "cool_setpoint":"27.0",
   "min_cool_setpoint":"13",
   "max_cool_setpoint":"37",
   "min_heat_setpoint":"13",
   "max_heat_setpoint":"37",
   "setpoint_increment":0.5,
   "humidity":"35",
   "outdoor_temperature":"",
   "mode":"Auto",
   "run_mode":"Run Schedule",
   "fan_mode":"Auto",
   "operating_state":"System Idle",
   "fan_state":"Fan Off",
   "display_lock":false,
   "is_connected":true
}

In Nexia web UI configuration settings for it are limited - I see more options in Nexia Android application. I also don't see this device with Nexia Google Assistnat and Alexa integration - so I'm really interested in bringing some support of it in HomeAssistant.

iskiselev commented 3 years ago

Device id can be found with Request URL: https://www.mynexia.com/houses/{HOUSE_ID}/firmware_updates request. It will return next JSON:


[
   {
      "id":1994222,
      "deviceName":"Second floor",
      "firmwares":[
         {
            "name":"Firmware",
            "startMessage":"Connecting to Second floor...",
            "type":"main",
            "version":"02.69.00",
            "needsUpgrade":false,
            "updateUrl":"/houses/{HOUSE_ID}/diagnostics/thermostats/{DEVICE_ID}/update_firmware",
            "cancelUrl":"/houses/{HOUSE_ID}/diagnostics/thermostats/{DEVICE_ID}/update_firmware",
            "updateKey":null,
            "deviceName":"Second floor",
            "confirmKey":"{SOMETHING_STRANGE_I_WOULD_MASK}",
            "cancellable":false
         }
      ]
   }
]