eHeat Envi - Smart 500w or 1000W space heaters - Version 0.0.1 Available

Have just got this heater and it appears to be smart and able to link to Google Cloud or Alexa, but they don’t allow any other integration other than their own app.

Having run a HTTPS snoop it looks like its not going to be that difficult to undertake as its a simple API such as:

GET https://app-apis.enviliving.com/apis/v1/device/list
list of devices

GET https://app-apis.enviliving.com/apis/v1/device/[device id]
Gets the device details and they are using a bearer auth key which can be obtained.

PATCH https://app-apis.enviliving.com/apis/v1/device/update-temperature/[device id]
Updates the Temp

I searched around and couldn’t find anyone else who’s adapted this and I’ll keep my progress within this thread.

— EDIT —

“Working” Version of this item in below post:

Now at Version 0.0.3 which includes Room temp and HACS integration.

I tried viewing the API traffic via mitmproxy but cannot get the app to trust the mitmproxy ca cert. How did you accomplish that?

Also, do you have a sample flow for getting a bearer token?

mitmproxy wasn’t working for me either, I ended up doing it via frida and httptoolkit.

Only way I got the bearer token was via the app itself.

Ended up getting side tracked and hoping to get back to this next week.

Looks like an API call to:

https://app-apis.enviliving.com/apis/v1/auth/login

With JSON:

{
  "password": "<plain text>",
  "login_type": 1,
  "username": "<email>",
  "device_id": "1",
  "device_type": "homeassistant"
}

Looks like the device_id is needed, but can be anything, same with device_type. The device Id generated by my virtual phone was:
b7fc91a908301e24

Reponse back is:

{
  "status": "success",
  "statusCode": 200,
  "msgCode": 1004,
  "msg": "Logged in successfully",
  "data": {
    "token": "<token>"
  }
}

I ran through this using Bruno to make sure I could send simple info and get replies back and looks like

This is my very very hacky and early version 0.0.1

Pretty much built using AI.

Currently working:
Turn on / off
Report / Set Temp

Possibly Working:
Adding multiple devices
(I only have one so cant test)

Not Working:
Room Temp Grab
Absolutely everything else (including HACS integration).

Not doing releases or anything fancy yet on Github, however we are now at version 0.0.2:

Currently working:
Turn on / off
Report / Set Temp
Room Temp

Possibly Working:
Adding multiple devices
(I only have one so cant test)

Not Working:
Absolutely everything else (including HACS integration).

Bumped to versions 0.0.3

Currently working:
Turn on / off
Report / Set Temp
Room Temp
HACS Integration

Possibly Working:
Adding multiple devices
(I only have one so cant test)

Not Working:
Absolutely everything else

It’d be great to have someone test this via HACS with two different heaters so we can see what breaks (if anything!)

v0.0.4

Now when an update happens and the API returns an issue (unauth’ed) it’ll reissue a key. It should have done this from the start, but it didn’t!