StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
615 stars 110 forks source link

[FR] Support for new Shelly TRV #644

Open Llamrei80 opened 2 years ago

Llamrei80 commented 2 years ago

Is your feature request related to a problem? Please describe.

I just received my new Shelly TRV and want to use it in Home-Assistant. https://shelly.cloud/shelly-thermostatic-radiator-valve/

Describe the solution you'd like

Add support for the new Shelly TRV.

Describe alternatives you've considered

Additional context

ahbrims commented 2 years ago

there is a work around.
I found that setting the MQTT and ColoT peer to the HA allows me to add the TRVs.
Too much to explain in full: you will need MQTT setup in HA and then on the TRV (in a browser and the local, not cloud or app) under internet settings, add in username and password to the MQTT and set alter address server address to your HA. And Enable COIOT and set address to your HA with port :5683 eg: 192.168.0.11:5683 I don't know if both MQTT and COIOT are needed but it worked.
In HA, one of my TRVs was discovered automatically the others I added by the Add Integration, Shelly and then added the IP address.
Hope this helps anyone else searching to get their Shelly TRV into HA.

dolenec commented 2 years ago

Can you share manual MQTT sensor settings? In my case discovery do not work, only FW update.. all other not..

dolenec commented 2 years ago

But TRV is still not supported in Shelly4Hass... do I understand correctly...

hakana commented 2 years ago

We have not implemented support for TRV, as we have not got any samples jet.

dolenec commented 2 years ago

Do you expecting to receive sample any soon?

sroettering commented 2 years ago

I received my TRV last week. Can I give you some information for the implementation?

exKAjFASH commented 2 years ago

@hakana I'm having 2 TRVs, 2 are coming soon - already installed 1 and I could help test it. Let us know progress here - it will help us and thank you for a great integration

shoarma4life commented 2 years ago

I have two of them. If I can contribute let me know.

NightFalcon650 commented 2 years ago

I also got five, they are recognized by HA, but not all entities are recognized. The temperatuur, valve position etc. aren't added. On wich term could we expect the TRV completly supported with all possible entities?

hakana commented 2 years ago

I finally got the TRV device from Shelly, but I can't get it to work.

First, it tried to calibrate and failed. After that, it only shows 01 on the display and does nothing whatever I'm trying. Does anyone here have a solution for that?

I will contact Shelly tomorrow about it, just checking here first...

shoarma4life commented 2 years ago

I finally got the TRV device from Shelly, but I can't get it to work.

First, it tried to calibrate and failed. After that, it only shows 01 on the display and does nothing whatever I'm trying. Does anyone here have a solution for that?

I will contact Shelly tomorrow about it, just checking here first...

Did you actually installed the TRV on a radiator? They need that to calibrate. Also press the reset button (square one for 20 seconds to reset it to default). When it says AP you should be able to connect to them.

hakana commented 2 years ago

It is fixed now, the device was in factory mode and I have to do some guided steps to get it back to normal. I don't have radiators but is it attached to a radiator valve that I bought to test with. I'm nearly done with the implementation and I will post a new beta when I have test it a bit more.

NightFalcon650 commented 2 years ago

It is fixed now, the device was in factory mode and I have to do some guided steps to get it back to normal. I don't have radiators but is it attached to a radiator valve that I bought to test with. I'm nearly done with the implementation and I will post a new beta when I have test it a bit more.

Nice! I've seen that more people had that issue. Can't wait for the new implementations. Is there somewhere a manual how your code has been build op? Interested in what the differance is between yours and the HA shelly implementation.

shoarma4life commented 2 years ago

It is fixed now, the device was in factory mode and I have to do some guided steps to get it back to normal. I don't have radiators but is it attached to a radiator valve that I bought to test with. I'm nearly done with the implementation and I will post a new beta when I have test it a bit more.

That's great news! Probably a dumb question but where do we find the beta versions of shellyforhass?

exKAjFASH commented 2 years ago

That's great news! Probably a dumb question but where do we find the beta versions of shellyforhass?

@shoarma4life Check this guide - https://hacs.xyz/docs/faq/beta, as soon as you re-download with 'beta' enabled you should see:

Screenshot 2022-05-12 at 11 28 08
dsmoljanovic commented 2 years ago

Awesome, will try it out also.

NightFalcon650 commented 2 years ago

I've installed the beta2 version (latest). Feedback:

shoarma4life commented 2 years ago

Thanks! Tried and worked like a charm!

shoarma4life commented 2 years ago

I've installed the beta2 version (latest). Feedback:

  • i like the card design, would be nice to have all the other sensor data on the same card.
  • i've tested and noticed the following possible issues: The climate sensor current temp is correct with the one on the shellyTRV webpage. The set temp isn't the one set on the webpage and the card in HA says that it's heating aldo it off. In my case webpage temp is set to 13 and the card says 23. If i try to lower it through HA it's says NaN and a short error message that it can't set the temp. image image

