Parameters for Volvo On Call component

I just added the Volvo on Call component and am trying to figure out all details and parameters. The Wiki documentation is quite limited at the moment. I am more than willing to expand it, but before I add information to that page, I would like to verify it’s correctness, since it is information I ‘reverse engineered’ from the Python code.
So, here we go…

An optional parameter not mentioned is the ‘update_interval’ parameter which defaults to 1 minute, which is also to minimum value allowed.

Supported resources are:

  • lock
  • heater
  • odometer
  • fuel_amount
  • fuel_amount_level
  • distance_to_empty
  • washer_fluid_level
  • brake_fluid
  • service_warning_status
  • bulb_failures
  • doors
  • windows

The ‘fuel_amount_level’ parameter seems a bit odd, since the States overview lists it as ‘sensor.[carname]_fuel_level’ and not ‘…_fuel_amount_level’.

Also, I noticed the ‘remote start’ resource is missing.

Is the above correct? If so, I can add it to the wiki.

Hi!

I just got my VOC working and have the same states available as what you have listed.

My lock/unlock control is not working (and has odd icons) … haven’t yet tried the heater.

When verbose logging is enabled, I can see a lot more values returned (for my Model year 2016, SPA platform). I’d be interested in developing this further to incorporate all the other data … however, I have no programming background. I suppose I could try to extend using existing sensors as templates …

Once I stabilize my HA install, might try to tackle this …

Cheers,
John

I’ve also seen more data in the debug log (like tyre pressure) and once I’ve gained a better understanding of the HA structure, I will try to expand it (I do have programming experience, but very little Python milleage).

What do you mean with odd icons? Like a round white icon with a blue border and either a kind of shield in it or an open circle? That’s the default for binary sensors. As I am also new to HA, I’m not sure how to change that.

From these icons (door, window) I cannot change the status as well, only see the status and duration. Probably because they are just binary sensors and not switches? Again, I need to do more reading/digging.

Just now, I also noticed that the location of the car hasn’t been updated for 3 days.

Looks like this component can use some ‘maintenance’… ;o)

BTW, I have a model year 2017 car.

For the odd icons, its the control that I find odd (lighting bolts, instead of slider). Thread here

indicates that it is due to “assumed state.”

I had an issue during installation that prevented the voc component from working; reported on github and the dev fixed it within a day or two … A good starting point for further development might be to request some guidance from him. I’ve had some pretty bad experience with the VOC app on my phone (slow to update, position wrong)… so might want to keep that in mind as we troubleshoot. (I haven’t actually setup the tracker yet).

I tried throwing in an extra “resource” (hv_battery_charge)that I could see in the logs in the main volvooncall.py … but no luck. Digging a little further, there are additional volvooncall.py files underneath each “type” of device: sensor, binary_sensor, device_tracker, but none of those reference any specific resources by name, so I gather the collection / assembly of resources is done elsewhere.

So made a little headway:

The following works: add to the end of the RESOURCES section of …/components/volvooncall.py:

         'trip_meter1': ('sensor', 'TripMeter1', 'mdi:ruler', 'km')}

I think the reason it didn’t work before was because I was trying to grab hvBatteryLevel … and this attribute is nested inside hvBatttery after a {

ie in verbose logging, I can see:

‘hvBattery’: {‘hvBatteryChargeStatusDerived’: ‘CablePluggedInCar_FullyCharged’, ‘hvBatteryChargeStatusDerivedTimestamp’: datetime.datetime(2017, 9, 13, 1, 21, 2, tzinfo=datetime.timezone.utc), ‘hvBatteryChargeModeStatus’: None, ‘hvBatteryChargeModeStatusTimestamp’: None, ‘hvBatteryChargeStatus’: ‘ChargeEnd’, ‘hvBatteryChargeStatusTimestamp’: datetime.datetime(2017, 9, 13, 1, 21, 2, tzinfo=datetime.timezone.utc), ‘hvBatteryLevel’: 100, ‘hvBatteryLevelTimestamp’: datetime.datetime(2017, 9, 13, 1, 21, 2, tzinfo=datetime.timezone.utc), ‘distanceToHVBatteryEmpty’: None, ‘distanceToHVBatteryEmptyTimestamp’: datetime.datetime(2017, 9, 13, 1, 21, 2, tzinfo=datetime.timezone.utc), ‘hvBatteryChargeWarning’: ‘UnexpectedPowerloss’, ‘hvBatteryChargeWarningTimestamp’: datetime.datetime(2017, 9, 7, 2, 10, tzinfo=datetime.timezone.utc), ‘timeToHVBatteryFullyCharged’: 30, ‘timeToHVBatteryFullyChargedTimestamp’: datetime.datetime(2017, 9, 13, 0, 21, 20, tzinfo=datetime.timezone.utc)},

Wherease for TripMeter, I can see:

‘tripMeter1’: 4086900,

Note the need to convert camelcase into underscores. IOW TripMeter1 become trip_meter1 for the volvooncall.py.

So the hvbattery addition does grab that whole section in {} … I may have been too quick on my checks after reloading. Any ideas on how to grab an individual element within?