Yi Plus - A mod for switching capture and recording modes

OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Reaction score
22
Country
Canada
@itzik
1. The led pattern is a list of on/off commands and you can make the pattern as long as you like. The interval is how long it stays at each command in the pattern before switching to the next. For example, pattern 0110, interval 100 would be off for 100ms, on for 200ms, then off for 100ms. It repeats indefinitely.

2. It looks OK but I didn't test it. You can remove the wifi led if you like. I found it just confuses me more.

@scuola
If you always want the LEDs and beeps off you can change the setting using your phone. If you only want it off for pictures, you can set up yi plus to do this. I am not at my computer right now so I can't look up the messages you need to send to achieve that.
 

scuola

Member
Joined
Jun 26, 2015
Messages
56
Reaction score
2
Country
Italy
Many thanks!
When you can, please send the messages to insert in yi plus for the Leds and beeps off when taking pictures
 

gente

Active Member
Joined
Aug 17, 2015
Messages
348
Reaction score
55
Country
Germany
@bikemike
how can be switched between foto resolutions?
is that right for "4608x2592 16:9" or only "4608x2592" instead "off"?
and "off" means that mode setting, adjusted by the app?
in what section i have to move the settings modes for rotating..., in capture oder record or it doesn't matter.
I need 2 values for setting and resetting?
I have made a script for 2 resolutions/fps and rotating the display at that resolutions (and back again if not longer needed) because when using for dashcam and for changing the foto format/resolution from 4:3 to 16:9.
Also changed the behaviour of LED.
Can you take a look on my script, it is not working where is the fault(s)?
Thanks

"record":
{"modes":
[
{
"name":"30 FPS",
"leds":[
{"id":"shutter","pattern":"100000000000000","interval":150}
],
"messages":[
{"msg_id":2,"type":"system_mode","param":"record"},
{"msg_id":2,"type":"rec_mode","param":"record"},
{"msg_id":2,"type":"video_resolution","param":"2304x1296 30P 16:9"}
]
},
{
"name":"video rotate on 30 FPS",
"leds":[
{"id":"shutter","pattern":"110000000000000","interval":150}
],
"messages":[
{"msg_id":2,"type":"video_rotate","param":"on"}
]
},
{
"name":"video rotate off 30 FPS",
"leds":[
{"id":"shutter","pattern":"111000000000000","interval":150}
],
"messages":[
{"msg_id":2,"type":"video_rotate","param":"off"}
]
},
{
"name":"60 FPS",
"leds":[
{"id":"shutter","pattern":"101000000000000","interval":150}
],
"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 60P 16:9"}
]
},
{
"name":"video rotate on 60 FPS",
"leds":[
{"id":"shutter","pattern":"110110000000000","interval":200}
],
"messages":[
{"msg_id":2,"type":"video_rotate","param":"on"}
]
},
{
"name":"video rotate off 60 FPS",
"leds":[
{"id":"shutter","pattern":"111011100000000","interval":250}
],
"messages":[
{"msg_id":2,"type":"video_rotate","param":"off"}
]
},
{
"name":"Timelapse 5 second interval",
"leds":[
{"id":"shutter","pattern":"101010000000000","interval":150}
],
"messages":[
{"msg_id":2,"type":"system_mode","param":"record"},
{"msg_id":2,"type":"rec_mode","param":"record_timelapse"},
{"msg_id":2,"type":"timelapse_video_resolution","param":"1920x1080 30P 16:9"},
{"msg_id":2,"type":"timelapse_video","param":"5"},
{"msg_id":2,"type":"timelapse_video_duration","param":"off"}
]
},

{
"name":"Timelapse 10 second interval",
"leds":[
{"id":"shutter","pattern":"101010100000000","interval":150}
],
"messages":[
{"msg_id":2,"type":"system_mode","param":"record"},
{"msg_id":2,"type":"rec_mode","param":"record_timelapse"},
{"msg_id":2,"type":"timelapse_video_resolution","param":"1920x1080 30P 16:9"},
{"msg_id":2,"type":"timelapse_video","param":"10"},
{"msg_id":2,"type":"timelapse_video_duration","param":"off"}
]
}

]
},
"capture":
{"modes":
[
{
"name":"Picture 4:3",
"leds":[
{"id":"shutter","pattern":"111100000000000","interval":150}
],
"messages":[
{"msg_id":2,"type":"system_mode","param":"capture"},
{"msg_id":16777228,"param":"precise quality;4608x3456"}
]
},
{
"name":"Picture 16:9",
"leds":[
{"id":"shutter","pattern":"111101000000000","interval":150}
],
"messages":[
{"msg_id":2,"type":"system_mode","param":"capture"},
{"msg_id":16777228,"param":"precise quality;4608x2592"}
]
},
{
"name":"Timelapse 2",
"leds":[
{"id":"shutter","pattern":"111101010000000","interval":150}
],
"messages":[
{"msg_id":2,"type":"system_mode","param":"capture"},
{"msg_id":16777228,"param":"precise quality cont.;2.0 sec"}
]
},
{
"name":"Timelapse 5",
"leds":[
{"id":"shutter","pattern":"111101010100000","interval":150}
],
"messages":[
{"msg_id":2,"type":"system_mode","param":"capture"},
{"msg_id":16777228,"param":"precise quality cont.;5.0 sec"}
]
},
{
"name":"Self timer 10",
"leds":[
{"id":"shutter","pattern":"111101010101000","interval":150}
],
"messages":[
{"msg_id":2,"type":"system_mode","param":"capture"},
{"msg_id":16777228,"param":"precise self quality;10s"}
]
},
{
"name":"Burst 7 in 1s",
"leds":[
{"id":"shutter","pattern":"111101010101010","interval":150}
],
"messages":[
{"msg_id":2,"type":"system_mode","param":"capture"},
{"msg_id":16777228,"param":"burst quality;7 p / s"}
]
}

]
}
}
 
