babooshka tv how a homemade video indicator displaced the assemblage point of my elderly parents

Dear friends. It so happened that my previous publication was carried away by a UFO, considering it overly politicized. This is the second attempt to publish this text. Alas, I did not manage to find out which specific formulations are forbidden on HabrΓ©. Therefore, I removed all the names and all references to popular people and television channels, so as not to once again cause anxiety in the ardent hearts of especially compassionate readers and, thereby, to moderate the intensity of passions in the comments. This modest brainchild of mine was invented with the sole purpose of taking my beloved parents out of the television "information bubble" and providing them with an additional and, at the same time, a familiar format alternative from our family videos, as well as various videos from the Internet, interesting and useful for expanding horizons. Hopefullythat this time the UFO will leave the post alone, and you, dear colleagues, will enjoy reading.



Hi, Habra. I want to tell you an amazing story that happened to my parents thanks to a small device that I collected for them last year. At the same time, I will tell you about the creation process, and also share some interesting discoveries.



It all started with the fact that my daughter and I once again came to visit our parents. My parents are aged. And, like all elderly pensioners, their joys are simple: water the flowers, take a walk in the park, chat with children and grandchildren, and, of course, TV. Where without it.



Parents watch for the first time the sensational epic film about he-you-not-dimona a couple of years ago

Parents first watch a sensational movie a couple of years ago. (On the TV cover "naked" RPI of the first model, proof of concept, so to speak)



. , . , , . , , , . - , . . , , .



, , . , , - . . - . . , ( , ) . , , , -. . , . , , , . β€” . β€” - . , , . " , , . . , , , , ..." β€” .



.



Interplay Medium. , RPi . , . , . . . , … - youtube . . , . β€” .



β€” .





, IR .



assembly on a bradboard with an IR receiver and transmitter (why you need a transmitter - I will tell you below)



. , .



babooshka.tv , - :



  • lirc,
  • +
  • IR ( IR LED , )
  • RPi Zero ( ), PWM


. , + .



babooshka.tv first version



( , :) , , .





- Raspberry OS. Raspberry Pi OS Lite image



( 2018) IR. , . , , . . RX TX /dev/lirc, . RX TX , . , , -.



wifi SSH , , . , . , , , ddg it!





.



,



apt update  
apt install mc fbi omxplayer sox


freefonts ( omxplayer )



apt install ttf-freefont


- freefonts RPi, , , freefonts /usr/share/fonts/truetype/...

sudo



