Log trace shows telegrams, watch FF for unknown telegrams

This commit is contained in:
MichaelDvP
2020-11-18 10:07:16 +01:00
parent 4bf821fbd5
commit db06e2c3b9
3 changed files with 9 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
- expose test framework via api (#611) - expose test framework via api (#611)
- SysLog has enable/disable flag in WebUI - SysLog has enable/disable flag in WebUI
- Add solar configuration telegrams (#616) [thanks @hpanther] - Add solar configuration telegrams (#616) [thanks @hpanther]
- log trace shows decoded telegrams, watch 0xFF for unknown telegrams
### Fixed ### Fixed
- mixer IPM pumpstatus - mixer IPM pumpstatus

View File

@@ -231,6 +231,7 @@ function EMSESPSettingsControllerForm(props: EMSESPSettingsControllerFormProps)
<MenuItem value={5}>NOTICE</MenuItem> <MenuItem value={5}>NOTICE</MenuItem>
<MenuItem value={6}>INFO</MenuItem> <MenuItem value={6}>INFO</MenuItem>
<MenuItem value={7}>DEBUG</MenuItem> <MenuItem value={7}>DEBUG</MenuItem>
<MenuItem value={8}>ALL</MenuItem>
</SelectValidator> </SelectValidator>
<TextValidator <TextValidator
validators={['required', 'isNumber', 'minNumber:0', 'maxNumber:65535']} validators={['required', 'isNumber', 'minNumber:0', 'maxNumber:65535']}

View File

@@ -602,7 +602,11 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
if ((watch_id_ == WATCH_ID_NONE) || (telegram->type_id == watch_id_) if ((watch_id_ == WATCH_ID_NONE) || (telegram->type_id == watch_id_)
|| ((watch_id_ < 0x80) && ((telegram->src == watch_id_) || (telegram->dest == watch_id_)))) { || ((watch_id_ < 0x80) && ((telegram->src == watch_id_) || (telegram->dest == watch_id_)))) {
LOG_NOTICE(pretty_telegram(telegram).c_str()); LOG_NOTICE(pretty_telegram(telegram).c_str());
} else {
LOG_TRACE(pretty_telegram(telegram).c_str());
} }
} else {
LOG_TRACE(pretty_telegram(telegram).c_str());
} }
// only process broadcast telegrams or ones sent to us on request // only process broadcast telegrams or ones sent to us on request
@@ -644,6 +648,9 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
if (!found) { if (!found) {
LOG_DEBUG(F("No telegram type handler found for ID 0x%02X (src 0x%02X)"), telegram->type_id, telegram->src); LOG_DEBUG(F("No telegram type handler found for ID 0x%02X (src 0x%02X)"), telegram->type_id, telegram->src);
if ((watch() == WATCH_ON) && (watch_id_ == 0xFF)) {
LOG_NOTICE(pretty_telegram(telegram).c_str());
}
} }
return found; return found;