REST sensor throws errors when device is offline - how do I get rid of them?

I have a magic mirror project, which is currently not set up.
I’ve made a binary sensor like this to test if the screen is on or off:

  - platform: rest
    name: MagicMirror_Bathroom
    resource: http://10.11.12.62:8080/api/monitor/status
    value_template: '{{ value_json.monitor == "unknown" }}'
    scan_interval: 10

But it fills up the logfile with errors when it’s offline.
How do I get rid of the errors in the logfile?

What error?

Oh, darn, I forgot to paste it:

2019-12-11 22:49:37 ERROR (SyncWorker_5) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xad936730>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-11 22:49:37 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 90 seconds.
2019-12-11 22:51:11 ERROR (SyncWorker_17) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa9368330>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-11 22:51:11 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 120 seconds.
2019-12-11 22:53:15 ERROR (SyncWorker_9) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa9103cb0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-11 22:53:15 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 150 seconds.
2019-12-11 22:55:49 ERROR (SyncWorker_18) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa9973870>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-11 22:55:49 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-11 22:58:53 ERROR (SyncWorker_8) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa933aa70>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
...
2019-12-12 09:06:05 ERROR (SyncWorker_15) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa94853f0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:06:05 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:09:09 ERROR (SyncWorker_14) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa90feef0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:09:09 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:12:13 ERROR (SyncWorker_16) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xac6b1e70>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:12:13 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:15:17 ERROR (SyncWorker_8) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa89467f0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:15:17 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:18:21 ERROR (SyncWorker_5) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xac7578f0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:18:21 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:21:25 ERROR (SyncWorker_7) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xb1b0de30>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:21:25 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:24:29 ERROR (SyncWorker_11) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa97bdeb0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:24:29 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:27:33 ERROR (SyncWorker_13) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa9733370>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:27:33 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:30:37 ERROR (SyncWorker_3) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xac5858d0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:30:37 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:33:41 ERROR (SyncWorker_14) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa8dcfd70>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:33:41 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:36:45 ERROR (SyncWorker_15) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa978aa10>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:36:45 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:39:49 ERROR (SyncWorker_5) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xacb72c70>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:39:49 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:42:53 ERROR (SyncWorker_7) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa899ae90>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:42:53 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:45:57 ERROR (SyncWorker_4) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xac786d10>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:45:57 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:49:01 ERROR (SyncWorker_5) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xac7a34f0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:49:01 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:52:05 ERROR (SyncWorker_15) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xac802e50>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:52:05 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:55:09 ERROR (SyncWorker_7) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa8984e10>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:55:09 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 09:58:13 ERROR (SyncWorker_3) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa89bc770>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 09:58:13 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 10:01:17 ERROR (SyncWorker_16) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xac79d3f0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 10:01:17 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 10:04:21 ERROR (SyncWorker_1) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa9258190>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 10:04:21 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 10:07:25 ERROR (SyncWorker_9) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xac4a1930>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 10:07:25 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.
2019-12-12 10:10:29 ERROR (SyncWorker_8) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://10.11.12.62:8080/api/monitor/status failed with HTTPConnectionPool(host='10.11.12.62', port=8080): Max retries exceeded with url: /api/monitor/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa92fd9b0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2019-12-12 10:10:29 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform rest not ready yet. Retrying in 180 seconds.

Pretty sure you can’t prevent that if the host is off-line.

1 Like

Yes it is offline at the moment, still waiting for the darned mirror :smiley:

Just realised - socialpollencountuk is down, and has been down for a few weeks now, and it’s just clicked THAT’S what’s preventing any/all other rest sensors not to work! So for example my bin collection council website rest sensors. This is a really big bug.

I know that it’s a very old topic… but someone finded a solution or workaround? Maybe using a template or other stuff?