fordpass-ha icon indicating copy to clipboard operation
fordpass-ha copied to clipboard

Error communicating with FordPass

Open malse83 opened this issue 3 years ago • 39 comments

I install the integration, but i have this error on the log. I already read the problem Integration not initialising #90 , and #114 . But not solve for me.

This is my log:

2021-09-09 22:10:07 WARNING (MainThread) [custom_components.fordpass] 'vehiclestatus' 2021-09-09 22:10:07 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for "my vin code" 2021-09-09 22:10:07 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for "my vin code"

malse83 avatar Sep 09 '21 20:09 malse83

I give to you some information about my enviroment: I use Home Assistant Core, version 2021.9.6, installed as Docker container on Raspberry Pi OS.

malse83 avatar Sep 15 '21 21:09 malse83

Same problem here

bckthomas avatar Sep 19 '21 06:09 bckthomas

@malse83 @bckthomas if you are still having problems can you please enable debug logging and send me the full log.

logger:
  default: warning
  logs:
    custom_components.fordpass: debug

itchannel avatar Sep 27 '21 07:09 itchannel

Here are the logs. I replaced the VIN byxxxxxxxxxxxx

2021-09-27 14:18:02 DEBUG (MainThread) [custom_components.fordpass] vin 2021-09-27 14:18:02 DEBUG (MainThread) [custom_components.fordpass] username 2021-09-27 14:18:02 DEBUG (MainThread) [custom_components.fordpass] password 2021-09-27 14:18:02 DEBUG (MainThread) [custom_components.fordpass] region 2021-09-27 14:18:02 DEBUG (MainThread) [custom_components.fordpass] UK&Europe 2021-09-27 14:18:02 DEBUG (MainThread) [custom_components.fordpass.fordpass_new] /config/custom_components/fordpass/fordpass_token.txt 2021-09-27 14:18:02 DEBUG (SyncWorker_11) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-09-27 14:18:04 WARNING (MainThread) [custom_components.fordpass] 'vehiclestatus' 2021-09-27 14:18:04 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for xxxxxxxxxxxx 2021-09-27 14:18:04 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for xxxxxxxxxxxx 2021-09-27 14:18:04 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 1.451 seconds (success: False)

bckthomas avatar Sep 27 '21 12:09 bckthomas

Same issue here. Logs just showing a loop of

2021-10-19 09:01:59 DEBUG (MainThread) [custom_components.fordpass] vin
2021-10-19 09:01:59 DEBUG (MainThread) [custom_components.fordpass] username
2021-10-19 09:01:59 DEBUG (MainThread) [custom_components.fordpass] password
2021-10-19 09:01:59 DEBUG (MainThread) [custom_components.fordpass] region
2021-10-19 09:01:59 DEBUG (MainThread) [custom_components.fordpass] UK&Europe
2021-10-19 09:01:59 DEBUG (MainThread) [custom_components.fordpass.fordpass_new] /config/custom_components/fordpass/fordpass_token.txt
2021-10-19 09:01:59 DEBUG (SyncWorker_1) [custom_components.fordpass.fordpass_new] Token is valid, continuing
2021-10-19 09:01:59 WARNING (MainThread) [custom_components.fordpass] 'vehiclestatus'
2021-10-19 09:01:59 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for XXX-VIN-XXX
2021-10-19 09:01:59 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for XXX-VIN-XXX
2021-10-19 09:01:59 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 0.782 seconds (success: False)

jamesonuk avatar Oct 19 '21 08:10 jamesonuk

I have done another clean install and this has worked. I know I did try this yesterday but I have a 0 (zero) in my VIN which looked a lot like a O (capital o) in the app so the VIN was wrong. I haven't had time to check the code but is there a possibility that this is caused by adding the wrong VIN and it is just that the logging / feedback isn't highlighting it?

jamesonuk avatar Oct 19 '21 19:10 jamesonuk

