Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add support for TRVZB via Cloud #1244

Open
Furlanstefano opened this issue Oct 18, 2023 · 49 comments
Open

Feature request: Add support for TRVZB via Cloud #1244

Furlanstefano opened this issue Oct 18, 2023 · 49 comments
Assignees
Labels
enhancement New feature or request

Comments

@Furlanstefano
Copy link

Hi, can u add support for new TRVZB via Cloud?
With the ZIGbee Hub in home assistant I see the new device with wrong value for the temperature sensor and not as a thermostat device.
Thanks

Schermata 2023-10-18 alle 14 03 21
sonoff-13cc52bc63d19deb63f9bbb0b37fffa0-Termo Cucina-62dbf1b3885e9f4850d306905a99df9a.json.txt

@AlexxIT AlexxIT added the enhancement New feature or request label Oct 24, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 24, 2023

It's very difficult to add a thermostat remotely. You can try to collect all commands from the device (via debug logs).

@Furlanstefano
Copy link
Author

do you think that I can solve the problem with a zigbee dongle? Now my TRVZB are connected via a Z-bridge pro, I think that with the dongle I can manage thermostat directly via zha or zigbee2mqtt.

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 25, 2023

You should try

@pippo73
Copy link

pippo73 commented Nov 23, 2023

Hi @Furlanstefano , did you managed to handle it? I plan to install a similar configuration, but I would like to be sure I can use it.

@Furlanstefano
Copy link
Author

@pippo73 works great with the zigbee usb-dongle and zha component on home assistant. I manage 10 TRVZB with a wifi thermostat connected to the water heater.

@Pante90
Copy link

Pante90 commented Nov 30, 2023

Hello,
can i know, how to visualizing the controller about my TRVZB in sonoff integration on Home assistant? Now i see this, and i don't know why.
TRVZB
i can't see any command and any sensor.
what i can do??
Help me please!!

@Furlanstefano
Copy link
Author

Furlanstefano commented Dec 1, 2023

@Pante90 like i said you have to use a usb zigbee dongle and zha integration for use trvzb ad a thermostat, not the zigbee hub.

@Pante90
Copy link

Pante90 commented Dec 1, 2023

how to do, to connect a usb dongle.with ewelink app? i think you need a hub or coordinator .

@pippo73
Copy link

pippo73 commented Dec 1, 2023

how to do, to connect a usb dongle.with ewelink app? i think you need a hub or coordinator .

When you use the USB d'ongle, your HA become an hub itself thanks to zha (or mqtt2zigbee). You create a network apart and you will no more use ewlink app but only HA

@Pante90
Copy link

Pante90 commented Dec 1, 2023

how to do, to connect a usb dongle.with ewelink app? i think you need a hub or coordinator .

When you use the USB d'ongle, your HA become an hub itself thanks to zha (or mqtt2zigbee). You create a network apart and you will no more use ewlink app but only HA

Ohh yess, but the zigbee device connected to this usb dongle doesn't appear on ewelink app. and you posted a SONOFFLAN integration on the first picture, and not a ZHA. i can't found anything about a TRVZB on sonofflan integration

@pippo73
Copy link

pippo73 commented Dec 1, 2023

Ohh yess, but the zigbee device connected to this usb dongle doesn't appear on ewelink app. and you posted a SONOFFLAN integration on the first picture, and not a ZHA. i can't found anything about a TRVZB on sonofflan integration

Now I pass the answer to @Furlanstefano, because I don't have any of them. I was answering you just for the theory 😅

@Furlanstefano
Copy link
Author

I posted the first picture asking for trvzb integration on sonofflan, for now it s not possible so i erased all my trvzb from eWeLink app and cloud, buyed an sonoff usb zigbee dongle (23€ on Amazon) and connected my trvzb directly in home Assistant with the dongle and zha native integration. Look at my screenshot from my phone.
Screenshot 2023-12-01 (13 37 58) jpeg

@chojnicki
Copy link

chojnicki commented Jan 6, 2024

"use usb dongle", "use zha" etc. How is that solution? It has nothing to do with that addon. It's like "I cannot start my motorcycle" - "Use car instead, works for me".

I'm trying to switch from Z2M where I have TRVZB connected together with around 100 other devices to separate ecosystems with HA in the middle. It works good with every brand except Sonoff :( Point of this addon is to use official hub and ewelink app, so ditching that on favor of ZHA/Z2M is not a solution that should be suggested in this repository :/

