homebridge-shelly icon indicating copy to clipboard operation
homebridge-shelly copied to clipboard

[New device] Shelly TRV

Open Docjones opened this issue 3 years ago • 28 comments

Please run $ homebridge-shelly describe <ip-address> with the IP address of your new device, and then post the output from that command here.

Tried to do that on my neew Shelly TRV, command returned:

pi@homebridge:/var/lib/homebridge $ homebridge-shelly describe 192.168.50.132
Error: No reply in 247s
    at Timeout.<anonymous> (/usr/local/lib/node_modules/homebridge-shelly/node_modules/coap/lib/retry_send.js:74:16)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7) {
  retransmitTimeout: 247
}

Perhaps this will help: https://shelly-api-docs.shelly.cloud/gen1/#shelly-trv

Docjones avatar Jan 15 '22 11:01 Docjones

Hi, it will be great if you make integration with the new product Shelly TRV. The valve works perfectly. The have the same error like @Docjones, but the valve is working and I log in on web UI with the its IP address. If we can help some way, please let us know.

sg-generix avatar Feb 06 '22 17:02 sg-generix

Exactly the same response as above for me.

RogerioNeiva avatar Feb 08 '22 21:02 RogerioNeiva

Are you sure the device is awake when use send that command? Is there a setting in the web UI to enable CoIoT or CoAP?

alexryd avatar Feb 09 '22 06:02 alexryd

Device is awake, no access restrictions, CoIoT is set to "on", ip of the the homebridge-server, port defaults to 5683.

"describe" command still times out, but device shows up on homebridge-shelly-admin-view as "UNKNOWN"

Docjones avatar Feb 09 '22 06:02 Docjones

Ok, I'm not sure why the device doesn't respond to description requests but it doesn't really matter. As long as it can be discovered, that's fine.

Can you confirm that the target temperature can be set using this URL:

http://<ip-address>/settings?target_t=20

alexryd avatar Feb 10 '22 06:02 alexryd

Yes, temp has been set to 20°. Output was:

pi@homebridge:/var/lib/homebridge $ curl http://192.168.50.134/settings?target_t=20
{
  "device": {
    "type": "SHTRV-01",
    "mac": "60A423D90E02",
    "hostname": "shellytrv-60A423D90E02",
    "num_outputs": 0
  },
  "wifi_ap": {
    "enabled": false,
    "ssid": "shellytrv-60A423D90E02"
  },
  "wifi_sta": {
    "enabled": true,
    "ssid": "XXXXX",
    "ipv4_method": "dhcp",
    "ip": null,
    "gw": null,
    "mask": null,
    "dns": null
  },
  "mqtt": {
    "enable": false,
    "server": "192.168.33.2:1883",
    "user": null,
    "id": "shellytrv-60A423D90E02",
    "clean_session": true,
    "max_qos": 0,
    "retain": false,
    "update_period": 60
  },
  "sntp": {
    "server": "time.google.com",
    "enabled": true
  },
  "login": {
    "enabled": false,
    "unprotected": false,
    "username": "admin",
    "default_username": "admin"
  },
  "pin_code": "",
  "name": "Heizung",
  "fw": "20220202-080736/v2.1.3@d255ad74",
  "discoverable": true,
  "build_info": {
    "build_id": "20220202-080736/v2.1.3@d255ad74",
    "build_timestamp": "2022-02-02T08:07:36Z",
    "build_version": "2022020208"
  },
  "cloud": {
    "enabled": false
  },
  "coiot": {
    "enabled": true,
    "update_period": 3600,
    "peer": "XXXX:5683"
  },
  "timezone": "Europe/Berlin",
  "lat": xxxx,
  "lng": xxxx,
  "tzautodetect": true,
  "tz_utc_offset": 3600,
  "tz_dst": false,
  "tz_dst_auto": true,
  "time": "07:59",
  "child_lock": false,
  "display": {
    "brightness": 7,
    "flipped": true
  },
  "hwinfo": {
    "hw_revision": "dev-prototype",
    "batch_id": 0
  },
  "sleep_mode": {
    "period": 60,
    "unit": "m"
  },
  "thermostats": [
    {
      "target_t": {
        "enabled": true,
        "value": 20,
        "units": "C",
        "accelerated_heating": true
      },
      "schedule": true,
      "schedule_profile": 1,
      "schedule_profile_names": [
        "Bad",
        "Livingroom 1",
        "Bedroom",
        "Bedroom 1",
        "Holiday"
      ],
      "schedule_rules": [
        "0430-0123456-25",
        "0900-0123456-23",
        "1800-0123456-25",
        "0000-0123456-23"
      ],
      "temperature_offset": 0,
      "ext_t": {
        "enabled": false
      },
      "boost_minutes": 30,
      "valve_min_percent": 0,
      "force_close": false
    }
  ]
}

Docjones avatar Feb 10 '22 06:02 Docjones

Oh, and can you include the battery level when integrating it? Can i provide you with help/information/output?

Docjones avatar Feb 10 '22 07:02 Docjones

Great!

Yes the battery level will be included.

alexryd avatar Feb 10 '22 07:02 alexryd

Hey @Docjones, can you install shellies ($ npm i -g shellies) and then run $ shellies listen. Is your TRV discovered by this script? Can you tell if the status property reflects whether a target temperature is enabled? Does mode refer to the currently active schedule?

alexryd avatar Feb 13 '22 13:02 alexryd

Hello @alexryd - the TRV is not being discovered.

Besides: there is no option to pass authentication to the shellies command - i receive multiple Error 401 while querying the settings of the other devices.

Docjones avatar Feb 17 '22 06:02 Docjones

Is CoIoT set to the IP address of the device that you are running shellies on? I'm not sure if this can run on the same device as homebridge. And is the TRV awake when you run that command?

