Yi Plus - A mod for switching capture and recording modes

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Likes
22
Country
Canada
#1
I've created a program to allow mode and setting changes without connecting to a phone and without needing to reboot. I've only tested it with 1.2.12 and 1.2.13 firmware so I can't guarantee it will work on anything else.

Download:
https://drive.google.com/file/d/0B4toKKKJwI9jOFlJbkg4bE5MaWc/view?usp=sharing

Install:
The files in the zip need to be extracted and placed in the root directory of your camera's micro sd card.

Setup:

Modes, settings, and LED blinking behavior can be modified by editing yi_plus.json.

Using:

Single click power button:
  • Normal behavior - switch between capture and record
Double click power button (press two times within .5 seconds):
  • If in capture mode, goes to next yi_plus capture mode listed in yi_plus.json
  • If in record mode, goes to next yi_plus record mode listed in yi_plus.json
Note: Yi Plus also works with the bluetooth remote!

Known Issues:
- sometimes doesn't work. need to turn camera off and back on. maybe an issue with the wifi trick?
- wifi LED blinks but but wifi is not on
- pressing wifi button will turn wifi off and yi_plus will stop working
- pressing wifi button again will turn wifi on and allow connection from phone/tablet
- must power cycle camera after using wifi
- might not be able to upgrade firmware while yi_plus is running (might have to switch to a different sd card)

Donate:
If you like it and want to donate, you can do so via this link:
https://goo.gl/ApYN94
 
Last edited:
Joined
May 5, 2015
Messages
67
Likes
5
Country
Israel
#2
awesome. what setting do you put in yi_plus.json for switching between 120fps HD and 30fps FHD
 

luckylz

Active Member
Joined
Apr 8, 2015
Messages
414
Likes
106
Country
China
#3
hi @bikemike I found out there are total 4 files in your script:
Code:
/autoexec.ash
/yi_plus/yi_plus
/yi_plus/yi_plus.json
/yi_plus/yi_plus.sh
Is it possible for you to explain how to make the yi_plus & yi_plus.json ? thanks !
 
OP
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Likes
22
Country
Canada
#4
@itzik, replace the record modes with the following two:
Code:
                {
                    "name":"30fps FHD",
                    "leds":[
                        {"id":"shutter","pattern":"100000000000000","interval":150},
                        {"id":"wifi","pattern":"00000000000000000000","interval":10}
                    ],
                    "messages":[
                        {"msg_id":2,"type":"system_mode","param":"record"},
                        {"msg_id":2,"type":"rec_mode","param":"record"},
                        {"msg_id":2,"type":"video_resolution","param":"1920x1080 30P 16:9"} 
                    ]
                },
                {
                    "name":"120fps HD",
                    "leds":[
                        {"id":"shutter","pattern":"101000000000000","interval":150},
                        {"id":"wifi","pattern":"00000000000000000000","interval":10}
                    ],
                    "messages":[
                        {"msg_id":2,"type":"system_mode","param":"record"},
                        {"msg_id":2,"type":"rec_mode","param":"record"},
                        {"msg_id":2,"type":"video_resolution","param":"1280x720 120P 16:9"} 
                    ]
                }
@luckylz
yi_plus is a C++ program that runs on the camera's Linux OS. It connects to the camera's config port on 7878, much like the mobile app does, and sends messages to change the camera settings when you press or double press the power button. This only works properly when the camera thinks wifi is on so I put a line in the yi_plus.sh to trick the camera into thinking wifi is on but sometimes it doesn't work so I need to see if I can come up with a better solution.

yi_plus.json a config file used by the yi_plus program that you can edit with a text editor.
 

gente

Active Member
Joined
Aug 17, 2015
Messages
348
Likes
54
Country
Germany
#5
thanks for this helpful program :)
how many record modes and capture modes can be set?
can i copy the lines from your autoexec to mine. At what position beginning or end of my script?
The behavior will be keep the same: the red LED will be on for record mode and off for capture mode?
But i cannot see for example what record mode is switched, the first or fifth?
How i can switch back to first mode or a any of all modes, have i switch to times as long the desired mode comes back: 2-->3-->4-->5-->1?
Possibility to change camera settings?
Changing the display reversal (rotation 180°) for dashcam using and back again?
Changing the three metering modes or setting lens retification?
Have they set also in record or video mode instead of the video settings?