@AlexxIT I personally would love to see support for this device, which is very popular recently :)

@3jam3
Copy link

3jam3 commented Apr 22, 2024

You can try to collect all commands from the device (via debug logs).
What would be the best way to collect them for you? Please elaborate, give some hints.

@empx92
Copy link

empx92 commented Oct 4, 2024

Any news meanwhile ;)?

@AlexxIT AlexxIT self-assigned this Oct 10, 2024
@spioli
Copy link

spioli commented Oct 10, 2024

"use usb dongle", "use zha" etc. How is that solution? It has nothing to do with that addon. It's like "I cannot start my motorcycle" - "Use car instead, works for me".

I'm trying to switch from Z2M where I have TRVZB connected together with around 100 other devices to separate ecosystems with HA in the middle. It works good with every brand except Sonoff :( Point of this addon is to use official hub and ewelink app, so ditching that on favor of ZHA/Z2M is not a solution that should be suggested in this repository :/

@AlexxIT I personally would love to see support for this device, which is very popular recently :)

I agree, it is possible have the integration for this device?

@markfarringtonhome
Copy link

markfarringtonhome commented Oct 15, 2024

Yes please! Can we please have support for this - having invested in the zigbee hubs it would be a shame to have to purchase a usb dongle (+ home assistant isn't located in an ideal place for zigbee signal)

@AlexxIT AlexxIT mentioned this issue Oct 20, 2024
@ahmet8282
Copy link

Hello

Any updates on this?

@nicumaxian
Copy link

Looking for "TRVZB" support 🙏

@feder87
Copy link

feder87 commented Dec 4, 2024

Looking for "TRVZB" support please 🙏

@bob-tm
Copy link

bob-tm commented Dec 7, 2024

I attach log from my 3 devices.
Can you add sensors as first step? Or point me how to do this.
temp (c) = temp / 10
Voltage (mv) = Uint16 in hex

2024-12-07 12:45:29.782 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d UIID 7017 | {'bindInfos': {'gaction': []}, 'subDevId': '138310fefff8e2447017', 'parentid': '10022bfabb', 'fwVersion': '1.2.1', 'subDevRssi': -27, 'battery': 100, 'supportPowConfig': 1, 'fault': 0, 'step': '0035', 'limitVoltage': '09b8', 'temperature': 214, 'trigTime': '1733567482000', 'curTargetTemp': 220, 'workMode': '0', 'workState': '1', 'runVoltage': '053f', 'mon': '000000a001a400d2025800d203fc00d2056400a0056400a0', 'tues': '000000a001a400d2025800d203fc00d2056400a0056400a0', 'wed': '000000a001a400d2025800d203fc00d2056400a0056400a0', 'thur': '000000a001a400d2025800d203fc00d2056400a0056400a0', 'fri': '000000a001a400d2025800d203fc00d2056400a0056400a0', 'sat': '000000a001a400d2025800d203fc00d2056400a0056400a0', 'sun': '000000a001a400d2025800d203fc00d2056400a0056400a0', 'switch': 'on', 'manTargetTemp': 220, 'temSouce': 0, 'subDevRssiSetting': {'active': 60, 'duration': 5}, 'autoTargetTemp': 210, 'tempCorrection': 0, 'windowSwitch': False, 'childLock': False, 'ecoTargetTemp': 70, 'openPercent': 100, 'closePercent': 100}
2024-12-07 12:45:29.783 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a UIID 7017 | {'bindInfos': {'gaction': []}, 'subDevId': 'd38210fefff8e2447017', 'parentid': '10022bfabb', 'fwVersion': '1.2.1', 'subDevRssi': -65, 'ecoTargetTemp': 70, 'manTargetTemp': 190, 'windowSwitch': False, 'childLock': False, 'battery': 100, 'supportPowConfig': 1, 'temperature': 190, 'trigTime': '1733567661000', 'curTargetTemp': 190, 'workMode': '0', 'workState': '0', 'fault': 0, 'step': '0049', 'limitVoltage': '08c2', 'runVoltage': '059e', 'mon': '000000a001a400be025800a0025800a003fc00be056400a0', 'tues': '000000a001a400be025800a0025800a003fc00be056400a0', 'wed': '000000a001a400be025800a0025800a003fc00be056400a0', 'thur': '000000a001a400be025800a0025800a003fc00be056400a0', 'fri': '000000a001a400be025800a0025800a003fc00be056400a0', 'sat': '000000a001a400be025800be025800be025800be056400a0', 'sun': '000000a001a400be025800be025800be025800be056400a0', 'switch': 'on', 'temSouce': 0, 'autoTargetTemp': 160, 'tempCorrection': 0, 'openPercent': 100, 'closePercent': 100}
2024-12-07 12:45:29.784 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b8805 UIID 7017 | {'bindInfos': {'gaction': []}, 'subDevId': 'e65e0cfefff8e2447017', 'parentid': '10022bfabb', 'fwVersion': '1.2.1', 'battery': 100, 'supportPowConfig': 1, 'subDevRssi': -56, 'fault': 0, 'step': '001e', 'limitVoltage': '0bd1', 'temperature': 210, 'trigTime': '1733568120000', 'curTargetTemp': 220, 'workMode': '2', 'workState': '1', 'runVoltage': '04f6', 'mon': '000000a001a400dc025800dc03fc00dc056400a0056400a0', 'tues': '000000a001a400dc025800dc03fc00dc056400a0056400a0', 'wed': '000000a001a400dc025800dc03fc00dc056400a0056400a0', 'thur': '000000a001a400dc025800dc03fc00dc056400a0056400a0', 'fri': '000000a001a400dc025800dc03fc00dc056400a0056400a0', 'sat': '000000a001a400dc025800dc03fc00dc056400a0056400a0', 'sun': '000000a001a400dc025800dc03fc00dc056400a0056400a0', 'switch': 'on', 'autoTargetTemp': 220, 'temSouce': 0, 'manTargetTemp': 220, 'subDevRssiSetting': {'active': 60, 'duration': 5}, 'tempCorrection': 0, 'windowSwitch': False, 'childLock': False, 'ecoTargetTemp': 70, 'openPercent': 100, 'closePercent': 100}


@bob-tm
Copy link

bob-tm commented Dec 7, 2024

It seems like new UIID 7017 should be added to core\devices.py (TRVZB
by SONOFF)

workMode = 0 - Manual
workMode = 2 - Auto
workMode = 1 - Off

manTargetTemp 215 - Set new target to 21.5 in manual mode
autoTargetTemp - Editable?? Target in Auto mode
curTargetTemp
ecoTargetTemp - Editable Target in off (frost protection)
tempCorrection - Editable correction of current temp
childLock
windowSwitch - OpenWindow Detection
workState = 0 - iddle
workState = 1 - heating

List of All options
https://youtu.be/yCxa2A73yaI?t=601

Some Code for TRVZB
https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/devices/sonoff.ts

2024-12-07 12:45:29.787 DEBUG (MainThread) [custom_components.sonoff] AUTO mode start
2024-12-07 12:45:34.148 DEBUG (MainThread) [custom_components.sonoff.core.ewelink.cloud] CLOUD change state old=None, new=True
2024-12-07 12:45:34.149 DEBUG (MainThread) [custom_components.sonoff] Add 27 entities
2024-12-07 13:05:50.384 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | 1733569548654
2024-12-07 13:05:51.294 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | None
2024-12-07 13:05:53.534 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:05:53.644 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 215} | None
2024-12-07 13:05:53.706 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 225, 'trigTime': '1733569552000'} | None
2024-12-07 13:05:55.446 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | None
2024-12-07 13:06:08.743 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 210} | 1733569568716
2024-12-07 13:06:09.743 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 210} | None
2024-12-07 13:06:11.913 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:06:11.980 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 210} | None
2024-12-07 13:06:12.048 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 225, 'trigTime': '1733569571000'} | None
2024-12-07 13:06:13.919 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 210} | None
2024-12-07 13:06:37.250 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '2'} | 1733569595892
2024-12-07 13:06:38.210 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '2'} | None
2024-12-07 13:06:50.387 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '1'} | 1733569608992
2024-12-07 13:06:51.371 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '1'} | None
2024-12-07 13:06:51.440 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 70} | None
2024-12-07 13:06:52.381 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'switch': 'off'} | None
2024-12-07 13:06:53.383 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'ecoTargetTemp': 70} | None
2024-12-07 13:07:02.445 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | 1733569621117
2024-12-07 13:07:03.453 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:07:03.505 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 210} | None
2024-12-07 13:07:04.417 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'switch': 'on'} | None
2024-12-07 13:07:05.437 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 210} | None
2024-12-07 13:07:57.010 DEBUG (MainThread) [custom_components.sonoff.core.ewelink.cloud] CLOUD change state old=True, new=True
2024-12-07 13:08:30.644 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '2'} | 1733569709840
2024-12-07 13:08:31.628 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '2'} | None
2024-12-07 13:08:43.791 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | 1733569723493
2024-12-07 13:08:44.782 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:08:45.844 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | None
2024-12-07 13:08:46.784 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:08:46.849 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 215} | None
2024-12-07 13:08:46.897 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 226, 'trigTime': '1733569725000'} | None
2024-12-07 13:08:47.801 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | None
2024-12-07 13:08:49.504 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b8805 <= Cloud3 | {'temperature': 220, 'trigTime': '1733569728000'} | None
2024-12-07 13:08:49.559 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b8805 <= Cloud3 | {'workState': '0'} | None
2024-12-07 13:08:53.870 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b8805 <= Cloud3 | {'runVoltage': '0587'} | None
2024-12-07 13:10:02.155 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] 10022bfabb <= Cloud3 | {'gatewayBindRelations': []} | None
2024-12-07 13:10:37.834 DEBUG (MainThread) [custom_components.sonoff.core.ewelink.cloud] CLOUD change state old=True, new=True
2024-12-07 13:10:44.152 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 205} | 1733569842623
2024-12-07 13:10:45.141 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 205} | None
2024-12-07 13:10:47.324 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:10:47.389 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 205} | None
2024-12-07 13:10:47.454 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 226, 'trigTime': '1733569846000'} | None
2024-12-07 13:10:49.314 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 205} | None
2024-12-07 13:10:54.396 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b8805 <= Cloud3 | {'battery': 100, 'supportPowConfig': 1} | None
2024-12-07 13:11:08.804 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssiSetting': {'active': 60, 'duration': 5}} | 1733569868914
2024-12-07 13:11:09.797 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -34} | None
2024-12-07 13:11:34.801 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -35} | None
2024-12-07 13:11:39.283 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 240} | 1733569898945
2024-12-07 13:11:39.806 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -34} | None
2024-12-07 13:11:40.254 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 240} | None
2024-12-07 13:11:42.440 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:11:42.508 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 240} | None
2024-12-07 13:11:42.575 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 225, 'trigTime': '1733569901000'} | None
2024-12-07 13:11:42.641 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workState': '1'} | None
2024-12-07 13:11:44.464 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 240} | None
2024-12-07 13:11:44.524 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'runVoltage': '053f'} | None
2024-12-07 13:11:44.793 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -33} | None
2024-12-07 13:12:00.448 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'battery': 100, 'supportPowConfig': 1} | None
2024-12-07 13:12:07.761 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b8805 <= Cloud3 | {'temperature': 220, 'trigTime': '1733569926000'} | None
2024-12-07 13:12:37.526 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 220} | 1733569956841
2024-12-07 13:12:38.503 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 220} | None
2024-12-07 13:12:40.690 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:12:40.744 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 220} | None
2024-12-07 13:12:40.805 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workState': '0'} | None
2024-12-07 13:12:42.690 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 220} | None
2024-12-07 13:12:42.757 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'runVoltage': '0793'} | None
2024-12-07 13:13:08.027 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '2'} | 1733569986263
2024-12-07 13:13:09.014 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '2'} | None
2024-12-07 13:13:09.068 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 210} | None
2024-12-07 13:13:11.012 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'autoTargetTemp': 210} | None
2024-12-07 13:13:18.309 DEBUG (MainThread) [custom_components.sonoff.core.ewelink.cloud] CLOUD change state old=True, new=True
2024-12-07 13:13:20.082 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | 1733569998395
2024-12-07 13:13:21.085 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:13:22.061 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | None
2024-12-07 13:13:23.062 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:13:23.126 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 215} | None
2024-12-07 13:13:23.199 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 226, 'trigTime': '1733570002000'} | None
2024-12-07 13:13:24.063 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | None
2024-12-07 13:13:30.239 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 210} | 1733570009653
2024-12-07 13:13:31.230 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 210} | None
2024-12-07 13:13:33.399 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:13:33.468 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 210} | None
2024-12-07 13:13:35.415 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 210} | None
2024-12-07 13:13:35.662 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '2'} | 1733570015392
2024-12-07 13:13:36.411 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '2'} | None
2024-12-07 13:13:54.515 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | 1733570033446
2024-12-07 13:13:55.487 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:13:56.504 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | None
2024-12-07 13:13:57.510 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:13:57.556 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 215} | None
2024-12-07 13:13:57.629 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 229, 'trigTime': '1733570036000'} | None
2024-12-07 13:13:58.495 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 215} | None
2024-12-07 13:14:32.702 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 230} | 1733570072026
2024-12-07 13:14:33.690 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 230} | None
2024-12-07 13:14:36.581 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:14:36.581 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'curTargetTemp': 230} | None
2024-12-07 13:14:36.581 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 228, 'trigTime': '1733570074000'} | None
2024-12-07 13:14:36.581 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'workState': '1'} | None
2024-12-07 13:14:37.876 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'manTargetTemp': 230} | None
2024-12-07 13:14:37.939 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'runVoltage': '0541'} | None
2024-12-07 13:15:12.193 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] 10022bfabb <= Cloud3 | {'directDevNum': 3, 'routerDevNum': 0} | None
2024-12-07 13:16:01.321 DEBUG (MainThread) [custom_components.sonoff.core.ewelink.cloud] CLOUD change state old=True, new=True
2024-12-07 13:35:29.217 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'windowSwitch': False} | None
2024-12-07 13:35:31.127 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -34} | None
2024-12-07 13:36:00.475 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'tempCorrection': 8} | 1733571360381
2024-12-07 13:36:01.163 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -35} | None
2024-12-07 13:36:01.448 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'tempCorrection': 8} | None
2024-12-07 13:36:03.637 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 237, 'trigTime': '1733571362000'} | None
2024-12-07 13:36:03.700 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'tempCorrection': 8} | None
2024-12-07 13:36:06.133 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -35} | None
2024-12-07 13:36:12.964 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssiSetting': {'active': 60, 'duration': 5}} | 1733571373061
2024-12-07 13:36:13.959 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -35} | None
2024-12-07 13:36:20.836 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'tempCorrection': 0} | 1733571380085
2024-12-07 13:36:21.824 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'tempCorrection': 0} | None
2024-12-07 13:36:23.947 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -33} | None
2024-12-07 13:36:23.994 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'temperature': 229, 'trigTime': '1733571382000'} | None
2024-12-07 13:36:24.060 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'tempCorrection': 0} | None
2024-12-07 13:36:28.960 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -37} | None
2024-12-07 13:36:57.234 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'childLock': True} | 1733571415994
2024-12-07 13:36:58.222 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'childLock': True} | None
2024-12-07 13:36:58.959 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -34} | None
2024-12-07 13:37:03.460 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'childLock': False} | 1733571422417
2024-12-07 13:37:04.451 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'childLock': False} | None
2024-12-07 13:37:07.104 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'windowSwitch': True} | 1733571427134
2024-12-07 13:37:08.077 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'windowSwitch': True} | None
2024-12-07 13:37:08.961 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -34} | None
2024-12-07 13:37:10.714 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'windowSwitch': False} | 1733571430624
2024-12-07 13:37:11.690 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'windowSwitch': False} | None
2024-12-07 13:37:13.961 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -34} | None
2024-12-07 13:37:20.930 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'ecoTargetTemp': 55} | 1733571440654
2024-12-07 13:37:21.917 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'ecoTargetTemp': 55} | None
2024-12-07 13:37:23.416 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssiSetting': {'active': 60, 'duration': 5}} | 1733571443428
2024-12-07 13:37:24.411 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -34} | None
2024-12-07 13:37:31.180 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'ecoTargetTemp': 70} | 1733571451227
2024-12-07 13:37:32.171 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'ecoTargetTemp': 70} | None
2024-12-07 13:37:34.402 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880d <= Cloud3 | {'subDevRssi': -35} | None
Connected

