Send emails / txts notifications from gcode.

More
1 year 7 months ago #324708 by tommylight

I tried the stock #!/usr/bin/env python
as well as #!/usr/bin/python
Just a stab in the dark but try adding 2 or 3 to the python
#!/usr/bin/env python2
or
#!/usr/bin/env python3

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #324723 by chrisfischer
Thanks for the idea.
Tried it without success.

But it did make me think to try some other stuff i saw in the link above.

I changed the M101 file to a new name sendemail.py
Then i called the file in the bash script of M101 that looks like this:

#!/bin/bash

python3 sendemail.py P1 P2 %

exit 0


That did the trick!
This is a huge step towards automation for me!
Thanks everyone.

ps the python script sendemail.py needed to be in the config folder with the machine.ini despite the mcode file location in my nc_files directory.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
1 year 4 weeks ago - 1 year 2 weeks ago #335789 by Dwellon
I got this working by using curl in a G-code macro to call a webhook that sends me texts. I signed up with a voip provider that gives me a number capable of receiving and sending SMS through a simple API. That way I don't need a full email setup—just a lightweight script and a network connection. Super handy for longer jobs or when I step away from the machine.
Last edit: 1 year 2 weeks ago by Dwellon.

Please Log in or Create an account to join the conversation.

Time to create page: 0.150 seconds
Powered by Kunena Forum