home-assistant-plugin-for-tasker icon indicating copy to clipboard operation
home-assistant-plugin-for-tasker copied to clipboard

Network Error

Open SeLLeRoNe opened this issue 6 years ago • 11 comments
trafficstars

Hi there, I have just installed this plugin for Tasker to play around with some stuff but it is not working to me.

When I try to add the server, and I click "TEST SERVER" it return a "Network Error" error. I am connected via Wifi, but it does the same over 4G. I have specified the protocol on the Base URL and the Access Token (the error remains the same with or without Access Token)

I have other tasks which use HTTP Push calls to interact with Home Assistant and those are working fine.

The SSL Certificate it's a Let's Encrypt one and Home Assistant is being proxied from Apache (and so far, everything has been working for quite a few months this way :) )

Any clue?

Thanks Andrea

SeLLeRoNe avatar Oct 15 '19 14:10 SeLLeRoNe

Here the same problem, network error. http://localHAip. + long life token.. Any tips?

Nobeernogman avatar Oct 27 '19 13:10 Nobeernogman

You guys need to run the server encrypted so you use the https protocol

lildevilx avatar Oct 29 '19 01:10 lildevilx

I seem to be having the same issue, I do have a self-signed cert for https on the server and the CA has been added to the device. I get a Network Error with http, https, with and without the port being specified. If you drop the http/s altogether then you get an IO Error.

Seems that since Android 7.0 a self-signed CA certificate needs to be loaded directly into the app: https://support.google.com/pixelphone/answer/2844832?hl=e

Perhaps an option to add the CA in the app, or a dialog prompting the user to trust the certificate might help.

HASS version: 0.99.3 Android version: 9.0

devmau5 avatar Oct 30 '19 05:10 devmau5

My problem it's kind of different from every other response.

I do use HTTPS I do not use a Self Signed Cert, I have a Let's Encrypt valid certificate.

Thanks Andrea

SeLLeRoNe avatar Oct 30 '19 09:10 SeLLeRoNe

For your certificate, do you give the address for your local network as well?

lildevilx avatar Oct 30 '19 17:10 lildevilx

I also have this issue with no https protocol involved.

tiagofreire-pt avatar Nov 22 '19 15:11 tiagofreire-pt

Yes I do @lildevilx Internally (LAN/Wifi( the host resolve to the local IP while externally it resolve with the public one.

In both cases, the certificate is valid

SeLLeRoNe avatar Nov 22 '19 15:11 SeLLeRoNe

My problem is I simply cannot get past this Network Error when setting up the https server.

I was attempting to dedicate an old Galaxy S3 phone running Android 4.4.2 as a Tasker server - for things like immediate Skybell doorbell notifications to HASS. My HASS version is the latest (105), and is external facing via duckdns.

From what I've been able to piece together from this thread, Reddit, etc., this was primarily an issue for newer versions of Android. Should this tasker plugin be usable on Android 4.4 with an https/duckdns HASS implementation?

GaryOkie avatar Feb 05 '20 22:02 GaryOkie

Solved the Network Error. It was due to an SSL handshake incompatibility between Home Assistant and the Android 4.4 OS. This configuration.yaml http: option solved the server connection error by enabling a compatible TLS1.2 security protocol:

http:
  ssl_profile: intermediate

The other alternative for an old phone like this is to rebuild it with a custom ROM from XDA Dev's to bring it up to at least Android 7.

GaryOkie avatar Feb 17 '20 15:02 GaryOkie

I had also a network error. The problem was, that the crt file used by home assistant at http.ssl_certificate contained only the certificate but not the certificate path/the parent certificates.

bmaehr avatar Oct 15 '21 23:10 bmaehr

Am having this issue now. Am using my own CA installed as a user certificate in Android settings. Connection works from browsers without any problems

arne182 avatar Oct 22 '23 16:10 arne182