Duet3D custom integration

Hi everyone,

I’m making this message because i’m currently working on a duet3d custom integration.

I have not yet taken time to put the code on github but I will in the next weeks or so.

image

This is the current working code, nothing fancy but I keep you updated when I have time to continue this integration.

The final goal will be to have:

  • 2 binary_sensors : printing and error
  • sensors for:
    • active/standby/current heat for bed and tools
    • print progress and times
    • file name and general infos
  • switches to pause / resume / stop print /emergency stop
  • anything else that could be interesting/usefull to have in HA
  • a custom lovelace card to show all the infos neatly

Don’t hesitate to comment if you have further ideas

3 Likes

Hi There, I’m back to it a little bit.

So the code is now on github (it’s still not finished but you can get it) I will see for an integration with HACS.

Every comment is welcome and don’t hesitate to open issues on the github :wink:

Link to the github: https://github.com/irgusite/hass-Duet3D/tree/master

4 Likes

This is very nice. I built a Hypercube printer with a Duet wifi board a couple of years ago. If I ever have a reason to setup a second printer again, I will be looking for your component. Thanks! :slight_smile:

I’m considering buying a Duet3D upgrade for my duplicator i3 printer, after my Melzi board died. Being able to use it with Home Assistant, even without octoprint, is a big plus for me. I added this topic to my favorites!

Hi, small news on the integration.
I just restarted the to code the integration (some misshaps with the last iteration).
Will keep you posted as much as possible.

The first tests I ran gave good results for the new integration with GUI configuration.

I will put the dev code on github as soon as possible. In the first time, it will be manual install, and I will investigate later how to add it to HACS :slight_smile:

Thank you all for your interest :slight_smile:

2 Likes

Great! I have my Duet3D ethernet board up and running. Could you make a short installation guide of how to install your integration?

Thanks in advance!

Is this still being worked on or is there an alternative for Reprap-based printers to be integrated into Home Assistant? Home Assistant has been giving me an error message and eventually ignored the integration, apparently because it doesn’t have a manifest that is required of integrations these days.

At the moment I had to stop working on the integration because of my studies and family. I hope being able to work on it this summer but no guarantee at this moment. I will put the code I have in a couple weeks but it is not working for now. Sorry for that.

1 Like

No worries! I’m grateful you’re putting your energy into this in the first place!

For information I have updated irgusite app, for rrf3, seems that there was a missing authentication you can get it here :
repier37/hass-Duet3D: Home Assistant Duet3D custom integration (github.com)

1 Like

This implementation is not working anymore. The rr_status is deprecated, and a password is also not required.
Forked your repo and refactored the code heaviy to comply with the current custom component framework and also with the new DSF machine/status endpoint:

This integration is configured via the UI and I also added a service to send GCodes from Home Assistant to DSF. Happy to get feedback!

All entities are getting created successfully now and values are updated, however I am not satisfied that the entities are not linked to a device and that there is no proper config flow. The position entity is also not working as intended as the X,Y,Z values are just added as a string, so the visualization is not working. Will work on those topics as well in the next days.

1 Like

so this is not correct:

Quote from dc42:

The machine/status query is not RRF3 specific, it is provided by a Raspberry Pi or other single board computer connected to a Duet 3. So rr_status is correct for your Duet 2.
For a list of available HTTP commands, see DuetWebControl/README.md at 8af12d88c10698ade9901808624c445e57793137 · Duet3D/DuetWebControl · GitHub. RRF3 also supports rr_model.

rr_model is the correct one for duet 2 and duet 3. Machine/Status is only available for SBC.

Just rr_status is deprecated

1 Like

As I said:

The rr_status is deprecated

I do not use a standalone Duet 3, so I can’t test with it properly, but as rr_model should also return the Object Model it should be work OOB if I add a configuration option. Thanks for the hint!
Do you want to test it? I can implement that tomorrow :slight_smile:

the problem is with http://192.168.2.166/rr_model you get an empty object model.
So with http://192.168.2.166/rr_model?key=boards or something else (boards, state, axes) you get more details.

Already testing but until now I dont have much success. But you also should be able to use the rr_model because this is working on both.

1 Like

Nope rr_ endpoints do not work with the SBC mode. When you use SBC you need to use the DSF API: REST API · Duet3D/DuetSoftwareFramework Wiki · GitHub
The content is kind of the same, but it’s a different API.

Here you can also find the OpenAPI definitions for both:
Standalone: RepRapFirmware/OpenAPI.yaml at d8955e945540855ccdfd1abc994b0abdd7fcddbb · Duet3D/RepRapFirmware · GitHub
SBC: DuetSoftwareFramework/OpenAPI.yaml at 666bace11063459215ef1acec5f10a71d96ed363 · Duet3D/DuetSoftwareFramework · GitHub

With the help of @smoki3 we implemented the standalone mode as well. You can now choose “Standalone” during the setup to fetch data. So the integration supports now both: SBC (/machine/status) and standalone ( /rr_model?key=<key>).
Currently, the service call is not yet implemented for the standalone mode. Will do this later :slight_smile:

While we were on it, we also fixed the missing implementation for multiple toolheads :partying_face:
Make sure to install: Release v.0.1.0 · Lyr3x/hass-Duet3D · GitHub

1 Like

Thanks Lyr3x for doing what I wanted to do from a long time but did not manage due to a lack of time.
I took your version and added in it the authentication, I created a pull request on your github.
In the mean time, if someone want to try out my version, you can get it on my repo

Quick update, I am currently working on porting the octoprint card for this duet integration.
Seems to work at home, should wwwomeone want to give it a try, and report any issues:

@repier37 It looks like your card has not been updated for the new version of HACS:
Screenshot from 2024-03-12 14-59-37
You also have issues turned off on this repository.