Coming from Domoticz I am now running Home assistant on my Proxmox server. I have one nagging problem though and that is setting up the pvoutput sensor to be utilized for creating automations for blinds etc. When I put the sensor in the configuration.yaml and after subsequent reboot of HA (0.109.6), a persistent error occurs every 5 mins (my API request frequency):
2020-05-08 14:21:25 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.pvoutput is taking over 10 seconds
2020-05-08 14:21:25 ERROR (SyncWorker_3) [homeassistant.components.rest.sensor] Error fetching data: http://pvoutput.org/service/r2/getstatus.jsp failed with HTTPConnectionPool(host='pvoutput.org', port=80): Max retries exceeded with url: /service/r2/getstatus.jsp (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f6caca046d0>, 'Connection to pvoutput.org timed out. (connect timeout=10)'))
2020-05-08 14:21:25 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.pvoutput fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/pvoutput/sensor.py", line 119, in update
self.pvcoutput = self.status._make(self.rest.data.split(","))
AttributeError: 'NoneType' object has no attribute 'split'
I have no clue what is going on, I am on the 300 API calls Pvoutput subscription. My pvoutput sensor in configuration.yaml is as follows:
2020-05-08 22:08:48 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform pvoutput is taking over 10 seconds.
2020-05-08 22:08:49 ERROR (SyncWorker_2) [homeassistant.components.rest.sensor] Error fetching data: http://pvoutput.org/service/r2/getstatus.jsp failed with HTTPConnectionPool(host='pvoutput.org', port=80): Max retries exceeded with url: /service/r2/getstatus.jsp (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f357558bcd0>, 'Connection to pvoutput.org timed out. (connect timeout=10)'))
2020-05-08 22:08:49 ERROR (SyncWorker_2) [homeassistant.components.pvoutput.sensor] Unable to fetch data from PVOutput
As opposed to the first version of the config no reading is taken and show zero or “None” instead of one first reading and then stop.
Hope someone steers me in the right direction.
Thanks and stay safe.
Just tried again and after reboot now the error in the logging is again:
2020-05-09 09:36:47 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform pvoutput is taking over 10 seconds.
2020-05-09 09:36:49 ERROR (SyncWorker_0) [homeassistant.components.rest.sensor] Error fetching data: http://pvoutput.org/service/r2/getstatus.jsp failed with HTTPConnectionPool(host='pvoutput.org', port=80): Max retries exceeded with url: /service/r2/getstatus.jsp (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fb4fffb7fd0>, 'Connection to pvoutput.org timed out. (connect timeout=10)'))
2020-05-09 09:36:49 ERROR (MainThread) [homeassistant.components.sensor] pvoutput: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/pvoutput/sensor.py", line 119, in update
self.pvcoutput = self.status._make(self.rest.data.split(","))
AttributeError: 'NoneType' object has no attribute 'split'
So, after some deep diving I found my Pfsense box running Snort to block PVoutput. Taming that beast now. Not a Home Assistant issue after all.
Thank you for the HTTP headers tip it got me to this solution in the end also by giving me the IP of PVoutput so I could go through the Pfsense logs.