Open rsporsche opened 1 month ago
Hi @rsporsche Yes, notifications and alarms are on my ToDo list, I just have to find some time to actually implement it. API supports it but there are just few things to consider if you want to do it properly.
If you will need any help, let me know, but if you don't feel confident you can wait for me, I will be adding this feature at some point, hopefully in the next 2-3 months. I had already few requests for it and I need it for myself too :smile:
Thanks,
Sorry I just noticed that notifications is listed in the planned features, not sure how I missed that because I did read it.
I will probably wait if it's likely to happen in the next couple of months. I'd still be happy to contribute but I don't know if that's actually helpful or just creates more work.
My thoughts on your points:
2. Mostly I just want a loud alarm to wake me up if my car moves unexpectedly in the night but when outside of the home I would still rely on the app.
You can pretty much do it already, without relying on notifications from PAJ GPS API. I'm doing something similar for getting notifications when my wife leaves her job and drives home.
You just have to define home area in your home assistant (with about 100m buffer) and then you can make automation like this:
alias: Car Alarm
description: Notify that car moved at night
trigger:
- platform: zone
entity_id: device_tracker.paj_gps_1234567
zone: zone.home
event: leave
condition:
- condition: time
after: "22:00:00"
before: "06:00:00"
weekday:
- sun
- mon
- tue
- wed
- thu
- fri
- sat
action:
- service: notify.persistent_notification
metadata: {}
data:
message: Car is moving at night!
title: THIEF!
mode: single
This will trigger an action when your car leaves home area at night, between 22:00 and 6:00 Replace my notification with something that blasts alarm on your speaker and you are done. :smile:
Thanks, I'll give that a go. I think I would still like the other alarm types but this is a great start.
I want to integrate my GPS tracker with home assistant so that I can broadcast a notification via my smart speaker when an alarm is triggered by the tracker.
I would be happy to have a go at this myself but just wanted to raise the issue first in case there is any work in progress or for discussion first.
On first look, I am thinking this could be implemented by creating an entity that polls the /api/v1/notifications/{device} endpoint and raising an event when it returns new notifications.