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

YIapp "At home" and "Away" modes controlled by Home Assistant / YIHack #37

Closed
SmartM-ui opened this issue Jul 6, 2021 · 11 comments
Closed

Comments

@SmartM-ui
Copy link

Hi,
There is a way, through integration, sensor, MQTT, to send the command "at home" and "not_home" from Home Assistant and have it read to the YI app. It would be handy for creating automations.
I have noticed that the commands that are sent via integration / MQTT are executed, but are not synchronized by HA / YIapp.
Example, if I activate the cam from YIapp, the switch on Home Assistant continues to be disabled
Thanks

@roleoroleo
Copy link
Owner

roleoroleo commented Jul 6, 2021

There is a way, through integration, sensor, MQTT, to send the command "at home" and "not_home" from Home Assistant and have it read to the YI app. It would be handy for creating automations.

We need to check if the app sends a message to the cam when you toggle this switch.
Capture it and send it to the cam when you want.

I have noticed that the commands that are sent via integration / MQTT are executed, but are not synchronized by HA / YIapp.
Example, if I activate the cam from YIapp, the switch on Home Assistant continues to be disabled

I was unable to reverse the configuration file in the cam.
I can't read and write how the cam is configured.
So I saved these settings to a different file and the result is that app and web site are not synchronized.

@SmartM-ui
Copy link
Author

There is a way, through integration, sensor, MQTT, to send the command "at home" and "not_home" from Home Assistant and have it read to the YI app. It would be handy for creating automations.

We need to check if the app sends a message to the cam when you toggle this switch.
Capture it and send it to the cam when you want.

I have noticed that the commands that are sent via integration / MQTT are executed, but are not synchronized by HA / YIapp.
Example, if I activate the cam from YIapp, the switch on Home Assistant continues to be disabled

I was unable to reverse the configuration file in the cam.
I can't read and write how the cam is configured.
So I saved these settings to a different file and the result is that app and web site are not synchronized.

Do I always capture the data via IPC_Sniff?

Thanks again and sorry for all my requests, but you are the only one who could be able to make the YI better!

I bought it only knowing that there was your YIHACK :-)

@roleoroleo
Copy link
Owner

Yes, use ipc_sniff.

@SmartM-ui
Copy link
Author

Hi @roleoroleo
this is the data that is detected when I press the Home and Not_Home button from the YIhome app

Screenshot_20210707-152636_YI Home

Not_Home:
IPC message. Len: 20. Status: No error information!
Parsing message.
01 00 00 00 04 00 00 00 8e 00 01 00 04 00 00 00 00 dd 6d 00

Home:
IPC message. Len: 20. Status: No error information!
Parsing message.
01 00 00 00 04 00 00 00 8e 00 01 00 04 00 00 00 00 dd 6d 00

I hope it can be used for the switch and synchronization with Home Assistant

@roleoroleo
Copy link
Owner

This is strange, it's the same message.

@SmartM-ui
Copy link
Author

Hi,
I wanted to try to run the command again to verify the correctness of the data reported, but when I try to change mode in Not_Home, this error is reported:

IPC message. Len: 16. Status: No error information!
Parsing message.
01 00 00 00 02 00 00 00 7c 00 7c 00 00 00 00 00
Sending MOTION_START to queue #1
Sending MOTION_START to queue #2
Sending MOTION_START to queue #3
Sending MOTION_START to queue #4
Sending MOTION_START to queue #5
Sending MOTION_START to queue #6
Sending MOTION_START to queue #7
Sending MOTION_START to queue #8
Sending MOTION_START to queue #9
IPC message. Len: 16. Status: Resource temporarily unavailable!
Parsing message.
01 00 00 00 08 00 00 00 81 00 01 00 00 00 00 00
IPC message. Len: 16. Status: Resource temporarily unavailable!
Parsing message.
01 00 00 00 02 00 00 00 f6 00 f6 00 00 00 00 00
IPC message. Len: 16. Status: Resource temporarily unavailable!
Parsing message.

@roleoroleo
Copy link
Owner

This is not an error. It's ok.

@SmartM-ui
Copy link
Author

This is not an error. It's ok.

OK,
however, it no longer shows the data it reported yesterday:
01 00 00 00 04 00 00 00 8e 00 01 00 04 00 00 00 00 dd 6d 00

@roleoroleo
Copy link
Owner

I think the "Home/Away" switch is cloud side only.
It probably doesn't affect the cam settings but only the app.

@SmartM-ui
Copy link
Author

I think the "Home/Away" switch is cloud side only.
It probably doesn't affect the cam settings but only the app.

But yesterday when I pressed the home not_home from button, your sniffer received that data:
01 00 00 00 04 00 00 00 8e 00 01 00 04 00 00 00 00 dd 6d 00

today he receives nothing.
After I try again

@roleoroleo
Copy link
Owner

There are a lot messages between the processes.
Maybe the sniffer caught another one that has nothing to do with Home/Away.

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

No branches or pull requests

2 participants