thanks. Could you share the steps on how to create the startup script? I tried this too but run against the wall “readonly filesystem”…
btw… The master branch of the component has a check for a WSL environment now and when running on WSL I disable the rlock. But not tested in detail… I added the rlock to prevent some race conditions when I get to many updates for one car in parallel.
Not sure why you’re getting the readonly filesystem. I’ll describe my installation in case someone uses a similar setup.
First off, I run homeassistant supervised inside WSL2 using a “genie bottle”. This runs all systemd services which wsl doesn’t support natively. I used this guide.
To autostart the VM with Windows, I added a task in Windows Task Scheduler to run at startup.
This starts the WSL VM, and executes the script detailed below. The command for task scheduler is: wsl ~/startup.sh
The script runs the bottle, but now to fix this error, it runs the 3 commands discussed above that recreate /dev/shm:
I also have some USB auto mounting to passthrough deconz and wyzesense in this script, but I kept them out here since they’re out of the scope of this discussion.
thanks for your post. I think that’s actually the reason why I get a bunch of errors when HASS tries to start the appletv integration. Are there any plans for a fix?
Is there a way to check the current installed version of the integrations in the GUI?
Guys, do you have a smart solution to “lock” the entity that controls the door locks? Is it possitble to secure this with eg a pincode from the frontend? Thanks a lot.
@ReneNulschDE I have a small problem with the setup in my car. When it looses sync (which has happened a few times more than it really should, maybe because the IP address changes frequently when going from the home wifi to the car’s 4G modem?) I can’t request a PIN from that because the OpenWRT firewall has blocked the call, it seems. So is there another address I need to whitelist in addition to the others you gave me futher up? These:
2022-04-05 04:03:10 ERROR (MainThread) [custom_components.mbapi2020.oauth] Error requesting data from https://id.mercedes-benz.com/as/token.oauth2: Cannot connect to host id.mercedes-benz.com:443 ssl:default [Connect call failed (‘141.113.50.67’, 443)]
2022-04-05 04:03:10 ERROR (MainThread) [custom_components.mbapi2020] Authentication failed. Please reauthenticate.
My best guess is that it is offline too long. I park at my cabin at times, and cell reception there is rather lousy. Does it need to sync with a certain interval to avoid reauthentication?
To be clear: the integration doesn’t connect to your car directly, it connects to a fixed number of cloud servers of Mercedes (id.mercedes-benz.com in this case, to authenticate against). And according to the error message you get, that connection is failing, it simply cannot connect.
@robertklep I am fully aware of that. The system is IN the car. With
going from the home wifi to the car’s 4G modem
I mean that the Pi in the car (further up in the thread the system is explained a bit better) has a separate Pi running OpenWRT and connecting to the home wifi when it’s parked at home and to 4G with a Huawei USB modem when it’s not at home. The car can’t connect to wifi. So when parked at the cabin, if the component has to connect to the server and can’t at a set time it will assume that sync is lost, I believe. How often does it need to connect for this? And can it be set up to try again x number of hours later instead of assuming that sync is lost?
I had added some code to try to reconnect in the past and looks like this code is not good enough. I’m checking for clienterrors and I have to extend this to this error type too.
Thanks, that sounds great! I’ll put it right into the car system when you have something ready. And I apologize for my ignorance, but I have no idea what a PR is…
No worries. I considered writing an answer to you that was a bit more sarcastic, but decided you couldn’t be expected to have read my message higher up in the thread about how I was building this to get a keyless entry system in the car.
Energy Dashboard Integration is one the more often asked questions that I get here, on Github or via private messages. Currently, the MB-API has no valid sensor to integrate directly into the energy management of HA.
Let me explain how I tried to solve it with standard HA functionality and the changes to the charging_power sensor integrated in v0.6.5. The charging_power sensor reports the values in kW now.
However we need the values in kWh to use it in the energy dashboard. There is a standard sensor in HA that calculates the “Riemann sum”.