Expose chamber heater and remaining fans to web UIs on Kobra S1 / S1 Max - #95
Open
SirDragonClaw wants to merge 1 commit into
Conversation
GoKlipper's objects/list is unusable, so patch_objects_list() synthesises the list that Moonraker reports to Mainsail/Fluidd. For KS1/KS1M it only appended air_filter_fan and box_fan, so several objects that GoKlipper happily serves were invisible to both web UIs. Most notably the chamber heater. [chamber_temp] is a PID-controlled heater in the stock printer.cfg (max_temp 65, sensor via sensor_iio_path) and GoKlipper already reports it in heaters.available_heaters, but because it was missing from this list no client ever subscribed to it. S1 Max owners therefore had no chamber temperature readout or setpoint in the web UI at all, despite the hardware supporting a heated chamber and M141/M191 already working from the console. Adds for KS1/KS1M: chamber_temp Adds for KS1M only: fan_generic chamber_fan (chamber circulation fan, PB6) fan_generic exhaust_fan (external exhaust fan, PB4) controller_fan controller_fan (mainboard fan, PB3) Verified on a Kobra S1 Max, firmware 2.7.x, Rinkhals 20260716_02. All four objects return live data over both objects/query and a Fluidd-style printer.objects.subscribe, and chamber_temp streams notify_status_update temperature frames. chamber_temp is added for KS1 as well since the S1 shares the heated-chamber design; the three extra fans are gated to KS1M because only that model's printer.cfg was inspected.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
On the Kobra S1 / S1 Max, the chamber heater is invisible to Mainsail and Fluidd even though
GoKlipper serves it happily. This adds it, plus the S1 Max's chamber, exhaust and mainboard fans, to
the synthesised objects list.
Background
Because GoKlipper's
objects/listis unusable,patch_objects_list()inkobra.pysynthesises thelist that Moonraker reports to web clients. Clients subscribe only to what that list contains, so any
object missing from it is unreachable from the UI regardless of whether GoKlipper can serve it.
For
KS1/KS1Mthe list only appendedfan_generic air_filter_fanandfan_generic box_fan.The significant omission is
chamber_temp. In the stockprinter.cfgit is a PID-controlledheater:
[chamber_temp] heater_pin: PB8 sensor_iio_path: /sys/bus/iio/devices/iio:device0/in_voltage1_raw sensor_type: NTC 100K beta 3950 min_temp: -30 max_temp: 65 control: pidand GoKlipper already reports it as a heater:
M141/M191also already work from the console. So the hardware, the firmware and the macros wereall in place. Only the objects list entry was missing, which meant S1 Max owners had no chamber
temperature readout or setpoint anywhere in the web UI.
Changes
Added for
KS1/KS1M:chamber_tempAdded for
KS1Monly:fan_generic chamber_fanfan_generic exhaust_fancontroller_fan controller_fanVerification
Tested on a Kobra S1 Max (
KOBRA_MODEL_CODE=KS1M,KOBRA_MODEL_ID=20029, Anycubic firmware2.7.1.4, Rinkhals20260716_02).Before: 134 objects listed, no chamber anything. After: 138 objects.
All four return live data via
objects/query, and also via a Fluidd-styleprinter.objects.subscribe, which is what actually matters for the UI:chamber_tempalso streams livenotify_status_updateframes, so it graphs correctly rather thansitting static:
gklibwas not restarted; only Moonraker. No regression seen in existing panels.Scoping note for reviewers
chamber_tempis added forKS1as well asKS1Mon the basis that the S1 shares theheated-chamber design, but it was only tested on an S1 Max, so a second pair of eyes from a KS1
owner would be welcome. The three extra fans are deliberately gated to
KS1Mbecause only thatmodel's
printer.cfgwas inspected.Objects that do not exist return
{}from GoKlipper rather than erroring, so a wrong model gate heredegrades to a cosmetic empty entry rather than a failure.