Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

HowDoI: Create a "Template" TRV and then instantiate for each physical TRV

$
0
0

@tillykeats wrote:

Hi

I downloaded HA today on a Pi3 with a bespoke MQTT client from here: https://github.com/gpbenton/engMQTTClient

Installing the MQTT Broker addon, I can read/set TRV with ID 8008. I have 10 other TRVs each with their unique ID but I dont want to have to create a config for each one.

Is there a cleaver config way to do this?
What I want to do is create a single “generic/template” for an Energenie eTRV and “instantiate” this for the 11 TRV physical devices in my home. I want to avoid having to duplicate all the effort to set up 11 TRVs when in fact I want all the same command and report topics (ref. that GitHub link above) - where the only aspect that will change is the eTRV ID. So somehow I’d need to pass the ID of the TRV , somehow.

MQTT Commands tree at /energenie/eTRV/Command/(command-as-below)/(device-id)

Command Payload Comment
Temperature 4-30 (Ascii) Set Target Temperature
Identify None Makes the MIH0013 flash
Exercise None Causes Valve to go up and down. Creates Diagnostic when finished.
Voltage None MIH0013 reports battery Voltage
Diagnostics None Causes MIH0013 to report diagnostics
ValveState “0”, “1” or “2” (ascii) 0=Set Valve Open 1=Closed 2=Normal Operation
PowerMode “0”, “1” 0=Low Power Mode off 1=On
ReportingInterval 300-3600 (ascii) Set the Reporting Interval (not tested)

MQTT States tree at /energenie/eTRV/Report/(report-command-as-below)/(device-id):

Report Payload Comment
Temperature Ascii string Measured Temperature in degrees Centigrade
TargetTemperature Ascii String Target Temperature set
Diagnostics 2 bytes byte 0 = low byte, 1 = high byte
Voltage Ascii String Reported Battery Voltage

So in other words, I want to define a single sensor “template” for a “template/generic” TRV , with (if possible) one set of topics I want to publish/subscribe to, ; and finally based on this , I want to create the 11 items to represent the physical TRVs in the home. I might need to rework how I do this but you get the idea?

p.s. I am a total newbie at this so please explain the solution - Ive read OH documents on Things and MQTT but clearly not capable of getting further with this.

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>