Would it possible to get the start switch and lock control for this api? Those are the 2 last items for my setup
Hi,
I have published a new version 0.3.1:
New Sensor:
Car - Show information about the state/result of last executed action and received messages
EngineState (@rmertz3282: Thx for your contribution)
remoteStartActive (@rmertz3282: Thx for your contribution)
Car Sensor sample:
Breaking Change:
Sensor values and attributes are shown based on the regional settings of the MB-App now. If you have some special calculations like km/h to mi/h, please check the values.
Fixes:
- Sensor gets updated only im the timestamp of the attributes are newer. (Protect agains some race conditions, when to many messages come in at the same time)
- Missing Tire Sensor attributes added again
Others:
We saw a lot of messages around the ācustom_componentā-security issues in the last days. I have reviewed my code again and have not found any related wrong code usage. But please feel free to check the code too.
Hi,
I have published a bugfix release 0.3.2.
This should solve the ābinary sensors not updatedā problem. Will I ever understand this async stuff in HA?
Any feedback is welcome. I have tested the parkbrakestatus. Looks better now.
Hi @iptvcld,
until the lock is implemented you can use the template-lock.
Change the YOURLICPLATE and Wxxxxxxx.
Sample:
lock:
- platform: template
name: Dev Car
value_template: "{{ is_state('sensor.YOURLICPLATE_lock', '2') }}"
availability_template: '{{ states("sensor.YOURLICPLATE_lock") != "unknown" }}'
lock:
service: mbapi2020.doors_lock
data:
vin: Wxxxxxxx
unlock:
service: mbapi2020.doors_unlock
data:
vin: Wxxxxxx
And Iām sure get the switch done based on this example too. Here is the doc to the template switch and the service to start the engine is mbapi2020.engine_start
Hi @iptvcld,
you deleted your post, but ā¦
why not installing version 0.3.3 and use the new ignition sensor.
- Ignition state
Internal Name: ignitionstate Values Description_short Description_long "0" "lock" "Ignition lock" "1" "off" "Ignition off" "2" "accessory" "Ignition accessory" "4" "on" "Ignition on" "5" "start" "Ignition start"],
Very niceā¦ I will add this. Thank you for your work/time
On your next update, would you please be able to add the status of the bonnet/hood?
Hi @fbrannvall,
this should be fixed in v.0.3.4 - Was no HA magic - just a missing comma in my code
BR
Rene
So far everything is working great. Thank you Rene!!
hmm still dont have the tire sensor; i used to have it on the old API. odd
Anyone see this message before?
Car action: DOORSUNLOCK failed. error_code: RIS_FORBIDDEN_VIN, error_message: VIN does not belong to user
I have confirmed i am using the VIN that it picks up via the API and also same VIN in the MerMe app. I can unlock the doors via the app ok but when i try via this service, i get the noted error
I had this issue when I registered for the Mercedes developer website using a different e-mail address than for Mercedes Me.
thanks for the message; yes i have confirmed i am logged in with the same emailā¦ Odd i was able to do this before all the updates yesturday
Hi,
Could you enable the debug mode and check if you really transfer the right vin?
Unlock is working for me.
BR
Rene
Yeah, no issues here either.
Thanks for testing. We discussed the topic via private message and found the following reasons:
- VIN needs to be written in UPPERCASE
- Car needs to be in an area with mobile network coverage
BR
Rene
For what itās worth the last update has been working perfectly for me.
Thank you for your time and effort.
I took the 2021-01-5 update and now I get errors. Any ideas?
Logger: homeassistant.setup
Source: custom_components/mercedesmeapi/apicontroller.py:546
First occurred: 1:56:10 PM (1 occurrences)
Last logged: 1:56:10 PM
Error during setup of component mercedesmeapi
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/mercedesmeapi/__init__.py", line 110, in setup
mercedesme_api = Controller(
File "/config/custom_components/mercedesmeapi/apicontroller.py", line 342, in __init__
self._get_cars()
File "/config/custom_components/mercedesmeapi/apicontroller.py", line 546, in _get_cars
cars = json.loads(
File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Hi,
You are using the old component. This does not work anymore.
Please scroll up and check the new mbapi2020 component.
RenƩ
Thanks. It had been working fine, didnāt realize there was a new version.