How to integrate Shelly BLU TRV

As the official Shelly binding is still not supporting BLU TRV devices please find here an easy and lightweight solution. This solution uses RPC over HTTP/GET - so no MQTT Broker required.

Prerequisites:

  1. If already set, remove password from BLU Gateway Gen3
    (Reason: There is a bug when openhab and BLU gateway are negotiating Digest authentication during write requests)
  2. TRVs are already paired with the gateway
    If you have problems with pairing TRVs with the gateway, forget all the pairing instructions you have seen on Shelly website or on printed manual. Go to the gateway device website, at the top click on + BLE device, then Shelly BLU TRV
    If I remeber correctly press the reset button on the TRV once and they are instantly paired.
  3. Install HTTP Binding and JsonPath Transformation Service

Configure HTTP Thing

You need just one HTTP thing for the BLU gateway. TRV channels will be added directly to the gateway thing.

Configuration

  • Base URL: http://<ip-address of gateway>
  • Refresh: 285
  • Timeout: 15000

Channels

Now we are adding channels for the following TRV properties:

  • Current Temperature
  • Target Temperature (incl. sending command to TRV)
  • Battery Level

Assumption: Your TRV IDs start with 200

For Current Temperature click Add Channel

  • Channel type: Number Channel
  • Status-Transformation: JSONPATH:$.current_C
  • Status-URL Extension: /rpc/BluTrv.GetStatus?id=200
  • Mode: Read-Only
  • Click Create

For Target Temperature click Add Channel

  • Channel type: Number Channel
  • Status-Transformation: JSONPATH:$.target_C
  • Status-URL Extension: /rpc/BluTrv.GetStatus?id=200
  • Update after command: yes
  • Command URL Extension: /rpc/BluTrv.Call?id=200&method=TRV.SetTarget&params={"id":0,"target_C":%2$s}
  • Mode: Read-Write
  • Click Create

For adding Battery Level:

  • Go to the Code tab
  • copy/paste the Current Temperature section
  • Replace current_C by battery
  • Click Create

Overview of values provided by TRV device:

  "id": 200,
  "target_C": 30,
  "current_C": 21.5,
  "pos": 100,
  "connected": true,
  "rssi": -56,
  "battery": 100,
  "packet_id": 59,
  "last_updated_ts": 1787684668,
  "key": false,
  "paired": true,
  "rpc": true,
  "rsv": 62,
  "fw_ver": "v1.5.0"

This list can be obtained by running this URL from your browser: http://<ip-address of gateway>/rpc/BluTrv.GetStatus?id=200

Basically, that is it. From here you can add items to your channels like you are used to.

Notes:

  • Method GetStatus uses the gateway’s cache so that we can save battery power
  • If you send a command (i.e. new target temperature) this can take up to 60 seconds. This is by design of the TRV manufacturer
  • There are more methods available, where you might find the value you are looking for: Shelly BLU Gateway Gen3 | Shelly Technical Documentation
  • List of all Methods provided by BLU gateway: http://<ip-address of gateway>/rpc/Shelly.ListMethods