1.7.1 - G-code received event support, ETA calculation bug fix, and Slack API reconnection logic fixes
A quick hotfix to address the a 1.7.0 Slack RTM API reconnection loop issue
-
Added support for sending messages based on G-code received from the printer. The initial use case was to trigger a message for Marlin's filament sensor runout message although events can be configured for anything messages OctoPrint receives from your printer. It is recommended to use OctoPrint's Terminal feature find the text you want to match. In the case of Marlin's filament runout, the actual message received is "fsensor_update - M600" which is important to know so the correct match criteria will be used.
-
Expanded G-code event logic beyond the default 'Starts with' to include 'Ends with', 'Contains', and 'Regular expressions'
-
Fixed an ETA calculation where if the local OS time zone was not used, the time remaining value would not be included in the output. Thanks to @tedder for the bug report and patch.
-
ETA will no longer be included in messages if the printer isn't actually printing (print has finished, print has been cancelled, print is paused, etc.)
-
Reworked the Slack API WebSocket connection logic in an attempt to combat Octoslack bots going offline and not responding to requests via Slack channels. Added multiple layers of reconnection logic and WebSocket pings at 3 second intervals (as advised by Slack's own documentation).