Last edited:

gente

Active Member
Joined
Aug 17, 2015
Messages
348
Reaction score
55
Country
Germany
ok after testing and changing something all is working well, the changing of foto format/resolution doesn't work.
Can you send me the codes changing foto format from 4:3 to 16:9.
You see my coding the post before.
The switching between modes is a little bit tricky, you have to click not to slow...
 

mach

New Member
Joined
Jul 18, 2015
Messages
12
Reaction score
1
Country
Austria
thanks @bikemike that works and is pretty helpfull. Works also with custom firmware.

Edit: my fault, works also with coring/movie script. Very cool, thanks again.

Is it possible to switch of wifi led?
Led blinking is very strange during record, but I guess not you cannot avoid that.
 
Last edited:

TD3XT

New Member
Joined
Oct 1, 2015
Messages
1
Reaction score
0
Country
Australia
This is extremely useful and so far is working very reliably. Thanks very much. I've edited the json file and customised it to the settings I want and all works well.

Do you have it documented anywhere all the settings that can be changed? For example I'd like to be able to turn RAW on and off for photo's and do some of the other things that can be done in ash scripts.
 

itzik

Member
Joined
May 5, 2015
Messages
67
Reaction score
5
Country
Israel
same as TD3XT said,
great mode. i use it all the time only 2 feedbacks i would say are:
1. turn off wifi led somehow
2. where can we find documents so we can change the modes alone like if i want yo add 2K how do i do it?

again this is working great and upgraded my user expericance very much.
 
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Reaction score
22
Country
Canada
@gente
I haven't tested, but try these:
Code:
{"msg_id":2,"type":"photo_size","param":"16M (4608x3456 4:3)"}
{"msg_id":2,"type":"photo_size","param":"12M (4608x2592 16:9)"}

@mach I know the blinking wifi led is annoying but I don't think there is any way around it. The wifi isn't actually on though so at least your battery life shouldn't be affected.

I can probably do something about the strange blinking during record. I can detect when recording starts and then stop yi_plus from making any changes to the leds.

@TD3XT Unfortunately I have not figured out a way to send commands from the Linux OS (where yi_plus is running) to the RTOS (real time OS) where the ash scripts run.

@itzik
I don't have any documentation for all the settings you can change yet but you can search through this file:

https://github.com/luckylz2git/Ponerine/blob/master/camerasetting.py

As an example, there is a photo quality option:
Code:
def photo_quality(self, options):
    if options == "":
      options = '["S.Fine","Fine","Normal"]'
    r = '''
        {
        "type": "options",
        "title": "Photo Quality",
        "desc": "Set photo quality.",
        "section": "setting",
        "key": "photo_quality",
        "options": [options]
        }
        '''
This can be put into messages as follows to switch between photo quality:
Code:
{"msg_id":2,"type":"photo_quality","param":"Normal"}
or
{"msg_id":2,"type":"photo_quality","param":"Fine"}
or
{"msg_id":2,"type":"photo_quality","param":"S.Fine"}
 

mach

New Member
Joined
Jul 18, 2015
Messages
12
Reaction score
1
Country
Austria
Many thanks!
When you can, please send the messages to insert in yi plus for the Leds and beeps off when taking pictures
Hi @scuola , could you please tell us, how to disable LED only for photo mode or one specific mode.
btw, "yi plus" is awesome ! Thanks @bikemike .
 

scuola

Member
Joined
Jun 26, 2015
Messages
56
Reaction score
2
Country
Italy
HI @mach

@scuola
If you always want the LEDs and beeps off you can change the setting using your phone. If you only want it off for pictures, you can set up yi plus to do this. I am not at my computer right now so I can't look up the messages you need to send to achieve that.

I disabled LEDs in the phone app as suggested by @bikemike (thanks!) who also may suggest how to do via Yi plus.
 

mach

New Member
Joined
Jul 18, 2015
Messages
12
Reaction score
1
Country
Austria
yea, but how to disable LED only for one mode or only for photo mode... maybe @bikemike can help :)
 

gente

Active Member
Joined
Aug 17, 2015
Messages
348
Reaction score
55
Country
Germany
settings for buzzer ring and LED:
Code:
{"msg_id":2,"token":%s, "type":"buzzer_ring", "param":"on"}
#{"msg_id":2,"token":%s, "type":"buzzer_ring", "param":"off"}