Same issue: Debug logs: 2021-12-15 19:19:45 DEBUG (MainThread) [custom_components.fordpass] username 2021-12-15 19:19:45 DEBUG (MainThread) [custom_components.fordpass] password 2021-12-15 19:19:45 DEBUG (MainThread) [custom_components.fordpass] vin 2021-12-15 19:19:45 DEBUG (MainThread) [custom_components.fordpass] region 2021-12-15 19:19:45 DEBUG (MainThread) [custom_components.fordpass] UK&Europe 2021-12-15 19:19:45 DEBUG (MainThread) [custom_components.fordpass.fordpass_new] /config/custom_components/fordpass/fordpass_token.txt 2021-12-15 19:19:45 DEBUG (SyncWorker_31) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-15 19:19:46 WARNING (MainThread) [custom_components.fordpass] 'vehiclestatus' 2021-12-15 19:19:46 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for XXXXXXXXXXXXXXXXX (replaced VIN in post) 2021-12-15 19:19:46 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for XXXXXXXXXXXXXXXXX (replaced VIN in post) 2021-12-15 19:19:46 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 0.926 seconds (success: False)

Have uninstalled / reinstalled the integration many times and even copied the VIN DIRECTLY from the fordpass app and pasted just to make sure I didn't fat finger it...

nathan-curtis avatar Dec 16 '21 01:12 nathan-curtis

SameissueL Debug logs: 2021-12-16 08:21:42 DEBUG (MainThread) [custom_components.fordpass] username 2021-12-16 08:21:42 DEBUG (MainThread) [custom_components.fordpass] password 2021-12-16 08:21:42 DEBUG (MainThread) [custom_components.fordpass] vin 2021-12-16 08:21:42 DEBUG (MainThread) [custom_components.fordpass] region 2021-12-16 08:21:42 DEBUG (MainThread) [custom_components.fordpass] UK&Europe 2021-12-16 08:21:42 DEBUG (MainThread) [custom_components.fordpass.fordpass_new] /config/custom_components/fordpass/fordpass_token.txt 2021-12-16 08:21:42 DEBUG (SyncWorker_1) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-16 08:21:43 WARNING (MainThread) [custom_components.fordpass] 'vehiclestatus' 2021-12-16 08:21:43 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for WF0xxxxxxxxxxxxx 2021-12-16 08:21:43 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for WF0xxxxxxxxxxxxxxxx 2021-12-16 08:21:43 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 0.740 seconds (success: False)

Home Assistant 2021.11 -> 2021.12.2 fordpass-ha 1.23 -> 1.26 Have uninstalled and reinstalled the integration many times and even copied the VIN DIRECTLY from the fordpass

greensoftwarepl avatar Dec 16 '21 07:12 greensoftwarepl

Same problem with the last version (1.26) Complete re-installation did not change a thing When I do a 'reload', it works again for a while... DEBUG log ? Thanks, anyway..


This error originated from a custom integration.

Logger: homeassistant Source: custom_components/fordpass/sensor.py:58 Integration: FordPass (documentation, issues) First occurred: 15 December 2021, 18:26:06 (166 occurrences) Last logged: 08:23:22

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _async_write_ha_state state = self._stringify_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 511, in _stringify_state if (state := self.state) is None: File "/config/custom_components/fordpass/sensor.py", line 362, in state return self.get_value("state") File "/config/custom_components/fordpass/sensor.py", line 58, in get_value return round(self.coordinator.data[self.sensor]["fuelLevel"]) TypeError: 'NoneType' object is not subscriptable

Calvin4024 avatar Dec 16 '21 07:12 Calvin4024

@Calvin4024 @nathan-curtis @greensoftwarepl Can you please add the following to your configuration to enable debug mode and then send me the corresponding logs.

logger:
  default: warning
  logs:
    custom_components.fordpass: debug

Also can you let me know the following:

  • Make and model of car (Is it a hybrid/electric)
  • Version of HA
  • Country you're located in and the region you selected

itchannel avatar Dec 16 '21 08:12 itchannel

@Calvin4024 @nathan-curtis @greensoftwarepl

FORD MONDEO 2016 (Disel) HA version -> all version from 2021.11 to 2021.12 Poland, region: UK&Europe

