Curl fails, cert expired

I have a command_line sensor using:

curl -u <user:psswd> https://telematics.otodatanetwork.com:4432/v1.5/DataService.svc/GetAllDisplayPropaneDevices --header Content-Type:application/json"

that has stopped working.

HA error is:

Logger: homeassistant.components.command_line.utils
Source: components/command_line/utils.py:54
Integration: Command Line (documentation, issues)
First occurred: 4:39:10 AM (6 occurrences)
Last logged: 4:39:10 AM

Command failed (with return code 60): curl -u user:psswd https://telematics.otodatanetwork.com:4432/v1.5/DataService.svc/GetAllDisplayPropaneDevices --header Content-Type:application/json

When I issue from command line on a Windows PC (from a totally different geographic location) I get:

curl: (35) schannel: next InitializeSecurityContext failed: SEC_E_CERT_EXPIRED (0x80090328) - The received certificate has expired.

But, when I point a browser to:

https://telematics.otodatanetwork.com:4432/v1.5/DataService.svc/GetAllDisplayPropaneDevices

It tells me:

NET::ERR_CERT_DATE_INVALID

But when I tell the browser to proceed, it asks me to enter my username/psswd and returns the expected data.

I tried:

https://user:psswd/telematics.otodatanetwork.com:4432/v1.5/DataService.svc/GetAllDisplayPropaneDevices

and it does not work.

I have never done anything with respect to ssl certificates on the HA server (or elsewhere).

Is this an HA issue?

Is the problem on my side?

No. It’s the admin who owns telematics.otodatanetwork.com 's problem to fix. They forgot to renew thier SSL cert.

1 Like

Thank you!

I emailed them, just in case they don’t know (and no one else alerted them).

In the meantime, you can run curl -k to ignore certificate errors.

1 Like

That is fabulous!

Works great.

Thank you.