[Xiaomi Yi] Share your scripts and settings

I am newbie to the Xiaomi Yi autoexec script possibilities.
Is there any possiblity to use the autoexec commands while the cam is running in normal operation?
I would like to do manual settings like with DSLR (e.g. manual ISO, AWB to fixed Kelvin, manual shutter speed) and decide shutting time individual.
Thanks for your feedback.
No, you can't change anything while cam's already in use, you can make or download a script copy in yhe root of microsd then power ON cam and see if you're satisfied with that settings, if not, power OFF, change script parameter replace it and try again till you find what you're looking for... ;)
 
Would be so good to have full manual control (like Manual mode with DSLR) on the Xiaomi Yi.
Similar to the protune feature on Hero4 ... but in addition with shutter speed control. ;-)

Would it be possible to generate endless loop in autoexec script and grab commands while looping?

I see two possiblities:
1. loop autoexec.ash and check regulary if command files are existing. The command files will be created by custom telnet app which generates the dummy files. E.g. If file "/tmp/fuse_d/cmd001.cmd" exists special t-command will be executed and the dummy file "cmd001.cmd" will be deleted again until new command file will be created.

lu_util exec 'if test -f "/tmp/fuse_d/cmd001.cmd"; then XXXXexecute_this_t-commandXXXX; fi'

Just 1st idea but do not know how XXXX must be coded. To execute normal linux command if file exists is working.

2. loop autoexec.ash and regulary execute command found in specific file on SD. E.g. the file /tmp/fuse_d/command.sh is used to transfer the t-command from telnet (or php webserver) based custom application. After command was executed command.sh get's deleted and autoexec.ash scripts waits until new command.sh file is available with new "instructions".

Just and idea ... but i think it could work to change settings in realtime.
 
Last edited:
Does Yi Autoexec support bash IF-ELSE statement ?

for example i would like to employ NR only from 6PM-7AM


EDIT 1: seems possible to use lu_util exec, as above, sorry did not read it before..


test in linux, this would work, but not tested yet in YI


lu_util exec 'h=`date +%H`; if [ $h = 18 ] || [ $h = 19 ] || [ $h = 20 ] || [ $h = 21 ] || [ $h = 22 ] || [ $h = 23 ] || [ $h = 00 ] || [ $h = 01 ] || [ $h = 02 ] || [ $h = 03 ] || [ $h = 04 ] || [ $h = 05 ] || [ $h = 06 ]; then t ia2 -adj tidx -1 2250 -1; else t ia2 -adj tidx -1 0 -1 ; fi'
expected result: during daytime NR will be 0 , during night time NR will be 2250

EDIT2: Above Script not working.. Beep Loop
 
Last edited:
can someone recommend me a script for a FLAT looking video for outdoor day time , with minimal sharpening ?

firmware 1.2.12
 
Is it possible to use the output from the "lu_util exec" (or lu_util exec2) command as input in the autoexec.ash script???

Unfortunately this example is not working to use the result from lu_util as input in the autoexec.ash:
lu_util exec 'echo "t pwm 1 enable"'

Any idea how to get this working?
This would allow to pass any code for e.g. changing shutter speed, iso, AWB on/off etc. at any time while cam is on.
 
What is the minimum sleeping time which needs to be set after ....
a) changing exposure time
b) picture shot
???

I would like to find out the smallest possible delay between this changes/commands.
Thanks for your feedback.
 
Hi,

is there any script for car_dvr mode?
I'm looking for script which:
  1. enable recording in loop
  2. switch all leds off
  3. rotate recording in 180 degr.
  4. auto record

I found 3 & 4:
Code:
t app test vin_rotate 180
t app key record

but how to realize pt 1 and 2 ???
it is possible via autoexec.ash script?
 
This camera has loop recording in default i think or can be turned on in settings, all leds can be switched off in settings also rotation can be done there, but for auto record you need t app command in autoexec.

