- Making HTTP requests from scripts
-
Member
Making HTTP requests from scripts
Is it possible to make HTTP requests from within scripts?
I have a bad habit of forgetting to turn my compressor off at the end of the day, and because of a slow leak somewhere it decides to start up in the middle of the night and annoy the neighbours. So I am about to install some Sonoff smart switches so that I can ensure that it gets turned of at the end of the day. These switches have an HTTP api among others that allow control across the network. What I would like to do is have PlanetCNC also turn the compressor on at startup and off at shutdown using scripts. I am also installing a smart switch on my shop vac so that it can be controlled remotely so being able to turn that on/off in scripts would also be useful.
Cheers
Simon
Similar Threads:
-
-
Member
Re: Making HTTP requests from scripts
Yes, this is possible. TNGv2 fully integrates Python on several levels and with Python this is a piece of cake.
When I'm done with high priority tasks I'll make some examples/tutorials.
-
Member
Re: Making HTTP requests from scripts
Thank you. I was just about to post that I figured out how to do it using Python. There is no rush for this as I am waiting for the Sonoff devices to ship and then I will have to deal with installing them before I can do much more with PlanetCNC to integrate them.
Thanks
Simon
-
Member
Re: Making HTTP requests from scripts
Oftopic:
In API examples is Arduino project showing how to create custom USB expansion board for TNGv2. This might also be an interesting thing to play with.
- Making HTTP requests from scripts
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules