mercedes_me_api icon indicating copy to clipboard operation
mercedes_me_api copied to clipboard

Entities loaded once, but doesnt get updated with data

Open ehallq opened this issue 4 years ago • 9 comments

Not sure if i have configured anything wrong. But right now I get all the entities for my car. I have set scan_interval to 30. But the entities never gets updated with a state and I don't see any errors in the log. Basically last update was when I restarted home assistant, but all entites has "Unknown" as status. I know this is expected for some values like XXX_rangeelectric since my car is a E200d, but all my entites are missing data

ehallq avatar Jan 05 '21 08:01 ehallq

Dear, Try to put 120. When I try to update with bash script I can see that usually it takes 50 seconds to update all entities.

If you have chance also try to set debug log for this integration and share with me the logs. Thanks

xraver avatar Jan 05 '21 09:01 xraver

120 didnt help, I can see that it is running the update script, but nothing gets updated

2021-01-05 11:39:35 DEBUG (SyncWorker_0) [custom_components.mercedesmeapi] Start Update Resources 2021-01-05 11:41:27 DEBUG (SyncWorker_0) [custom_components.mercedesmeapi] End Update 2021-01-05 11:41:35 DEBUG (SyncWorker_0) [custom_components.mercedesmeapi] Start Update Resources 2021-01-05 11:43:04 DEBUG (SyncWorker_0) [custom_components.mercedesmeapi] End Update 2021-01-05 11:43:35 DEBUG (SyncWorker_4) [custom_components.mercedesmeapi] Start Update Resources 2021-01-05 11:45:34 DEBUG (SyncWorker_4) [custom_components.mercedesmeapi] End Update 2021-01-05 11:45:35 DEBUG (SyncWorker_0) [custom_components.mercedesmeapi] Start Update Resources 2021-01-05 11:47:28 DEBUG (SyncWorker_0) [custom_components.mercedesmeapi] End Update 2021-01-05 11:47:35 DEBUG (SyncWorker_7) [custom_components.mercedesmeapi] Start Update Resources 2021-01-05 11:49:21 DEBUG (SyncWorker_7) [custom_components.mercedesmeapi] End Update 2021-01-05 11:49:35 DEBUG (SyncWorker_6) [custom_components.mercedesmeapi] Start Update Resources

Image of all my sensors https://imgur.com/CdbpSE2.jpg

ehallq avatar Jan 05 '21 10:01 ehallq

Interesting. the script working well. but no way to receive data. I have to understand better what is happening. Have you tried to use the standalone python script or bash?

thanks

xraver avatar Jan 05 '21 11:01 xraver

I have used the standalone python script to get the token only

edit: oh didnt see the status command. I will try that, will attach result in a minute edit2: So I ran it and made it write everything to the resource file. and this is what I get for every item basically. The same can be seen in HA {"name": "rangeliquid", "vin": "XXX", "version": "1.0", "href": "/vehicles/XXX/resources/rangeliquid", "state": null, "timestamp": null, "valid": false}

ehallq avatar Jan 05 '21 11:01 ehallq

For me 0.10 broke my sensors, rolling back to 0.9 fixes it again. Getting no error within home assistant, just sensor value "unknown"

apfelflo89 avatar Jan 05 '21 11:01 apfelflo89

I think it is related to https://github.com/xraver/mercedes_me_api/issues/15 I unlocked and locked my car with the app, causing some statuses to update. Now I got values for the lock related sensors

ehallq avatar Jan 05 '21 11:01 ehallq

If it is related to #15, setting enable_resources_file: True may help.

danielrheinbay avatar Jan 05 '21 12:01 danielrheinbay

enable_resources_file: True was indeed helping. Thank you

apfelflo89 avatar Jan 05 '21 14:01 apfelflo89

OK actually it didn't. With enable_resources_file: True the sensors are populated with data when Home Assistant is starting but it never gets updated as far as I tested. So far I´m back again on 0.9

apfelflo89 avatar Jan 06 '21 08:01 apfelflo89