Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cycling is never reported as an Activity #2761

Open
bbrendon opened this issue May 5, 2024 · 3 comments
Open

Cycling is never reported as an Activity #2761

bbrendon opened this issue May 5, 2024 · 3 comments
Assignees

Comments

@bbrendon
Copy link

bbrendon commented May 5, 2024

Cycling is never reported as an Activity.

Once upon a time, my garage door used to open when I got home from cycling. This broke at one point and I just assumed something changed in home assistant that caused it to break. I didn't look into it until recently.

Model Name: iPhone 14 pro
Software Version: iOS 17.4.1
App version: 2024.4 (2024.624)

Describe the bug
Cycling is never reported as an Activity.

To Reproduce
Go cycling/running. Log the data.

Expected behavior
Cycling is reported.

Additional context
I get values of Stationary, Automotive, Unknown, Walking . Also the Types array never has more than one value so I'm not sure what the point of Types is. I never get Running or Cycling reported.

They way I collect the data is just log the state and attributes when there is a state change to the activity entity.

Some related links:
https://developer.apple.com/documentation/coremotion/cmmotionactivity
https://companion.home-assistant.io/docs/core/sensors/

Finally: I think there is a problem with your issue template. Your github issue asks for the version in parenthesis but the issue template calls them brackets?

@bgoncal
Copy link
Member

bgoncal commented May 7, 2024

Sensor are not reported in realtime due to iOS limitation, could it be the issue? One way of checking is to perform cycling activities with the App in foreground and see if the state changes

@bgoncal bgoncal self-assigned this May 7, 2024
@bbrendon
Copy link
Author

bbrendon commented May 8, 2024

I went cycling from 11.47 to 13.16. Around the last 5-10 minutes I opened the HASS app on my phone. These are the logs:

2024-05-08 11:48:27.626436 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Automotive', 'attributes': {'Confidence': 'High', 'Types': ['Automotive'], 'icon': 'mdi:car'>
2024-05-08 12:14:47.370100 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Unknown', 'attributes': {'Confidence': 'High', 'Types': ['Unknown'], 'icon': 'mdi:help-circl>
2024-05-08 12:20:36.777090 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Automotive', 'attributes': {'Confidence': 'High', 'Types': ['Automotive'], 'icon': 'mdi:car'>
2024-05-08 13:12:57.453751 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Automotive','attributes': {'Confidence': 'High', 'Types': ['Automotive'], 'icon': 'mdi:car'

I did notice my wife went running and her phone reported cycling for a period of 5 minutes.

@bbrendon
Copy link
Author

bbrendon commented May 22, 2024

Went yesterday, logs

2024-05-21 14:10:00.462389 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Automotive', 'attributes': {'Confidence': 'High', 'Types': ['Automotive'],
2024-05-21 14:25:59.659709 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Unknown', 'attributes': {'Confidence': 'High', 'Types': ['Unknown'], 'icon'
2024-05-21 14:31:00.653435 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Automotive', 'attributes': {'Confidence': 'High', 'Types': ['Automotive'], 'icon
2024-05-21 15:45:37.612784 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Stationary', 'attributes': {'Confidence': 'High', 'Types': ['Stationary'], 'icon':
2024-05-21 15:49:48.999460 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Automotive', 'attributes': {'Confidence': 'High', 'Types': ['Automotive'], 'icon'
2024-05-21 15:56:10.016252 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Unknown', 'attributes': {'Confidence': 'High', 'Types': ['Unknown'], 'icon':
2024-05-21 15:56:32.342478 INFO BrendonArrive: {'entity_id': 'sensor.brendon_iphone_activity', 'state': 'Unknown', 'attributes': {'Confidence': 'High', 'Types': ['Unknown'], 'ico

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants