apologies, first time posting and I assumed I'd get an email notification on a response, but looks like I had that setting toggled off in my profile!
I did a poor job of sanitizing some of the ips/msgs/user etc. I think I did a better job below. All the requests are coming from the same machine (192.168.20.10) TO foo.lan. Again, the variables ARE updating and the trigger IS firing
- Code: Select all
Web Server request to set variable "foo" value to "bar" from 192.168.20.10
Web Server access denied "http://foo.lan:8176/variables/foo.json" from myuser @ 192.168.20.10
Web Server request to set variable "sendCriticalNotification" value to "bar" from 192.168.20.10
Trigger SendCritNotification
Web Server access denied "http://foo.lan:8176/variables/sendCriticalNotification.json" from myuser @ 192.168.20.10
Pushover Pushover notification was sent sucessfully, title: Critical Error, body: bar
I've attached a screen shot of the trigger. All it does is send a pushover notification upon a change of that var. Makes it an easy way for me to send notifications from the various services I have running in my house via a simple http request.
As for the python code, it's pretty straight forward (I think?)
- Code: Select all
digest_auth = HTTPDigestAuth(os.environ["INDIGO_USER"], os.environ["INDIGO_PWD"])
def set_indigo_var(var, value):
data = {"value": value}
reply = requests.put(
f"http://foo.lan:8176/variables/{var}.json", auth=digest_auth, data=data
)
As you can see in the log msgs above, only one of the vars that I change has a trigger, but the access denied msg happens when I try to set either variable (and they both update just fine).