### Example application property configuration Source: https://rinkhals-community.github.io/Rinkhals/about/apps/configuration Examples of setting specific properties for mjpg-streamer and moonraker applications. ```bash set_app_property 30-mjpg-streamer resolution 1280x720 set_app_property 40-moonraker mqtt_print_auto_leveling True ``` -------------------------------- ### Define an app manifest with properties Source: https://rinkhals-community.github.io/Rinkhals/about/schemas/app-manifest Example of a complete app.json file demonstrating metadata, resource requirements, and various UI property types. ```json { "$version": "1", // Schema version "name": "Example app", "description": "Simple example app to showcase the app system", "version": "1.0", "url": "https://github.com/rinkhals-community/Rinkhals.Apps/tree/master/apps/example", // App or project URL "requirements": { "cpu": 0, // CPU usage in % "memory": 0 // Memory usage in MB }, // Those properties will be exposed in Rinkhals UI "properties": { "text_input": { "display": "IP address", // Optional: if display is not set, the property won't be shown in the UI "type": "text", // Optional: property type for the UI (text, number, enum, report or qr) "validation": "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$", // Optional: regex to validate strings "default": "0.0.0.0" // Optional: default value }, "number_input": { "display": "Number", "type": "number", "range": [ 1024, 65536 ], // Optional: valid range for the number "default": 5678 }, "enum_input": { "display": "Option", "type": "enum", "options": [ "Choice 1", "Choice 2", "Choice 3" ] // Optional: valid choices for this enum }, "text_output": { "display": "Status", "type": "report" // Reports will be shown to the user but not editable }, "link_output": { "display": "Link", "type": "qr" // This property will be shown to the user with a QR code } } } ``` -------------------------------- ### Start camera capture via MQTT Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Publish this JSON payload to the video topic to enable camera access for VLC or other clients. ```json { "type": "video", "action": "startCapture", "timestamp": 1660201929871, "msgid": "02fd3987-a2ff-244e-7c95-7fe257a9ef70", "data": null } ``` -------------------------------- ### Restart an application Source: https://rinkhals-community.github.io/Rinkhals/about/apps/configuration Commands to stop and start an application using its path. ```bash [APP_PATH]/app.sh stop [APP_PATH]/app.sh start ``` -------------------------------- ### start drying Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Initiates the filament drying process with specified parameters. ```APIDOC ## start drying ### Description Initiates the filament drying process with specified parameters. ### Request Example {"method":"filament_hub/start_drying","params":{"duration":240,"fan_speed":0,"id":0,"temp":45},"id":33}\x03 ### Response {"id":33,"result":{}}\x03 ``` -------------------------------- ### Start print job via MQTT Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Publish this JSON payload to the print topic to initiate a print job. Includes both full configuration and minimal required fields. ```json { "type": "print", "action": "start", "msgid": "02fd3987-a2ff-244e-7c95-7fe257a9ef70", "timestamp": 1660201929871, "data": { "taskid": "-1", // Mandatory "url": "", // Optional "filename": "test_model/FlexibleShark-41m.gcode", // Mandatory "md5": "943c0dff568dd508e21af2d894bb6b49", // Optional "filepath": null, // Optional "filetype": 1, // Mandatory "project_type": 1, // Optional "filesize": 188000, // Optional "ams_settings": { // Optional "use_ams": true, "ams_box_mapping": [ { "paint_index": 0, "ams_index": 0, "paint_color": [ 255, 255, 255, 255 ], "ams_color": [ 255, 255, 255, 255 ], "material_type": "PLA" } ] }, "task_settings": { // Optional "auto_leveling": 0, "vibration_compensation": 0, "ai_settings": { "status": 0, "count": 468, "type": 723012352 } } } } ``` ```json { "type": "print", "action": "start", "msgid": "02fd3987-a2ff-244e-7c95-7fe257a9ef70", "timestamp": 1660201929871, "data": { "taskid": "-1", "filename": "test_model/FlexibleShark-41m.gcode", "filetype": 1 } } ``` -------------------------------- ### MQTT Publish: Start Print Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Publishes a message to the printer's slicer topic to start a print job. ```APIDOC ## MQTT Publish: anycubic/anycubicCloud/v1/slicer/printer/20024/[YOUR_PRINTER_ID]/print ### Description Starts a print job on the printer using the provided G-code file information. ### Request Body - **type** (string) - Required - Must be "print" - **action** (string) - Required - Must be "start" - **msgid** (string) - Required - Unique message identifier - **timestamp** (number) - Required - Current epoch timestamp - **data** (object) - Required - Contains print task details - **taskid** (string) - Required - Task identifier - **filename** (string) - Required - Path to the G-code file - **filetype** (number) - Required - File type identifier - **url** (string) - Optional - URL to the G-code file - **md5** (string) - Optional - MD5 checksum of the file ### Request Example { "type": "print", "action": "start", "msgid": "02fd3987-a2ff-244e-7c95-7fe257a9ef70", "timestamp": 1660201929871, "data": { "taskid": "-1", "filename": "test_model/FlexibleShark-41m.gcode", "filetype": 1 } } ``` -------------------------------- ### MQTT Publish: Start Video Capture Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Publishes a message to the printer's video topic to initiate a capture stream, which can then be accessed via HTTP. ```APIDOC ## MQTT Publish: anycubic/anycubicCloud/v1/web/printer/20024/[YOUR_PRINTER_ID]/video ### Description Initiates video capture on the printer. After publishing, the stream can be accessed at http://[YOUR_PRINTER_IP]:18088/flv. ### Request Body - **type** (string) - Required - Must be "video" - **action** (string) - Required - Must be "startCapture" - **timestamp** (number) - Required - Current epoch timestamp - **msgid** (string) - Required - Unique message identifier - **data** (null) - Required - Must be null ### Request Example { "type": "video", "action": "startCapture", "timestamp": 1660201929871, "msgid": "02fd3987-a2ff-244e-7c95-7fe257a9ef70", "data": null } ``` -------------------------------- ### Orca Slicer Filament Start G-code Source: https://rinkhals-community.github.io/Rinkhals/guides/spoolman-support Use this command in the filament start G-code section of Orca Slicer to set the active spool ID. ```gcode ; filament start gcode M555 S=5 ``` -------------------------------- ### Control Filament Drying Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Commands to start or stop the filament drying process. ```json {"method":"filament_hub/start_drying","params":{"duration":240,"fan_speed":0,"id":0,"temp":45},"id":33}\x03 ``` ```json {"id":33,"result":{}}\x03 ``` ```json {"method":"filament_hub/stop_drying","params":{"id":0},"id":34}\x03 ``` ```json {"id":34,"result":{}}\x03 ``` -------------------------------- ### Printer information report Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Example of the JSON structure returned by the printer in response to an info query. ```json { "type": "info", "action": "report", "timestamp": 100107, "msgid": "747b3bf5-6c54-45a7-97bb-67507d78d160", "state": "done", "code": 200, "msg": "done", "data": { "printerName": "My Kobra 3", "urls": { "fileUploadurl": "http://[YOUR_PRINTER_IP]:18910/gcode_upload?s=OCL9W949OatvcjBvtmcerIbwT9k6TG7b", "rtspUrl": "http://[YOUR_PRINTER_IP]:18088/flv", }, "project": null, "model": "Anycubic Kobra 3", "ip": "[YOUR_PRINTER_IP]", "version": "2.3.5.3", "state": "free", "temp": { "curr_hotbed_temp": 23, "curr_nozzle_temp": 28, "target_hotbed_temp": 0, "target_nozzle_temp": 0, }, "print_speed_mode": 2, "fan_speed_pct": 0, "aux_fan_speed_pct": 0, "box_fan_level": 0, }, } ``` -------------------------------- ### Get printer information Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Publishes a query to the printer to retrieve its current status, including temperatures, fan speeds, and connection URLs. ```APIDOC ## MQTT PUBLISH anycubic/anycubicCloud/v1/slicer/printer/20024/[YOUR_PRINTER_ID]/info ### Description Requests the current status and configuration of the printer. ### Request Example { "type": "info", "action": "query", "msgid": "02fd3987-a2ff-244e-7c95-7fe257a9ef70", "timestamp": 1660201929871 } ``` -------------------------------- ### get filament info Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Retrieves the filament information for a specific slot. ```APIDOC ## get filament info ### Description Retrieves the filament information for a specific slot. ### Request Example {"method":"filament_hub/filament_info","params":{"id": 0,"index":1},"id":31} ### Response {"id":31,"result":{"index":1,"sku":"","brand":"","type":"PLA","color":[255,255,255],"extruder_temp":{"min":0,"max":0},"hotbed_temp":{"min":0,"max":0},"diameter":0,"rfid":1,"source":2}} ``` -------------------------------- ### Initialize Mainboard Connection Source: https://rinkhals-community.github.io/Rinkhals/printers/mainboard-connection Sets the motherboard to maskrom mode using the xrock tool and specified binary files. ```bash $ sudo ./xrock maskrom rv1106_ddr_924MHz_v1.15.bin rv1106_usbplug_v1.09.bin --rc4-off # This command should return directly ``` -------------------------------- ### Define a firmware repository manifest Source: https://rinkhals-community.github.io/Rinkhals/about/schemas/firmware-repository-manifest A sample manifest.json file demonstrating the required schema fields including version, repository metadata, and the array of firmware versions. ```json { "$version": "1", "name": "Anycubic Kobra S1 firmware (Mirror)", "description": "Mirror for Anycubic Kobra S1 stock firmwares", "repository": "https://rinkhals.thedju.net", "self": "https://rinkhals.thedju.net/Kobra%20S1/manifest.json", "firmwares": [ { "version": "2.5.0.6", "date": 1742569005, "changes": "1. Improved loading and unloading logic\n2. Improved video monitoring stability\n3. Other issues fixed", "md5": "c0d7b3857602b2b3ed145fd195b3236d", "url": "https://rinkhals.thedju.net/Kobra%20S1/KS1_2.5.0.6.swu", "supported_models": [ "KS1" ] } ] } ``` -------------------------------- ### Backup All Partitions Source: https://rinkhals-community.github.io/Rinkhals/printers/mainboard-connection Reads all partitions from the device and saves them as image files. ```bash sudo ./upgrade_tool pl | tee output/partitions.txt sudo ./upgrade_tool rl 0x00000000 0x00000040 output/env.img sudo ./upgrade_tool rl 0x00000040 0x00000400 output/idblock.img sudo ./upgrade_tool rl 0x00000440 0x00000400 output/uboot_a.img sudo ./upgrade_tool rl 0x00000840 0x00000400 output/uboot_b.img sudo ./upgrade_tool rl 0x00000c40 0x00000200 output/misc.img sudo ./upgrade_tool rl 0x00000e40 0x00008000 output/boot_a.img sudo ./upgrade_tool rl 0x00008e40 0x00008000 output/boot_b.img sudo ./upgrade_tool rl 0x00010e40 0x00018000 output/system_a.img sudo ./upgrade_tool rl 0x00028e40 0x00018000 output/system_b.img sudo ./upgrade_tool rl 0x00040e40 0x00020000 output/oem_a.img sudo ./upgrade_tool rl 0x00060e40 0x00020000 output/oem_b.img sudo ./upgrade_tool rl 0x00080e40 0x00100000 output/userdata.img sudo ./upgrade_tool rl 0x00180e40 0x00080000 output/ac_lib_a.img sudo ./upgrade_tool rl 0x00200e40 0x00080000 output/ac_lib_b.img sudo ./upgrade_tool rl 0x00280e40 0x00020000 output/ac_app_a.img sudo ./upgrade_tool rl 0x002a0e40 0x00020000 output/ac_app_b.img sudo ./upgrade_tool rl 0x002c0e40 0xffffffff output/useremain.img # The last one is dumping indefinitely, not sure why yet ``` -------------------------------- ### Enable GoKlipper profiler Source: https://rinkhals-community.github.io/Rinkhals/firmware/goklipper Add the pprof section to api.cfg to enable the profiler web interface at :6060/debug. ```json "pprof":{ "enable":true }, ``` -------------------------------- ### Configure custom MQTT broker Source: https://rinkhals-community.github.io/Rinkhals/about/monitoring-app Define these environment variables in the .env file to point the monitor tool to a specific MQTT server. ```text MQTT_IP=x.x.x.x MQTT_PORT=1883 KOBRA_DEVICE_ID=[NAME_OF_DEVICE_IN_HOME_ASSISTANT] # In case your MQTT Server requires authentication add and uncomment below lines. # MQTT_USERNAME=my-user # MQTT_PASSWORD=super-secret-password ``` -------------------------------- ### Manage application properties via CLI Source: https://rinkhals-community.github.io/Rinkhals/about/apps/configuration Use these commands to set, remove, or clear application properties. ```bash set_app_property [APP] [PROPERTY] [VALUE] remove_app_property [APP] [PROPERTY] # Restore propery to default clear_app_property [APP] # Restore all properties to default ``` -------------------------------- ### Mount Partition Image Source: https://rinkhals-community.github.io/Rinkhals/printers/mainboard-connection Maps a partition image file to a loop device and mounts it for modification. ```bash $ sudo losetup --find --show output/userdata.img /dev/loop0 $ mkdir -p _userdata && sudo mount -o rw /dev/loop0 _userdata ``` -------------------------------- ### Verify USB Webcam Connection Source: https://rinkhals-community.github.io/Rinkhals/guides/mainsail-add-webcam Command to check if the connected USB webcam has been initialized by the system. ```bash dmesg | grep -i usb ``` -------------------------------- ### Connect to Printer via ADB Source: https://rinkhals-community.github.io/Rinkhals/about Commands to establish an ADB connection to the printer and access the shell. ```bash adb connect PRINTER_IP:5555 adb shell ``` -------------------------------- ### Backup printer partitions Source: https://rinkhals-community.github.io/Rinkhals/printers/recover-boot-issues Execute this script while the printer is in a known-good state to create a snapshot for future recovery. ```bash /opt/rinkhals/tools/backup-partitions.sh ``` -------------------------------- ### Replicate MQTT topics with Node-RED Source: https://rinkhals-community.github.io/Rinkhals/about/monitoring-app Use this JSON configuration to import a flow into Node-RED that bridges Rinkhals and Home Assistant MQTT topics. ```json [{"id":"59dd4e7eefe8b054","type":"mqtt in","z":"a6514c1133ecdc8a","name":"Kobra S1","topic":"#","qos":"2","datatype":"buffer","broker":"f93780ad0f3c6c32","nl":false,"rap":true,"rh":0,"inputs":0,"x":120,"y":640,"wires":[["082cc4ced39e9cc4"]]},{"id":"6370b15cf029e9f8","type":"mqtt out","z":"a6514c1133ecdc8a","name":"Home Assistant","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b5f6a01430cedf53","x":440,"y":640,"wires":[]},{"id":"082cc4ced39e9cc4","type":"switch","z":"a6514c1133ecdc8a","name":"Topic","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"homeassistant/","vt":"str"},{"t":"cont","v":"rinkhals/","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"x":270,"y":640,"wires":[["6370b15cf029e9f8"],["6370b15cf029e9f8"],[]]},{"id":"f93780ad0f3c6c32","type":"mqtt-broker","name":"Kobra S1","broker":"192.168.1.167","port":"9883","tls":"f715935469ff79b9","clientid":"","autoConnect":true,"usetls":true,"protocolVersion":"5","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"b5f6a01430cedf53","type":"mqtt-broker","name":"MQTT","broker":"mqtt","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"3","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"f715935469ff79b9","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":""}] ``` -------------------------------- ### Dump Partition Layout Source: https://rinkhals-community.github.io/Rinkhals/printers/mainboard-connection Displays the partition table of the connected device. ```bash $ sudo ./upgrade_tool pl Using config.ini Partition Info(parameter): NO LBA Size Name 01 0x00000000 0x00000040 env 02 0x00000040 0x00000400 idblock 03 0x00000440 0x00000400 uboot_a 04 0x00000840 0x00000400 uboot_b 05 0x00000c40 0x00000200 misc 06 0x00000e40 0x00008000 boot_a 07 0x00008e40 0x00008000 boot_b 08 0x00010e40 0x00018000 system_a 09 0x00028e40 0x00018000 system_b 10 0x00040e40 0x00020000 oem_a 11 0x00060e40 0x00020000 oem_b 12 0x00080e40 0x00100000 userdata 13 0x00180e40 0x00080000 ac_lib_a 14 0x00200e40 0x00080000 ac_lib_b 15 0x00280e40 0x00020000 ac_app_a 16 0x002a0e40 0x00020000 ac_app_b 17 0x002c0e40 0xffffffff useremain ``` -------------------------------- ### Configure Userdata Recovery Paths Source: https://rinkhals-community.github.io/Rinkhals/printers/recover-boot-issues Define the local paths for the update files and target directories when manually initializing the userdata partition. ```bash update_file_path="./update_swu" to_update_path="./_userdata/app/gk" to_update_wifi_cfg="./_userdata/wifi_cfg" to_run_sh_path="./_userdata/app/kenv" ``` -------------------------------- ### Set LED State Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Toggles the LED state (1 for on, 0 for off). ```json {"method":"led/set_led","params":{"S":1},"id":37}\x03 ``` ```json {"id":37,"result":{}}\x03 ``` -------------------------------- ### Check Flash Information Source: https://rinkhals-community.github.io/Rinkhals/printers/mainboard-connection Verifies the connection to the device by reading flash memory details. ```bash $ sudo ./upgrade_tool rfi Using config.ini Flash Info: Manufacturer: SAMSUNG,value=00 Flash Size: 7456MB Block Size: 512KB Page Size: 2KB ECC Bits: 0 Access Time: 40 Flash CS: Flash<0> ``` -------------------------------- ### set led Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Controls the LED state (1 for on, 0 for off). ```APIDOC ## set led ### Description Controls the LED state (1 for on, 0 for off). ### Request Example {"method":"led/set_led","params":{"S":1},"id":37}\x03 ### Response {"id":37,"result":{}}\x03 ``` -------------------------------- ### Control camera light Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Toggle the camera light status and brightness. ```json { "type": "light", "action": "control", "timestamp": 1733258023447, "msgid": "e36be270-b1b5-11ef-8e80-67dea82d3a00", "data": { "type": 3, "status": 1, "brightness": 100 } } ``` ```json { "type": "light", "action": "control", "timestamp": 1733257985156, "msgid": "cc992440-b1b5-11ef-8e80-67dea82d3a00", "data": { "type": 3, "status": 0, "brightness": 0 } } ``` -------------------------------- ### Define the app repository schema Source: https://rinkhals-community.github.io/Rinkhals/about/schemas/app-repository-manifest Placeholder schema definition for the app repository. ```text TODO ``` -------------------------------- ### Configure GoKlipper log level Source: https://rinkhals-community.github.io/Rinkhals/firmware/goklipper Set the log level to debug in the api.cfg file to increase logging verbosity. ```json "sys":{ "logLevel":"debug" }, ``` -------------------------------- ### Set Camera LED Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Enables or disables the camera LED via gkapi. ```json {"id": 2018,"method": "Led/SetCameraLed","params": {"enable": 1}}\x03 ``` -------------------------------- ### Trace Kobra Process Communication Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Commands to monitor process IO, socket activity, and serial communication using strace and grep. ```bash strace -z -Y -y -f -e trace=read,write -e signal=none --strings-in-hex=non-ascii-chars -s 1000 -p ``` ```bash 2>&1 | grep 'socket:' ``` ```bash 2>&1 | grep '/dev/tty' ``` -------------------------------- ### set camera led Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Sets the state of the camera LED (requires gkcam). ```APIDOC ## set camera led ### Description Sets the state of the camera LED (requires gkcam). ### Request Example {"id": 2018,"method": "Led/SetCameraLed","params": {"enable": 1}}\x03 ``` -------------------------------- ### Flash Partition to Device Source: https://rinkhals-community.github.io/Rinkhals/printers/mainboard-connection Writes a modified partition image back to the motherboard at the specified offset. ```bash $ sudo ./upgrade_tool wl 0x00080e40 0x00100000 output/userdata.img ``` -------------------------------- ### Configure Auto-Refill Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Sets the auto-refill configuration for the filament hub. ```json {"method":"filament_hub/set_config","params":{"auto_refill":1},"id":31}\x03 ``` ```json {"id":31,"result":{}}\x03 ``` -------------------------------- ### SSH Login Credentials Source: https://rinkhals-community.github.io/Rinkhals/guides/mainsail-add-webcam Default credentials required to access the machine via SSH. ```text User: root Pass: rockchip ``` -------------------------------- ### Change bed temperature Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Update the target hotbed temperature by publishing to the print topic. ```json { "type": "print", "action": "update", "timestamp": 1733257941899, "msgid": "b2d0a5b0-b1b5-11ef-8e80-67dea82d3a00", "data": { "taskid": "492102245", "settings": { "target_hotbed_temp": 60 } } } ``` -------------------------------- ### Moonraker Spoolman Configuration Source: https://rinkhals-community.github.io/Rinkhals/guides/spoolman-support Add this block to your moonraker.custom.conf to define the Spoolman server URL and synchronization rate. ```ini [spoolman] server: https://spoolman.domain sync_rate: 5 ``` -------------------------------- ### list registered endpoints Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Lists all endpoints currently registered in the system. ```APIDOC ## list registered endpoints ### Description Lists all endpoints currently registered in the system. ### Request Example {"method":"list_endpoints","params":{},"id":32} ``` -------------------------------- ### auto-refill Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Configures the auto-refill setting for the filament hub. ```APIDOC ## auto-refill ### Description Configures the auto-refill setting for the filament hub. ### Request Example {"method":"filament_hub/set_config","params":{"auto_refill":1},"id":31}\x03 ### Response {"id":31,"result":{}}\x03 ``` -------------------------------- ### Manage Filament Information Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Sets or retrieves filament details for a specific slot. ```json {"method":"filament_hub/set_filament_info","params":{"color":{"B":65,"G":209,"R":254},"id":0,"index":2,"type":"PLA"},"id":34}\x03 ``` ```json "{\"method\":\"filament_hub/filament_info\",\ \"params\":{\"id\": 0,\"index\":1},\"id\":31}" ``` ```json {"id":31,"result":{"index":1,"sku":"","brand":"","type":"PLA","color":[255,255,255],"extruder_temp":{"min":0,"max":0},"hotbed_temp":{"min":0,"max":0},"diameter":0,"rfid":1,"source":2}} ``` -------------------------------- ### Klipper Spoolman G-code Macros Source: https://rinkhals-community.github.io/Rinkhals/guides/spoolman-support Define these macros in printer.custom.cfg to enable setting the active spool via G-code. ```gcode [gcode_macro SET_SPOOL] gcode: {{ action_call_remote_method("spoolman_set_active_spool", params) }} [gcode_macro M555] gcode: SET_SPOOL SPOOL_ID={{ params.S }} ``` -------------------------------- ### Change nozzle temperature Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Update the target nozzle temperature by publishing to the print topic. ```json { "type": "print", "action": "update", "timestamp": 1733257941899, "msgid": "b2d0a5b0-b1b5-11ef-8e80-67dea82d3a00", "data": { "taskid": "492102245", "settings": { "target_nozzle_temp": 211 } } } ``` -------------------------------- ### Adjust print speed Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Set the printer speed mode to slow, standard, or fast. ```json { "type": "print", "action": "update", "timestamp": 1733258087225, "msgid": "096fa290-b1b6-11ef-8e80-67dea82d3a00", "data": { "taskid": "492102245", "settings": { "print_speed_mode": 1 } } } ``` ```json { "type": "print", "action": "update", "timestamp": 1733258087225, "msgid": "096fa290-b1b6-11ef-8e80-67dea82d3a00", "data": { "taskid": "492102245", "settings": { "print_speed_mode": 2 } } } ``` ```json { "type": "print", "action": "update", "timestamp": 1733258087225, "msgid": "096fa290-b1b6-11ef-8e80-67dea82d3a00", "data": { "taskid": "492102245", "settings": { "print_speed_mode": 3 } } } ``` -------------------------------- ### Reset Rinkhals Configuration via SSH or ADB Source: https://rinkhals-community.github.io/Rinkhals/about/printer-configuration Use this command to remove the Rinkhals configuration directory and reset settings to default. ```bash rm -rf /useremain/home/rinkhals ``` -------------------------------- ### Control lights Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Controls the camera light or head light status and brightness. ```APIDOC ## MQTT PUBLISH anycubic/anycubicCloud/v1/web/printer/20024/[YOUR_PRINTER_ID]/light ### Description Turns the camera light (type 3) or head light (type 1) on or off. ### Request Example { "type": "light", "action": "control", "timestamp": 1733258023447, "msgid": "e36be270-b1b5-11ef-8e80-67dea82d3a00", "data": { "type": 3, "status": 1, "brightness": 100 } } ``` -------------------------------- ### Query Filament Hub Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Retrieves the current status of the filament hub. ```json {"method":"objects/query","params":{"objects":{"filament_hub":null}},"id":30}\x03 ``` ```json {"id":30,"result":{"eventtime":10406.219115208,"status":{"filament_hub":{"auto_refill":0,"current_filament":"","cutter_state":0,"ext_spool":0,"ext_spool_status":"ready","filament_hubs":[{"id":0,"status":"ready","dryer_status":{"status":"stop","target_temp":0,"duration":0,"remain_time":0},"temp":45,"slots":[{"index":0,"status":"ready","sku":"","type":"PLA","color":[158,166,180],"rfid":1,"source":2},{"index":1,"status":"ready","sku":"","type":"PLA","color":[255,255,255],"rfid":1,"source":2},{"index":2,"status":"empty","sku":"","type":"","color":[0,0,0],"source":3},{"index":3,"status":"empty","sku":"","type":"","color":[0,0,0],"source":3}]}],"statistics":{"unwind_stat":[0,0,0,0,0],"feed_stat":[29,0,0,0,0]}}}},"\x03 ``` -------------------------------- ### Change printer settings Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Updates printer parameters such as bed temperature, nozzle temperature, or print speed mode. ```APIDOC ## MQTT PUBLISH anycubic/anycubicCloud/v1/web/printer/20024/[YOUR_PRINTER_ID]/print ### Description Updates specific printer settings like target temperatures or print speed modes for an active task. ### Request Example (Temperature) { "type": "print", "action": "update", "timestamp": 1733257941899, "msgid": "b2d0a5b0-b1b5-11ef-8e80-67dea82d3a00", "data": { "taskid": "492102245", "settings": { "target_hotbed_temp": 60 } } } ``` -------------------------------- ### Query printer information Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Publish this JSON payload to the info topic to request current printer status. ```json { "type": "info", "action": "query", "msgid": "02fd3987-a2ff-244e-7c95-7fe257a9ef70", "timestamp": 1660201929871 } ``` -------------------------------- ### MQTT Publish: Stop Print Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Publishes a message to the printer's slicer topic to stop the current print job. ```APIDOC ## MQTT Publish: anycubic/anycubicCloud/v1/slicer/printer/20024/[YOUR_PRINTER_ID]/print ### Description Stops the currently running print job. ### Request Body - **type** (string) - Required - Must be "print" - **action** (string) - Required - Must be "stop" - **timestamp** (number) - Required - Current epoch timestamp - **msgid** (string) - Required - Unique message identifier - **data** (object) - Required - Contains task identifier - **taskid** (string) - Required - Task identifier to stop ### Request Example { "type": "print", "action": "stop", "timestamp": 1733337112202, "msgid": "07fe2ea0-b26e-11ef-94d0-7925260ebe40", "data": { "taskid": "-1" } } ``` -------------------------------- ### Control head light Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Toggle the head light status and brightness. Note that this may not be available on all printer models. ```json { "type": "light", "action": "control", "timestamp": 1733258054565, "msgid": "f5f81d50-b1b5-11ef-8e80-67dea82d3a00", "data": { "type": 1, "status": 1, "brightness": 100 } } ``` ```json { "type": "light", "action": "control", "timestamp": 1733258054565, "msgid": "f5f81d50-b1b5-11ef-8e80-67dea82d3a00", "data": { "type": 1, "status": 0, "brightness": 0 } } ``` -------------------------------- ### List Registered Endpoints Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Retrieves a list of all registered API endpoints. ```json {"method":"list_endpoints","params":{},"id":32} ``` -------------------------------- ### query filament hub Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Queries the current status of the filament hub, including spool information, dryer status, and statistics. ```APIDOC ## query filament hub ### Description Queries the current status of the filament hub, including spool information, dryer status, and statistics. ### Request Example {"method":"objects/query","params":{"objects":{"filament_hub":null}},"id":30}\x03 ### Response {"id":30,"result":{"eventtime":10406.219115208,"status":{"filament_hub":{"auto_refill":0,"current_filament":"","cutter_state":0,"ext_spool":0,"ext_spool_status":"ready","filament_hubs":[{"id":0,"status":"ready","dryer_status":{"status":"stop","target_temp":0,"duration":0,"remain_time":0},"temp":45,"slots":[{"index":0,"status":"ready","sku":"","type":"PLA","color":[158,166,180],"rfid":1,"source":2},{"index":1,"status":"ready","sku":"","type":"PLA","color":[255,255,255],"rfid":1,"source":2},{"index":2,"status":"empty","sku":"","type":"","color":[0,0,0],"source":3},{"index":3,"status":"empty","sku":"","type":"","color":[0,0,0],"source":3}]}],"statistics":{"unwind_stat":[0,0,0,0,0],"feed_stat":[29,0,0,0,0]}}}}}\\x03 ``` -------------------------------- ### Stop current print via MQTT Source: https://rinkhals-community.github.io/Rinkhals/firmware/mqtt Publish this JSON payload to the print topic to stop an active print job. ```json { "type": "print", "action": "stop", "timestamp": 1733337112202, "msgid": "07fe2ea0-b26e-11ef-94d0-7925260ebe40", "data": { "taskid": "-1" } } ``` -------------------------------- ### set filament info Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Updates the filament information for a specific slot. ```APIDOC ## set filament info ### Description Updates the filament information for a specific slot. ### Request Example {"method":"filament_hub/set_filament_info","params":{"color":{"B":65,"G":209,"R":254},"id":0,"index":2,"type":"PLA"},"id":34}\x03 ``` -------------------------------- ### stop drying Source: https://rinkhals-community.github.io/Rinkhals/firmware/ipc-commands Stops the filament drying process for a specific hub. ```APIDOC ## stop drying ### Description Stops the filament drying process for a specific hub. ### Request Example {"method":"filament_hub/stop_drying","params":{"id":0},"id":34}\x03 ### Response {"id":34,"result":{}}\x03 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.