latic
March 28, 2024, 2:00am
1
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:
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!)
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?
latic
April 9, 2024, 9:34pm
3
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.
latic
April 17, 2024, 6:31pm
4
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
latic
April 18, 2024, 7:15am
5
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).
latic
April 18, 2024, 6:10pm
6
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).
latic
April 19, 2024, 6:47pm
7
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!)
latic
April 28, 2024, 6:00am
8
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!
latic
April 29, 2024, 7:00pm
9
V0.0.5 was updating some API renewal logic
V0.0.6 Fixed a few errors / warnings which wanted me to update to the latest supported climate entity style.
latic
April 30, 2024, 5:48pm
10
V0.0.7 Continuing to Fix HA erros and warnings. Disabled compatibility mode (its fully compliant with the 2025.1 required changes).
V0.0.8 More API tweaks.
I’ve now had multiple API token renewals over the past 12 hours and everything looks to be working well.
tobias2
September 29, 2024, 6:58pm
11
This is super cool, thanks so much for putting it together and sharing the repo!
Newbie question: How do I go about testing this / adding the integration to HA?
saschawj
(Sascha Ferley)
October 22, 2024, 12:26am
12
Awesome integration. However as stated buggy. While login seems to work, reporting and sending updates (turning on / off) doesn’t.
latic
October 30, 2024, 6:44am
13
Yep, I didn’t get full time to get this running fully. Currently it looks like every few days they change up the codes etc.
I’ll get back to it at some point.
saschawj
(Sascha Ferley)
November 9, 2024, 10:19pm
14
Almost be worth while to see if one can ESPHome the device, since from network config it seems to be using a ESP32 controller.