How to dump the entire object model?
-
I wanted to manipulate the material fan in daemon.g and tried to find it in the object model.
What is a good way to dump the entire object model of a printer? I looked at M409 (insufficient memory?) and also this page https://duet3d.dozuki.com/Wiki/Object_Model_of_RepRapFirmware but still couldn't find a way to dump the entire OM.
Is there a documentation or example somewhere how to do that? I saw for example mentioning of the rr_model 'http command' but naivly just sticking it to the machine domain returned very sparse JASON doc.
Board: Duet 3 Mini 5+ (Mini5plus) Firmware: RepRapFirmware for Duet 3 Mini 5+ 3.3 (2021-06-15) Duet WiFi Server Version: 1.26```
-
@zapta It's possible in SBC mode by opening http://duet3/machine/status but not directly in standalone mode due to memory limitations. There is a way of dumping the machine model in DWC though: Open the dev tools via F12, go to the JS console, and enter this command:
JSON.parse(JSON.stringify(machineStore.model))
That will write the full object model to the JS console. You are aware of the object model explorer in DWC, aren't you?
-
@zapta said in How to dump the entire object model?:
What is a good way to dump the entire object model of a printer?
http://192.168.1.88/machine/status
in a web browser (substitute your correct IP address) then copy and paste.Works in SBC mode, I'm not sure about standalone.
-
@zapta if you are running in standalone mode you can use M409 without parameters to list the root keys. Then you can query each root key with M409 to dump out that subtree.
-
Thanks everybody for the info.
@dc42, I presume that I need to run something like this for every top level key M409 K"tools". Does this comment fully dumps tree of the "tools" root?
@achrn , I got an error page. I presume because I don't use a SBC.
@chrishamm, the javascript console trick worked and when I copied the object and pasted to an editor got a dump of ~1000 lines which I presume is a complete dump. Thanks. Would be nice to have a similar functionality in the DWC's UI but maybe it's already there. I am not familiar with the 'object model explorer' and could find any going through the screens of DWC.
BTW, my immediate motivation is adding to daemon.g a rule that will set the material fan to 30% if hot end > 80c and material fan < 30%. The cooling duct on Voron V2.4 is melting near the hot end and it may happen in the short period of time after a print when the hot end is ~240 and the material fan is off.
-
@zapta there's a plugin which can be enabled for browsing the object model.
Settings > general > built in plugins -
@jay_s_uk said in How to dump the entire object model?:
@zapta there's a plugin which can be enabled for browsing the object model.
Settings > general > built in pluginsThanks @jay_s_uk, i just started it and it seems to be useful. Is there a way to fully open all the sections so I can use page search to search for thinks I am looking for? This way I don't need to guess what path to expand.
-
@zapta this is the best place to look https://github.com/Duet3D/RepRapFirmware/wiki/Object-Model-Documentation#overview
-
Thanks @jay_s_uk , this is very useful. Any reason why it's not linked here https://duet3d.dozuki.com/Wiki/Object_Model_of_RepRapFirmware ?
-
@zapta i've added a change to the wiki so hopefully it gets approved
-
Thanks @jay_s_uk !