@ahmet8282
Copy link

@bob-tm while at it, can you please add the state to see if the valve open or not (heating or not)

Yes it is possibly to compare target and room temperature, but doing it from the attribute will be better. Thank you

@bob-tm
Copy link

bob-tm commented Dec 7, 2024

Seems like workState

in this log I increase target temp, wait to state changed and decrease it back.

2024-12-07 13:47:25.816 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'manTargetTemp': 200} | None
2024-12-07 13:47:28.036 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:47:28.103 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'curTargetTemp': 200} | None
2024-12-07 13:47:28.155 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'temperature': 193, 'trigTime': '1733572047000'} | None
2024-12-07 13:47:28.216 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'workState': '1'} | None
2024-12-07 13:47:30.022 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'manTargetTemp': 200} | None
2024-12-07 13:47:30.084 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'runVoltage': '0551'} | None
2024-12-07 13:47:45.282 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'manTargetTemp': 185} | 1733572063712
2024-12-07 13:47:46.261 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'manTargetTemp': 185} | None
2024-12-07 13:47:48.454 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'workMode': '0'} | None
2024-12-07 13:47:48.509 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'curTargetTemp': 185} | None
2024-12-07 13:47:48.575 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'workState': '0'} | None
2024-12-07 13:47:50.461 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'manTargetTemp': 185} | None
2024-12-07 13:47:50.524 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] a4800b880a <= Cloud3 | {'runVoltage': '05ac'} | None

