simont77 / fakegato-history

Module to emulate Elgato Eve history
MIT License
167 stars 15 forks source link

New Characteristics / Services: Eve Motion - Eve Light Strip - Window Guard - Light Switch - Smoke #78

Open HomeKidd opened 4 years ago

HomeKidd commented 4 years ago

Hi!

I'm working on implementing custom Eve characteristics for ESP8266 based HomeKit firmware that works without any bridge via Wi-Fi.

Characteristics that i'm looking for: Temperature offset, LED on Motion, Transitions, Power On Behavior

Also i'm looking for the correct Service/Characteristic order for Eve Room to show app at the settings page as "Eve Room" (like my Eve Degree, Motion etc). Found it πŸ€“

~~Currently I've successfully added Eve Degree (shows up as "real" Degree in Eve app), but i can't find the correct order for Eve Room! But i've found some things in Accessory Simulator, e.g: VOC density doesn't shows up on Eve app (Room's sensor can measure it...also CO2) But VOC characteristic will be kept because I've the same sensor that Elgato have in Room~~πŸ˜„

~~Other thing that cant figure out is Eve Motion have ( had???) custom "LED on Motion" characteristic for toggeling the LED when motion detected.... anybody found the proper characteristic for that? It would be a nice feature to turn on/off the led when motion detected via Eve's characteristic~~πŸ˜„

Eve Motion characteristic: IMG_7749

HomeKidd commented 4 years ago

Also i've found two new characteristic that i'm interested in after i've exposed the Log Service/Characteristics for 'LightBulb' accessory type (aka Eve Light Strip): Transitions - Quick, Default, Moderate, Calm(delay time for changing color) Power On Behavior - Last Used, Default White (color after power-outage)

ebaauw commented 4 years ago

You need a HomeKit app to report the characteristics. We used HMCatalog for that, see https://github.com/simont77/fakegato-history#how-to-contribute, but I think that no longer compiles on the latest XCode with Swift v5.

HomeKidd commented 4 years ago

Yep i’ve Xcode installed, HMC app isnt the problem, the biggest program is that i dont have any Eve accessories so i cant capture data at the monentπŸ€“ Also i dont want to buy accessories just for reverse engineering EveπŸ™„πŸ˜… At the moment i’m playing with Accessory Simulator maybe i can figure out something πŸ’ͺ I’ve opened this Issue for those who maybe have these accessories and can figure it out ✌️ Or someone who already found these 😁

HomeKidd commented 4 years ago

But i've found a custom characteristic for Humidity and Temperature and Status in Eve. Humidity E863F122-079E-48FF-8F27-9C2605A29F52 Temperature E863F108-079E-48FF-8F27-9C2605A29F52 Status E863F150-079E-48FF-8F27-9C2605A29F52

Status seems to be 'Data type' and assigned to Eve Extend. In the HomeKit Accessory simulator it shows 0 Connected when set to data type with 0000000 value.

HomeKidd commented 4 years ago

I've found something: πŸ˜„

I've added E863F11D and E863F131 Characteristics under Log Service. After that the two settings in Eve app appeared (Power on behavior and Transitions) When i set the desired settings this happens:

When Transitions set to 'Calm' in Eve app: E863F11D becomes 6c02b004 6a022003 6b024006 When Transitions set to 'Moderate': 6c029001 6a029001 6b022003 When Transitions set to 'Default': 6c029600 6a029600 6b029001 When Transitions set to 'Quick': 6c025000 6a025000 6b027800

At the same time on every value change, Eve reads E863F131 Characteristics

When Power Behavior set to 'Defualt White' in Eve app: E863F11D becomes 650102 When Power Behavior set to 'Last Used' in Eve app: E863F11D becomes 650101 At the same time on every value change, Eve reads E863F131 Characteristics

The Power Behavior setting becomes constant when i also set E863F131 Characteristics.

IMG_8108_copy test

HomeKidd commented 4 years ago

Eve Thermo E863F12C's value set to 0011ff00 f22076 when performing a Valve Protection under the settings in Eve app. Setting E863F12F to this value will made the setting 'active'

HomeKidd commented 4 years ago

Also I've found Eve Window Guard when adding Tampered characteristic to "Eve Door" πŸ˜„ The strange thing is after i've added this characteristic, the accessory is no longer available at Eve app, only when you search via Settings Icon and tap Accessories 😳 Also new characteristic Tilt detection appears πŸ˜„ Doesn't matter which accessory type i've selected, it works with Other, Sensor, Door and Window type accessry too πŸ˜„

IMG_8311

ctschach commented 4 years ago

Do you have the Characteristics UUID for Tilt detection?

HomeKidd commented 4 years ago

Do you have the Characteristics UUID for Tilt detection?

No, i can't find it at the moment but please note Eve Window Guard doesn't really exist and not released yet since 2017(?)... πŸ˜„ But I'll keep searching....

But I've found two services:

E863F002 - Service for Eve Room 2015 E863F003 - Service for Eve Door & Window

Also when I've added E863F003, the Times Opened Characteristic is divided by 2 (counts both opened / closed state and divide it by 2 for only opened state). πŸ˜„

Also the Firmware update Characteristic (E863F11E) manages the User manual download for each accessory.

Setting E863F11E value to 01be00be triggers available update for Eve Weather (2015) Setting E863F11E value to 02be00be triggers available update for Eve Room (2015) Setting E863F11E value to 03be00be / 26be00be triggers available update for Eve Door & Window Setting E863F11E value to 04be00be triggers available update for Eve Energy (first gen) Setting E863F11E value to 11be00be / 25be00be triggers available update for Eve Motion Setting E863F11E value to 18be00be triggers available update for Eve Smoke Setting E863F11E value to 31be00be triggers available update for Eve Button Setting E863F11E value to 33be00be triggers available update for Eve Flare Setting E863F11E value to 36be00be triggers available update for Eve Light Strip Setting E863F11E value to 22be00be / 0bbe00be triggers available update for Eve Light Switch Setting E863F11E value to 37be00be / 38be00be triggers available update for Eve Energy Strip US/EU Setting E863F11E value to 1ebe00be triggers available update for Eve Degree Setting E863F11E value to 12be00be / 1abe00be / 2bbe00be / 0dbe00be / 28be00be / 29be00be / 1bbe00be / 1cbe00be / 2abe00be triggers available update for Eve Energy US Setting E863F11E value to 14be00be / 21be00be / 14be00be / 24be00be triggers available update for Eve Energy EU

Setting E863F11E value to 0cbe00be / 2cbe00be / 47be00be triggers available update for Eve Thermo Setting E863F11E value to 3bbe00be triggers available update for Eve Extend Setting E863F11E value to 23be00be triggers available update for Eve Aqua Setting E863F11E value to 27be00be triggers available update for Eve Room (new)

And at the same time user manuals (based on the value) could be downloaded. Eg.: 01be00be indicates available FW for Weather and Eve Weather's manual is downloadable.

HomeKidd commented 4 years ago

The another strange observation is setting E863F11E 30be00be / 43be00be / 49be00be triggers new available characteristics!

Adding it to the new Eve Light Switch seem to be working.... I've added E863F11D and E863F131 Characteristics under Log Service and same logic applies as i've mentioned previously: E863F11D read the value from Eve, E863F131 sets it.

Flip orientation: ON 21020001 OFF 21020000

Auto off timer 1 min 2c0101 2 min 2c0102 5 min 2c0105 10 min 2c010a 20 min 2c0114 30 min 2c011e 1h 2c013c 2h 2c0178

Status led: Always off 200100 When switch on 200142 When switch off 2001c2

External input Switch (pernament) value unknown Push button (Momentary) value unknown

It's missing i can't find values for these....

IMG_8677

IMG_8676

IMG_8675

HomeKidd commented 4 years ago

Elgato Eve Water Guard found....πŸ€“

Please ignore the "FakeWindowGuard" name πŸ˜‚

Leak Sensor Service with Leak Detected Characteristic and Last Activation Characteristic. Also Status Fault Characteristic needed. When Eve detects fault it will show "Make sure the cable isn't pinched"... Also the E863F007Eve Log service must be added with all the necessary Characteristics and E863F11D with E863F131.

When Leak detected pop-up screen shows the alarm could be Muted or Dismissed .

When Muting the alarm E863F11D got 4e0101 value (from Eve app) and setting E863F131 to 4e0101 will set it. The siren/alarm no longer will make any sound and no pop-up window will appear again! Setting E863F131 to 4e0001 will enable the alarm/siren (when leak detected) again!

Some characteristics may be missing.... hard to find these but Eve app shows this accessory as"Water Guard"! πŸ˜„

IMG_8691 copy IMG_8673 copy IMG_8671 copy

HomeKidd commented 4 years ago

@ebaauw @simont77 My friend updated HMCatalog for Swift 5. I'll text him to create a public repo on GitHub for that, but until: HMCatalog-Swift5-experimental.zip

It has a couple UI bugs, but i think it will be patched πŸ˜„

ebaauw commented 4 years ago

No history for the leak sensor?

HomeKidd commented 4 years ago

No history for the leak sensor?

Nope. At the moment this is what i've got πŸ˜„
Until its not released by Eve nobody knows what features Water Guard have. Same applies for Window Guard too

tobekas commented 4 years ago

Cool. The first byte of E863F11E encodes the product type and the next two bytes (swapped) seem to encode the firmware build number, which is added in parentheses after the Firmware Version under Detaills. Seems that the firmware update is only suggested, if this build number is below Eveβ€˜s latest build for this product. Furthermore, sometimes with higher build number, new characteristics are unlocked. This is logical, as these settings are probably new features from this version onward.

Not sure about the 4th byte...

tobekas commented 4 years ago

E863F11D (GetConfiguration) E863F131 (SetConfiguration) are in TLV Format. Several data are entered one after the other, starting with 1 byte for type (20 for status led, 21 for flip orientation,...), 1 byte for the length (number of following bytes) and then the actual data.

The schedules for Eve aqua and Eve Light switch are also handled with this two characteristics. I'm just researching this a little bit, but it’s not quite clear now.

Thermo Schedule, in contrast, is handled with E863F12C and E863F12F. Not TLV, but pure binary DATA format. This was much easier to decode. I will share my discoveries in #40 soon!

simont77 commented 4 years ago

Nice work! Could you add your discoveries to the wiki, as soon as you have something consistent? thanks

HomeKidd commented 4 years ago

@simont77 Could you pin this issue to the top?

@tobekas E863F11E first byte is exactly the product type! When i'm changing one bit eg.: 11be00be to 11be10be FW update icon disappears. Also: E863F11E - based on the FW version - can add new features πŸ˜„ I've found one of the characteristics (basically not a real characteristic) for Eve Motion what i've looking for in first comment: LED on Motion when FW set to 25be00be!πŸ˜„

LED on Motion: On: 300101 Off: 300100

Also under Sensitivity this appears but i wasnt able to turn it on 😳 Maybe its like the Eve Thermo's Window detection feature that only enabled when (automation?) condition was set up? Only in Dark:

E863F11D becomes: 80040000 0400 (mostly) and sometimes 300103 and 80040000 ffff

IMG_8711 IMG_8712

HomeKidd commented 4 years ago

Eve Window Guard still not working 😳 Shows up in Accessories tab but not in Room/ At a glance. But when adding Status Tampered characteristic to Eve Door still shows up as "Window Guard". Also Tilt detection is now clickable, when hitting Start it will read from E863F131 continuously. It looks like Window Guard isn't just a reed switch contact sensor, because - according to the tampered state pop-up window and tilt detection - physical tilting / opening needed to perform. IMG_8720 IMG_8719

Also Eve Smoke acts the same not shows up just in Accessories tab:

Installation is basically Status Active Characteristic. When set to "active", installation is "OK". Also performing a Test Alarm is necessary first.

Test alarm stop: 40020200 Test alarm start: 40020201

You need to perform at least one test ( setting E863F131 to 40020201) to disappear the red alarm icon.

IMG_8714 IMG_8716 IMG_8717

HomeKidd commented 4 years ago

I've contacted Eve to add temp offset for other Temperature related products ( Room/Degree) 🀞

IMG_8844

tobekas commented 4 years ago

Just FYI: I reverse engineered the Thermo schedule: See my comment im #40 and my PR: #80. I added a lot of debug outputs in my PR implementation for playing around.

Next task will be schedule for aqua / light switch / energy / energy strip, which seems more challenging.

HomeKidd commented 4 years ago

I've see that! Great work πŸ‘Œ

HomeKidd commented 4 years ago

Finally I've got user manual for Eve Water Guard πŸ€“ Users-Manual-4529514.pdf

n0rt0nthec4t commented 4 years ago

So, mucking around with things, stumbled (if not known) the recipe to make the EveHome think you have an Eve Smoke. Seems adding a motion sensor to your smoke & co sensors, the it shows up as an Eve smoke. However, seems the motion history is not shown if this configuration, so must other characteristics which trigger the motion history to re-show

IMG_2008 IMG_2007

HomeKidd commented 4 years ago

@n0rt0nthec4t

It works without the Motion Sensor too... Like I've posted it before πŸ˜„

n0rt0nthec4t commented 4 years ago

@n0rt0nthec4t

It works without the Motion Sensor too... Like I've posted it before πŸ˜„

True, but in your case, the eve app doesn't say its an Eve Smoke when using just a motion sensor. Have to work out how to get the history showing when eve app thinks its an eve smoke

fullphat commented 4 years ago

This is a fantastic post! I'm using it to help add custom characteristic support to a new HomeKit browsing app of my own. 😁

Has anyone been able to determine what Characteristic E863F135 is? According to my app, its' metadata is:

Unit: None
Format: UInt8
Min: 0
Max: 4
Step: 1
Read: Yes
Write: No
Events: Yes

It only appears for my Eve Degree and only ever reads 1.

Thanks!

HomeKidd commented 4 years ago

@fullphat I've never seen it, but i guess it should be the built-in display's layout because you can change which parameter you want to show on the display and the Eve Degree should save this parameterπŸ˜„ Also because its not writable, the app only can read this. My guess is 0-4 is the five display layout πŸ˜„ In that case Eve Room also have to support the E863F135 πŸ˜„

fullphat commented 4 years ago

Thanks for the info! I didn't know you could change what's displayed, so I'll look into that.

My Eve Room doesn't support this characteristic, although it is the old 2015(?) variant.

Update

It's now reading as 2, although I've not changed anything.

I'd forgotten about the button on the back, but that only seems to swap between temperature and humidity on my device. The reading on E863F135 doesn't change either way.

fullphat commented 3 years ago

Also, does anyone know what the readable E863F132 characteristic is? It's a UInt32 according to the metadata. My Eve Room supports it within the AirQualitySensor service.

HomeKidd commented 3 years ago

@fullphat As i remember E863F132 is Eve’s ppm/ppb CO2/VOC characteristic which used for the Eve history chartπŸ˜„

HomeKidd commented 3 years ago

Thanks for the info! I didn't know you could change what's displayed, so I'll look into that.

Update

It's now reading as 2, although I've not changed anything.

I've added it to my Fake Eve Degree in the Accessory Simulator, actually nothing changed and the Eve app doesnt read anything from E863F135 😟 Which Service is it linked to?

fullphat commented 3 years ago

It's linked to the custom "Eve Degree" service: B14B15FE-199A-4FA7-B633-841AA0F827F6 42BCDA09-F2D1-4923-A5EA-592FCC2FCE49 D4CCC18E-7BED-4FCC-8241-59A54343B599 82521DB2-14DF-4990-8804-3A4CACDB39E3

HomeKidd commented 3 years ago

Little update:

Eve Light Strip E863F131 data values for showing the last active / active for time:

00022300 0302 5201 650101 6c029001 6a029001 6b022003 d004 44884d25 9b04 8e265925 00 00000000 0000001e 02300c

Using the latest build 338 (Hex 5201 on byte 7-8), followed by the Transitions and Power on Behaviour data. Then d004 followed by the last active time, 9b04 followed by the Now Eve epoch time πŸ˜„

Using my custom native HomeKit FW i was able to get these up and running correctly πŸ˜‡

IMG_6420

n0rt0nthec4t commented 3 years ago

Also Eve Smoke acts the same not shows up just in Accessories tab:

Installation is basically Status Active Characteristic. When set to "active", installation is "OK". Also performing a Test Alarm is necessary first.

Test alarm stop: 40020200 Test alarm start: 40020201

You need to perform at least one test ( setting E863F131 to 40020201) to disappear the red alarm icon.

The red alarm icon is there to indicated an alarm test reminder has been set. When an alarm test has been started from teh Eve app, either "40020200" or "40020201" is written to E863F11D. Using E863F131 and returning 8608 %s00000000, where %s is an 16bit value which is the UNIX time in seconds when the last alarm test was performed: eg "86085b5b516000000000", this is displayed next to the alarm test click through, rather then a red "unknown". returning 8608 000000000000000 displays "Never" in red

Is there anyone else able to get some dumps of data returned from E863F131 on an Eve Smoke?

I've got other commands been written to E863F11D, such as "4102xxxx", but cant seem to work out what that is.

n0rt0nthec4t commented 3 years ago

OK.. I can get a normal smoke sensor show up as an Eve Smoke. 3 characteristics are required to be added with the Log service. These are: E863F131 - Set Command E863F11D - Get Command

E863F134 - status (HMCharacteristicTypeElgatoDeviceStatus), UINT32 type. Have worked out the following status bits

    // Status bits
    //  0 = Smoked Detected
    //  1 = Heat Detected
    //  2 = Alarm test active
    //  9 = Smoke chamber
    // 14 = Smoke sensor deactivated
    // 15 = flash status led (on)
    // 24 & 25 = alarms paused
    // 25 = alarm muted

"40020501" gets written to E863F11D, when flash status led = on done in Eve App "40020500" when off

With these, you get the below... more work to sus things out

IMG_0668

n0rt0nthec4t commented 3 years ago

Ok, the hard bit now is to workout teh signatures and fields for history data requests for an Eve Smoke.. oh fun.

HomeKidd commented 3 years ago

Dig deeper into the New Weather (without having an actual one πŸ˜‚ ).... Updates soon πŸ˜„

XS-SpaceGray-P-2 2

n0rt0nthec4t commented 2 years ago

Dig deeper into the New Weather (without having an actual one πŸ˜‚ ).... Updates soon πŸ˜„

Interesting to know what "recipe" was use to Show as a eve weather/degree. what was the characteristic for Trend?

n0rt0nthec4t commented 1 year ago

@HomeKidd wondering what "signature" you had for Eve Water Guard to make work in your "beta" firmware for ESP?