Johboh / hassalarm

Android app for integration with Hass.io as a sensor for the next scheduled alarm on the device
MIT License
62 stars 6 forks source link

Connection failed - Trust anchor not found #17

Closed dverha closed 4 years ago

dverha commented 4 years ago

Hi,

First of all, thanks for this great app. It has been working flawlessly for me before, however since I moved my Home Assistant (Hass.io) to my Synology NAS it is not working anymore.

I created a new Long-Lived Access Token and updated the server address accordingly but got the following error:

Using long lived token Entity ID is of type input_datetime Request: POST /api/services/input_datetime/set_datetime

Request headers: Authorization: Bearer

Request body: {"datetime":"2020-04-16 08:00:00","entity_id":"input_datetime.next_alarm_daan"}

Failure: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

The connection itself is working and also the Long-Lived Access Token works in Tasker.

Any idea what might be the problem here?

Thank you in advance for your help!

Kind regards, Daniel

Johboh commented 4 years ago

Hello! It looks like some Android client certification issue. What device are you using and OS? Also is your time and date correct? And do you use https? Do you need to use https :)?

I'm guessing that Tasker is ignoring invalid certificates.

dverha commented 4 years ago

Hi! I have a Samsung S10 (stock OS) and time/date is correct. I also have the same problem on my girlfriends phone (Moto G5+) so I assume it has something to do with the new Hass.io installation on my Synology.

I am using https (letsEncrypt) as I want to access Hass.io from outside my network. Is there a way I can let HassAlarm connect locally someway? I am unable to access HomeAssistant locally myself, not sure why though.

This is my http setting in the configuration.yaml:

http: ssl_certificate: /ssl/cert.pem ssl_key: /ssl/privkey.pem

dverha commented 4 years ago

Hello again, I solved it by using DuckDNS again instead of a certificate created by my Synology. Tickets can be closed!