I'm looking at ways to integrate data from Palette into Home Assistant. Values that would be relevant to my use cases include (by order of importance):
Ping - Pong. This is the most important as it allows not only to monitor proper operation of Palette, but also of the entire system including the 3D printer itself. A use case could be, slow down print speed / feed rate when ping <98%. This is particularly relevant to me as a Prusa Mk3s user as this machine suffers from heat creep due to the extruder stepper motor overheating and a faulty heatbreak design. Pausing the print for a set time to let the motor cool down could be another way to achieve this. This could be implemented as a sensor.
Splices. I tend to slow my printing speed down in order not to run into "Buffer Collapse" Error 120. The plug-in's advance feature helps buckets with this. I set the Splicing Speed Rate at 75% for most prints. Normal Feed Rate is set anywhere between 80% and 150% depending on the model's geometry. Once all splices are completed, I could run at up to 200% reducing print times for some models. This could be implemented as a sensor.
Feed Rate Status. To know if a splice is currently happening. This could be implemented as a binary sensor.
Filament Used. Just a nice thing to know / record when printing the same model over and over. Helps with provisioning materials needed for production of future prints. This could be implemented as a sensor.
Connection Status. This could be implemented as a sensor / binary sensor or even a switch to connect when disconnected
Status: This could be implemented as a sensor. Similar to number of splices. May not be needed.
These data Pull Requests could be done via Octoprint Shell Commands to start with, but long term this could become an actual component for Home Assistant for other users to use along with the Octoprint component. Shell Command is the solution I rely on to add functionality to the existing Octoprint component for Home Assistant. Here is one such example that I use for a script / switch to decrease feed rate to 80%:
'''
shell_command:
prusa_speed_80pc: "curl -s http://192.168.XX.XX/api/printer/command -d '{"command":"M220 S80"}' -H 'Content-Type: application/json' -H 'X-Api-Key: XXXXXXXXXXXXXXXXXX'"
script:
prusa_speed_80pc:
alias: Prusa 80%
sequence:
delay:
milliseconds: 1
service: shell_command.prusa_speed_80pc
'''
I looked at the terminal window from Octoprint / Canvas Hub, but cannot find relevant data. Some pointers could be very helpful here... I think my skills are not sufficient to get this data pulled into Home Assistant. Maybe some more skilled programmers can chime in?
It sounds like you're looking for someone who has both a Home Assistant AND a Mosaic Pallette. I'm guessing this cuts the field by a fair bit.
Searching the OctoPrint plugin list I don't see anything that covers Palette directly. The only one that has any support whatsoever appears to be OctoPod. This puts gdombiak in the race for plugin authors with a Mosaic Palette.
Some of the plugins in the MQTT space may support Home Assistant but I wouldn't know.
The Mosaic support forum itself might be another place to look for this. Presumably they provide a plugin for their product but it doesn't appear on the OctoPrint published list.
The plugin isn't posted but it is available via their gitlab and linked from their website.
Me too. I have a palette and quite a bit of MQTT knowledge through developing my other plugins, and being one of the MQTT plugin maintainers. I just haven't had the time to look into their gitlab repositories to see how they are communicating with the device itself.If I can figure that out I don't foresee it being difficult at all to publish that to an MQTT topic.
I sometimes wish I had one of those Palettes but there are times when the makers of that apppear to be a little overwhelmed with the support burden, to be honest.
Honestly, the guys from Mosaic are good. Been using their Palettes 2s for 3 weeks. I placed a feature request for their Palette plug after a week (200% feed rate and feed rate change from beginning of print). They updated their plug-in with these features in less than a week.
My request for Home Assistant integration seems to go beyond the scope of what they're prioritising right now. I can understand that.
All in all, the product experience has been fantastic. Worked straight out of the box and yielded very few failed prints... It is an expensive kit at 500USD compared to the 300USD PRUSA MMU2S. The latter is sitting in a drawer as it does not work. The former is printing. The workmanship, quality of integration and software alone would justify the price...
Now, you can get refurbished units or older models on Mosaic's webshop. This could be a nice way in!
I agree, they do seem to try with their support, but after much trying I kept having issues with jams. Not sure if I got a bad batch of splice core tubes or something, but it kept bulging/fusing with the filament and would end up having to take it apart to clear. I ended up letting it sit for some time until they released the "s" upgrade kit and once installed have gone through a few prints without issues. I guess being an earlier adopter has it's gotchas. Seems the new splicing core updates have improved the situation.
I just wished they would figure out firmware updates via either the firmware update plugin or within their own plugin, because that part is a pain to deal with for me. Would be a lot easier to just select a hex file the way I do to upgrade my printer.
No experience with firmware updates yet... apart from the first time when I opened the box. Plugged my computer, used their proprietary software and that was that!
Am using a Palette 2S Pro and it's been a great user experience.
Yeah, that's the rub. I don't have my printer close to my machine. I have to unplug my laptop from power, and all the other random stuff plugged in and take it to the printer to upgrade or unload all the filament, disconnect from my printer and more the palette back to my work area. It's just an inconvenience.
Just noticed on their release notes that there were api commands added for OctoPod for getting ping history. With Home Assitant you can do API calls if I'm not mistaken. You may want to look into that downloadPingHistory and getPingHistory commands.
Edit: Quick test and it does seem to respond, but because I'm not printing there's a lot of empty stuff I suspect.
This results in an error due to size exceeding 255 characters (limitation of Home Assistant). I need to break this down into different attributes.
Is there a way to see all the JSON attributes as I would for http://X.X.X.X/api/job? This yields:
Is it just me or is this advertised-but-not-implemented in the plugin? Wouldn't it show up around line 129 if it were? See, there's no changeFeedRateSlowed() here.
Thanks a lot for chiming in. I'll liaise with the support guys from Mosaic to try to get them moving on this. Should really upgrade my request from focusing on Home Assistant to any Octoprint plugin really. The fact that they accepted merge requests by @gdombi shows they've got some kind of interest in supporting third party plugins. An Android compatible remote app with Palette support could be useful to me...
Anyways, I tried with a bunch of other endpoint and either got a 255 character error or it returned an unknown status.
Wish I could see a list of json from the plugin... Using curl commands, I either get "forbidden"or "unknown". @jneilliii what command did you use to get the results from post #11?
It's at the top of that screenshot, using jquery"s ajax call. Because I was running it in browser's developer console logged in to octoprint, didn't have to worry about the api key.