Send a console message at a given event
-
Good evening, I don't know if I'm asking about reality or science fiction but is there a way to send a message in the console when a certain event occurs? I explain....I use the telegram bot wich sends me a message every time a message in the console/display appears...my goal is to get a message when, at the end of a print, the hextruders temperatures are lowered at 50°C. This is because I've already configured the FW for the water cooling system to stop at this temperature and I'd like to get a message too so I can remotely turn off the printer (I already do this by a son off) without have to keep on opening the DWC to see when the temperatures reahces the 50°C.....is it fantasy or is it makeable?
Thanks!
Andrea
-
@the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
then setup a variable in config.g e.g.global printing = false
in start.g use
set global.printing = true
then in daemon.g
if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50} M117 "display message" set global.printing = false
That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.
-
@jay_s_uk said in Send a console message at a given event:
@the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
then setup a variable in config.g e.g.global printing = false
in start.g use
set global.printing = true
then in daemon.g
if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50} M117 "display message" set global.printing = false
That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.
excellent I'll try it right now!
-
@the_dragonlord said in Send a console message at a given event:
@jay_s_uk said in Send a console message at a given event:
@the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
then setup a variable in config.g e.g.global printing = false
in start.g use
set global.printing = true
then in daemon.g
if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50} M117 "display message" set global.printing = false
That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.
excellent I'll try it right now!
I don't find neither start.g or daemon.g files...where are they located?
-
@the_dragonlord said in Send a console message at a given event:
@the_dragonlord said in Send a console message at a given event:
@jay_s_uk said in Send a console message at a given event:
@the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
then setup a variable in config.g e.g.global printing = false
in start.g use
set global.printing = true
then in daemon.g
if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50} M117 "display message" set global.printing = false
That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.
excellent I'll try it right now!
I don't find neither start.g or daemon.g files...where are they located?
Create them yourself in the sys folder - the folder where config.g is located.
Frederick
-
@fcwilt said in Send a console message at a given event:
@the_dragonlord said in Send a console message at a given event:
@the_dragonlord said in Send a console message at a given event:
@jay_s_uk said in Send a console message at a given event:
@the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
then setup a variable in config.g e.g.global printing = false
in start.g use
set global.printing = true
then in daemon.g
if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50} M117 "display message" set global.printing = false
That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.
excellent I'll try it right now!
I don't find neither start.g or daemon.g files...where are they located?
Create them yourself in the sys folder - the folder where config.g is located.
Frederick
excellent, thanks
-
@fcwilt said in Send a console message at a given event:
@the_dragonlord said in Send a console message at a given event:
@the_dragonlord said in Send a console message at a given event:
@jay_s_uk said in Send a console message at a given event:
@the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
then setup a variable in config.g e.g.global printing = false
in start.g use
set global.printing = true
then in daemon.g
if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50} M117 "display message" set global.printing = false
That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.
excellent I'll try it right now!
I don't find neither start.g or daemon.g files...where are they located?
Create them yourself in the sys folder - the folder where config.g is located.
Frederick
The index for the 2 tools to use in the heat.heaters array are 0 and 1 or 1 and 2?
-
@the_dragonlord heaters for tools would be 1 and 2. Activate the object model browser as it'll help you see where everything is stored
-
@jay_s_uk said in Send a console message at a given event:
@the_dragonlord heaters for tools would be 1 and 2. Activate the object model browser as it'll help you see where everything is stored
uhm....I apologize for my ignorance....what's the object model browser?
EDIT
it's a plugin, I've found it -
@the_dragonlord it's a plugin. It can be activated in settings - general - plugins
-
@the_dragonlord said in Send a console message at a given event:
@jay_s_uk said in Send a console message at a given event:
@the_dragonlord heaters for tools would be 1 and 2. Activate the object model browser as it'll help you see where everything is stored
uhm....I apologize for my ignorance....what's the object model browser?
Go to the Settings - General section in the DWC.
Select the tab BUILT-IN PLUGINS.
Locate the Object Model Browser and start it.
Frederick
-
@fcwilt said in Send a console message at a given event:
@the_dragonlord said in Send a console message at a given event:
@jay_s_uk said in Send a console message at a given event:
@the_dragonlord heaters for tools would be 1 and 2. Activate the object model browser as it'll help you see where everything is stored
uhm....I apologize for my ignorance....what's the object model browser?
Go to the Settings - General section in the DWC.
Select the tab BUILT-IN PLUGINS.
Locate the Object Model Browser and start it.
Frederick
unfortunately the telegram bot doesn't "intercept" the messages as I workngly said before but "only" the console messages....is there a GCODE to start a row in the console?
EDIT
GOT IT M118 L2