{"msg_id":2,"token":%s, "type":"led_mode", "param":"all enable"}
#{"msg_id":2,"token":%s, "type":"led_mode", "param":"all disable"}
#{"msg_id":2,"token":%s, "type":"led_mode", "param":"status enable"}
and set this lines either in the section of record or capture modes in yi_plus.json , where you need it or in both...
 

StfLA

Member
Joined
Aug 6, 2015
Messages
73
Reaction score
5
Country
France
Hi !
If I try to use Yi Plus, AND a loop in autoexec.ash, it doesn't work. Is there a solution ?

The loop doesn't start, and Yi Plus doesn't work.

Code:
#!/bin/sh

# Yi Plus uItron autoexec.ash script
#
# Author:     Mike Morrison
# Created on: 2015-09-22
# Donations:  https://goo.gl/ApYN94

# wait for boot
sleep 7

# execute the yi_plus script on Linux
lu_util exec '/tmp/fuse_d/yiplus/yi_plus.sh'
sleep 10

#MAIN LOOP
while true
do
t app key shutter
sleep 1
#done

And I can't disable the beep with this line, it breaks Yi Plus
Code:
{"msg_id":2,"type":"buzzer_volume", "param":"mute"}
 
Last edited:
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Reaction score
22
Country
Canada
Hi !
If I try to use Yi Plus, AND a loop in autoexec.ash, it doesn't work. Is there a solution ?

The loop doesn't start, and Yi Plus doesn't work.

If you have a loop that takes a picture every second you wouldn't be able to do anything else with the camera so I'm not sure why you are trying to combine it with the yi plus script.
 

StfLA

Member
Joined
Aug 6, 2015
Messages
73
Reaction score
5
Country
France
You're right, but it' not a problem. I want to use Yi plus as a "preset loader"
I have 2 Yi that I use regulary to take pictures every seconds (for Mapillary), and I'm tired of checking all the settings, on the 2 Yi, each time I want to take a picture sequence.
With Yi Plus, I could write all the settings I want in the script and just start the Yi.
 
OP
B

bikemike

New Member
Joined
Aug 29, 2015
Messages
23
Reaction score
22
Country
Canada
You're right, but it' not a problem. I want to use Yi plus as a "preset loader"
I have 2 Yi that I use regulary to take pictures every seconds (for Mapillary), and I'm tired of checking all the settings, on the 2 Yi, each time I want to take a picture sequence.
With Yi Plus, I could write all the settings I want in the script and just start the Yi.

Ahh. Well that makes sense. Does Yi Plus work for you if you don't use the loop?
 

StfLA

Member
Joined
Aug 6, 2015
Messages
73
Reaction score
5
Country
France
Yes, it works without the loop :)
(except for muting the beep)
 

luckylz

Active Member
Joined
Apr 8, 2015
Messages
414
Reaction score
107
Country
China
Hi @bikemike , your yi_plus is great ! I use it to intialize the default settings of YiCams.

And I monitor the official YiCam's app, and get some information for you:
Code:
APP-SEND>>> {"token":0,"msg_id":257}
... ...
APP-SEND>>> {"token":1,"msg_id":3}
APP-SEND>>> {"token":1,"msg_id":2,"type":"camera_clock","param":"2015-09-24 10:18:01"}
APP-SEND>>> {"token":1,"msg_id":1,"type":"app_status"}
APP-SEND>>> {"token":1,"msg_id":2,"type":"system_mode","param":"capture"}
... ...

you can see the send out string format, is in the order: token, msg_id, type, param, and without any spaces. and in most case(99%), if don't follow this order, there will be no problems.
from yi_plus.log:
Code:
SENDING MESSAGE: {   "msg_id" : 257,   "token" : 0}
SENDING MESSAGE: {   "msg_id" : 1,   "token" : 1,   "type" : "system_mode"}
SENDING MESSAGE: {   "msg_id" : 2,   "param" : "low",   "token" : 1,   "type" : "buzzer_volume"}

but I already found out in some very special situation, the wrong string order will cause the YiCam won't accept the message.

so please consider, if it's possible for you to make some modification on your yi_plus code.
 

Fried

Active Member
Joined
Aug 10, 2015
Messages
214
Reaction score
42
Country
Italy
Wow very interesting thread I just noticed it, I'll surely try it, if everything works fine I'll buy you a beer cause you deserve it... ;)
 

Fried

Active Member
Joined
Aug 10, 2015
Messages
214
Reaction score
42
Country
Italy
hi @bikemike I'm testing your script but it seems doesn't work for me, I'm using it as you upload without any modification copied directly to microsd, script should start cause shutter and wifi led blink, when I double hit power button shutter led blink more times, I just test with video mode for now.. anyway I tried to shoot couple of videos but it keep lastest setting by app... I have 2015-09-23 version of yi_plus.sh.. I'll test capture mode soon.. I've upload yi_plus.log, so you can check... Thanks...
 

Attachments

  • yi_plus.zip
    12.6 KB · Views: 7
Top