@bob-tm
Copy link

bob-tm commented Jan 3, 2025

Some base to start from.

	7017: [
		spec(XSensor, param="workMode"),
                spec(XSensor, param="workState"),
		spec(XSensor, param="temperature", multiply=0.1),
		
		spec(XSensor, param="manTargetTemp", multiply=0.1),
		spec(XSensor, param="autoTargetTemp", multiply=0.1),
		spec(XSensor, param="curTargetTemp", multiply=0.1),
		spec(XSensor, param="ecoTargetTemp", multiply=0.1),
		spec(XSensor, param="tempCorrection", multiply=0.1),		

		spec(XSensor, param="childLock"),
		spec(XSensor, param="windowSwitch"),
		
		spec(XSensor, param="runVoltage"),
		
		XSwitch,
                Battery,
		ZRSSI
	]

image

@fabi86
Copy link

fabi86 commented Jan 7, 2025

Yes +1 for TRV support and thanks a lot for your great work!!! really appreciate it!

i have the trv on 3 different floors, so dongle is no option for me, as i need 2-3 bridges to cover the whole area.
currently using tado, would love to switch to sonoff TRV, since more durable

@oetjeesa
Copy link

Hi Alex, thanks for your great work. What is the status of TRV in SONOFF_LAN? I only get a switch option in HA, not a thermostat, and no reading of target/measured temperature.
image
Any guidance on how to include this sensor and all the sensor entities, or when this will be included?
Thanks again