cp -r freefont /usr/share/fonts/truetype/freefont  
chown root:root /usr/share/fonts/truetype/freefont  
chown root:root /usr/share/fonts/truetype/freefont/*


IR



apt install lirc


/etc/lirc/hardware.conf



# Run "lircd --driver=help" for a list of supported drivers.  
DRIVER="default"

# usually /dev/lirc0 is the correct setting for systems using udev  
DEVICE="/dev/lirc1"  
MODULES="gpio_ir_recv"


/etc/lirc/lirc_options.conf

! , known bug . , , .



driver        = default  
device        = /dev/lirc1


.



irdb-get find YOUR_DEVICE  


, YOUR_DEVICE.conf /etc/lirc/lircd.conf.d/ (, , , - )



, : , Lirc ' '. , ( , ...) ( ), . .



lircd.conf



cp /etc/lirc/lircd.conf.dist /etc/lirc/lircd.conf


/boot/config.txt, PAL - IR :



disable_splash=1

# disable_overscan=1

framebuffer_width=720
framebuffer_height=576

# enable PWM audio (add this line)
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4

# uncomment for composite PAL
sdtv_mode=2

# uncomment if hdmi display is not detected and composite is being output
# hdmi_force_hotplug=1

# Uncomment this to enable the gpio-ir module
dtoverlay=gpio-ir,gpio_pin=23,gpio_pull=up
dtoverlay=gpio-ir-tx,gpio_pin=22


IR ,



GitHub. @elmicha



/etc/udev/rules.d/71-lirc.rules /dev/lirc-rx /dev/lirc-tx:



ACTION=="add", SUBSYSTEM=="lirc", DRIVERS=="gpio_ir_recv", SYMLINK+="lirc-rx"
ACTION=="add", SUBSYSTEM=="lirc", DRIVERS=="gpio-ir-tx", SYMLINK+="lirc-tx"
ACTION=="add", SUBSYSTEM=="lirc", DRIVERS=="pwm-ir-tx", SYMLINK+="lirc-tx"


/etc/lirc/lirc_options.conf:



device        = /dev/lirc-rx
listen        = 0.0.0.0:8766


lirc_options.conf lirc_tx_options.conf :



device        = /dev/lirc-tx
output        = /var/run/lirc/lircd-tx
pidfile      = /var/run/lirc/lircd-tx.pid
listen        = 0.0.0.0:8765
connect      = 127.0.0.1:8766


/etc/systemd/system/lircd-tx.service ( systemctl cat lircd) :



[Unit]  
Documentation=man:lircd(8)  
Documentation=http://lirc.org/html/configure.html  
Description=Second lircd, the transmitter  
Wants=lircd-setup.service  
After=network.target lircd-setup.service lircd.service  

[Service]  
Type=simple  
ExecStart=/usr/sbin/lircd --nodaemon --options-file /etc/lirc/lirc_tx_options.conf  

[Install]  
WantedBy=multi-user.target  
Create /etc/systemd/system/lircd-tx.socket (from the output of systemctl cat lircd.socket) and edit it:  

[Socket]  
ListenStream=/run/lirc/lircd-tx  

[Install]  
WantedBy=sockets.target  
Also=lircd-tx.service  


/usr/local/bin/irsend



#! /bin/sh  
exec /usr/bin/irsend --device=/var/run/lirc/lircd-tx "$@"
chmod +x /usr/local/bin/irsend


lircd-tx ( sudo)



systemctl daemon-reload
systemctl start lircd-tx
systemctl enable lircd-tx


RX (sudo ...)



systemctl enable lircd.service
systemctl enable lircd.socket

systemctl restart lircd


! Warning of duplication of "begin remote… end remote". . .



:)



systemctl reboot

systemctl status lircd.service
systemctl status lircd.socket


IR



- . . IR , MOSFET :) , , LED IR .



irsend SEND_ONCE SONY-TV KEY_1


RX



irw




, . .



systemctl stop lircd.socket
systemctl stop lircd.service

record with own key names
irrecord --disable-namespace

systemctl start lircd.socket
systemctl start lircd.service


raw ( )



irrecord -f -d /dev/lirc0 ~/lirc.conf




, , , . :



  • next
  • prev
  • forward +10min
  • backward -10min
  • play/pause toggle
  • pause on switching-off
  • stop
  • audio track switch
  • subtitles switch


remoteir.sh



, , : next, prev play/pause toggle. , , . . remoteir.sh "ARR_DOWN" "ARR_UP" .. , irw . irw , .



irw


babooshka.tv



cd /home/pi/
git clone https://git.shalnoff.com/git/BABOOSHKA.TV
cd BABOOSHKA.TV/


git, . BABOOSHKA.TV .



.sh ( +x)



ls --all 


, chmod +x *.sh



systemd ( LED )



/etc/systemd/system/splash.service



[Unit]  
DefaultDependencies=no  
After=local-fs.target  

[Service]  
StandardInput=tty  
StandardOutput=tty  
ExecStart=/home/pi/BABOOSHKA.TV/early_init.sh  

[Install]  
WantedBy=sysinit.target  




sudo systemctl enable splash.service




/etc/rc.local



sudo -H -u pi /home/pi/BABOOSHKA.TV/start.babooshka.sh > /dev/null &



( sudo) .



systemctl reboot


, babooshka.tv. . .. , , . ramfs . . :) .





  • - ~/BABOOSHKA.TV/VIDEO/
  • , playlist ( 10 )
  • , PLAY
  • - , ,




, /boot/cmdline.txt. , console=tty3 quiet consoleblank=0 logo.nologo. :



console=serial0,115200 console=tty3 quiet consoleblank=0 loglevel=1 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait logo.nologo


( , )



vt.global_cursor_default=0


tty login,



sudo systemctl disable getty@tty1 


. ( , ) .



… IR TX. TX, . IR . -, - , , - . , , - , , . , . , . .



…



, . , , , , , , , . , , .



, ( ) - , . (!...)

, . … , … . . ? , , , " , … , … "… .



, , , :) , , .



. , , , , . .. β€” , . . 1 . , , , . , . . - "". , - .



. . , , RPi -.



Chinese uber box



, , , ...



TV-RF modulator board



, , . . " , -!" β€” .



, , , .



, . . ~200-5v 400 mA, , . 1A.

Power supply unit inside the improvised babooshka.tv case.  Remember to unsolder the capacitor before cutting the side slot.



, . , 220v, .

, . micro USB - .



The modulator is powered like this.  5v.  Resistor R1 needs to be removed.

. 5v. R1 . ( … , )





, ) ) . .. , , , β€” .



wiring babooshka.tv



Pi Zero IO

:



LED +3,3v 470R



GPIO 0  BCM17   LED ,   
GPIO 2  BCM27   LED ,   (, )


( , ~470R 1K )



IR



GPIO 3  BCM22   IR TX  
GPIO 4  BCM23   IR RX  

    38kHz --  

    +-----------------------+ 3
    |                       +---------------------o +3.3V
    |      ______________   |
    |     /                 |
    |    (                  | 2  
    |     \______________   +---------------------o GND
    |                       |
    |                       | 1
    |               data -> +---------------------o GPIO 4 (BCM23)
    +-----------------------+

    950nm  ( TSUS5400,    )

                     +5V
                      o
                      |
                     | |  51 Ohm (    MOSFET,    )
                     |_|
                      |
                     _|_
                     \ / 
                     ---  IR LED
                      |
                      |
         ___      |---'
  o-----|___|-----|       MOSFET
         10K      |->--
    GPIO 3 (BCM22)     |
                       |
                    ----- GND
                     ---
                      - 


, PWM



GPIO 1  BCM18   R AUDIO
GPIO 23 BCM13   L AUDIO


-



RPi TV out

, :)



RPi . . . . .



babooshka.tv exploded view

WiFi . .



. . IR RX . , β€” IR , .



babooshka.tv, final assembly



IR , . . , , - , 950nm.



babooshka.tv back view.  All inscriptions, of course, are not relevant, but are they needed in this situation :)

. , , , :)



, , . -. …



IR diode can be removed from the housing and riveted near the TV sensor





TV modulator.  "Collective farm" sound filter on SMD components.



. .



RPi Zero Audio

, !



, SMD, . , , . , .



All transactions as a whole



. , IR . . , , - , , . .. , β€” . , . , .





babooshka.tv work demonstration

:



  • ;
  • ( 10 -);
  • ;
  • ( , -);
  • ;
  • ( )


, , :



  • ;
  • ;
  • LED ;
  • , "" ;
  • , VIDEO YOUTUBE;
  • , / ( , , )




  • ( Usage: );
  • "" , ';' ;
  • "" ( ) ( Usage: );


, - ,



scp <your_super_cool_kitten_flick.mp4>  <babooshka>:BABOOSHKA.TV/VIDEO/




    ssh babooshka 
    cd BABOOSHKA.TV/YOUTUBE/
    youtube-dl -f 'bestvideo[vcodec=avc1][height<=720]+bestaudio/best[abr<=120]' --merge-output-format mp4 -o '%(playlist_index)s - %(title)s.%(ext)s' <youtube link>


:) .





. , youtube-dl



apt install mkvtoolnix python-pip
pip install -U youtube-dl


. -level 3.0. , , RPi low profile. H264.



ffmpeg -i FILEIN -vcodec libx264 -preset slow -level 3.0 -b 700k -s 720x404 FILEOUT


, .



babooshka.tv got a fun sticker with a logo





  • youtube-dl ( )
  • youtube ( , youtube-dl RPi )
  • Tox, . -. . IR .




https://git.shalnoff.com/BABOOSHKA.TV


, .



, , - OpenELEC OSMC. , . .. ( , experience :) 100% . β€” . , , :)



, . . , , IR . (+ 4 2 , RPi Zero). , , "" bash youtube .





. .

, , , , , . .. " " , .



, . , β€” . , , , . , , .



, youtub . , , . . , . " " .



, , , , .





, , . - , - . :



  • . , instant , , ;
  • RSS/JSON/plain ;
  • ;
  • ;
  • ;
  • "-";
  • RSS youtube/vimeo


.. youtube, vimeo . , . OpenELEC, , .



, , / IPFS.



- … . . . , . .



Mom and Dad are watching cats and granddaughter



PS Disclaimer: Never make a low power transmitter for your neighbor's grandmother. It is forbidden! Suddenly, the neighbor's grandmother still presses the usual button from time to time and inadvertently watches some wrong video. And in many localities, this button still works as before. In general, I warned you.



o----'\/\/\/'----o




All Articles