Page 1 of 1

HTTP Get script

PostPosted: Mon Feb 27, 2023 8:28 pm
by Korey
Seeing as how it does not look like the Autelis Jandy plugin will ever be updated to Python 3, I'm trying preemptively to get control of my Autelis Jandy pool controller this way: user:pass@poolcontrol/set.cgi?name=pump&value=0. It works via browser.

Daves fantastic Ghost XML grabs all the data I need, I just need a way to control the functions once Indigo lets go of Python 2.

How do I send this using a python script ?

I have tried a bunch of examples online but have not found a solution. :(

Thanks in advance for your wisdom.

Re: HTTP Get script

PostPosted: Mon Feb 27, 2023 10:53 pm
by whmoorejr
This worked for cameras to get an image.... might work for a pool pump?

Code: Select all
import requests
from requests.auth import HTTPDigestAuth
r = requests.get('http://IPADDRESS/poolcontrol/set.cgi?name=pump&value=0', auth=HTTPDigestAuth('user', 'pass'))
r.raise_for_status()

Re: HTTP Get script

PostPosted: Tue Feb 28, 2023 9:47 am
by Korey
Thanks So much Bill!

All I had to do is change the Auth to Basic and it works! :wink:

Not as sexy as a full blown plugin, but it will do the trick when the time comes.

This code turns off the pump:

Code: Select all
import requests
from requests.auth import HTTPBasicAuth
r = requests.get('http://192.168.0.248/set.cgi?name=pump&value=0', auth=HTTPBasicAuth('user', 'pass'))
r.raise_for_status()


Thanks Again!

Re: HTTP Get script

PostPosted: Fri Apr 28, 2023 9:03 am
by pgershon
You might want to look at this too. I would love to integrate my AquaLink into Indigo.

https://github.com/sfeakes/AqualinkD