Control temperature through mqtt for MClimate Vicki Lora Smart Radiator Thermostat (TRV)

I have integrated this thermostat with Node-Red and mqtt into HA. I can control it also manually but with automation I don’t get the option to change the target temperature.

Do I use the correct sensor type to achieve my goal to control the targetTemperature or do I misconfigured a topic content.

image

topic: homeassistant/climate/eui-70b3d52dd3015cd5/climate/config

{
  "device": {
    "identifiers": [
      "lora2nodered2mqtt_eui-70b3d52dd3015cd5"
    ],
    "manufacturer": "MClimate",
    "model": "Vicki - LoRaWAN Smart Radiator Thermostat",
    "name": "eui-70b3d52dd3015cd5"
  },
  "object_id": "eui-70b3d52dd3015cd5",
  "unique_id": "eui-70b3d52dd3015cd5_climate_lora2nodered2mqtt",
  "name": null,
  "modes": [
    "auto"
  ],
  "temperature_unit": "C",
  "temp_step": 1,
  "json_attributes_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/get",
  "mode_state_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/get",
  "mode_state_template": "{{ value_json.system_mode  if value_json.system_mode==\"off\" else \"auto\"}}",
  "action_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/get",
  "action_template": "{% set values = {\"heat\":\"heating\"} %}{{ values[value_json.running_state] }}",
  "current_temperature_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/get",
  "current_temperature_template": "{{ value_json.sensorTemperature }}",
  "temperature_state_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/get",
  "temperature_state_template": "{{ value_json.targetTemperature }}",
  "temperature_command_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/set/targetTemperature",
  "mode_command_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/set/system_mode"
}

topic: homeassistant/sensor/eui-70b3d52dd3015cd5/battery/config

{
  "device": {
    "identifiers": [
      "lora2nodered2mqtt_eui-70b3d52dd3015cd5"
    ],
    "manufacturer": "MClimate",
    "model": "Vicki - LoRaWAN Smart Radiator Thermostat",
    "name": "eui-70b3d52dd3015cd5"
  },
  "object_id": "eui-70b3d52dd3015cd5_battery",
  "unique_id": "eui-70b3d52dd3015cd5_battery_lora2nodered2mqtt",
  "enabled_by_default": true,
  "state_class": "measurement",
  "device_class": "battery",
  "entity_category": "diagnostic",
  "unit_of_measurement": "%",
  "state_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/get",
  "json_attributes_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/get",
  "value_template": "{{ value_json.battery }}"
}

topic: homeassistant/sensor/eui-70b3d52dd3015cd5/humidty/config

{
  "device": {
    "identifiers": [
      "lora2nodered2mqtt_eui-70b3d52dd3015cd5"
    ],
    "manufacturer": "MClimate",
    "model": "Vicki - LoRaWAN Smart Radiator Thermostat",
    "name": "eui-70b3d52dd3015cd5"
  },
  "object_id": "eui-70b3d52dd3015cd5_humidity",
  "unique_id": "eui-70b3d52dd3015cd5_humidity_lora2nodered2mqtt",
  "name": "Humidity",
  "device_class": "humidity",
  "unit_of_measurement": "%",
  "state_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/get",
  "json_attributes_topic": "lora2nodered2mqtt/eui-70b3d52dd3015cd5/get",
  "value_template": "{{ value_json.relativeHumidity }}"
}

topic: lora2nodered2mqtt/eui-70b3d52dd3015cd5/get

{
  "device": {
    "friendlyName": "eui-70b3d52dd3015cd5",
    "ieeeAddr": "eui-70b3d52dd3015cd5",
    "manufacturerName": "MClimate",
    "model": "Vicki - LoRaWAN Smart Radiator Thermostat",
    "powerSource": "Battery"
  },
  "rssi": -49,
  "battery": 87,
  "targetTemperature": 21,
  "sensorTemperature": 17.94,
  "relativeHumidity": 68,
  "valve_pct": 35,
  "running_state": null,
  "system_mode": "auto"
}


Only available automation action is:

I am searching for a MQTT solution where I can change the the “targetTemperature” in automation, I don’t use the HVAC mode because the intelligence is already inside the device and need only to change the temperature.

Found a slution to add a “mqtt number” as extra to the device which made it possible to control te targetTemperature through automation:

{
	topic: "homeassistant/number/eui-70b3d52dd3015c93/trv_number/config",
	payload: {
		device: {
			identifiers: [ "lora2nodered2mqtt_eui-70b3d52dd3015c93" ],
			manufacturer: "MClimate",
			model: "Vicki - LoRaWAN Smart Radiator Thermostat",
			name: "eui-70b3d52dd3015c93"
		},
		object_id: "eui-70b3d52dd3015c93_trv_number",
		unique_id: "eui-70b3d52dd3015c93_trv_number_lora2nodered2mqtt",
		device_class: "temperature",
		name: "Target temperature",
		max: 30,
		min: 5,
		unit_of_measurement: "°C",
		step: 1,
		mode: "slider",
		state_topic: "lora2nodered2mqtt/vicki/eui-70b3d52dd3015c93/get",
		value_template: "{{ value_json.targetTemperature }}",
		command_topic: "lora2nodered2mqtt/vicki/eui-70b3d52dd3015c93/set/targetTemperature"
	}
}

The full soltion I have published on github:

Hi cnoork, thank you for your great work :slight_smile:
I am currently planning to implement severaly vicky thermostat into a hotel complex.
For a prototype i bought a thermostat and a milesight lora gateway.
Would you mind helping me understand how to configure it to get it running with my homeassistant instance ?

Hi FreddyS96, I don’t know if you are still interested, but I have created a new Node Red flow which has many improvements and is also usable for other LoraWAN device.

The config looks more complex but is far more straight forward to Home Assistant:

And here the result for the Vicki: