Skip to content

Instantly share code, notes, and snippets.

Damien Gaignon psolyca

  • Tours, France
Block or report user

Report or block psolyca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@psolyca
psolyca / autoexec_preset_res.ash
Last active Nov 15, 2018
4 presets for live streaming through Yi 4k
View autoexec_preset_res.ash
# All multiplicators are the same for example purpose
# Change them to suit your needs with
# https://gist.github.com/psolyca/722b9b9e32e6c66e29f9b4c5788ea50f to choose a base bitrate
# https://gist.github.com/psolyca/57a4025b0bba5216db728e1054c04a2d to choose bitrate multiplicators
# https://gist.github.com/psolyca/d83bd3594c94c6e3fd17d7ae636678ff to choose a resolution and the number associate
# Resolution depend on the choice between NTSC and PAL on the cam.
# Following resolutions are NTSC format.
# Only one base multiplicator for all presets
@psolyca
psolyca / video_bitrates_base_table_live.txt
Created Nov 6, 2018
Video bitrates base table for live for Yi4k
View video_bitrates_base_table_live.txt
0x49742400 #1.00 Mbps
0x49927C00 #1.20 Mbps
0x49989680 #1.25 Mbps
0x49B71B00 #1.50 Mbps
0x49D59F80 #1.75 Mbps
0x49F42400 #2.00 Mbps
@psolyca
psolyca / video_bitrates_multiplicator_table_live.txt
Last active Nov 6, 2018
Video bitrates multiplicator table for live for Yi4k
View video_bitrates_multiplicator_table_live.txt
The values in the video bitrate table are stored as 32 bit floating point values :
0x3D4CCCCD #0.05
0x3DCCCCCD #0.1
0x3E19999A #0.15
0x3E4CCCCD #0.2
0x3E800000 #0.25
0x3E99999A #0.3
0x3EB33333 #0.35
0x3ECCCCCD #0.4
@psolyca
psolyca / live_video_bitrates_addresses_table.md
Last active Apr 25, 2019
Live video bitrates addresses table for Yi4k
View live_video_bitrates_addresses_table.md
Addresses Resolutions
0xA06E50BC 1920x1080p
0xA06E50FC 1280x720p
0xA06E513C 848x480p
0xA06E517C 640x360p
@psolyca
psolyca / Audio_bitrates_addresses_table.md
Last active Apr 25, 2019
Audio bitrates addresses table for Yi4k
View Audio_bitrates_addresses_table.md
Address Value
0xA06D4538 Audio
@psolyca
psolyca / Audio_bitrates_table.md
Last active Apr 25, 2019
Audio bitrates table for Yi4k
View Audio_bitrates_table.md

The audio bitrate is stored as a 32 bit integer corresponding to the number of bits per second. ex: 0x1F400 is 128000 bits per second which is 128kb/s.

Bitrates (kb/s) Hex
#8kbs 0x1F40
#16kbs 0x3E80
#32kbs 0x7D00
#64kbs 0xFA00
#96kbs 0x17700
@psolyca
psolyca / video_bitrates_addresses_table.md
Last active Apr 25, 2019
Video bitrates addresses table for Yi4k
View video_bitrates_addresses_table.md

This is for the 4k firmware 1.10.9

Res. num. Address NTSC PAL
@psolyca
psolyca / video_bitrates_table.md
Last active Apr 25, 2019
Video bitrates table for Yi4k
View video_bitrates_table.md

The values in the video bitrate table are stored as 32 bit floating point values :

Bitrate (Mbps) Hex value
0.05 0x3D4CCCCD
0.1 0x3DCCCCCD
0.15 0x3E19999A
0.2 0x3E4CCCCD
0.25 0x3E800000
0.3 0x3E99999A
@psolyca
psolyca / LightsControl.md
Last active Jun 4, 2018
Light control with NodeMCU v3
View LightsControl.md

The goal is to control all my lights with Domoticz and my wall switches.

A NodeMCU v3 will be used as the controller, a PCF8574 board to extand I/O, a 4 relays board to switch lights on/off and a mini AC-DC converter.

ESPeasy is the firmware of the main board and Domoticz the home automation manager.

Home configuration

Lights in the home are simple or 3-way switches. By the way, all cables from live, neutral and between switches and lights are gathered in a connecting box as the following: wiring_present

@psolyca
psolyca / RollerShutter.md
Last active Jun 4, 2018
Roller shutter with Electrodragon SPDT and HLW8012
View RollerShutter.md

After modding the Electrodragon SPDT, it is time to use it.

The goal is to make a roller shutter switch. A HLW8012 breakout board (energy meter) made also by Electrodragon will be used as a calibration system to handle percentage opening.

ESPeasy is the firmware of the main board and Domoticz the home automation manager.

Hardware

For security reasons and to avoid both UP and DOWN power lines powered in the same time, one relay is the power relay where as the other one is the direction relay.

Following the modding of the SPDT board:

You can’t perform that action at this time.