Unfortunatelly i didnt found commands to shut down all leds with autoexec script.
 
in settings via app...I know...but I using https://github.com/halvaborsch/ash.booter
for my various situation, one of them is cardvr where I would just press the power button and (wrote above) 4 steps needs to be done via script.
 
in settings via app...I know...but I using https://github.com/halvaborsch/ash.booter
for my various situation, one of them is cardvr where I would just press the power button and (wrote above) 4 steps needs to be done via script.

Ahmm okay. So the only way i can help you is to check the commands I extracted from last firmware:
https://github.com/PJanisio/Xiaomi_Yi_autoexec/tree/master/!!commands_extracted

I didnt validated them all though, but maybe you will find what you want.
 
Last edited:
in settings via app...I know...but I using https://github.com/halvaborsch/ash.booter
for my various situation, one of them is cardvr where I would just press the power button and (wrote above) 4 steps needs to be done via script.
I'm using this one too and it works. You can switch up to nine differents scripts. I made a litle modification to combine this script and xyc, now you can switch the script from phone or directly in the cam.
Link: http://grupoxiaomiyiaction.foroactivo.com/t123-booterxyc-xyc-booter-script
 
@zadayak: What key combination do I have to use to activate a script that somehow it will not work with me.
 
It is fully explained in the forum, in spanish.
Two ways:
- If you want to switch script without the phone, Press and hold Shutter button. Start camera. When read lights starts to blink by press power button select script to load. Ex: For load 2_(your script).ash script press button 2 times.
- If you want to change settings in script enter via telnet an run xyc.sh
 
this is starting point :D

I found something from line 1132 but I don't know how to use it
https://github.com/PJanisio/Xiaomi_...!!commands_extracted/1.2.13/strings.txt#L1132

I try send json command via telnet 7878:
{"msg_id":257, "token": 0}
then next
{"msg_id":2,"token":1, "type":"led_mode", "param":"all disable"}

and it's works

so now I try send the same via internally netcat...test in progress

Cześć reaper7,

I saved the LED states because possibly they can be useful for someone doing research, but as you said, i dont know either how to use them yet.
Regarding telnet/netcat, did you found the solution?

I made some trials today with this code:

Code:
echo '{"msg_id":257, "token": 0}'; sleep 5; echo '{"msg_id":2,"token":1, "type":"led_mode", "param":"all disable"}' | nc localhost 7878;

but without success.

Later on when command will run properly it can be saved as shell script and run from lu_util exec command.
 
I don't have such bash skills :D
First of all after send first request for valid token:
'{"msg_id":257, "token": 0}'
tcp pipe must be opened for next request.
Sending any next requests via separate netcat instances gives errors...
so, as You wrote in Your example, this must be send by one complex netcat request but not with sleep between.
 
Yeah you are right, connection must be maintained. Sooner or later this will be figured out.
I have no time to sit with the camera as I became a father 2 weeks ago :D
 
Sorry for double posting but there is already a solution.

@reaper7
Take a look at this thread, here is an binary and script to turn on all possible settings from autoexec script and many more.
Like we Poles says: "you should not break down unlocked door" ;)

https://dashcamtalk.com/forum/threads/yi-plus-a-mod-for-switching-capture-and-recording-modes.14110/

Script has also possibility to switch modes. In one word - great tool.

Of course i would be mad to not add this to repository ;D, so i made it already and additionaly you can find there script for turning off leds for movie and photo mode here:
https://github.com/PJanisio/Xiaomi_Yi_autoexec/tree/master/yi_plus/json_scripts/led_disable
 
Yes, this is very nice tool but (because always is some "but", as we Poles says ;) )...how with this tool switch between ap/sta modes? For this reason I using ash.booter
Hmmm ... maybe little addition inside yi_plus.sh? e.g. when shutter button is pressed when cam starts, then run sta mode and without it starts normally as ap .
 
Last edited:
Back
Top