HTTP Device SSL peer certificate or SSH remote key was not OK

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
ridewithstyle
Posts: 155
Joined: 02 Jan 2016 01:20

HTTP Device SSL peer certificate or SSH remote key was not OK

Post by ridewithstyle »

Hello there,

my HTTP Device stopped working, I can't really tell when or why but I get the following log entry

Can not make request: SSL peer certificate or SSH remote key was not OK

If I copy and paste the http device url into my browser I get asked for username and password and then it works

my url is

Code: Select all

https://192.168.0.42/api/switch/ctrl?switch=4711&action=off
how can I fix this? Do you need for debug information?

Best Regards,
Torsten
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: HTTP Device SSL peer certificate or SSH remote key was not OK

Post by PoltoS »

Why do you use https:// ??? note the S
ridewithstyle
Posts: 155
Joined: 02 Jan 2016 01:20

Re: HTTP Device SSL peer certificate or SSH remote key was not OK

Post by ridewithstyle »

Hi PoltoS,

thanks for getting back to me. The answer to your question is simple: out of habit, I usually try https first, and it worked for ages.

After a bit debugging I now know: somehow either ZWay or the switch device got a firmware update (or both) and since the switch is handing out self-signed certificates or ZWay suddenly cares about it. And by default the switch only accepts https connections in its api. So simply setting ZWay's http device to http results in

Code: Select all

{
  "success" : false,
  "error" : {
    "code" : 7,
    "description" : "invalid connection type"
  }
}
only if I allow unsecure http in the switch I can use it again with ZWay and it returns

Code: Select all

{
  "success" : true,
  "result" : {
    "switches" : [
      {
        "switch" : 1,
        "active" : false
      }
    ]
  }
}
So now it works again, and one day I will care about the switch status enough to enable polling.

Thanks for your help,
rws
Post Reply