MFG
gente
 
OP
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Likes
22
Country
Canada
#6
1. You can have as many modes as you want!
2. Yes, you should be able to copy the lines from my autoexec.ash to yours. You will also have to copy the yi_plus directory to your SD card.
3. You can set the LED behavior for each mode. If you don't set LED behavior it keeps the same as original.
4. In my example script I blink the shutter LED a certain number of times depending on the mode. 1 blink for mode one, two for mode 2, etc. For capture mode I set the first blink to be a bit longer so I can see the difference.
5. Yes, to switch modes you double click the power button. It will roll back to the first mode after the last mode.
6. Yes you can change camera settings.
7. You should be able to rotate but I have not tried. Each mode will need to specify the rotation.
Code:
{"msg_id":2,"type":"video_rotate","param":"on"}
or
{"msg_id":2,"type":"video_rotate","param":"off"}
8. Meter modes:
Code:
{"msg_id":2,"type":"meter_mode","param":"center"}
or
{"msg_id":2,"type":"meter_mode","param":"average"}
or
{"msg_id":2,"type":"meter_mode","param":"spot"}
Lens Rectification:
Code:
{"msg_id":2,"type":"warp_enable","param":"on"}
or
{"msg_id":2,"type":"warp_enable","param":"off"}
9. I don't understand your last question.
 
OP
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Likes
22
Country
Canada
#7
I have just now uploaded a new version that seems to start up more consistently (the changes for this are in the yi_plus.sh file). I also removed the wifi LED behavior from the yi_plus.json config because it was just adding more confusion.
 

gente

Active Member
Joined
Aug 17, 2015
Messages
348
Likes
54
Country
Germany
#8
Where i have to put in the settings for camera like metering modes or display rotation and how to switch between them?
In the record- or videomode?
Can you post an script changing this 3 settings and the videomodes from 2,3k 30p,1980x1080 60p, 120p and the foto modes 16m and 12m/16:9?
 
Joined
Jun 11, 2015
Messages
31
Likes
2
Country
Spain
#9
I'm trying to use it without luck... it seems it loads your command (included at the end of my autoexec.ash) but when i change the video mode it record always at 2.3k... what i'm doing wrong?? the led says to me i'm stay on mode 2, 3, 4, or 5 but always the same resolution...

PD: I'm using a modded 1.2.12 firmware...
 
OP
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Likes
22
Country
Canada
#10
@Ghetto I uploaded a new version that hopefully fixes your issue. Try it out and let me know (the specific change is in yi_plus.sh).

@gente It will be a lot of modes if you want every combination of metering, rotating, and lens rectification. Have you tried editing the yi_plus.json yourself?
 
OP
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Likes
22
Country
Canada
#12
What does the date say in yi_plus.sh? It should say 2015-09-23 as I just uploaded the change today. If that's what you have then I'm not sure what the problem could be. You could upload the log file if you can telnet into your camera.

It's located here: /tmp/yi_plus.log

Copy it to your sd card (/tmp/fuse_d) then you can upload it here.
 
Joined
May 5, 2015
Messages
67
Likes
5
Country
Israel
#13
i didnt use scrip yet but i got a few question:
1. i turn on camera normall and only once its on i can switch between the modes? (by clicking twice the power button)
2. is there any way to know what mode i am in (changing lights and etc.) im talking about if im in 1080 30fps or 720 120fps?
3. when i turn off the camera and back on, in what mode does it stay? the last one i used?
 
OP
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Likes
22
Country
Canada
#14
@itzik
1. Yes, turn on as normal. The program takes an extra couple seconds more than the normal boot up time before it is running.
2. You can set the LED behavior in the yi_plus.json file. The example config blinks the shutter LED differently for each mode. One blink for mode 1, 2 blinks for mode 2, etc.
3. When you turn the camera off and back on it will be in the first mode of picture or video depending on which you had set up as default in the YiCam app.
 
