<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.2.2">Jekyll</generator><link href="https://heino.cc/jekyll/feed.xml" rel="self" type="application/atom+xml" /><link href="https://heino.cc/jekyll/" rel="alternate" type="text/html" /><updated>2023-12-28T16:31:23+02:00</updated><id>https://heino.cc/jekyll/feed.xml</id><title type="html">heino.cc</title><subtitle>Samin turinoita Jekyllin avulla julkaistuna.</subtitle><entry><title type="html">Sony STR-DE595 Esphome remote transmitter control codes</title><link href="https://heino.cc/jekyll/2023/10/07/esphome-sony-strde.html" rel="alternate" type="text/html" title="Sony STR-DE595 Esphome remote transmitter control codes" /><published>2023-10-07T16:00:00+03:00</published><updated>2023-10-07T16:00:00+03:00</updated><id>https://heino.cc/jekyll/2023/10/07/esphome-sony-strde</id><content type="html" xml:base="https://heino.cc/jekyll/2023/10/07/esphome-sony-strde.html">&lt;h1 id=&quot;sony-str-de595-esphome-remote-transmitter-control-codes&quot;&gt;Sony STR-DE595 Esphome remote transmitter control codes&lt;/h1&gt;

&lt;h2 id=&quot;circuit-diagram&quot;&gt;Circuit diagram&lt;/h2&gt;
&lt;p&gt;Example circuit diagram for sending IR codes using IR LED with ESP32.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://heino.cc/jekyll/assets/irblaster.png&quot; alt=&quot;IR blaster circuit diagram&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-codes&quot;&gt;The codes&lt;/h2&gt;
&lt;p&gt;These codes have been recorded by using esphome’s remote receiver function
and tested by using IR blaster circuit with Lolin D1 mini. Some of the codes
propably work with other Sony home theater receivers too.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;on:
Received Sony: data=0x00003A0C, nbits=15

off:
Received Sony: data=0x00007A0C, nbits=15

input video1:
Received Sony: data=0x0000220C, nbits=15

input video2:
Received Sony: data=0x00003C0C, nbits=15

next preset:
Received Sony: data=0x0000040C, nbits=15

prev. preset:
Received Sony: data=0x0000440C, nbits=15

band:
Received Sony: data=0x0000420C, nbits=15

direct tune:
Received Sony: data=0x00000A0D, nbits=15

input cd:
Received Sony: data=0x0000520C, nbits=15

input dvd:
Received Sony: data=0x00005F0C, nbits=15

input md/tape:
Received Sony: data=0x00004B0C, nbits=15

input multi ch:
Received Sony: data=0x0000270C, nbits=15

power toggle:
Received Sony: data=0x0000540C, nbits=15

sleep:
Received Sony: data=0x0000030C, nbits=15

2ch:
Received Sony: data=0x0000410D, nbits=15

afd:
Received Sony: data=0x0000710D, nbits=15

movie/...:
Received Sony: data=0x00003B0D, nbits=15

test tone:
Received Sony: data=0x0000290D, nbits=15

shift:
Received Sony: data=0x0000470D, nbits=15

mute:
Received Sony: data=0x0000140C, nbits=15

vol-:
Received Sony: data=0x0000640C, nbits=15

vol+:
Received Sony: data=0x0000240C, nbits=15

ch+:
Received Sony: data=0x0000040C, nbits=15

ch-:
Received Sony: data=0x0000440C, nbits=15

down:
Received Sony: data=0x0000170D, nbits=15

up:
Received Sony: data=0x0000570D, nbits=15

left:
Received Sony: data=0x0000270D, nbits=15

right:
Received Sony: data=0x0000670D, nbits=15

menu:
Received Sony: data=0x0000770D, nbits=15

1:
Received Sony: data=0x0000000C, nbits=15

2:
Received Sony: data=0x0000400C, nbits=15

3:
Received Sony: data=0x0000200C, nbits=15

4:
Received Sony: data=0x0000600C, nbits=15

5:
Received Sony: data=0x0000100C, nbits=15

6: 
Received Sony: data=0x0000500C, nbits=15

7:
Received Sony: data=0x0000300C, nbits=15

8:
Received Sony: data=0x0000700C, nbits=15

9:
Received Sony: data=0x0000080C, nbits=15

0:
Received Sony: data=0x0000480C, nbits=15
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Which leads to for example following config in eshome:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
# Example configuration entry
remote_transmitter:
  pin: GPIO15
  carrier_duty_percent: 50%


# Example button configuration
button:
  - platform: template
    name: Amp on