alexryd avatar Feb 18 '22 05:02 alexryd

Yes, CoIot ist set properly - however, since i don't have another machine (running npm), i only can test this from the homebridge server. The device is definitivel awake - i was checking it with the webinterface simultaneously

Docjones avatar Feb 26 '22 07:02 Docjones

Hello @alexryd - any new on this issue? Anything i can provide you with to help to solve the issue?

Docjones avatar Mar 16 '22 13:03 Docjones

What else can we do to support the TRV? My device is getting dusty little by little. Please let's try to solve the problem together again...

I get a time out with the command, but I can open the URL over web. For other devices like shelly1, the command ran...

xx@raspberrypi:~ $ homebridge-shelly describe 192.168.xxx.xxx Error: No reply in 247s at Timeout. (/usr/local/lib/node_modules/homebridge-shelly/node_modules/coap/lib/retry_send.js:74:16) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7) { retransmitTimeout: 247

xelypse avatar Apr 29 '22 21:04 xelypse

Here is the output from $ shellies listen:

[Device discovered] 2022-04-30T21:01:04.600Z Model: Shelly TRV ID: xxxxxx Host: 192.168.xxx.xxx Property: temperature Value: 20.9 Property: targetTemperature Value: 19 Property: battery Value: 99 Property: sensorError Value: false Property: valveError Value: false Property: mode Value: 0 Property: status Value: false Property: valvePosition Value: 0

xelypse avatar Apr 30 '22 21:04 xelypse

@xelypse Ok so if your TRV can be discovered with the shellies listen command then it can be supported by this plugin. Can you tell if the status property reflects whether a target temperature is enabled? Does mode refer to the currently active schedule?

alexryd avatar May 02 '22 07:05 alexryd

Hi @alexryd, yes, mode does refer to the currently active schedule and status indicates whether the thermostat is currently heating.

TRV can be discovered with the shellies listen command, but only if the TRV ist awake. Could this become a problem?

xelypse avatar May 02 '22 10:05 xelypse

Hey @Docjones, can you install shellies ($ npm i -g shellies) and then run $ shellies listen. Is your TRV discovered by this script? Can you tell if the status property reflects whether a target temperature is enabled? Does mode refer to the currently active schedule?

I did this and $ shellies listen does not return the TRV.

RogerioNeiva avatar May 27 '22 10:05 RogerioNeiva

Hey Alex, could you estimate by when the implementation can be completed? Sorry for pushing 🫣

xelypse avatar Jun 13 '22 08:06 xelypse

I installed a few Shelly TRV devices in my home to maintain a constant temperature. Great devices, would be awesome to see them supported in this plugin!

HermannBjorgvin avatar Jun 30 '22 13:06 HermannBjorgvin

Hi Alex, do you have an update for us? Are you planning any further development in this topic/plug-in? Thank you for any update regarding this! Steff

HarrySteff avatar Sep 15 '22 20:09 HarrySteff

In case it helps anyone: Setting the coiot peer to the ip address, not the hostname, fixed the timeout issues for me. You'd think they are equivalent but nope.

The shelly TRV just silently fails at anything that'd require DNS resolution, even globally-resolvable DNS names.

If that doesn't help, you might get a little bit more of information with http://your-shelly-ip/debug/log, but it only logs something when it receives coiot messages, the reply is silent and fails silently.

(Not a homebridge user but i found this while trying to solve my own problem)

dequis avatar Oct 02 '22 16:10 dequis

I was able to get my homebridge to pickup a TRV by

  • Setting a static ip address for it(possibly unrelated but advised to do this by Shelly support as the TRV wasn't appearing in their iOS app)
  • Setting up the TRV to use the Homebridge IP for CoIoT
excerpt from $ curl http://<TRV IP>/settings after it was configured
   "coiot": {
       "enabled": true,
       "peer": "192.168.0.145:5683",
       "update_period": 3600
   }

The TRV then appears in the admin UI for homebridge-shelly at http://homebridge.local:8181/ - here's what the API returns

$ curl http://homebridge.local:8181/api/devices
{
    "data": [
        {
            "excluded": true,
            "host": "192.168.0.15",
            "id": "<SNIP>",
            "lastSeen": 784823,
            "modelName": "Shelly TRV",
            "online": true,
            "type": "SHTRV-01",
            "unknown": false
        }
    ],
    "success": true
}

danburke avatar Oct 06 '22 13:10 danburke

Hello, I would love to see support for the Shell TRV as well. Using @danburke example, I managed to get my Homebridge picking up TRV, too. But it is unknown and excluded:

{
    "success": true,
    "data": [
        {
            "type": "SHTRV-01",
            "id": "<#####>",
            "host": "192.168.100.65",
            "modelName": "Unknown Device",
            "online": true,
            "lastSeen": 29065,
            "unknown": true,
            "excluded": true
        }
    ]
}

jhaedrich avatar Dec 07 '22 16:12 jhaedrich

Putting a $100 bounty on a solution to this since I use this plugin a lot and very much appreciate all the work that goes into it. (Via PayPal)

HermannBjorgvin avatar Dec 30 '22 23:12 HermannBjorgvin

Is there anything more we could do? I would really appreciate if this plugin would support the TRV. Thank you for any update on this. kind regards Stefan

HarrySteff avatar Jan 05 '23 09:01 HarrySteff

I would also love a solution. If there is anything that can be done to support the effort let me know.

frequentsailor avatar Feb 03 '23 18:02 frequentsailor

My last try, i really do not want to setup homeassistant only for my TRV's. Unfortunately. I guess there is no further development on this plugin, am i right?

HarrySteff avatar Oct 31 '23 09:10 HarrySteff