Home-Automation icon indicating copy to clipboard operation
Home-Automation copied to clipboard

Itinerary not start

Open Tomas3Miasto opened this issue 11 months ago • 22 comments

Describe the bug

I noticed that if I go not far from home (2-3 km) and come back soon, Itinerary does not start

Expected behavior

No response

Blueprint configuration

alias:%20Automatic%20Gate%0Adescription%3A%20%22%22%0Ause_blueprint%3A%0A%20%20path%3A%20etiennec78/automatic-gate.yaml%0A%20%20input:%0A%20%20%20%20gate:%0A%20%20%20%20%20%20-%20cover.brama_wjazdowa_gate%0A%20%20%20%20persons:%0A%20%20%20%20%20%20-%20person.tomasz%0A%20%20%20%20driving_sensors:%0A%20%20%20%20%20%20-%20binary_sensor.mercedes_moving%0A%20%20%20%20travel_time_sensors:%0A%20%20%20%20%20%20-%20sensor.tomasz_travel_time%0A%20%20%20%20proximity_sensors:%0A%20%20%20%20%20%20-%20sensor.prox_dom_tomasz_iphone_odleglosc%0A%20%20%20%20notify_devices:%0A%20%20%20%20%20%20-%201a3d2b9ba6900d530fa097b7641c6511%0A%20%20%20%20itinerary_sensors:%0A%20%20%20%20%20%20-%20input_text.tomasz_itinerary%0A%20%20%20%20eta_sensors:%0A%20%20%20%20%20%20-%20input_datetime.automatic_gate_planned_opening%0A%20%20%20%20eta_zone:%204000%0A%20%20%20%20safety_delay:%202%0A%20%20%20%20lead_time:%2025%0A%20%20%20%20activation_zone:%201000%0A%20%20%20%20timeout_delay:%2015%0A

Blueprint traces

No response

What version of Home Assistant are you running ?

2025.1.2

What type of installation are you running?

Home Assistant OS

Additional information

No response

Tomas3Miasto avatar Jan 13 '25 16:01 Tomas3Miasto

The reason why the route doesn't start is that your driving sensor is only switched 'on' once. Thus, the blueprint opens the gate to let you out, then stops once the gate has been closed. And as you don't restart your car, the blueprint is not triggered again when arriving. I'll have to rearrange my code to implement your suggestion, but since I've got midterms at the moment, I won't be working on it for a few days

etiennec78 avatar Jan 13 '25 16:01 etiennec78

This is strange, i switch on my drive sensor every time I power on my car. It doesn’t work when I power off and power on car but I can see that drive switch is on. This is not so Uploading IMG_6537.png… important :)

Tomas3Miasto avatar Jan 13 '25 18:01 Tomas3Miasto

For the current version of the blueprint you need to turn the driving sensor on when leaving to open your gate, then turn it off and on when returning back home to start the itinerary. Btw I can't see the image you attached

etiennec78 avatar Jan 14 '25 06:01 etiennec78

Hi On this image you can see my long home way 15:35 -16:17 were it is ok and two short about 16:20 where "Mercedes moving" switch is "On" then "Off" and again "On"

IMG_6537

Tomas3Miasto avatar Jan 14 '25 06:01 Tomas3Miasto

Hello, sorry for the late response Could you please attach a trace file so I can see what causes the issue ? Keep in mind that this file will contain GPS coordinates, so feel free to remove them

etiennec78 avatar Jan 22 '25 16:01 etiennec78

Hi, no problem unfortunately I don't have a trace with a short route right now. unless I can dig it up somewhere

Tomek

Tomas3Miasto avatar Jan 22 '25 19:01 Tomas3Miasto

Hello. I attached last trace. I stopped about 800m from my home, power off the car and power on - that usually start itinerary Did not remove GPS - cannnot find in the file trace automation.automatic_gate 2025-01-23T14_55_35.724107+00_00.json

BR Tomek

Tomas3Miasto avatar Jan 23 '25 19:01 Tomas3Miasto

Hello Thomas, I have taken a look at your logs, and it seems to stop at the following condition : {{ distance(person.tomasz, zone.home)*1000 > 2000 }} Could you please check that your person entity has a gps device tracker attached to it ? And if that's already the case, let me know the result of {{ distance(person.tomasz, zone.home) }} when you're far away from home.

Etienne

etiennec78 avatar Jan 23 '25 20:01 etiennec78

Good Morning I have event three track devices

  1. Icloud3
  2. My car
  3. iphone

probably a stupid question but I don't know where to use this script, I try in developer tools > template but I get person is undefined

Br Tomek

Tomas3Miasto avatar Jan 24 '25 07:01 Tomas3Miasto

Hello, It's my fault, I forgot the quotes when copying from your logs : {{ distance('person.tomasz', 'zone.home')*1000 > 2000 }}

etiennec78 avatar Jan 24 '25 09:01 etiennec78

[image0.png] Pozdrawiam Tomasz

Wiadomość napisana przez Etienne C. @.***> w dniu 24 sty 2025, o godz. 10:22:



Hello, It's my fault, I forgot the quotes when copying from your logs : {{ distance('person.tomasz', 'zone.home')*1000 > 2000 }}

— Reply to this email directly, view it on GitHubhttps://github.com/etiennec78/Home-Automation/issues/11#issuecomment-2612047178, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BLPSXGSMRO2YRI6ZUXCDI5L2MIA6LAVCNFSM6AAAAABVC7LZHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJSGA2DOMJXHA. You are receiving this because you authored the thread.Message ID: @.***>

Tomas3Miasto avatar Jan 24 '25 12:01 Tomas3Miasto

Hello, It seems that you have attached a picture to your email, but I cannot see it on GitHub. Could you try sending it directly through GitHub instead ?

etiennec78 avatar Jan 24 '25 13:01 etiennec78

Image

Tomas3Miasto avatar Jan 24 '25 13:01 Tomas3Miasto

Hello Tomek, I just realized what the problem was. In your message you say that to do your test, you went 800m from your home. However, in your settings, your ETA zone is set to 2km. For safety reasons, this blueprint stops if you start too close to home, and that's why nothing appeared in your logs.

I've just pushed a new version into the dev branch which allows you to launch an itinerary if you return to the gate without having left your car. Give it a try and let me know if your problem is fixed. And if it's still not the case, don't hesitate to send more logs.

Best regards, Etienne

etiennec78 avatar Jan 24 '25 21:01 etiennec78

Hello Etienne Thank you I tested today with power off and it works I try without power off tomorrow and will see. Thanks

Pozdrawiam Tomasz

Tomas3Miasto avatar Jan 25 '25 15:01 Tomas3Miasto

Hi Etienne It works but: Below i paint my route to my job. I usuelly drive green one ( there is big traffic on read one) when I am at the blue dot Itinerary started again

Image

Tomas3Miasto avatar Jan 28 '25 06:01 Tomas3Miasto

Hello, sorry for the delay but I didn't receive the notification... I'm glad to see that it (almost) works for your case now ! So if I understand correctly, an itinerary gets started soon after that you leave your home ? Could you please attach a trace file so I can take a look at it ?

etiennec78 avatar Feb 04 '25 22:02 etiennec78

Hello @Tomas3Miasto I haven't heard from you in a month, so I'm closing the issue. Don't hesitate to re-open it if the problem is still happening.

etiennec78 avatar Mar 02 '25 20:03 etiennec78

Hello I thought I uploaded the route after your last request and that you didn't have time to deal with it. If it's not a problem, I'm uploading today's route. I dropped my daughter off at a friend's and returned home without turning off the car. The automation didn't work.

<File redacted by etiennec78>

Tomas3Miasto avatar Mar 05 '25 17:03 Tomas3Miasto

Hello Tomas, I've read your logs, and it seems that you weren't localized more than 2350m from home during your run. Do you think this was the case or was it a bug ? The blueprint won't start a new route if you're less than 350m away of your ETA zone, because GPS can sometimes report inaccurate positions, and I'd like to avoid starting unwanted routes close to home, which could reopen the gate. Maybe try to reduce your ETA zone ? I've set mine to 700m and it works well.

etiennec78 avatar Mar 08 '25 00:03 etiennec78

Hi Etienn. I created a sensor that shows how far I am from home, it shows a distance greater than 2350 m, so it's probably a bug. I changed the ETA zone as suggested. Please give me a few days to test it.

Regards tomek

Tomas3Miasto avatar Mar 13 '25 08:03 Tomas3Miasto

Hi Etienne

It seems that the automation works, but the problem is the correct location. I have to think about what to replace the iPhone location with.

Today, for example, the gate opened when I was leaving for work.

First it closed after 2 minutes and then (I think I was about 1km from home) it opened

Regards

Tomek

Tomas3Miasto avatar Mar 27 '25 10:03 Tomas3Miasto

Hello @Tomas3Miasto ! It's been a while since I've heard back about your issue. Have you tried updating the blueprint since then ? Maybe some of the issues were fixed.

Also, Here Travel Time is now compatible with the blueprint, and gives more accurate results than Waze, so it might be worth giving it a try.

etiennec78 avatar Jul 21 '25 12:07 etiennec78

I'm closing this issue. Feel free to reopen it if needed.

etiennec78 avatar Sep 25 '25 05:09 etiennec78

Hi Could you help with this ? [image0.jpeg] Pozdrawiam Tomasz

Wiadomość napisana przez Etienne C. @.***> w dniu 21 lip 2025, o godz. 14:29:

 [https://avatars.githubusercontent.com/u/59794011?s=20&v=4]etiennec78 left a comment (etiennec78/Home-Automation#11)https://github.com/etiennec78/Home-Automation/issues/11#issuecomment-3096543788

Hello @Tomas3Miastohttps://github.com/Tomas3Miasto ! It's been a while since I've heard back about your issue. Have you tried updating the blueprint since then ? Maybe some of the issues were fixed.

Also, Here Travel Time is now compatible with the blueprint, and gives more accurate results than Waze, so it might be worth giving it a try.

— Reply to this email directly, view it on GitHubhttps://github.com/etiennec78/Home-Automation/issues/11#issuecomment-3096543788, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BLPSXGW3245D2AWQD23XCI33JTMLDAVCNFSM6AAAAABVC7LZHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAOJWGU2DGNZYHA. You are receiving this because you were mentioned.Message ID: @.***>

Tomas3Miasto avatar Nov 04 '25 18:11 Tomas3Miasto

Hello @Tomas3Miasto ! It seems that you have attached a picture to your email, but I cannot see it on GitHub. Could you please try to send it directly from GitHub ? I'd be happy to help

etiennec78 avatar Nov 04 '25 20:11 etiennec78

Hello @etiennec78 I changed Waze to Here and now have this issue.

Image

Tomas3Miasto avatar Nov 05 '25 11:11 Tomas3Miasto

I have recently added configuration checks when the blueprint is triggered. For this particular issue, you need to read this part of the documentation. Your itinerary sensors need a length of 255 to store all data.

etiennec78 avatar Nov 05 '25 11:11 etiennec78

By the way I just saw that the issue in your screen mentions the travel time sensor. This is wrong, it comes from the itinerary sensor. It seems I was quite tired when I wrote this 😂 I'll change the error message

etiennec78 avatar Nov 05 '25 19:11 etiennec78

Fixed ! #188

etiennec78 avatar Nov 05 '25 19:11 etiennec78