Hi Simon. Thanks for this project. I wondered whether the API has potentially changed as I am getting the following error after manually installing and configuring it. I am using Core version core-2021.1.4 and Superviser version supervisor-2021.01.5
2021-01-23 05:59:31.936321 INFO AppDaemon: Terminating asx_sensor
2021-01-23 05:59:31.945316 INFO AppDaemon: Initializing app asx_sensor using class Get_ASX_info from module asx_sensor
2021-01-23 05:59:31.973421 WARNING asx_sensor: asx_sensor: Entity sensor.asx_data_last_updated not found in namespace default
2021-01-23 05:59:31.978148 INFO AppDaemon: asx_sensor: Entity sensor.asx_data_last_updated created in namespace: default
2021-01-23 05:59:32.126534 WARNING asx_sensor: ------------------------------------------------------------
2021-01-23 05:59:32.128817 WARNING asx_sensor: Unexpected error running initialize() for asx_sensor
2021-01-23 05:59:32.133753 WARNING asx_sensor: ------------------------------------------------------------
2021-01-23 05:59:32.236846 WARNING asx_sensor: Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3.8/site-packages/urllib3/util/connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn
conn.connect()
File "/usr/lib/python3.8/site-packages/urllib3/connection.py", line 308, in connect
conn = self._new_conn()
File "/usr/lib/python3.8/site-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x757618f8>: Failed to establish a new connection: [Errno -2] Name does not resolve
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 724, in urlopen
retries = retries.increment(
File "/usr/lib/python3.8/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.asx.com.au', port=443): Max retries exceeded with url: /asx/1/share/WOW/prices?interval=daily&count=1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x757618f8>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 150, in initialize_app
await utils.run_in_executor(self, init)
File "/usr/lib/python3.8/site-packages/appdaemon/utils.py", line 290, in run_in_executor
response = future.result()
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/appdaemon/apps/asx_sensor/asx_sensor.py", line 70, in initialize
self.load()
File "/config/appdaemon/apps/asx_sensor/asx_sensor.py", line 116, in load
response = requests.request("GET", url, headers=self.headers, data = self.payload)
File "/usr/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.asx.com.au', port=443): Max retries exceeded with url: /asx/1/share/WOW/prices?interval=daily&count=1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x757618f8>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
2021-01-23 05:59:32.239169 WARNING asx_sensor: ------------------------------------------------------------