Mazda connected service

I promised a while ago to add my NodeRed flows for charging the CX-60 and controlling car pre-conditioning. The following flow is my setup in case it helps someone. I have tried to add comment nodes to explain what each group is relating to.
A couple of points to note:

  • Pod Point charging is scheduled from the new local calendar integration - I have setup a calendar called ‘Car’
  • In the calendar integration, I have created 2 entries ‘Charge Car’ and ‘Precondition Car’.
  • I have set the charge to be a daily repeat between 12:45am and 4:15am - I am on Octopus Go tariff so get cheap overnight electric.
  • I usually set out at 7:40am each day midweek for school runs so I have set preconditioning to start at 7:15am and end at 7:30am.
  • When the car is preconditioning, I enable battery charging on the Pod Point

I have setup up notifications to go via the Companion App:

  • A notification is sent at 10:00pm to remind me to plug the car in if it is not plugged in and the car battery is less than 85%
  • At 10:10pm, an actionable notification is set to be fired - it tells me what pre conditioning I have set for the next morning, if any, and allows me to change preconditioning options for next morning ie turn off preconditioning automation, heat the cabin, enable front demister, enable rear demister, enable front and rear demister
  • At 7:10am a notification is sent with the same options above as I might want to change preconditioning options when I look ut and see the weather

I guess the next thing I can automate on this would be to enable preconditioning automatically if there is frost/snow or below a certain temperature.

[{"id":"c297dece1a83e2e3","type":"api-call-service","z":"4572911c1f8357d7","g":"0dd4a100e7646ae8","name":"Notification","server":"60e3c8e2.b47df8","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_james_iphone","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"{{message.message}}\",\"title\":\"{{title}}\",\"data\":{\"actions\":[{\"action\":\"TURN_OFF_AUTOMATION\",\"title\":\"Turn Off Automation\"},{\"action\":\"CABIN_HEAT\",\"title\":\"Heat Only\"},{\"action\":\"HEAT_AND_FRONT_DEFROSTER\",\"title\":\"Heat and front defroster\"},{\"action\":\"HEAT_AND_REAR_DEFROSTER\",\"title\":\"Heat and rear defroster\"},{\"action\":\"HEAT_AND_ALL_DEFROSTER\",\"title\":\"Heat and both defrosters\"}],\"persistent\":true,\"tag\":\"persistent\",\"push\":{\"badge\":\"{{states.counter.iosbadgecount.state}}\"},\"sound\":{\"name\":\"default\",\"critical\":\"1\",\"volume\":\"0.25\"}}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1110,"y":1120,"wires":[[]]},{"id":"60e3c8e2.b47df8","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

I do something similar for pre-conditioning - However, as well as enabling battery charging on the Pod Point I also needed to switch on the car for charging, otherwise it just used the batter to pre-condition.

@StephenMilner do you have the car set to charge time between specific hours from the car itself? For the CX-60 I don’t have a charge time set so as soon as PodPoint turns on there is no need to enable charging from the car charge HA entity as the car will accept any charge any time

Hi @bdr9! Thx for HA integration.
Is it possible to increase default timeout to 30 seconds, or make it configurable? With default 10 I got a lot of timeouts, and when I change it to 30 it works.
Thank you :slight_smile:

Hi @cobric, I have increased the timeout to 30 seconds in this PR: Increase timeout to 30 seconds for Mazda integration by bdr99 · Pull Request #92744 · home-assistant/core · GitHub

It will be included in the 2023.5.3 patch release.

Hi @bdr9, thx :slight_smile:

I recently setup Mazda connected services, and I am finding it very delayed or non responsive. I have never gotten it to tell me the doors are open. I am curious if its slow for everyone or if I am doing something wrong. It says its a polling connection, is there any way to manually pull the status?

@MrKuenning the status of the car is very dependent on the model of car. I have a CX-60 and it does not report door, bonnet, boot, hazard lights status at all. But then it doesn’t report that in the Mazda app either.
It is fairly delayed to get status updates but then you wouldn’t want it to keep polling the API - if you have an EV or PHEV it will hammer the battery if there was regular polling occurring.
You can however press Refresh Status to get updates. I find it can take up to a minute to update, depending on mobile reception where the cad is parked

@MrKuenning You’re not doing anything wrong, the data is just very slow to update. It’s a limitation of the Mazda API and there isn’t anything the integration can do about it. If your Mazda is an electric vehicle, you can use the refresh status button that @Townsmcp mentioned, but this isn’t available on gas-powered cars.

My car is the 2023 CX-5. Does it also have the option to refresh the status?

The CX-5 is not an electric car, so no, the refresh button is not available.

Anyone else having issues with the api?

Mazda changed their API today and unfortunately broke the integration. I already fixed it and the fix will be released in HA 2023.7.0.

1 Like

@avd706 I can confirm as bdr9 states, the beta of 2023.7 works perfect with the integration

1 Like

Big thank you. Looking forward to the next release. I’m on 23.07.0b3 and I’m getting errors.

Really love the integration. Thanks for creating it and maintaining it.

Great it’s working in 2023.7.0b4

I just purchased a CX-50 and went to check the integration. The official integration page routes to the removed integration page… any chance this will be fixed? Or is there another place to get it?

1 Like

It looks like its been taken down by Mazda

See top of this page

1 Like

If you don’t mind staying on 2023.10.1 you might be ok (until Mazda next changes the API?)
As the owner of a Mazda, you should probably tell them what you think of their DMCA abuse with one of the contact options on this page: Contact Us | Mazda USA

1 Like

The problem with the DMCA taken down is that Mazda US have no jurisdiction over global Mazdas. I’m UK based so don’t see why this should apply to me. My car is 1 year old (CX-60) and if this can’t be resolved, I certainly will not remain with Mazda when my finance runs out. My last car was a Mercedes and they had official developer access which in turn had a Merc HA integration. Mazda should be doing the same and releasing an official Dev access (just like Tesla released today!)

@bdr9, not sure if you have seen this post - hopefully there is something in what mr-ransel has said and you can counter argument it - your integration was fantastic and very welcome in steps to a connected world