Thank you for your reply.
I also thought about that and did not like the idea
However, I just enabled heartbeat at WS settings and now connection reestablishes by itself.
Thank you for your reply.
I also thought about that and did not like the idea
However, I just enabled heartbeat at WS settings and now connection reestablishes by itself.
Hey @Spellbinder_4
Happy new year !
I’ve updated github with latest Nodered Workflow. I put the print job time and time left values as you asked
Take care
You’re a wizard!
Thank you
Wondering if you could elaborate just a little more on what heartbeat is. I am running into the same issue but don’t want to restart the addon everytime.
Hey @TheOsirian ,
Open Nodered’s workflow and edit the K1 Server Listner then click on the pen to edit the settings
In the settings, tick the heartbeat and set a value as you like
I have mine setup for 10s and it works like a charm
Chris
hey can u share ur dashboard code pls
It’s a great script. Got it translated to Dutch, but this is based on the dashboard Chris showed in post 1. Installed the integration MJPEG IP Camera - Home Assistant he mentioned in post 2. Also put a Zigbee power plug to monitor the power for the printer called: sensor.smart_plug_3d_energy
Good luck with it
title: 3D printer
layout: {}
subview: false
visible:
cards: []
type: sections
badges:
- type: entity
show_name: false
show_state: true
show_icon: true
entity: sensor.smart_plug_3d_energy
color: ""
- type: entity
show_name: false
show_state: true
show_icon: true
entity: sensor.smart_plug_3d_power
color: ""
- type: entity
show_name: false
show_state: true
show_icon: true
entity: sensor.k1_working_layer
color: ""
- type: entity
show_name: false
show_state: true
show_icon: true
entity: sensor.k1_total_layer_count
color: ""
- type: entity
show_name: false
show_state: true
show_icon: true
entity: sensor.print_progress
color: green
sections:
- type: grid
cards:
- type: heading
heading: K1C
heading_style: title
- show_state: true
show_name: true
camera_view: live
type: picture-entity
entity: switch.k1_printer_light
camera_image: camera.creality_3d_k1c
name: Verlichting
grid_options:
columns: full
tap_action:
action: perform-action
perform_action: light.toggle
target:
device_id: 4fc80b153e547f52329d7f23ddc533f8
visibility:
- condition: state
entity: switch.smart_plug_3d
state: "on"
column_span: 2
- type: grid
cards:
- type: heading
heading: Ventilator
heading_style: title
- type: tile
entity: switch.side_fan
- type: tile
entity: switch.case_fan
- type: tile
entity: switch.model_fan
- type: heading
icon: mdi:thermometer
heading: Temperatuur
heading_style: title
- type: tile
entity: sensor.k1_nozzle_temp
name: Nozzle temperatuur
- type: tile
entity: sensor.bed_temperature
- type: tile
entity: sensor.box_temperature
- type: heading
icon: ""
heading_style: title
heading: Verlichting
- type: tile
entity: switch.k1_printer_light
name: K1C printer licht
- type: tile
entity: switch.smart_plug_3d
name: Printer AAN/UIT
tap_action:
action: toggle
max_columns: 3
Thing I like to add is a AI detection sensor. If my print fails I can send a notification to my phone
Thanks for all the info. I managed to get everything but my K2 Plus camera working properly with your setup. If anyone has any suggestions about the camera, please let me know.
Hello everyone,
Sorry for not getting back to you all, I as dealing with some health issues just back online today.
Thanks @Keizer23 for sharing.
@genomez, can you tell me what you tried for the camera and what is not working ?
As far as I am concerned, I added the camera using this integration, using these settings:
Full details can be found here
Cheers
Thanks for the response! I tried that integration as well as the generic camera integration. Apparently, the K2 must be a little different than the K1. The url to access just the camera is http://printer_ip:8000. None of the “?action=stream” part. Although I did try it that way and various other ports too.
I was able to get the various sensors and switched you had in your workflow, just not the camera.
Edited to add that the still image url did work for the K2 using the MJPEG IP Camera integration, just not the streaming. I still have more to do to the dashboard obviously lol.
Is the dashboard code for this available ??
Hey @genomez
You might be able to extract that using the developer view.
In my case, I have something like this. CameraView poped to mind straight away:
If you click on that line and go to the Payload tab, you might find the request URL
Hello @gaz99 ,
Here is mine, not edited since a couple of months, pretty sure not everything is working.
I’ve not had time to look at it lately
- path: printer
title: Printer
icon: mdi:printer-3d
sections:
- type: grid
cards:
- type: heading
heading: K1 Max
heading_style: title
badges: []
- camera_view: auto
type: picture-glance
title: K1 Max
entities:
- entity: switch.k1_printer_light
camera_image: camera.k1_max
grid_options:
columns: full
aspect_ratio: '4:3'
column_span: 1
visibility:
- condition: state
entity: switch.3d_printer_switch_0
state: 'on'
- type: grid
cards:
- type: heading
heading: Fan
heading_style: title
badges: []
layout_options:
grid_columns: 8
grid_rows: 1
- type: tile
entity: switch.k1_printer_side_fan
- type: tile
entity: switch.k1_printer_case_fan
- type: tile
entity: switch.k1_printer_model_fan
- type: tile
entity: sensor.k1_used_material_length
name: Filament used
- type: heading
heading: Temps
heading_style: title
badges: []
layout_options:
grid_columns: 8
grid_rows: 1
- graph: line
type: sensor
entity: sensor.k1_nozzle_temp
detail: 1
name: Nozzle
hours_to_show: 12
- graph: line
type: sensor
entity: sensor.k1_printer_bed_temperature
detail: 1
name: Bed
hours_to_show: 12
- graph: line
type: sensor
entity: sensor.k1_printer_box_temperature
detail: 1
name: Box
hours_to_show: 12
column_span: 1
visibility:
- condition: state
entity: switch.3d_printer_switch_0
state: 'on'
cards: []
type: sections
max_columns: 2
badges:
- type: custom:mushroom-template-badge
content: |-
{% if is_state('switch.3d_printer_switch_0', 'on') %}
Ready to rumble
{% else %}
Having a nap
{% endif %}
icon: mdi:power-plug
color: |-
{% if is_state('switch.3d_printer_switch_0', 'on') %}
blue
{% else %}
red
{% endif %}
entity: switch.3d_printer_switch_0
tap_action:
action: more-info
hold_action:
action: toggle
label: Socket
picture: ''
- type: entity
show_name: false
show_state: true
show_icon: true
entity: sensor.3d_printer_switch_0_energy
color: ''
- type: entity
show_name: false
show_state: true
show_icon: true
entity: sensor.3d_printer_switch_0_power
color: ''
visibility:
- condition: state
entity: switch.3d_printer_switch_0
state: 'on'
- type: custom:mushroom-template-badge
content: >-
{% if is_state('sensor.k1_total_layer_count', '0') %}
Not printing
{% else %}
{{states('sensor.k1_working_layer')}} /
{{states('sensor.k1_total_layer_count')}}
{% endif %}
icon: mdi:layers
color: |-
{% if is_state('sensor.k1_total_layer_count', '0') %}
red
{% else %}
green
{% endif %}
tap_action:
action: more-info
hold_action:
action: toggle
label: Layers
picture: ''
visibility:
- condition: state
entity: switch.3d_printer_switch_0
state: 'on'
- type: custom:mushroom-template-badge
content: |-
{% if is_state('sensor.k1_printer_print_progress', '0') %}
Paused
{% else %}
{{states('sensor.k1_printer_print_progress')}}%
{% endif %}
icon: mdi:printer-3d
color: |-
{% if is_state('sensor.k1_total_layer_count', '0') %}
red
{% else %}
green
{% endif %}
tap_action:
action: more-info
hold_action:
action: none
label: Progress
picture: ''
entity: sensor.k1_printer_print_progress
double_tap_action:
action: none
visibility:
- condition: state
entity: switch.3d_printer_switch_0
state: 'on'
- type: entity
show_name: false
show_state: true
show_icon: true
entity: sensor.k1_time_left
color: ''
visibility:
- condition: state
entity: switch.3d_printer_switch_0
state: 'on'
I’ll check it later today and post what I find in case another K2 user finds this. Thank you!
Sorry, I meant to post this sooner in case someone else with a K2 stumbles in here. The only way I have found so far to get the video stream to show up on my dashboard is by adding a Webpage Card. Then you can enter http://Printer-IP:8000 into the URL field and see the stream if you are local.
HA did complain when I was logged into it via https (vs http) so I ended up adding a reverse proxy to handle the https so I can view it local or remote. Thanks again for all the pointers!
Thanks for this, I’ve got it working with my K1C however the filament used appears to be wrong, I am currently printing a simple coaster, orca slicer says the total print uses 11.18m of filament, the print is about 15% in and ‘K1 Used Material Length’ is showing i’ve used 43.7m of filament already. Is there something I need to change somewhere? does this figure show a used since the printer was turned on or used in current print?
Good morning @iamgrog68,
I’ll check that as soon as possible and let you know !
Hello @iamgrog68 !
Sorry for the delay getting back to you. I just got to test this out and as far as I can see, the K1 Max is sending this data on the websocket in mm. I therefore setup the same for the entity in NodeRed
I tried slicing a quick keyring to test things out and got these results :
So all in all, I think the setup is fine at least for the K1 Max, I would expect the K1C to be exactly the same but I can’t check that as I don’t have one
does this figure show a used since the printer was turned on or used in current print?
For me it resets each new print, hence the answer to your question, “current print”
thanks Chris, I will take another look next time I am printing.
If I can help in any way let me know