OpenZWave / Zwave2Mqtt

Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue
MIT License
354 stars 93 forks source link

[question] Set climate custom components #847

Open flaghub opened 3 years ago

flaghub commented 3 years ago

Hi,

I have Hassio installed in Docker (synology). I've installed the Zwave2mqtt plugin. I have multiple eurotronic spirit radiator valve I'd like to configure.

I've read multiple times the documentation but I still don't understand how I could add the thermostat devices. First I tried to find the hass/devices.js or store/customDevices(.js|.json) but It wasn't there. So I created devices.js under hass.io folder (where you have homeassistant.json fo ex.). I tried multiple configuration but nothing seemed to work :(

Then I found out that there were a window right to the existing devices where you could (I guess) add new configuration devices and tried some configuration...but nothing appeared.

Can-you tell-me what's the best way to add the climate support for my valve? Here's a printscreen of my last test.

Thank you

zwave2mqttconfig

EKCJ commented 3 years ago

I don't think your code has enough values there to work. If you have another thermostat device that is working I would copy the code for that to use as a base. If you don't, here's the code for my identical Aeotec TRV:

{
  "type": "climate",
  "object_id": "thermostat",
  "values": [
    "64-1-0",
    "49-1-1",
    "67-1-1",
    "67-1-11"
  ],
  "mode_map": {
    "off": "Off",
    "heat": "Heat",
    "cool": "Heat Eco",
    "dry": "Full Power",
    "auto": "Manufacturer Specific"
  },
  "setpoint_topic": {
    "Heat": "67-1-1",
    "Heat Eco": "67-1-11",
    "Full Power": "67-1-1"
  },
  "default_setpoint": "67-1-1",
  "discovery_payload": {
    "min_temp": 8,
    "max_temp": 28,
    "modes": [
      "off",
      "heat",
      "cool",
      "dry",
      "auto"
    ],
    "mode_state_topic": "zwave2mqtt/11/64/1/0",
    "mode_command_topic": "zwave2mqtt/11/64/1/0/set",
    "current_temperature_topic": "zwave2mqtt/11/49/1/1",
    "temp_step": 0.5,
    "current_temperature_template": "{{ value_json.value }}",
    "temperature_state_template": "{{ value_json.value }}",
    "temperature_command_topic": "zwave2mqtt/11/67/1/1/set",
    "mode_state_template": "{{ {\"Off\":\"off\",\"Heat\":\"heat\",\"Heat Eco\":\"cool\",\"Full Power\":\"dry\",\"Manufacturer Specific\":\"auto\"}[value_json.value] | default('off') }}",
    "temperature_state_topic": "zwave2mqtt/11/67/1/1",
    "temperature_unit": "C",
    "precision": 0.1,
    "device": {
      "identifiers": [
        "zwave2mqtt_0xf52fe0c8_node11"
      ],
      "manufacturer": "Aeotec Limited",
      "model": "ZWA021 Thermostatic Valve (0x0015)",
      "name": "Front_room_TRV",
      "sw_version": "0.16"
    },
    "name": "Front_room_TRV_thermostat",
    "unique_id": "zwave2mqtt_0xf52fe0c8_Node11_thermostat"
  },
  "discoveryTopic": "climate/Front_room_TRV/thermostat/config",
  "persistent": true,
  "ignoreDiscovery": false,
  "id": "climate_thermostat"
}

Make sure to update the topics and device names as appropriate.

Separately, I have also been struggling with adding a new device to an existing node. I've entered my custom code via the UI as well as (modified) in customdevices.json but can't get the new entity to appear in HA, and rediscovering the node causes my changes to be lost even if I have stored them.

Is there some more in-depth documentation available somewhere? I'm sure OP and I are doing different things wrong, but I suspect a tutorial would help us both.

robertsLando commented 3 years ago

@flaghub @EKCJ Could you give a try to: https://github.com/zwave-js/zwavejs2mqtt ?

EKCJ commented 3 years ago

Thanks, I will try moving to that and see if it solves the problem - but maybe next weekend since I only migrated from the HA zwave integration to zwave2mqtt on Saturday 😂

flaghub commented 3 years ago

Thanks, I'll test next week