Hopefully you got something on this information, if you need more info let me know.

Been a while, but having the same NaN issue. The tempratures its showing are correct over here. Another thing is that they show most off the time that the device is offline. That moment the web page is also non-responsive. I think thats the stanby mode of the TRV. They sign in every 20-30 minutes.

shoarma4life commented 2 years ago

It is fixed now, the device was in factory mode and I have to do some guided steps to get it back to normal. I don't have radiators but is it attached to a radiator valve that I bought to test with. I'm nearly done with the implementation and I will post a new beta when I have test it a bit more.

Great work! I can add it to HA now. Some other issues are present like the NaN and availebility. Do you want to close this issue and have a new one loggegd for the new ones (A).

Again awesome work you're doing!

NightFalcon650 commented 2 years ago

stil having the NaN and availebility issues. Updated to latest HA version and HACS 1.25.5 Why do i get this issue? And are there more people with this issue?

shoarma4life commented 2 years ago

Sadly having the same issue. They are most of the time offline and when I change heat they say Nan. Up and downwards.

NightFalcon650 commented 2 years ago

Sadly having the same issue. They are most of the time offline and when I change heat they say Nan. Up and downwards.

What's the couse of this problem, and how can we fix it @hakana?

NightFalcon650 commented 1 year ago

Sadly having the same issue. They are most of the time offline and when I change heat they say Nan. Up and downwards.

What's the couse of this problem, and how can we fix it @hakana?

??

didierbosman commented 1 year ago

Same problems here : devices going off line once every 15 minutes (looks like related to the polling or update frequency), impossible to set the target temperature (at least to display the target set temperature in HASS : I can see the TRV taking over the set temperature, but it is not correctly displayed on the card) and impossible to switch on/off (clicking on the flame doesn't have any response).

kroozo commented 1 year ago

Hi,

I've got my hands on some devices, I can confirm @shoarma4life's findings.

I can also add that it seems impossible to set the target temperature to, because of the following error: WARNING (SyncWorker_27) [pyShelly] Error, 404 File not found http:///settings/thermostats/0?target_t=10.600000000000001

and that is because while the api docs do say thermostats in plural, its just thermostat in reality. Dropping the s from the request sets this correctly (to 10 in my case). This is also what the web ui of the devices calls. @hakana maybe this is an easy fix?

I'm on HA: 2022.8.7, shelly4hass 1.0.1, the devices themselves are however on 2.1.3 only, I'm struggling to update firmware, but I have not seen this mentioned in the release docs for firmwares (which are very helpfully scattered around facebook :( )

kroozo commented 1 year ago

Hi,

Did some digging around

  1. I managed to update the device to 2.1.8 and the url issue seems to be fixed. (It in fact now accepts both urls)

  2. The card I think does not update the target value because pyShelly does not implement update_coap and maybe update_status_information. Looking at the code I'm reasonably sure that the former is fired when there is a coap update received, I'm not sure about the later one. I'm not sure yet if the actual temperature is updated on the entity, it might be, but maybe just when pushing the heat button?

  3. The heat icon is currently hardwired in the ShellyClimate component. Which seems theoretically correct, as the device is always on, but maybe it would make sense if the position 0 would mean HEAT_OFF, and pushing that button would set target_temperature to 4 (which is the minimum and is represented on their own gui as "LO"), and it would be nice to remember the previous value for when the heat icon is pressed to turn on.

  4. It would probably make sense to add support for the usecase where automatic control is disabled and you directly set positions. Through I don't see how that fits into HA's idea of a climate entitiy.

OmegaKill commented 1 year ago

Hi,

i got my TRVs yesterday and there are a few values that seem to got mixed up.

image

In the above image:

22,7 °C is the current room temperature. 23 °C is the current room temperature rounded The currently set temperatur of 15 is not seen in this picture. But if you move the temperature gauge to the temperature you want its not changing in this picture but in the background it changes the target temperature.

image

shoarma4life commented 1 year ago

Still having the NaN issue. Anyone else got this resolved? I tried to use the MQTT broker addon but it wont add the devices to my broker. (wont be discoverd. I have no clue how to add them manually. i hoped the MQTT version could que the updates when the TRV comes online).

shoarma4life commented 1 year ago

@sroettering @dsmoljanovic @NightFalcon650 @kroozo @hakana All, yesterday it drove me nuts and i installed a new version of HA on an vmware ESXi vm. Plain install, search for shelly intergration and the TRV works no issues at all. My currenct production install is almost 2 years old. Probaly some mismatch in one of the config. Ill be moving to a new installation.