I’m sure someone that knows python and HA integrations could make something work with the websocket exposed on the K1 … but not me.
What’s working:
Several temperature sensors (Nozzle, Case, Bed)
Other sensors (layer counts, material length, print progress)
Partial fan control (ON/OFF)
Light control
If you want to chat about it or need help understanding the mess I made, hit me up!
If there are node-red experts that care to check what I came up and give tips to improve the workflow, let me know. It’s my first time using it in 5 years.
Still Image: http://your_printer_ip/downloads/original/current_print_image.png (This will display a still image of the last print you sent to your printer)
Sorry been down sick past couple of days and missed your message.
I don’t know how far you are coming from so I’m gonna start with a simple answer and we’ll take it from there.
Using Node-RED’s “sensor” block which comes pre-installed when you add the Node-RED, it basically create a brand new entity on your HA (you need the Node-RED companion too
That entity can be used like any other on the dashboard, your creativity takes care of the rest. I didn’t share that part because all dashboards are different and people like to see them their own way
Thanks for sharing! Im real fresh with Home assistant but with a bit of chat GPT help iv managed to get Node red and the Companion app installed, iv input your script and added my printers IP.
I can see the sensors in the node red Integration but they don’t update or allow me to control.
Any pointers on what I could be missing to direct me to getting this running.
Thanks in advance
Some values are only updated while printing, so lets start with the simple question, are you printing when checking the sensors in HA?
If you are let’s start with the Node-RED side:
Add a debug node behind the Server Listener and make sure you have some output from the printer. Everything relies on that
If you haven’t used Node-RED before, you can access debug messages on the right of your screen by clicking on
Do you get anything on that screen?
I also noticed that the sensors get stuck on my side after a long time of the printer being off (I completely shut the power to the printer when not in use using a connected wll plug). I believe this is caused by Node-RED permanently shutting down the connection to the WS Server after too many attemps at connecting to a server that is off.
I solved that by creating an automation that I can share if you are on the same situation.
Ok so added the debugging node, and started a print. (I hadn’t had a print going before) and nothings coming up, so I’m assuming my printers not connected to begin with.
If you select the websocket line and click on the message tab, you should see plenty of messages displayed there. These are the messages we are parsing through NodeRed to generate the sensors
So Using Google Chrome I couldn’t see anything going on in the network panel. However I’m on a Mac and was able to get to the same place on Safari and can see the mentioned connectors.
This means that the WS server is available on your network but your NodeRED is unable to connect to it. This is probably a network related issue, rather than a NodeRED one, but I think I found out why
The ws socket is available on port 9999, hence your WS node needs to look like this: