gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
145 stars 12 forks source link

Can't set pass-through zone interval #61

Closed pauly7300 closed 1 year ago

pauly7300 commented 1 year ago

I don't see the ability to change the delay for the pass-through zone delay any longer. I saw a note on beta 10 that you had made it easier to turn off but I no longer see an ability to set a delay time like documentation shows here.

Also, the reason I want to try and set the interval is because my wife's phone is with her at work but it still is showing that it may be in a passthrough zone. I increased the size of the zone a little and it seems to be showing correctly now. I haven't noticed this behavior in that zone in the past but it's very possible that it has been doing it even in V2.4 and I never noticed it.

This is what I see now.

image
gcobb321 commented 1 year ago

I'm seeing it on mine. Does it show if you refresh your browser?

pauly7300 commented 1 year ago

Hmm, no it doesn't. I tried from another browser as well and did a full cache dump and reload of the page.

gcobb321 commented 1 year ago

And you are on b11? Line 263 in icloud3/translations/en.json (2/6 file date) contains the field name for the passthru time. It should be:

"passthru_zone_time": "ENTER ZONE DELAY TIME - Delay processing a Zone Enter Trigger in case you are passing thru a zone",
FredWst commented 1 year ago

I'm in the same case with b11, line 263 is ok. (Clear cache safari firefox and edge -> same issue)

Capture d’écran 2023-02-07 à 19 22 49

configuration file from .storage/icloud3 { "profile": { "version": 1, "ic3_version": "3.0.0b11", "config_update_date": "2023-02-07 19:02:30", "event_log_card_directory": "www/custom_cards", "event_log_card_program": "icloud3-event-log-card.js" }, "data": { "tracking": { "username": "removed", "password": "«removed»", "encode_password": true, "icloud_server_endpoint_suffix": "", "setup_icloud_session_early": true, "data_source": "icloud,iosapp", "devices": [ { "ic3_devicename": "frederic_iphone", "fname": "Frédéric", "picture": "www/icloud3/Frédéric.jpg", "evlog_display_order": 0, "unique_id": "", "device_type": "iphone", "inzone_interval": "00:04:00", "tracking_mode": "track", "famshr_devicename": "frederic_iphone", "famshr_device_id": "removed=", "raw_model": "iPhone12,8", "model": "iPhone", "model_display_name": "iPhone SE", "fmf_email": "None", "fmf_device_id": "", "iosapp_device": "frederic_iphone_2", "track_from_base_zone": "home", "track_from_zones": [ "home" ], "stat_zone_fname": "Stationnaire", "old_devicename": "frederic_iphone" }, { "ic3_devicename": "pascale_iphone", "fname": "Pascale", "picture": "www/icloud3/Pascale.jpg", "evlog_display_order": 0, "unique_id": "", "device_type": "iphone", "inzone_interval": "00:04:00", "tracking_mode": "track", "famshr_devicename": "pascale_iphone", "famshr_device_id": "removed", "raw_model": "iPhone13,1", "model": "iPhone", "model_display_name": "iPhone 12 mini", "fmf_email": "None", "fmf_device_id": "", "iosapp_device": "pascale_iphone_2", "track_from_base_zone": "home", "track_from_zones": [ "home" ], "stat_zone_fname": "Stationnaire", "old_devicename": "pascale_iphone" } ] }, "general": { "log_level": "info", "unit_of_measurement": "km", "time_format": "24-hour", "display_zone_format": "fname", "max_interval": "00:04:00", "offline_interval": "00:20:00", "iosapp_alive_interval": "00:03:00", "old_location_threshold": "00:01:00", "gps_accuracy_threshold": 50, "travel_time_factor": 0.6, "tfz_tracking_max_distance": 8, "passthru_zone_time": "00:05:00", "track_from_base_zone": "home", "track_from_home_zone": true, "center_in_zone": false, "discard_poor_gps_inzone": false, "inzone_intervals": { "iphone": "00:04:00", "ipad": "02:00:00", "watch": "00:15:00", "airpods": "00:15:00", "no_iosapp": "00:15:00", "other": "02:00:00" }, "waze_used": true, "waze_region": "row", "waze_min_distance": 1, "waze_max_distance": 9999.0, "waze_realtime": false, "waze_history_database_used": true, "waze_history_max_distance": 20, "waze_history_track_direction": "north_south", "stat_zone_fname": "Stationnaire", "stat_zone_still_time": "00:08:00", "stat_zone_inzone_interval": "00:04:00", "stat_zone_base_latitude": 1, "stat_zone_base_longitude": 0, "display_text_as": [ "#1", "#2", "#3", "#4", "#5", "#6", "#7", "#8", "#9", "#10" ], "old_location_adjustment": "00:00:00", "distance_between_devices": false, "device_tracker_state_format": "fname" }, "sensors": { "monitored_devices": [], "device": [ "info", "badge", "battery", "name" ], "tracking_update": [ "interval", "last_update", "next_update", "last_located" ], "tracking_time": [ "travel_time", "travel_time_min" ], "tracking_distance": [ "zone_distance", "moved_distance", "dir_of_travel", "home_distance" ], "track_from_zones": [], "tracking_other": [ "trigger", "waze_distance", "calc_distance" ], "zone": [ "zone_fname" ], "other": [ "gps_accuracy" ], "excluded_sensors": [ "None" ] } } }

pauly7300 commented 1 year ago

I am on b11 and it does show the line that you referenced... Also, it probably have nothing to do with it but notice how the dashes wrap in that pop-over window.

image image

On Tue, Feb 7, 2023 at 10:11 AM Gary Cobb @.***> wrote:

And you are on b11? Line 263 in icloud3/translations/en.json (2/6 file date) contains the field name for the passthru time. It should be:

"passthru_zone_time": "ENTER ZONE DELAY TIME - Delay processing a Zone Enter Trigger in case you are passing thru a zone",

— Reply to this email directly, view it on GitHub https://github.com/gcobb321/icloud3_v3/issues/61#issuecomment-1421032886, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXWFJCBQJFHN3HMUGVEFRLWWJX4VANCNFSM6AAAAAAUS5MNVU . You are receiving this because you authored the thread.Message ID: @.***>

gcobb321 commented 1 year ago

The other file to check is /icloud3/config_flow.py. It is the Configurator module. The code that displays the screen is:

3778                vol.Optional('passthru_zone_header',
3779                           default=pass_thru_zone_used):
3780                            selector.BooleanSelector(),
3781                vol.Required(CONF_PASSTHRU_ZONE_TIME,
3782                           default=self._hhmmss_to_duration(CONF_PASSTHRU_ZONE_TIME)):
3783                            selector.DurationSelector(),

Does that match with what you have. If it does, refresh the browser again, I guess...

pauly7300 commented 1 year ago

File seems correct.
I performed all the steps you described multiple times and still it's not showing.

image
FredWst commented 1 year ago

Same for me

gcobb321 commented 1 year ago

About the line that continues to the next line, the length is static and in the /translations/en.json file. The characters were based on the width of the screen from HA in google on windows. It will wrap to the next line if it is displayed on a smaller screen (iPad)

gcobb321 commented 1 year ago

Try it on another device (ipad, iphone) and see if it shows up there if you are using the ios app on those devices. Are there any errors in the ha log file?

gcobb321 commented 1 year ago

Unfortunately, HA and the HA frontend and browsers are running the show that displays those screens.

FredWst commented 1 year ago

Same issue with iPhone, iPad, will check log tomorrow (23h00 here)

pauly7300 commented 1 year ago

The characters were based on the width of the screen from HA in google on windows You might just reduce the # of characters by one or two on either side to make it more compatible to different screen sizes, or you might consider removing the text based separators all together? I edited the en.json file to do the below. But certainly not vital. Just an idea and doesn't seem like it has anything to do with the original issue...

image
gcobb321 commented 1 year ago

I've been playing around with the formatting, number of characters, etc. It's a trial-and-error because the text is not a fixed space font so you can not line things up. The line above Action items at the bottom is the same width on google as an iPad. The difference is it just overflows the screen on an ipad. The boolean selectors prevent that from happening on the other fields. I remember a check box that sits on the left that I used a long time ago that would allow for a separator line without overflowing to the next line. I'm trying to find that code now to see if it works.

I still have no idea why the pass thru time field is not displaying.

pauly7300 commented 1 year ago

Try it on another device (ipad, iphone) and see if it shows up there if you are using the ios app on those devices. Are there any errors in the ha log file?

Same across all my devices (iphone, ipad) and multiple browsers (Chrome, Firefox and Safari).

Are you saying it's working for you?

In fact I'm also noticing that the time pickers aren't showing for other sections on this page.

image

Shouldn't these be under Stationary zone?

image
gcobb321 commented 1 year ago

On my system with a different check box

image

gcobb321 commented 1 year ago

I'm on HA 2023.2.0, upgrading to 2023.2.2 now.. Maybe that will break it for me.

pauly7300 commented 1 year ago

Peculiar that your Chrome is rendering it as an actual checkbox versus a boolean switch. You might also update Chrome to see. I'm on Chrome Version 109.0.5414.119 (Official Build) (x86_64). And HA Versions... Home Assistant 2023.2.2 Supervisor 2023.01.1 Operating System 9.5 Frontend 20230202.0 - latest

pauly7300 commented 1 year ago

One other question. Do those time pickers show up dynamically when you check the box or are they visible at all times?

gcobb321 commented 1 year ago

The checkbox if from HA. The old style used a boolean with a checkbox. (config_validation - cv.boolean) where the new style uses one from the HA Selector module (selectorBoolean)

My time entry fields now are gone.

image

pauly7300 commented 1 year ago

So it looks like those sections are collapsing for you. That's not happening on mine. Here's a video.

https://user-images.githubusercontent.com/11494052/217383479-eb81d691-845f-46c4-83b6-2b9a3ab4fc7b.mp4

gcobb321 commented 1 year ago

The check boxes on the left are the same as the boolean selector on the left. The 2023.2.2 HA update stopped displaying the time entry fields (Passthru time, stationary still time, inzone time, etc). The hh:mm:ss parameters are not showing on any screen.

pauly7300 commented 1 year ago

ahh. At least we've found the discrepancy. I guess there's a diff issue now.

engeles20 commented 1 year ago

is there a fix for this yet?

gcobb321 commented 1 year ago

See Release 12 notes here

engeles20 commented 1 year ago

@gcobb321 i would hate to open a new thread, but when i try to update to release 12 (from iCloud3 v3.0.0b11) i get this error

Logger: homeassistant.setup Source: setup.py:213 First occurred: 4:30:30 PM (1 occurrences) Last logged: 4:30:30 PM

Setup failed for custom integration icloud3: Unable to import component: cannot import name 'RANGE_DEVICE_CONF' from 'custom_components.icloud3.const' (/config/custom_components/icloud3/const.py)

gcobb321 commented 1 year ago

Unzip this to the /icloud3 directory and restart ha

const.zip

engeles20 commented 1 year ago

fixed thank you very much!

gcobb321 commented 1 year ago

Thanks for the heads up. I forgot to include theat module in the release beta 12, which has now been updated.