Repository navigation
Add additional MV200 ventilation data and control settings #3507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gereblye79
wants to merge
1
commit into
emsesp:dev
Choose a base branch
from
gereblye79:mv200-additional-data
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+53
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ Ventilation::Ventilation(uint8_t device_type, uint8_t device_id, uint8_t product | |
| register_telegram_type(0x56B, "VentilationMode", true, MAKE_PF_CB(process_ModeMessage), 1); | ||
| register_telegram_type(0x589, "VentilationAutoLevel", true, MAKE_PF_CB(process_AutoLevelMessage), 2); | ||
| register_telegram_type(0x585, "Blowerspeed", false, MAKE_PF_CB(process_BlowerMessage)); | ||
| register_telegram_type(0x58D, "VentilationOperatingTime", false, MAKE_PF_CB(process_OperatingTimeMessage)); | ||
| register_telegram_type(0x583, "VentilationMonitor", false, MAKE_PF_CB(process_MonitorMessage)); | ||
| register_telegram_type(0x5D9, "Airquality", false, MAKE_PF_CB(process_VOCMessage)); | ||
| register_telegram_type(0x587, "Bypass", false, MAKE_PF_CB(process_BypassMessage)); | ||
|
|
@@ -47,10 +48,14 @@ Ventilation::Ventilation(uint8_t device_type, uint8_t device_id, uint8_t product | |
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &inEx_, DeviceValueType::INT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(inEx), DeviceValueUOM::DEGREES); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &ventInSpeed_, DeviceValueType::UINT8, FL_(ventInSpeed), DeviceValueUOM::PERCENT); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &ventOutSpeed_, DeviceValueType::UINT8, FL_(ventOutSpeed), DeviceValueUOM::PERCENT); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &operatingTime_, DeviceValueType::TIME, FL_(ventOperatingTime), DeviceValueUOM::MINUTES); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &filterRemainingTime_, DeviceValueType::UINT32, FL_(ventFilterRemainingTime), DeviceValueUOM::MINUTES); | ||
| register_device_value( | ||
| DeviceValueTAG::TAG_DEVICE_DATA, &mode_, DeviceValueType::ENUM, FL_(enum_ventMode), FL_(ventMode), DeviceValueUOM::NONE, MAKE_CF_CB(set_ventMode)); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &voc_, DeviceValueType::UINT16, FL_(airquality), DeviceValueUOM::NONE); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &humidity_, DeviceValueType::UINT8, FL_(airHumidity), DeviceValueUOM::PERCENT); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &humidityControl_, DeviceValueType::ENUM, FL_(enum_ventHumidityControl), FL_(ventHumidityControl), DeviceValueUOM::NONE, MAKE_CF_CB(set_humidityControl)); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airQualityControl_, DeviceValueType::ENUM, FL_(enum_ventAirQualityControl), FL_(ventAirQualityControl), DeviceValueUOM::NONE, MAKE_CF_CB(set_airQualityControl)); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &bypass_, DeviceValueType::BOOL, FL_(airbypass), DeviceValueUOM::NONE, MAKE_CF_CB(set_bypass)); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &ventOutRpm_, DeviceValueType::UINT16, FL_(ventOutRpm), DeviceValueUOM::NONE); | ||
| register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &ventInRpm_, DeviceValueType::UINT16, FL_(ventInRpm), DeviceValueUOM::NONE); | ||
|
|
@@ -149,6 +154,13 @@ void Ventilation::process_MonitorMessage(const std::shared_ptr<const Telegram> & | |
| void Ventilation::process_BlowerMessage(const std::shared_ptr<const Telegram> & telegram) { | ||
| has_update(telegram, ventOutSpeed_, 0); | ||
| has_update(telegram, ventInSpeed_, 1); | ||
| // Remaining filter time in minutes at offset 6, inferred from Bosch 5000c (MV200) logs. | ||
| has_update(telegram, filterRemainingTime_, 6); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be ,3 - uint24 is 4 bytes |
||
| } | ||
|
|
||
| // Operating time in minutes at offset 0, inferred from Bosch 5000c (MV200) logs. | ||
| void Ventilation::process_OperatingTimeMessage(const std::shared_ptr<const Telegram> & telegram) { | ||
| has_update(telegram, operatingTime_, 0); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be ,3 - uint24 is 4 bytes |
||
| } | ||
|
|
||
| // message 0x05D9, data: 03 9C FF | ||
|
|
@@ -200,8 +212,10 @@ void Ventilation::process_BalanceMessage(const std::shared_ptr<const Telegram> & | |
| has_update(telegram, ventBalance_, 8); | ||
| } | ||
|
|
||
| // message 0x0561 — level percentages (L3 is fixed at 100 %) | ||
| // message 0x0561 — control settings and level percentages (L3 is fixed at 100 %) | ||
| void Ventilation::process_LevelMessage(const std::shared_ptr<const Telegram> & telegram) { | ||
| has_enumupdate(telegram, humidityControl_, 3); | ||
| has_enumupdate(telegram, airQualityControl_, 10); | ||
| has_update(telegram, level4Pct_, 13); | ||
| has_update(telegram, level1Pct_, 14); | ||
| has_update(telegram, level2Pct_, 15); | ||
|
|
@@ -257,6 +271,26 @@ bool Ventilation::set_ventBalance(const char * value, const int8_t id) { | |
| return true; | ||
| } | ||
|
|
||
| bool Ventilation::set_humidityControl(const char * value, const int8_t id) { | ||
| uint8_t v; | ||
| if (!Helpers::value2enum(value, v, FL_(enum_ventHumidityControl))) { | ||
| return false; | ||
| } | ||
|
|
||
| write_command(0x561, 3, v, 0x561); | ||
| return true; | ||
| } | ||
|
|
||
| bool Ventilation::set_airQualityControl(const char * value, const int8_t id) { | ||
| uint8_t v; | ||
| if (!Helpers::value2enum(value, v, FL_(enum_ventAirQualityControl))) { | ||
| return false; | ||
| } | ||
|
|
||
| write_command(0x561, 10, v, 0x561); | ||
| return true; | ||
| } | ||
|
|
||
| bool Ventilation::set_level1Pct(const char * value, const int8_t id) { | ||
| int v; | ||
| if (!Helpers::value2number(value, v)) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
best use DeviceValueType::TIME like operatingTime_, that way it'll be rendered correctly in HA