From 9d26b1d010bd44d178dc309a98abd1d296af3db6 Mon Sep 17 00:00:00 2001 From: Josef-MrBeam <81746291+Josef-MrBeam@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:52:14 +0200 Subject: [PATCH] SW-3938 link received errors to correct notification id (#1832) * link received errors to correct notification id * Add hint to maintenance page * bump iobeam version --- octoprint_mrbeam/dependencies.txt | 2 +- octoprint_mrbeam/iobeam/iobeam_handler.py | 9 +++- .../settings/maintenance_settings.jinja2 | 21 ++++---- .../translations/de/LC_MESSAGES/messages.mo | Bin 156953 -> 157444 bytes .../translations/de/LC_MESSAGES/messages.po | 47 ++++++++++++------ translations/messages.pot | 27 ++++++---- 6 files changed, 69 insertions(+), 37 deletions(-) diff --git a/octoprint_mrbeam/dependencies.txt b/octoprint_mrbeam/dependencies.txt index a7f7ee363..9d555e21d 100644 --- a/octoprint_mrbeam/dependencies.txt +++ b/octoprint_mrbeam/dependencies.txt @@ -1,4 +1,4 @@ -iobeam==1.3.0a1 +iobeam==1.3.0 mrb-hw-info==1.0.0 mrbeam-ledstrips==1.0.0 mrbeamdoc==1.1.0 diff --git a/octoprint_mrbeam/iobeam/iobeam_handler.py b/octoprint_mrbeam/iobeam/iobeam_handler.py index 2e730d8c4..e21d5ce32 100644 --- a/octoprint_mrbeam/iobeam/iobeam_handler.py +++ b/octoprint_mrbeam/iobeam/iobeam_handler.py @@ -1215,8 +1215,15 @@ def _handle_error_message(self, message): MrBeamEvents.HARDWARE_MALFUNCTION, dict(data=message), ) + if ( + message.get("id") + and message.get("id") in HwMalfunctionHandler.KNOWN_MALFUNCTIONS + ): + notification_id = message.get("id") + else: + notification_id = HwMalfunctionHandler.HARDWARE_MALFUNCTION_NON_I2C notification = self._user_notification_system.get_notification( - notification_id=HwMalfunctionHandler.HARDWARE_MALFUNCTION_NON_I2C, + notification_id=notification_id, err_code=malfunction.error_code, replay=True, ) diff --git a/octoprint_mrbeam/templates/settings/maintenance_settings.jinja2 b/octoprint_mrbeam/templates/settings/maintenance_settings.jinja2 index b62903d7c..52235205f 100644 --- a/octoprint_mrbeam/templates/settings/maintenance_settings.jinja2 +++ b/octoprint_mrbeam/templates/settings/maintenance_settings.jinja2 @@ -11,7 +11,7 @@

{{ _('Air Filter: Pre-filter') }}

- {{ _('The pre filter filters all coarse particles from the exhaust air. Regular changing improves the air flow and preserves the main filter.*') }} + {{ _('The pre filter filters all coarse particles from the exhaust air. Regular changing improves the air flow and preserves the main filter.**') }}
-

{{ _('used') }}

+

{{ _('used') }}*

@@ -40,7 +40,7 @@

{{ _('Air Filter: Main filter') }}

- {{ _('The main filter is a combined hepa and activated carbon filter. It filters both tiny particles and odours from the exhaust air.*') }} + {{ _('The main filter is a combined hepa and activated carbon filter. It filters both tiny particles and odours from the exhaust air.**') }}
-

{{ _('used') }}

+

{{ _('used') }}*

@@ -116,7 +116,7 @@ -

{{ _('used') }}

+

{{ _('used') }}*

@@ -127,7 +127,7 @@

{{ _('Air Filter: Main filter') }}

- {{ _('The main filter is a combined hepa and activated carbon filter. It filters both tiny particles and odours from the exhaust air.*') }} + {{ _('The main filter is a combined hepa and activated carbon filter. It filters both tiny particles and odours from the exhaust air.**') }} -

{{ _('used') }}

+

{{ _('used') }}*

@@ -203,14 +203,15 @@ -

{{ _('used') }}

+

{{ _('used') }}*

- {{ _('*Users without a Mr Beam Air Filter System can safely ignore and reset this counter.') }} + {{ _('* Please beware that these values only represent average values. Check your filters regularly to make sure they are not yet full.') }}
+ {{ _('** If you use the Mr Beam Single without the Air Filter System, you can ignore this counter and reset it at any time. Please clean the fan of the exhaust air hose regularly.') }}