Skip to content

Commit

Permalink
Adding Co2 measurement
Browse files Browse the repository at this point in the history
Signed-off-by: bjoernbrings <[email protected]>
  • Loading branch information
bjoernbrings committed Mar 11, 2021
1 parent f3a517e commit 034bf9c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ public class ValloxMVBindingConstants {
*/
public static final String CHANNEL_HUMIDITY = "humidity";

/**
* Current CO2 of the air flow exhausting the building.
*/
public static final String CHANNEL_CO2 = "co2";

/**
* Current cell state (0=heat recovery, 1=cool recovery, 2=bypass, 3=defrosting).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ public void onBinary(InputStream in) {
BigDecimal bdTempOutside = getTemperature(bytes, 134);
BigDecimal bdTempIncomingBeforeHeating = getTemperature(bytes, 136);
BigDecimal bdTempIncoming = getTemperature(bytes, 138);
int iHumidity = getNumberBE(bytes, 166);

int iHumidity = getNumberBE(bytes, 148);
int iCo2 = getNumberBE(bytes, 150);

int iStateOrig = getNumberBE(bytes, 214);
int iBoostTimer = getNumberBE(bytes, 220);
Expand Down Expand Up @@ -503,6 +505,7 @@ public void onBinary(InputStream in) {
updateChannel(ValloxMVBindingConstants.CHANNEL_TEMPERATURE_INCOMING,
new QuantityType<>(bdTempIncoming, SIUnits.CELSIUS));
updateChannel(ValloxMVBindingConstants.CHANNEL_HUMIDITY, new QuantityType<>(iHumidity, Units.PERCENT));
updateChannel(ValloxMVBindingConstants.CHANNEL_CO2, new DecimalType(iCo2));
updateChannel(ValloxMVBindingConstants.CHANNEL_CELLSTATE, new DecimalType(iCellstate));
updateChannel(ValloxMVBindingConstants.CHANNEL_UPTIME_YEARS, new DecimalType(iUptimeYears));
updateChannel(ValloxMVBindingConstants.CHANNEL_UPTIME_HOURS, new DecimalType(iUptimeHours));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ channel-type.valloxmv.tempincoming.label = Temperatur Zuluft
channel-type.valloxmv.tempincoming.description = Aktuelle Temperatur der Zuluft
channel-type.valloxmv.humidity.label = Luftfeuchtigkeit
channel-type.valloxmv.humidity.description = Aktuelle Luftfeuchtigkeit der Abluft
channel-type.valloxmv.co2.label = Co2
channel-type.valloxmv.co2.description = Aktueller Kohlenstoffdioxid Gehalt in der Abluft
channel-type.valloxmv.cellstate.label = Status Wärmetauscher
channel-type.valloxmv.cellstate.description = Status Wärmetauscher
channel-type.valloxmv.cellstate.state.option.0 = Wärmerückgewinnung
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<channel id="tempincomingbeforeheating" typeId="tempincomingbeforeheating"/>
<channel id="tempincoming" typeId="tempincoming"/>
<channel id="humidity" typeId="humidity"/>
<channel id="co2" typeId="co2"/>
<channel id="cellstate" typeId="cellstate"/>
<channel id="uptimeyears" typeId="uptimeyears"/>
<channel id="uptimehours" typeId="uptimehours"/>
Expand Down Expand Up @@ -151,6 +152,13 @@
<state readOnly="true" min="0" max="100" pattern="%d %unit%"/>
</channel-type>

<channel-type id="co2">
<item-type>Number:Dimensionless</item-type>
<label>CO2</label>
<description>CO2 measurement</description>
<state readOnly="true" pattern="%d"/>
</channel-type>

<channel-type id="cellstate">
<item-type>Number</item-type>
<label>Cell State</label>
Expand Down

0 comments on commit 034bf9c

Please sign in to comment.