@oetjeesa
Copy link

@bob-tm indeed adding your code to devices.py makes the data coming into HA.
image

However, it does not give thermostat control from HA. What would be the best way? To make a climate entity in configuration.yaml like this?:
climate:

  • platform: generic_thermostat
    name: SpaceHeater_Porch
    ac_mode: false
    heater: switch.space_heater_pro_power_switch
    target_sensor: sensor.space_heater_pro_temperature
    initial_hvac_mode: 'off'
    min_temp: 45
    max_temp: 500
    target_temp: 71
    min_cycle_duration:
    seconds: 5
    away_temp: 50
    precision: 1

@oetjeesa
Copy link

@bob-tm @AlexxIT the problem now is that for every TRV we would need to manually add a climate entity in code.... far from automatic

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 14, 2025

At the moment I don't understand at all the relationship between these parameters - switch, workMode, workState, manTargetTemp, autoTargetTemp, curTargetTemp, ecoTargetTemp.

Which parameter is used to switch on which mode. Which parameter is used to set the target temperature, probably the name of the parameter depends on the mode.

Looks like the logic is similar to this thermostat, but there are still important differences:

class XThermostat(XEntity, ClimateEntity):
params = {"switch", "targetTemp", "temperature", "workMode", "workState"}
# @bwp91 https://github.com/AlexxIT/SonoffLAN/issues/358
_attr_hvac_modes = [HVACMode.OFF, HVACMode.HEAT, HVACMode.AUTO]
_attr_max_temp = 45
_attr_min_temp = 5
_attr_preset_modes = ["manual", "programmed", "economical"]
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_target_temperature_step = 0.5