Joined
Jun 11, 2015
Messages
31
Likes
2
Country
Spain
#15
My fault... now with 2015-09-23 yi_plus.sh it works like a charm even on a modded 1.2.13... Thanks bikemike!!
 
OP
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Likes
22
Country
Canada
#16
@Ghetto Oh good, I'm happy to hear that. I think you're the first one besides me to get it working! Let me know if you have any ideas for the program.
 
Joined
Jun 11, 2015
Messages
31
Likes
2
Country
Spain
#17
When i understood how it works, its easy to use and customizable, so... Much faster than use the app to change between modes and resolutions... i think right now is almost perfect except for the wifi led blinking (more battery consumption)... But is posible to change the mode to desired one, and shut off wifi, so no problem with that.
 
OP
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Likes
22
Country
Canada
#18
The wifi led does blink but wifi isn't actually on so it shouldn't consume more power. I haven't done a comparison of run time with/without yi_plus running though so I can't be 100% certain.
 
Joined
May 5, 2015
Messages
67
Likes
5
Country
Israel
#19
thanks for fast answer. gonna test it latter, probably tomrrow just 2 more question:

1. i see this code
Code:
"leds":[
                        {"id":"shutter","pattern":"100000000000000","interval":150},
                        {"id":"wifi","pattern":"00000000000000000000","interval":10}
                    ],
i assume this has to do with the leds.. and the pattern looks alittle like binary. and interval is a timer. if you can give me a small guide how to controll how many blinks and in how much time il be glad!

2.

this is the things i need in my code. its right? i didnt miss any "," or something like that?

Code:
// Yi Plus example configuration file
//
// Author:     Mike Morrison
// Created on: 2015-09-22
// Donations:  https://goo.gl/ApYN94

// led ids: bluepower, redpower, shutter, wifi

{
    "record":
        {"modes":
            [
                {
                    "name":"30fps FHD",
                    "leds":[
                        {"id":"shutter","pattern":"100000000000000","interval":150},
                        {"id":"wifi","pattern":"00000000000000000000","interval":10}
                    ],
                    "messages":[
                        {"msg_id":2,"type":"system_mode","param":"record"},
                        {"msg_id":2,"type":"rec_mode","param":"record"},
                        {"msg_id":2,"type":"video_resolution","param":"1920x1080 30P 16:9"}
                    ]
                },
                {
                    "name":"120fps HD",
                    "leds":[
                        {"id":"shutter","pattern":"101000000000000","interval":150},
                        {"id":"wifi","pattern":"00000000000000000000","interval":10}
                    ],
                    "messages":[
                        {"msg_id":2,"type":"system_mode","param":"record"},
                        {"msg_id":2,"type":"rec_mode","param":"record"},
                        {"msg_id":2,"type":"video_resolution","param":"1280x720 120P 16:9"}
                    ]
                }
            ]
        },
    "capture":
        {"modes":
            [
                {
                    "name":"Picture",
                    "leds":[
                        {"id":"shutter","pattern":"111000000000000","interval":150}
                    ],
                    "messages":[
                        {"msg_id":2,"type":"system_mode","param":"capture"},
                        {"msg_id":16777228,"param":"precise quality;off"}
                    ]
                },
                {
                    "name":"Self timer 10",
                    "leds":[
                        {"id":"shutter","pattern":"111010101000000","interval":150}
                    ],
                    "messages":[
                        {"msg_id":2,"type":"system_mode","param":"capture"},
                        {"msg_id":16777228,"param":"precise self quality;10s"}
                    ]
                }
            ]
        }
}

again thanks for this amazing scrip its very usefull!
 
Joined
Jun 26, 2015
Messages
56
Likes
2
Country
Italy
#20
I would like to take multiple shots nanually. Among other reasons (writing time on sd card etc.) I presume, not sure, that beep shutter sound and shutter led blinking may slow down the pace.
Is there any ways to exclude beep shutter sound and shutter led blinking when shooting stills?
 

Similar threads