greensoftwarepl avatar Dec 16 '21 09:12 greensoftwarepl

FYI: this problem never happened before 1.23... and now the 'Odometer' doesn't work anymore, even if the rest is fine.... basically, it works for a few hours and then stops... Reload solves the problem for a few hours...

It is working right now, except the Odometer... I will send you the DEBUG log asap

Cheers

Calvin

Car: Mustang Mach-E EV Country: Switzerland/Europe

System Health

version core-2021.12.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.10.63-v8
arch aarch64
timezone Europe/Zurich
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 5000
Installed Version 1.18.0
Stage running
Available Repositories 974
Installed Repositories 4
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 7.0
update_channel stable
supervisor_version supervisor-2021.12.2
docker_version 20.10.9
disk_total 57.8 GB
disk_used 12.1 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok
installed_addons Studio Code Server (3.7.0), Samba share (9.5.1), File editor (5.3.3), Check Home Assistant configuration (3.9.0), Terminal & SSH (9.2.1), Duck DNS (1.14.0), Mosquitto broker (6.0.1), Node-RED (10.2.0)
Lovelace
dashboards 4
resources 0
views 15
mode storage

Calvin4024 avatar Dec 16 '21 09:12 Calvin4024

2021-12-16 08:36:30 WARNING (MainThread) [custom_components.fordpass] 'vehiclestatus' 2021-12-16 08:36:30 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for WF0FXXWPCFGD88634 2021-12-16 08:36:30 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for WF0FXXWPCFGD88634 2021-12-16 08:36:30 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 1.003 seconds (success: False) 2021-12-16 08:37:50 DEBUG (MainThread) [custom_components.fordpass] username 2021-12-16 08:37:50 DEBUG (MainThread) [custom_components.fordpass] password 2021-12-16 08:37:50 DEBUG (MainThread) [custom_components.fordpass] vin 2021-12-16 08:37:50 DEBUG (MainThread) [custom_components.fordpass] region 2021-12-16 08:37:50 DEBUG (MainThread) [custom_components.fordpass] UK&Europe 2021-12-16 08:37:50 DEBUG (MainThread) [custom_components.fordpass.fordpass_new] /config/custom_components/fordpass/fordpass_token.txt 2021-12-16 08:37:50 DEBUG (SyncWorker_10) [custom_components.fordpass.fordpass_new] No token, or has expired, requesting new token 2021-12-16 08:37:51 DEBUG (SyncWorker_10) [custom_components.fordpass.fordpass_new] {'httpStatus': 0, 'status': 200, 'requestStatus': None, 'error': None, 'lastRequested': None, 'version': None, 'UserProfile': None, 'access_token': XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx 2021-12-16 08:37:51 DEBUG (SyncWorker_10) [custom_components.fordpass.fordpass_new] Token is valid, continuing

greensoftwarepl avatar Dec 16 '21 09:12 greensoftwarepl

@Calvin4024 Can you please go to "integrations" and click options next to fordpass and then make sure the two measurement values are set and click "ok" and then restart and tell me if the Odometer now works. The other issue I'll need to review the logs

itchannel avatar Dec 16 '21 09:12 itchannel

image

OK ==> Restarted

image

Calvin4024 avatar Dec 16 '21 09:12 Calvin4024

@greensoftwarepl Looking at those logs it appears you've logged in succesfully but the fordpass API isn't excepting your vin hence the "Vehiclestatus" error. What functionality does your 2016 ford support in the fordpass app. Unfortunately the Ford API isn't very granular so it literally replies with a 401 error if the VIN is wrong, auth has failed or car is not supported.

itchannel avatar Dec 16 '21 09:12 itchannel

@Calvin4024 can you check your logs and see if you have any errors related to the odometer entity or any other fordpass one. Also you did hit submit on the options dialog before restarting HA right? Just checking 👍

When you have time and enable debug mode it should give me a full print out of the vehicle array so we can check why it's not adding entities.

itchannel avatar Dec 16 '21 09:12 itchannel

No error right now... but still unavailable...

I found this info in the log though.... and it was correct

'odometer': {'value': 5969.0, 'status': 'CURRENT', 'timestamp': '12-15-2021 13:10:11'

but....

image

I'll keep an eye on the logs and I will let you know when I have more useful info.... thanks

Calvin4024 avatar Dec 16 '21 10:12 Calvin4024

There must be another error for Fordpass in your log which is stopping the entity flow. If you can look at the log for all fordpass messages when you have 5 we can see where the flow is stopping.

itchannel avatar Dec 16 '21 10:12 itchannel

I have the same issue as @Calvin4024 and for mee the fuel sensor is unavailable too (kind of logical for a Mustang Mach E ;) ). For the fuel sensor the following is logged:

2021-12-16 10:40:31 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 511, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/fordpass/sensor.py", line 362, in state
    return self.get_value("state")
  File "/config/custom_components/fordpass/sensor.py", line 58, in get_value
    return round(self.coordinator.data[self.sensor]["fuelLevel"])
TypeError: 'NoneType' object is not subscriptable

Bert-R avatar Dec 16 '21 10:12 Bert-R

With release 1.27, the odometer is available again. Thanks!

Bert-R avatar Dec 16 '21 11:12 Bert-R

@Bert-R Great. There's another release incoming in a second that fixes a setup issue so don't be surprised when you see 1.28

itchannel avatar Dec 16 '21 11:12 itchannel

@Calvin4024 Can you give the new 1.28 release a go. Should hopefully fix the issues you're having

itchannel avatar Dec 16 '21 11:12 itchannel

@greensoftwarepl If you enable debug mode as I mentioned previously then add Fordpass using the latest 1.28 release, it will print all vehicles assigned to you in the log. That way you can check to see if the VIN your entering is being found by the API.

itchannel avatar Dec 16 '21 11:12 itchannel

1.28 installed, thanks... and the odometer is back for the Mach-E, great.....

Screenshot 2021-12-16 at 16 32 21

On the other hand, the sensor.12v_battery_template is stuck at exactly 12V... and Forscan tells me 14.2V.... (Ooopsss... the sensor just went to 15V for a few minutes... and now back to 12V...)


The 1.28 worked well for something like 10 minutes... but then I got:

This error originated from a custom integration.

Logger: custom_components.fordpass Source: helpers/update_coordinator.py:219 Integration: FordPass (documentation, issues) First occurred: 16:36:08 (1 occurrences) Last logged: 16:36:08

Error fetching fordpass data: Error communicating with FordPass for WF0TK3SU2xxxxxxxxx


DEBUG:

2021-12-16 16:30:30 DEBUG (MainThread) [custom_components.fordpass] username 2021-12-16 16:30:30 DEBUG (MainThread) [custom_components.fordpass] password 2021-12-16 16:30:30 DEBUG (MainThread) [custom_components.fordpass] vin 2021-12-16 16:30:30 DEBUG (MainThread) [custom_components.fordpass] region 2021-12-16 16:30:30 DEBUG (MainThread) [custom_components.fordpass] UK&Europe 2021-12-16 16:30:30 DEBUG (MainThread) [custom_components.fordpass.fordpass_new] /config/custom_components/fordpass/fordpass_token.txt 2021-12-16 16:30:31 DEBUG (SyncWorker_9) [custom_components.fordpass.fordpass_new] Succesfully fetched token Stage1 2021-12-16 16:30:31 DEBUG (SyncWorker_9) [custom_components.fordpass.fordpass_new] {'httpStatus': 200, 'status': 200, 'requestStatus': 'CURRENT', 'error': None, 'lastRequested': None, 'version': None, 'UserProfile': None, 'access_token': 2021-12-16 16:30:35 DEBUG (MainThread) [custom_components.fordpass.switch] {'returnCode': 200, 'returnMessage': 'The request was Successful', 'session': {'lastModifiedDate': '2021-12-16T15:30:34.664Z', 'gmSessionId': 4349557, 'gmStatus': 'enable'}} 2021-12-16 16:30:36 DEBUG (SyncWorker_6) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-16 16:30:36 DEBUG (SyncWorker_4) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-16 16:30:38 DEBUG (SyncWorker_5) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-16 16:30:38 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 2.462 seconds (success: True) 2021-12-16 16:30:38 DEBUG (MainThread) [custom_components.fordpass.switch] {'returnCode': 200, 'returnMessage': 'The request was Successful', 'session': {'lastModifiedDate': '2021-12-16T15:30:38.056Z', 'gmSessionId': 4349557, 'gmStatus': 'enable'}} 2021-12-16 16:35:38 DEBUG (SyncWorker_3) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-16 16:35:38 DEBUG (SyncWorker_10) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-16 16:36:08 WARNING (MainThread) [custom_components.fordpass] 2021-12-16 16:36:08 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for WF0TK3SU2MMxxxxxx 2021-12-16 16:36:08 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for WF0TK3SU2MMxxxxxx 2021-12-16 16:36:08 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 30.002 seconds (success: False)

Calvin4024 avatar Dec 16 '21 15:12 Calvin4024

@Calvin4024 The 12v value for the battery is what is returned from the fordpass API so nothing I can do about that as they don't give a very accurate reading such as using forscan locally.

The other issue you're having with "Error fetching fordpass data" does it start working again after the error or does only a restart fix it? As I sometimes get those errors but that's because of instabilities with the ford API. Also is that the complete log as I was hoping to see some python timeout/errors above that which would indicate the root cause.

itchannel avatar Dec 16 '21 19:12 itchannel

Hi mate, Thanks for your fast answer... :) I totally understand for the 12V battery, it is the way it is...

Concerning the "Error fetching fordpass data", I got an error just before 9pm yesterday, all my sensors were suddenly 'unavailable'... but I checked HA 20 minutes later and it was fine again, without any restart or reload.... then, I can see a successful connection every 5 minutes until now...

The 'Odometer' is working fine too, thanks...

In my opinion, it could be Ford's fault, if their API is not always available or very stable

2021-12-17 06:54:43 DEBUG (SyncWorker_1) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 06:54:43 DEBUG (SyncWorker_3) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 06:54:44 DEBUG (SyncWorker_0) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 06:54:44 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 1.846 seconds (success: True) 2021-12-17 06:54:44 DEBUG (MainThread) [custom_components.fordpass.switch] {'returnCode': 200, 'returnMessage': 'The request was Successful', 'session': {'lastModifiedDate': '2021-12-17T05:54:44.399Z', 'gmSessionId': 4349557, 'gmStatus': 'disable'}}

Calvin4024 avatar Dec 17 '21 06:12 Calvin4024

.. and I had another "Error communicating with FordPass" at 7:50 but it was fine again at 8:00 without any action on my side... just for your information...

2021-12-17 07:50:06 DEBUG (SyncWorker_10) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 07:50:06 DEBUG (SyncWorker_4) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 07:50:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:50:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:50:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'unavailable' when rendering template '{% if states.sensor.grid_injection.state | int <= 0 %} {{ states.sensor.grid_injection.state | int | abs + states.sensor.fronius_symo.state | int }} {% elif states.sensor.grid_injection.state | int > 0 %} {{ states.sensor.fronius_symo.state | int - states.sensor.grid_injection.state | int }} {%endif%}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:50:36 WARNING (MainThread) [custom_components.fordpass] 2021-12-17 07:50:36 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for WF0TK3SU2MMAxxxxx 2021-12-17 07:50:36 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for WF0TK3SU2MMAxxxxx 2021-12-17 07:50:36 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 30.004 seconds (success: False) 2021-12-17 07:50:36 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'') while processing template 'Template("{{ ((state_attr('sensor.fordpass_tirepressure', 'leftFrontTirePressure'))/ 14.504) | round(1) }}")' for attribute '_attr_native_value' in entity 'sensor.tire_fl_template' 2021-12-17 07:50:36 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'') while processing template 'Template("{{ ((state_attr('sensor.fordpass_tirepressure', 'rightFrontTirePressure')) / 14.504) | round(1) }}")' for attribute '_attr_native_value' in entity 'sensor.tire_fr_template' 2021-12-17 07:50:36 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'') while processing template 'Template("{{ ((state_attr('sensor.fordpass_tirepressure', 'outerLeftRearTirePressure')) / 14.504) | round(1) }}")' for attribute '_attr_native_value' in entity 'sensor.tire_rl_template' 2021-12-17 07:50:36 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'') while processing template 'Template("{{ ((state_attr('sensor.fordpass_tirepressure', 'outerRightRearTirePressure')) / 14.504) | round(1)}}")' for attribute '_attr_native_value' in entity 'sensor.tire_rr_template' 2021-12-17 07:50:36 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'round' got invalid input 'None' when rendering template '{{ (state_attr('sensor.fordpass_elveh', 'elVehDTE')) | round(0) }}' but no default was specified. Currently 'round' will return 'None', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:50:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:50:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:51:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:51:08 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:51:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:51:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:52:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:52:08 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:52:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:52:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:53:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:53:08 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:53:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:53:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:54:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:54:08 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:54:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:54:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:55:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:55:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:55:36 DEBUG (SyncWorker_5) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 07:55:36 DEBUG (SyncWorker_1) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 07:55:37 DEBUG (SyncWorker_0) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 07:55:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:55:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:55:38 INFO (MainThread) [custom_components.fordpass] Restored connection to FordPass for WF0TK3SU2MMAxxxxx 2021-12-17 07:55:38 INFO (MainThread) [custom_components.fordpass] Fetching fordpass data recovered 2021-12-17 07:55:38 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 2.075 seconds (success: True) 2021-12-17 07:55:38 DEBUG (MainThread) [custom_components.fordpass.switch] {'returnCode': 200, 'returnMessage': 'The request was Successful', 'session': {'lastModifiedDate': '2021-12-17T06:55:37.624Z', 'gmSessionId': 4349557, 'gmStatus': 'disable'}} 2021-12-17 07:56:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:56:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:56:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:56:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:57:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:57:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:57:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:57:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:58:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:58:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:58:10 ERROR (stream_worker) [homeassistant.components.stream] Error from stream worker: Error opening stream None/live/files/high/index.m3u8 2021-12-17 07:58:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:58:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:59:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:59:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:59:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 07:59:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 08:00:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 08:00:07 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 08:00:37 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_PV'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 08:00:38 DEBUG (SyncWorker_11) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 08:00:38 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'int' got invalid input 'None' when rendering template '{{value_json.Body.Data.Site['P_Akku'] | int }}' but no default was specified. Currently 'int' will return '0', however this template will fail to render in Home Assistant core 2022.1 2021-12-17 08:00:38 DEBUG (SyncWorker_12) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 08:00:42 WARNING (stream_worker) [libav.hls] skipping 3 segments ahead, expired from playlists 2021-12-17 08:00:47 DEBUG (SyncWorker_2) [custom_components.fordpass.fordpass_new] Token is valid, continuing 2021-12-17 08:00:47 DEBUG (MainThread) [custom_components.fordpass] Finished fetching fordpass data in 9.969 seconds (success: True) 2021-12-17 08:00:47 DEBUG (MainThread) [custom_components.fordpass.switch] {'returnCode': 200, 'returnMessage': 'The request was Successful', 'session': {'lastModifiedDate': '2021-12-17T07:00:47.530Z', 'gmSessionId': 4349557, 'gmStatus': 'disable'}}

Calvin4024 avatar Dec 17 '21 08:12 Calvin4024

Thanks you for all the good work! I am using this integration a few months now and I am very happy with it. But the last few weeks I have frequent disconnects and all my entities are unavailable. A restart of the integration does solve it for a while.

Gertjuh avatar Dec 17 '21 15:12 Gertjuh

@Gertjuh Does it come back after a while without restarting? As the fordpass API is very flakey at the moment so I do see it going unavailable every so often but usually comes back within 30mins or so.

itchannel avatar Dec 17 '21 22:12 itchannel