diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index 5edb451..738c5fb 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,17 @@ https://github.com/th33xitus/kiauh ## Changelog + + +### 0.0.4 (2021-03-17) +* (DutchmanNL) Implemented rounding of digits +* (DutchmanNL) Transfer ownership to DrozmotiX +* (DutchmanNL) Improve automerge for dependency updates +* (Basti-RX) Update state attribute relations + ### 0.0.3 (2021-01-07) * (DutchmanNL) Switch from data-polling to live socket events :-) * (DutchmanNL) Ensure all states and objects available are created diff --git a/io-package.json b/io-package.json index ec32cf2..57a02eb 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,20 @@ { "common": { "name": "klipper-moonraker", - "version": "0.0.3", + "version": "0.0.4", "news": { + "0.0.4": { + "en": "Implemented rounding of digits\nTransfer ownership to DrozmotiX\nImprove automerge for dependency updates\nUpdate state attribute relations", + "de": "Rundung von Ziffern implementiert\nÜbertragen Sie das Eigentum an DrozmotiX\nVerbessern Sie Automerge für Abhängigkeitsaktualisierungen\nAktualisieren Sie die Statusattributbeziehungen", + "ru": "Реализовано округление цифр\nПередать право собственности DrozmotiX\nУлучшение автоматического слияния для обновлений зависимостей\nОбновить отношения атрибутов состояния", + "pt": "Arredondamento de dígitos implementado\nTransferir propriedade para DrozmotiX\nMelhore o automerge para atualizações de dependências\nAtualizar relações de atributo de estado", + "nl": "Afronding van cijfers geïmplementeerd\nDraag het eigendom over aan DrozmotiX\nVerbeter automerge voor afhankelijkheidsupdates\nUpdate statusattribuutrelaties", + "fr": "Arrondi des chiffres implémenté\nTransférer la propriété à DrozmotiX\nAméliorer la fusion automatique pour les mises à jour des dépendances\nMettre à jour les relations d'attributs d'état", + "it": "Arrotondamento delle cifre implementato\nTrasferisci la proprietà a DrozmotiX\nMigliora l'automerge per gli aggiornamenti delle dipendenze\nAggiorna le relazioni degli attributi di stato", + "es": "Redondeo de dígitos implementado\nTransferir la propiedad a DrozmotiX\nMejorar la automatización para las actualizaciones de dependencias\nActualizar relaciones de atributos de estado", + "pl": "Zaimplementowano zaokrąglanie cyfr\nPrzenieś własność na DrozmotiX\nPopraw automerge dla aktualizacji zależności\nZaktualizuj relacje atrybutów stanu", + "zh-cn": "实施数字舍入\n将所有权转让给DrozmotiX\n改进自动合并以更新依赖项\n更新状态属性关系" + }, "0.0.3": { "en": "Switch from data-polling to live socket events :-)\nEnsure all states and objects available are created\nreconnect if connection closes (retry after 10 sec, ToDo : make adjustable)", "de": "Wechseln Sie von Datenabfragen zu Live-Socket-Ereignissen :-)\nStellen Sie sicher, dass alle verfügbaren Status und Objekte erstellt wurden\nStellen Sie die Verbindung wieder her, wenn die Verbindung geschlossen wird (versuchen Sie es nach 10 Sekunden erneut. ToDo: Einstellbar machen)", diff --git a/lib/apiResponse.json b/lib/apiResponse.json new file mode 100644 index 0000000..d1a7c29 --- /dev/null +++ b/lib/apiResponse.json @@ -0,0 +1,601 @@ +[ + { + "jsonrpc": "2.0", + "result": { + "state_message": "Printer is ready", + "klipper_path": "/home/pi/klipper", + "config_file": "/home/pi/klipper_config/printer.cfg", + "software_version": "v0.9.1-140-ge68cf08d", + "hostname": "WLAN-OctoPI", + "cpu_info": "4 core ARMv7 Processor rev 4 (v7l)", + "state": "ready", + "python_path": "/home/pi/klippy-env/bin/python", + "log_file": "/tmp/klippy.log" + }, + "id": "printer.info" + }, + { + "jsonrpc": "2.0", + "result": { + "objects": [ + "webhooks", + "configfile", + "pause_resume", + "gcode_macro PAUSE", + "gcode_macro RESUME", + "gcode_macro CANCEL_PRINT", + "heaters", + "heater_bed", + "fan", + "probe", + "gcode_move", + "bed_mesh", + "gcode_macro G29", + "menu", + "display_status", + "output_pin beeper", + "print_stats", + "virtual_sdcard", + "query_endstops", + "idle_timeout", + "toolhead", + "extruder" + ] + }, + "id": "printer.objects.list" + }, + { + "jsonrpc": "2.0", + "result": { + "status": { + "webhooks": { + "state": "ready", + "state_message": "Printer is ready" + }, + "virtual_sdcard": { + "progress": 0.0, + "is_active": false, + "file_position": 0 + }, + "filament_switch_sensor": { + + }, + "output_pin": { + + }, + "bed_mesh": { + "mesh_max": [ + 205.0, + 225.0 + ], + "mesh_matrix": [ + [ + -0.07, + -0.04713, + -0.042654, + -0.0475, + -0.054444, + -0.058117, + -0.055, + -0.043426, + -0.02358, + 0.0025, + 0.030926, + 0.055957, + 0.07 + ], + [ + -0.066574, + -0.046672, + -0.045315, + -0.052377, + -0.059988, + -0.062544, + -0.056698, + -0.041363, + -0.017714, + 0.010813, + 0.038523, + 0.05746, + 0.057407 + ], + [ + -0.052253, + -0.04455, + -0.048852, + -0.057377, + -0.064223, + -0.065369, + -0.058673, + -0.04387, + -0.022578, + 0.001708, + 0.023613, + 0.035883, + 0.029383 + ], + [ + -0.0325, + -0.039835, + -0.05036, + -0.06, + -0.065823, + -0.066039, + -0.06, + -0.0482, + -0.032274, + -0.015, + -0.000298, + 0.00677, + 0.0 + ], + [ + -0.011759, + -0.032156, + -0.047982, + -0.058673, + -0.064046, + -0.064303, + -0.060031, + -0.052199, + -0.042162, + -0.031656, + -0.022804, + -0.01811, + -0.020463 + ], + [ + 0.006543, + -0.021701, + -0.040908, + -0.052747, + -0.05873, + -0.060213, + -0.058395, + -0.054318, + -0.048866, + -0.042767, + -0.036594, + -0.030761, + -0.025525 + ], + [ + 0.02, + -0.009218, + -0.029372, + -0.0425, + -0.050298, + -0.054126, + -0.055, + -0.053601, + -0.050267, + -0.045, + -0.037459, + -0.026965, + -0.0125 + ], + [ + 0.027222, + 0.003986, + -0.014657, + -0.029136, + -0.039755, + -0.046698, + -0.050031, + -0.049695, + -0.045511, + -0.037181, + -0.024284, + -0.006278, + 0.0175 + ], + [ + 0.02784, + 0.016046, + 0.000909, + -0.014784, + -0.028685, + -0.038893, + -0.043951, + -0.042843, + -0.035001, + -0.020298, + 0.000946, + 0.02797, + 0.059568 + ], + [ + 0.0225, + 0.024537, + 0.013951, + -0.0025, + -0.019259, + -0.031975, + -0.0375, + -0.033889, + -0.020401, + 0.0025, + 0.033148, + 0.068673, + 0.105 + ], + [ + 0.01287, + 0.026474, + 0.020047, + 0.003735, + -0.014228, + -0.027512, + -0.031698, + -0.024274, + -0.004638, + 0.025905, + 0.064142, + 0.104949, + 0.141296 + ], + [ + 0.001636, + 0.018315, + 0.013731, + -0.000988, + -0.016925, + -0.027374, + -0.02784, + -0.016038, + 0.008104, + 0.042449, + 0.082648, + 0.122142, + 0.15216 + ], + [ + -0.0075, + -0.004043, + -0.011512, + -0.0225, + -0.031265, + -0.033735, + -0.0275, + -0.011821, + 0.012377, + 0.0425, + 0.07429, + 0.101821, + 0.1175 + ] + ], + "profile_name": "default", + "mesh_min": [ + 10.0, + 10.0 + ], + "probed_matrix": [ + [ + -0.07, + -0.0475, + -0.055, + 0.0025, + 0.07 + ], + [ + -0.0325, + -0.06, + -0.06, + -0.015, + 0.0 + ], + [ + 0.02, + -0.0425, + -0.055, + -0.045, + -0.0125 + ], + [ + 0.0225, + -0.0025, + -0.0375, + 0.0025, + 0.105 + ], + [ + -0.0075, + -0.0225, + -0.0275, + 0.0425, + 0.1175 + ] + ] + }, + "gcode": { + + }, + "temperature_fan": { + + }, + "print_stats": { + "print_duration": 0.0, + "total_duration": 0.0, + "filament_used": 0.0, + "filename": "", + "state": "standby", + "message": "" + }, + "heater_bed": { + "temperature": 23.298736858836772, + "power": 0.0, + "target": 0.0 + }, + "idle_timeout": { + "state": "Idle", + "printing_time": 0.0 + }, + "toolhead": { + "square_corner_velocity": 5.0, + "max_accel": 3000.0, + "homed_axes": "", + "estimated_print_time": 48972.450532194445, + "max_velocity": 300.0, + "print_time": 0.001, + "max_accel_to_decel": 1500.0, + "axis_minimum": [ + 0.0, + 0.0, + -5.0, + 0.0 + ], + "axis_maximum": [ + 249.0, + 235.0, + 235.0, + 0.0 + ], + "position": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "extruder": "extruder" + }, + "gcode_macro": { + + }, + "display_status": { + "progress": 0.0, + "message": null + }, + "fan": { + "speed": 0.0 + }, + "gcode_move": { + "homing_origin": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "speed_factor": 1.0, + "gcode_position": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "absolute_extrude": true, + "absolute_coordinates": true, + "position": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "speed": 1500.0, + "extrude_factor": 1.0 + }, + "temperature_sensor": { + + }, + "configfile": { + "config": { + "tmc2209 extruder": { + "uart_pin": "PC11", + "hold_current": "0.500", + "stealthchop_threshold": "4", + "run_current": "0.650", + "microsteps": "16" + }, + "board_pins": { + "aliases": "\nEXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=,\nEXP1_2=PB6, EXP1_4=, EXP1_6=PB9, EXP1_8=PB7, EXP1_10=<5V>" + }, + "pause_resume": { + + }, + "safe_z_home": { + "z_hop_speed": "10.0", + "speed": "80.0", + "home_xy_position": "117.5,117.5", + "z_hop": "10.0" + }, + "output_pin beeper": { + "pin": "EXP1_1" + }, + "mcu": { + "serial": "/dev/serial/by-id/usb-Klipper_stm32f103xe_30FFD8054242323413671657-if00" + }, + "bed_mesh default": { + "tension": "0.2", + "min_x": "10.0", + "min_y": "10.0", + "y_count": "5", + "mesh_y_pps": "2", + "x_count": "5", + "version": "1", + "algo": "lagrange", + "mesh_x_pps": "2", + "max_y": "225.0", + "max_x": "205.0", + "points": "\n-0.070000, -0.047500, -0.055000, 0.002500, 0.070000\n-0.032500, -0.060000, -0.060000, -0.015000, 0.000000\n0.020000, -0.042500, -0.055000, -0.045000, -0.012500\n0.022500, -0.002500, -0.037500, 0.002500, 0.105000\n-0.007500, -0.022500, -0.027500, 0.042500, 0.117500" + }, + "virtual_sdcard": { + "path": "~/sdcard" + }, + "stepper_z": { + "position_max": "235", + "endstop_pin": "probe:z_virtual_endstop", + "step_pin": "PB0", + "position_min": "-5", + "dir_pin": "PC5", + "step_distance": ".0025", + "enable_pin": "!PB1" + }, + "stepper_y": { + "position_endstop": "0", + "position_max": "235", + "endstop_pin": "^PC1", + "step_pin": "PB10", + "homing_speed": "50", + "dir_pin": "!PB2", + "step_distance": ".0125", + "enable_pin": "!PB11" + }, + "stepper_x": { + "position_endstop": "0", + "position_max": "249", + "endstop_pin": "^PC0", + "step_pin": "PB13", + "homing_speed": "50", + "dir_pin": "!PB12", + "step_distance": ".0125", + "enable_pin": "!PB14" + }, + "static_digital_output usb_pullup_enable": { + "pins": "!PC13" + }, + "heater_bed": { + "control": "pid", + "pid_kp": "64.890", + "sensor_pin": "PC3", + "heater_pin": "PC9", + "sensor_type": "NTC 100K beta 3950", + "pid_kd": "549.943", + "pid_ki": "1.914", + "min_temp": "0", + "max_temp": "130" + }, + "printer": { + "max_velocity": "300", + "max_z_velocity": "5", + "kinematics": "cartesian", + "max_accel": "3000", + "max_z_accel": "100" + }, + "gcode_macro RESUME": { + "rename_existing": "BASE_RESUME", + "default_parameter_e": "1", + "gcode": "\nG91\nG1 E{E} F2100\nG90\nRESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1\nBASE_RESUME" + }, + "gcode_macro PAUSE": { + "rename_existing": "BASE_PAUSE", + "default_parameter_e": "1", + "default_parameter_y": "230", + "default_parameter_x": "230", + "default_parameter_z": "10", + "gcode": "\nSAVE_GCODE_STATE NAME=PAUSE_state\nBASE_PAUSE\nG91\nG1 E-{E} F2100\nG1 Z{Z}\nG90\nG1 X{X} Y{Y} F6000" + }, + "fan": { + "pin": "PA8" + }, + "tmc2209 stepper_z": { + "uart_pin": "PC10", + "hold_current": "0.500", + "stealthchop_threshold": "5", + "run_current": "0.580", + "microsteps": "16" + }, + "tmc2209 stepper_x": { + "uart_pin": "PB15", + "hold_current": "0.500", + "stealthchop_threshold": "250", + "run_current": "0.580", + "microsteps": "16" + }, + "tmc2209 stepper_y": { + "uart_pin": "PC6", + "hold_current": "0.500", + "stealthchop_threshold": "250", + "run_current": "0.580", + "microsteps": "16" + }, + "bed_mesh": { + "horizontal_move_z": "5", + "mesh_pps": "2,2", + "mesh_min": "10, 10", + "mesh_max": "205, 225", + "fade_start": "1.0", + "probe_count": "5,5", + "speed": "100", + "relative_reference_index": "5" + }, + "display_status": { + + }, + "display": { + "click_pin": "^!EXP1_2", + "cs_pin": "EXP1_7", + "encoder_pins": "^EXP1_5, ^EXP1_3", + "lcd_type": "st7920", + "sid_pin": "EXP1_8", + "sclk_pin": "EXP1_6" + }, + "gcode_macro CANCEL_PRINT": { + "rename_existing": "BASE_CANCEL_PRINT", + "gcode": "\nTURN_OFF_HEATERS\nCLEAR_PAUSE\nSDCARD_RESET_FILE\nBASE_CANCEL_PRINT" + }, + "bltouch": { + "sensor_pin": "^PC2", + "control_pin": "PA1", + "pin_move_time": "0.4", + "y_offset": "-8", + "x_offset": "-41", + "z_offset": "2.01" + }, + "gcode_macro G29": { + "gcode": "\nBED_MESH_CLEAR\nBED_MESH_CALIBRATE\nBED_MESH_OUTPUT" + }, + "extruder": { + "control": "pid", + "pid_kp": "22.668", + "sensor_type": "EPCOS 100K B57560G104F", + "sensor_pin": "PA0", + "nozzle_diameter": "0.400", + "heater_pin": "PC8", + "pressure_advance": "0.48", + "max_extrude_only_distance": "120.0", + "step_pin": "PB3", + "pid_kd": "112.207", + "min_temp": "0", + "pid_ki": "1.145", + "filament_diameter": "1.750", + "dir_pin": "!PB4", + "max_temp": "250", + "step_distance": "0.002398", + "enable_pin": "!PD2" + } + }, + "save_config_pending": false + }, + "extruder": { + "pressure_advance": 0.48, + "target": 40.0, + "smooth_time": 0.04, + "power": 0.010654141978730249, + "temperature": 40.033073117865676 + } + }, + "eventtime": 48969.272864392 + }, + "id": "printer.objects.status" + } +] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3f4c028..86311da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "iobroker.klipper-moonraker", - "version": "0.0.3", + "version": "0.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1a802a0..91ada6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.klipper-moonraker", - "version": "0.0.3", + "version": "0.0.4", "description": "Adapter to interact with klipper by API", "author": { "name": "DutchmanNL",