@alpat59
Copy link

alpat59 commented Jan 14, 2025

HI all, your work is great ! .. I'm strongly interested (it's exactly I was searching for ..maintaining bridge pro original firmware and monitor/control devices by HA integration) and I want to thank @AlexxIT and all for your contribution and effort .. I'm not able to support you but don't hesitate to ask me if you need tests and checks. Tks

@oetjeesa
Copy link

oetjeesa commented Jan 14, 2025

hi Alex

the ihost API is defined here for the thermostat: https://ewelink.cc/ewelink-cube/introduce-open-api/document/
I guess the coolkit API has a very similar API interface, I remember you have a link in your code to it

there are 3 workmodes: AUTO, MANUAL and ECO
for each you can set the target temperature: manTargetTemp, autoTargetTemp, curTargetTemp, ecoTargetTemp
there is a switch parameter in the json, but in the ewelink app there is no switch, so I guess that is set by the API automatically

see here what you can set in ewelink app
image
image

when you change the code i can try it out for you if you want! if needed I can also give you access to my ewelink through a private channel...

Cheers
Michel

@bob-tm
Copy link

bob-tm commented Jan 16, 2025

Thank you for example. Done with climate entity!

toggle switch to on - enable manual mode
toggle switch to off - enable eco-off mode
switch will stay on in auto mode. Better to not use it and use preset modes for climate entity.

