Comments (22)
It's not important where you copy the file.
If it's in the root of the microSD try:
/tmp/sd/yi-hack/bin/ipc_cmd -f /tmp/sd/AI.bin
from yi-hack_ha_integration.
I need to add them to the fw before to add to ha.
from yi-hack_ha_integration.
I need to find a solution here
roleoroleo/yi-hack-Allwinner-v2#210
before.
from yi-hack_ha_integration.
maybe you will have to insert only face detection in the firmware because from further tests, I was able to ascertain that already currently, by modifying the "AI Human Detection" parameter from your web page YIHACK (camera setting), the YIhome app receives the command and synchronizes it.
Ok.
This only happens in one sense, WEBpage YIHACS> YIhome app and not vice versa. (Maybe integrating it into the firmware will be able to sync it both ways?)
This is normal and I can't fix it at the moment.
Having already the AI Human Detection sensor in your WebPage, is it already possible to have this switch in Home Assistant or can you tell me how to create it manually?
Create a switch with a http request like this:
http://IP-CAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=yes http://IP-CAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=no
THANK YOU!
I try to create a switch using restful
from yi-hack_ha_integration.
Hi @roleoroleo
this is the data that is detected when I press AI human detection from the YIhome app
AI Humand Detect OFF
IPC message. Len: 20. Status: No error information!
Parsing message.
01 00 00 00 08 00 00 00 3c 10 01 00 04 00 00 00 00 00 00 00
AI Humand Detect ON
IPC message. Len: 20. Status: No error information!
Parsing message.
01 00 00 00 08 00 00 00 3c 10 01 00 04 00 00 00 01 00 00 00
Thanks
from yi-hack_ha_integration.
Ok, now try to send these messages.
1 - Save the binary code (20 bytes) into a file (use hxd if you are a windows user).
2 - Use the command ipc_cmd -x file.bin
2 - Use the command ipc_cmd -f file.bin
3 - Refresh the app and check if the switch is changed.
from yi-hack_ha_integration.
ipc_cmd -x file.bin
Hi @roleoroleo
I installed HxD and pasted the code "01 00 00 00 08 00 00 00 3c 10 01 00 04 00 00 00 01 00 00 00" in a new file.
Saving the AI.bin file, I saw that it takes up 20 bytes.
I copied the file to the root of the MicroSd
Through terminal I gave the command:
killall ipc_multiplexer
/ tmp / sd / yi-hack / bin / ipc_cmd -x AI.bin
but the switch inside the YIhome app doesn't change
from yi-hack_ha_integration.
Sorry, use -f parameter.
-x is another feature.
from yi-hack_ha_integration.
Sorry, use -f parameter.
-x is another feature.
@roleoroleo
Good morning,
thanks, i tried but i must have made a mistake using HxD (i had never used it).
The following error is returned with the - f command:
killall ipc_multiplexer
/tmp/sd/yi-hack/bin/ipc_cmd -f AI.bin
Error opening file AI.bin
Opening the AI.bin file whit HxD (which I saved by manually adding the .bin extension), I see this:
from yi-hack_ha_integration.
Try to add the absolute path to the AI.bin
The content of the file seems to be ok.
from yi-hack_ha_integration.
Try to add the absolute path to the AI.bin
The content of the file seems to be ok.
Hi,
The absolute path should be AI.bin, I put it in the root of the microSD. Or create a temporary file inside the tmp / sd folder?
from yi-hack_ha_integration.
It's not important where you copy the file.
If it's in the root of the microSD try:
/tmp/sd/yi-hack/bin/ipc_cmd -f /tmp/sd/AI.bin
GREAT @roleoroleo
It works! AI.bin file manages to activate human detection in the official YI app!
After lunch I also try to create the file to deactivate it and I inform you.
Thanks again :-)
from yi-hack_ha_integration.
Hi @roleoroleo
The code works to both activate and deactivate the AI Human Detect:
AI Human Detect ON:
01 00 00 00 08 00 00 00 3C 10 01 00 04 00 00 00 01 00 00 00
AI Human Detect OFF:
01 00 00 00 08 00 00 00 3C 10 01 00 04 00 00 00 00 00 00 00
This code enable the AI Face Detection:
Face detect ON
01 00 00 00 08 00 00 00 3d 10 01 00 04 00 00 00 01 00 00 00
Face detect OFF
01 00 00 00 08 00 00 00 3d 10 01 00 04 00 00 00 00 00 00 00
Would it be possible to create the switch from Home Assistant?
from yi-hack_ha_integration.
I need to add them to the fw before to add to ha.
I look forward to!
Thank you
from yi-hack_ha_integration.
I need to add them to the fw before to add to ha.
Hi @roleoroleo ,
maybe you will have to insert only face detection in the firmware because from further tests, I was able to ascertain that already currently, by modifying the "AI Human Detection" parameter from your web page YIHACK (camera setting), the YIhome app receives the command and synchronizes it.
This only happens in one sense, WEBpage YIHACS> YIhome app and not vice versa. (Maybe integrating it into the firmware will be able to sync it both ways?)
Having already the AI Human Detection sensor in your WebPage, is it already possible to have this switch in Home Assistant or can you tell me how to create it manually?
Thanks
from yi-hack_ha_integration.
maybe you will have to insert only face detection in the firmware because from further tests, I was able to ascertain that already currently, by modifying the "AI Human Detection" parameter from your web page YIHACK (camera setting), the YIhome app receives the command and synchronizes it.
Ok.
This only happens in one sense, WEBpage YIHACS> YIhome app and not vice versa. (Maybe integrating it into the firmware will be able to sync it both ways?)
This is normal and I can't fix it at the moment.
Having already the AI Human Detection sensor in your WebPage, is it already possible to have this switch in Home Assistant or can you tell me how to create it manually?
Create a switch with a http request like this:
http://IP-CAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=yes
http://IP-CAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=no
from yi-hack_ha_integration.
Create a switch with a http request like this:
http://IP-CAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=yes http://IP-CAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=no
Hi @roleoroleo ... sorry again,
i was trying to make a switch with http, but it doesn't seem to work.
If you managed to do this, could you fix my code please?
switch:
-
platform: rest
resource: http://IPCAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=yes
name: yi_switch_ai_human_detection_on
username: "xxx"
password: "xxx" -
platform: rest
resource: http://IPCAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=no
name: yi_switch_ai_human_detection_off
username: "xxx"
password: "xxx" -
platform: rest
name: "yiswitchai"
resource: http://IPCAM:8080/cgi-bin/camera_settings.sh?ai_human_detection
body_on: "yes"
body_off: "no"
username: "xxx"
password: "xxx"
Thanks in advance
from yi-hack_ha_integration.
Try a command line switch with curl.
This service is not really rest.
from yi-hack_ha_integration.
Try a command line switch with curl.
This service is not really rest.
Ok, I try
from yi-hack_ha_integration.
Try a command line switch with curl.
This service is not really rest.
Hi @roleoroleo
I have managed to create a switch, but I have seen that it does not always work as well as the switches you have directly integrated.
I believe, for everyone's sake, that you will also have to integrate the AI Human Detect switch directly into the integration when you update the firmware :-)
The best code of all the tests turned out this, if it were to be useful to someone:
shell_command:
switch_1_on: curl -k "http://IPCAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=yes"
switch_1_off: curl -k "http://IPCAM:8080/cgi-bin/camera_settings.sh?ai_human_detection=no"
switch:
- platform: template
switches:
ipcam_ai_switch:
turn_on:
service: shell_command.switch_1_on
turn_off:
service: shell_command.switch_1_off
from yi-hack_ha_integration.
Hi @roleoroleo
I don't know where it is right to make the request, but in order not to let this request die, I only propose the link with the request made directly on yi-hack-Allwinner-v2 :-)
roleoroleo/yi-hack-Allwinner-v2#210 (comment)
roleoroleo/yi-hack-Allwinner-v2#209 (comment)
THANK YOU!!!
from yi-hack_ha_integration.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from yi-hack_ha_integration.
Related Issues (20)
- ip change HOT 10
- binary sensor for sound detection have at intervals of 10' HOT 3
- Error getting status HOT 4
- Cam device and entities disabled in Home Assistant HOT 7
- "Can't get mac address or serial number" when add camera HOT 2
- Cant take snapshot from ha HOT 14
- "Save video when a motion is detected" does not update properly HOT 10
- Stream no longer available after Update to 0.4.5 HOT 12
- Required Camera Configuration? HOT 4
- MQTT Name changes in 2023.8 HOT 3
- Cacagoo camera HOT 2
- Damaged SD Card-Problem with Home Assistant HOT 2
- `SUPPORT_ON_OFF` and `SUPPORT_STREAM` depreciated
- Integration is using deprecated supported features values HOT 5
- using native unit of measurement '%' which is not a valid HOT 2
- MQTT entity name starts with the device name in your config HOT 12
- Don't record temporarily HOT 6
- yi-hack-Allwinner-v2 -> PT202 HOT 1
- Similar camera type? HOT 2
- OSD Visibility during daylight
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yi-hack_ha_integration.