dasher icon indicating copy to clipboard operation
dasher copied to clipboard

xxx pressed. Count: 1 // Unsuccessful status code

Open vadimbz opened this issue 8 years ago • 7 comments

Getting subj after much trouble with node installation. Does it support https? Example of button config:

"name": "Camera",
"address": "84:D6:D0:53:7D:28",
"timeout": "60000",
"protocol": "udp",
"url": "https://domain:8123/api/services/script",
"method": "POST",
"headers": {"x-ha-access": "pw"},
"json": true,
"body": {"entity_id": "script.onvifer"}

vadimbz avatar Jun 13 '17 02:06 vadimbz

Just an assumption: 8123 looks like Hass, if you have a self singed certificate you could get problems. You should see them in the logs though

pattyland avatar Jun 24 '17 13:06 pattyland

It's been a while J In the meantime I found out that I can still do shell scripts with curl, proceeded that way, faced some sort of commotion with NPM and deleted it for good J

vadimbz avatar Jun 24 '17 17:06 vadimbz

I am having a similar (perhaps the same) problem. I'm using Let's Encrypt certs; are those also going to cause problems so I can't use this?

clemon79 avatar Jun 25 '17 05:06 clemon79

If the Let's Encrypt certificate is valid and you are using the correct hostname there should be a problem @vadimbz You could close the issue if it's solved

pattyland avatar Jun 25 '17 16:06 pattyland

Well, I'm switching to a "real" certificate now so we'll see if that helps once I get everything set up.

clemon79 avatar Jun 25 '17 17:06 clemon79

did anybody figure out how to get this working? i just installed a lets encrypt ssl cert and i'm getting errors saying not authenticated.. was working fine before SSL

Edit- got it working with the LE cert, i'd mistyped x-ha-access

bkcberry avatar Nov 28 '17 03:11 bkcberry

Also! For the original question-- to run a script, the config.json entry should look like this:

"name": "Camera",
"address": "84:D6:D0:53:7D:28",
"timeout": "60000",
"protocol": "udp",
"url": "https://domain:8123/api/services/script/onvifer",
"method": "POST",
"headers": {"x-ha-access": "pw"},

No need to send anything in the body unless you are passing info to your script. I now have several buttons configured this way, using and let's encrypt SSL certificate.

bkcberry avatar Nov 29 '17 04:11 bkcberry