Hello,
Can i add the qcode viewer in my hassio?
This gcode viewer from octoprint
That would be a great feature!
I would also be interested and have already dealt with it more closely, but see no approach how I could turn the sales …
Has anyone succeeded to do it?
Any update?
I previously had this done, lost my config for it, and am trying to figure it out but when it worked it was set up as such:
requires:
Octoprint with:
mqtt installed
home assistant discovery installed
cura thumbnails plugin
Cura:
octoprint plugin installed and configured
UFP format plugin installed
This will pass the file in ufp format to octoprint where it can then display the thumbnail
To get into home assistant:
first you need the thumbnail url, view the thumbnail, right click copy image address should be:
http://192.168.xx.xx/plugin/UltimakerFormatPackage/thumbnail/CE3_front.png?20220325140146
When I had it working, I had a template sensor that basically took the mqtt sensor “print progress” and then did a regex, where basically it took the file name in the url and removed.ufp and replaced with .png
Then I had this in my camera config, which then would show the thumbnail in lovelace:
- platform: generic
name: Vender Gcode Preview
still_image_url: "{{ states('sensor.vendergcodepreview') }}"
Problem is, I cant remember what I did to set up the above sensor to make the camera
I don’t know if some is still looking for this, but yesterday I solved it like this:
type: conditional
conditions:
- entity: binary_sensor.octoprint_printing
state: 'on'
card:
type: markdown
content: >-
![Image](http://192.168.1.70/plugin/UltimakerFormatPackage/thumbnail/{{
states("sensor.octoprint_print_file") | replace("gcode","png",1) }})
For those reading, this shows the STL preview, not the g-code. I was able to accomplish it similarly to yours though, thanks for posting it for others. Except I added the code to the ‘generic camera’ integration so I can just put the image in other picture cards easily.
Here’s what I was using: {{ “http://192.168.68.145/plugin/UltimakerFormatPackage/thumbnail/” + states(“sensor.octoprint_print_file”).split(".")[0] + “.png” }}