yi-hack-Allwinner-v2
yi-hack-Allwinner-v2 copied to clipboard
Status of the camera is not correct
I use firmware 0.2.7 with model y291ga. Unfortunately, I can no longer read the status with IP:8080/cgi-bin/get_configs.sh?conf=camera. It always says "SWITCH_ON": "yes" even if the camera is turned off. What is the reason, what can I do?
This is not the correct behavior. If you switch off the cam from camera_settings web page and click "Save Configuration", the cam should reply "SWITCH_ON":"no" Please clean the cache of the browser and check again.
Sorry, this approach shows no effect. Everytime ist "SWITCH_ON":"yes".
Please, use the debug of the browser and try to capture the network request. F12 with Chrome, network tab.
Ok. Camera is off, but camera-setting-page show "on".
This ist the network request:
Ok. Now press Save button and capture the request and the response:
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.
I face the same issue. Looks like after some time 1/2 day camera switched off, it is not longer possible to turn on/off the camera via the hack web interface or the applicable request.
Workaround is to use the yi app to get it again turned on.
could someone figure out whats the problem? I have the same issue...
Few times ago i got the correct values within the response of
"... cgi-bin/get_configs.sh?conf=camera"
but now theres nothing changing after switch something neither from the app, nor from Webpage
i used to resolve the json file for a state sensor in Mediola AIO Remote and wanted to use these at Home Assistant now.
Maybe this is also the Reason why the HASS Integration does not work for me...?!
Thx to All
Please explain me better. The issue refers to an old version of the hack.
Hi, thank you for taking care!
the states of the camera are not correct when I check them with the "conf=camera" request.
this is always the answer, no matter what I use to change:
{ "SWITCH_ON":"yes", "SAVE_VIDEO_ON_MOTION":"yes", "SENSITIVITY":"low", "AI_HUMAN_DETECTION":"no", "SOUND_DETECTION":"no", "SOUND_SENSITIVITY":"80", "LED":"no", "ROTATE":"no", "IR":"yes", "HOMEVER":"9.0.19.02_202007141512", "NULL":"NULL" }
Maybe you need a refresh of the cache. If the js script is not synchronized the "Save" function doesn't work. Please clean the cache and try again.
cache is empty. when I save changed settings and refresh the page, it doesn't keep the changes...
https://github.com/roleoroleo/yi-hack-Allwinner-v2/assets/2896314/328fa169-22e2-4df1-8693-5e37bd921a54
cache is empty. when I save changed settings and refresh the page, it doesn't keep the changes...
Screen_Recording_20231113_112526_Samsung.Internet.mp4
Same here.
Please, open the debug console in the browser and click "Save configuration".
Then check the response:
Please, open the debug console in the browser and click "Save configuration". Then check the response:
I do not receive such a response.
It does not matter whether the camera is on or off, it is always displayed as on. It doesn't matter whether I call 'cgi-bin/get_configs.sh?conf=camera' or 'index.html?page=camera_settings'.
I noticed another point: If I set the rotation to 'on' under 'index.html?page=camera_settings' so that the image is rotated, this setting is not displayed either. It always shows 'off' when I have saved the settings. Same with 'Status led'.
I do not receive such a response.
Please share the request.
Ok, I cleared the browser cache, then called 'index.html?page=camera_settings'. The camera is displayed as 'on' even though it is off.
In the console I only see the following error:
Nothing more.
request:
refreshed page:
After refresh:
But camera is off.
it sends switch_on= on and switch_on=yes and the camera is switching on and of too, but eyerytime i ask for the state it says
"SWITCH_ON":"yes"
same for browser and postman
it seems as something would trigger the state to "on/yes", because the state turns always back to "on" after refreshing the page. The Cam itself keeps on beeing on or off.
I have the App installed too, but this shouldn't be the reason. It is running in this setup for years
Check if the file /tmp/sd/yi-hack/etc/camera.conf changes when you switch on/off.
Check if the file /tmp/sd/yi-hack/etc/camera.conf changes when you switch on/off.
Do I have to take the SD out of the camera? Or can I access it in another way? Via ssh perhaps?
Use ssh.
I did it with ftp and the files show exactly the same...
when I manually edit the camera.conf file to switch_on=no... it shows the right state on the web server.
But the effect is the same... it doesn't change the settings set from the web server... it's falling back to state "no"
I don't understand. Probably 2 different problems. The status it's not correct but the question is: does the cam change the internal setting when you click "Save"? Does the file camera.conf change? So, the problem is the save method or just the get method?
the camera.conf does not change.
1.switch web server to "on"
camera turns on
-web server button changes to on -camera.conf doesn't change -http request doesn't change (thought this would get the data from the camera.conf file)
2.switch web server to "off" (whiteout refreshing the web page, cause the button would change by it self after a refresh...)
camera turns off
-web server button changes to off -camera.conf doesn't change -http request doesn't change
the web server button keeps its state and the camera.conf doesn't change. whatever I do so I guess the problem is the save method of the camera.conf
I have the same behavior of camera.conf on the SD like @captaincanada . No matter what I do, camera.conf doesn't change. Although the camera goes on or off as desired.
If the camera switch on/off but doesn't save, it's probably a problem related to mqttv4.
So, please, check if it's running:
# ps | grep mqttv4
It says
root@xxx:~# ps | grep mqttv4
1403 root 792 S mqttv4
11639 root 980 S grep mqttv4