Preset changing is working.
Target temp based on preset is changed too.

Replace two files from archive and test it.

SonoffLan.zip

@bob-tm
Copy link

bob-tm commented Jan 16, 2025

I need some help with config:

  1. convert Childlock and windowSwitch to switch
  2. Set units to temperature for manTargetTemp, autoTargetTemp, etc
  3. convert hex string from runvoltage and limitvoltage to decimal int and set mv as unit of mesaurment

@oetjeesa
Copy link

Dear Bob,

I tried your code and it is a BIG improvement, temperature can now be set.
image

However, I do not understand the mode settings. In my view the HA ON/OFF state should be automatically set by SONOFF, and therefore should be disabled, and should be equal to workState given by SONOFF.

The workMode should be one of: MANUAL, AUTO or OFF and be selectable in the thermostat. All this should be similar to the interface of SONOFF itself:
image

Oh yes, and the range of temperature values is from 4 to 35, a small change in climate.py.

Thanks a lot!

@oetjeesa
Copy link

and yes one thing, in one of the TRV the SONOFF API does not return a 'switch' parameter, and that makes the thermostat unusable in the HA thermostat, I have no idea why...

@bob-tm
Copy link

bob-tm commented Jan 16, 2025

I do not touch mode code. Presets work like in app

AlexxIT added a commit that referenced this issue Jan 16, 2025
@AlexxIT
Copy link
Owner

AlexxIT commented Jan 16, 2025

@oetjeesa
Copy link

Alex may I ask why you have not taken the code from Bob that defines a new Thermostat_TRV in the climate.py?

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 17, 2025

Missed it. A file with code in the issues comment is quite rare case.

@bob-tm
Copy link

bob-tm commented Jan 17, 2025

Missed it. A file with code in the issues comment is quite rare case.

How to Setup temperature units of mesaurment for manTargetTemp, autoTargetTemp?

Looks like this already present in your code and can be done via simple configure

Tomorrow I will check mode logic for climate entity and update the code.

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 18, 2025

I think only Celsius supported for now.

@bob-tm
Copy link

bob-tm commented Jan 18, 2025

Image

Yes, celsius. But how to change device_class for higlighted Sensors?

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 18, 2025

In fact, they're stupid sensors. They shouldn't be there. This is should be climate-type device.
They're temporary sensors until there's a normal climate entity.

@bob-tm
Copy link

bob-tm commented Jan 18, 2025

New release.
hvac mode now works like presets (off = off, heat = manual, auto = auto)
fixed Child Lock and Window Switch
It's fully functional climate entity. Ready to release.

climate.py, switch.py and core/devices.py should be replaced.

Code is attached.

sonoff.zip

@alpat59
Copy link

alpat59 commented Jan 19, 2025

Hi @bob-tm .. I kindly ask your help... I loaded into custom_component folder your "release", replacing the existing one (the official last is 3.8.2). I reloaded the integration, restarted HA, rebooted Raspberry .. but in the integration pages I'm not able to see the climate entity associated to my TRVZBs... I'm surely doing mistakes... Could you give some advices ? Thank you in advance

@bob-tm
Copy link

bob-tm commented Jan 21, 2025

I uploaded new code to my fork https://github.com/bob-tm/SonoffLAN/

@bob-tm
Copy link

bob-tm commented Jan 21, 2025

and create pull request #1569

@ibuffy
Copy link

ibuffy commented Feb 4, 2025

Any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests