Mazda connected service

@bdr9 i did add the lines to my instance but nothing shows up in the logs when trying to enable rear defogger. I’m wondering if the issue is with Mazda services itself - I have tried setting rear in Mazda app and am experiencing the same issue

Unfortunately I don’t think there is anything I can do about that. The HA integration is limited by what the Mazda app is able to do. So if the Mazda app is not able to do something, the HA integration won’t be able to do it either.

I thought that would be the case. Next stop, Mazda! Lol

When I enable both front and rear screens using HA or the Mazda app, it always shows the rear screen as not being on.

I’m pretty sure it is actually working though.

CX60

@StephenMilner ah ok. I see the same in the app (showing not on). At the point I then turn off both front and rear screens, send that update to the car, and then turn on again and send the command to the car. I haven’t actually just left it to see what happens. Definitely a bug in the Mazda app though. Plus the app hasn’t been updated in 7 months which is pretty poor form of Mazda - adding a new car to the app would have definitely revealed bugs in the interim

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.