#    id: my_button
    on_press:
      - remote_transmitter.transmit_sony:
          data: 0x00003A0C
          nbits: 15
          repeat:
            times: 5
            wait_time: 50ms
      - logger.log: &quot;Button pressed&quot;
    # Optional variables:
    icon: &quot;mdi:power-on&quot;

  - platform: template
    name: &quot;AMP off&quot;
    on_press:
      remote_transmitter.transmit_sony:
        data: 0x00007A0C
        nbits: 15
        repeat:
          times: 5
          wait_time: 50ms
    icon: &quot;mdi:power-off&quot;


  - platform: template
    name: &quot;AMP volume down&quot;
    on_press:
      remote_transmitter.transmit_sony:
        data: 0x0000640C
        nbits: 15
        repeat:
          times: 5
          wait_time: 50ms
    icon: &quot;mdi:volume-minus&quot;

  - platform: template
    name: &quot;AMP volume up&quot;
    on_press:
      remote_transmitter.transmit_sony:
        data: 0x0000240C
        nbits: 15
        repeat:
          times: 5
          wait_time: 50ms
    icon: &quot;mdi:volume-plus&quot;

  - platform: template
    name: &quot;AMP mute&quot;
    on_press:
      remote_transmitter.transmit_sony:
        data: 0x0000140C
        nbits: 15
        repeat:
          times: 5
          wait_time: 50ms
    icon: &quot;mdi:volume-mute&quot;

  - platform: template
    name: &quot;AMP input video1&quot;
    on_press:
      remote_transmitter.transmit_sony:
        data: 0x0000220C
        nbits: 15
        repeat:
          times: 5
          wait_time: 50ms
    icon: &quot;mdi:audio-video&quot;

  - platform: template
    name: &quot;AMP input tuner&quot;
    on_press:
      remote_transmitter.transmit_sony:
        data: 0x0000420C
        nbits: 15
        repeat:
          times: 5
          wait_time: 50ms
    icon: &quot;mdi:knob&quot;

  - platform: template
    name: &quot;AMP preset prev&quot;
    on_press:
      remote_transmitter.transmit_sony:
        data: 0x0000420C
        nbits: 15
        repeat:
          times: 5
          wait_time: 50ms
    icon: &quot;mdi:skip-previous&quot;

  - platform: template
    name: &quot;AMP preset next&quot;
    on_press:
      remote_transmitter.transmit_sony:
        data: 0x0000420C
        nbits: 15
        repeat:
          times: 5
          wait_time: 50ms
    icon: &quot;mdi:skip-next&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name></name></author><summary type="html">Sony STR-DE595 Esphome remote transmitter control codes</summary></entry><entry><title type="html">Acer ACR010 webcam in Linux</title><link href="https://heino.cc/jekyll/linux/webcam/2022/01/09/webcam.html" rel="alternate" type="text/html" title="Acer ACR010 webcam in Linux" /><published>2022-01-09T11:00:00+02:00</published><updated>2022-01-09T11:00:00+02:00</updated><id>https://heino.cc/jekyll/linux/webcam/2022/01/09/webcam</id><content type="html" xml:base="https://heino.cc/jekyll/linux/webcam/2022/01/09/webcam.html">&lt;h1 id=&quot;acer-acr010&quot;&gt;Acer ACR010&lt;/h1&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ lsusb
ID 0c45:637d Microdia ACR010 USB Webcam
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you encounter protocol errors ie:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ fswebcam -r 640x480 /tmp/lastsnap.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Error starting stream.
VIDIOC_STREAMON: Protocol error
Unable to use mmap. Using read instead.
Unable to use read.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;try connecting the webcam directly to computer instead of usb hub.&lt;/p&gt;

&lt;p&gt;V4l2 info:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;~$ v4l2-ctl --list-formats-ext -d 0
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'MJPG' (Motion-JPEG, compressed)
                Size: Discrete 2560x1920
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 2592x1944
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 2048x1536
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1280x960
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1280x720
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1024x768
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 800x600
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
        [1]: 'YUYV' (YUYV 4:2:2)
                Size: Discrete 2560x1920
                        Interval: Discrete 0.500s (2.000 fps)
                Size: Discrete 2592x1944
                        Interval: Discrete 0.500s (2.000 fps)
                Size: Discrete 2048x1536
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1280x960
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1280x720
                        Interval: Discrete 0.100s (10.000 fps)
                Size: Discrete 1024x768
                        Interval: Discrete 0.067s (15.000 fps)
                Size: Discrete 800x600
                        Interval: Discrete 0.050s (20.000 fps)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;creative-webcam-nx-pro-2&quot;&gt;Creative Webcam NX Pro 2&lt;/h1&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ lsusb
ID 041e:403a Creative Technology, Ltd Webcam NX Pro 2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ v4l2-ctl --list-formats-ext -d 2
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'JPEG' (JFIF JPEG, compressed)
                Size: Discrete 320x240
                Size: Discrete 640x480
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name></name></author><category term="linux" /><category term="webcam" /><summary type="html">Acer ACR010</summary></entry><entry><title type="html">Welcome to Jekyll!</title><link href="https://heino.cc/jekyll/jekyll/update/2021/04/04/welcome-to-jekyll.html" rel="alternate" type="text/html" title="Welcome to Jekyll!" /><published>2021-04-04T17:30:23+03:00</published><updated>2021-04-04T17:30:23+03:00</updated><id>https://heino.cc/jekyll/jekyll/update/2021/04/04/welcome-to-jekyll</id><content type="html" xml:base="https://heino.cc/jekyll/jekyll/update/2021/04/04/welcome-to-jekyll.html">&lt;p&gt;You’ll find this post in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;, which launches a web server and auto-regenerates your site when a file is updated.&lt;/p&gt;

&lt;p&gt;Jekyll requires blog post files to be named according to the following format:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;YEAR-MONTH-DAY-title.MARKUP&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;YEAR&lt;/code&gt; is a four-digit number, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MONTH&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;DAY&lt;/code&gt; are both two-digit numbers, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MARKUP&lt;/code&gt; is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works.&lt;/p&gt;

&lt;p&gt;Jekyll also offers powerful support for code snippets:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hi, &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Tom'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#=&amp;gt; prints 'Hi, Tom' to STDOUT.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Check out the &lt;a href=&quot;https://jekyllrb.com/docs/home&quot;&gt;Jekyll docs&lt;/a&gt; for more info on how to get the most out of Jekyll. File all bugs/feature requests at &lt;a href=&quot;https://github.com/jekyll/jekyll&quot;&gt;Jekyll’s GitHub repo&lt;/a&gt;. If you have questions, you can ask them on &lt;a href=&quot;https://talk.jekyllrb.com/&quot;&gt;Jekyll Talk&lt;/a&gt;.&lt;/p&gt;</content><author><name></name></author><category term="jekyll" /><category term="update" /><summary type="html">You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.</summary></entry></feed>