Rachel's Yard

| A New Continuation

(This is one of many parts series on dominating the world with Siri.)

Back when I moved into this house in August, I had to have the old garage door openers replaced... Let's just say that they were very very very old. So I contacted a local contractor (support local business!) for installation, and unfortunately, because my garage door is an one-piece door (instead of a sectional door), he recommended me using a screw drive garage door instead of belt drive, and that limited my options for the motor. Needless to say, the garage door opener was not very smart...

That means I have to use the dreadful HomeLink in our cars to control them. Not very fun. I originally had the idea of controlling it with a Raspberry Pi, but it was thrown to the back of my head...

Fear not, the DREAM IS ALIVE!

initial commit

^ That's the Raspberry that we are gonna use for the hub.

Hi

^ At least the camera works. The popular Homrbridge plugin homebridge-camera-ffmpeg currently does not have audio, so I modified the plugin and optimized it for RPi. More importantly, there's sound!

I have no idea what I'm doing

^ I literally have no idea what I'm doing... I know that you need a relay, a magnetic switch, and some jumpers... But that's all. I have NO IDEA how to wire them... (Story of a software gurl...) Special thanks to Ben La Monica for creating this awesome plugin!

Remote control

^ Time to take apart the remote... The garage door openers do have the wall-mounted ones, but I don't want to ruin those...

(This is when my friend Niraj comes over and help me with this... Kudos to the EE guy.)

magnetic switch

^ Let's try the magnetic switch... It works, of course... As Niraj said, this is the easiest part.

relay

^ Annnndddd the relay works, no problem!

It works, I have no idea why. It doesn't work, I have no idea why.

^ In theory, once I hook up the circuit from the remote to the relay COMM and NO, closing the relay should work, but.... It didn't. Debugging took like 3 hours, and it turned out to be interference? Anyway...

dessert!

^ Need to make myself feel better with dessert...

HomeDepot

^ Need to make a quick trip down to Home Depot... Just realized that I can't find my multimeter, and my soldering iron was trashed...

Niraj the boi

^ Once we figured everything out, time to solder... And I'm a terrible at soldering... Time for Niraj the big boi!

Finished product

^ Finished product! Don't ask about the Dremel on the table... It was something stupid...

Lovely

^ Look at this thicc boi

Annnnnd it's 1AM already, so we will do the sensor and wiring the next day (also we need to move the cars around which is annoying...)

Garage Hub

^ Garage Hub in its natural habitat (with the sensor hooked up).

interference

^ Again, I have to move the remote further away from the box... Because interference.

And there you have it, Open Sesame:

Open Sesame


Future Roadmap

Currently, I can only open/close one garage door at a time, due to the limitation of the remote (you can't press two buttons at the same time). I might get two one-button remote so it can control both door at the same time.

(This is one of many parts series on becoming the ultimate Apple fanboi/fangurl.)

Recently I've acquired a HomePod for the bomb ass speaker (trust me, it's better than Sonos), and for its Home Hub so I can automate all the things, and I can access my stuff at home remotely.

thicc boi

I have a bunch of TP-Link switches and bulbs, but sadly, it doesn't have first-party support yet. Fear not, homebridge is here for the rescue...

Home.app


However, I do have an old Bluetooth spekaer (Big Blue Live) that needs some AirPlay love... Trip down to Fry's, get a Raspberry Pi and a case, and go to town...

We want to accomplish this:

1
iPhone <-> AirPlay <-> RPi <-> Bluetooth <-> Blue Blue Live

Here are the dead simple steps to follow... I'm on Raspbian Stretch Lite, and I highly recommend Stretch (Debian 9). YMMV.

  1. Upgrade your Raspberry

    1
    2
    3
    sudo apt-get update
    sudo apt-get dist-upgrade
    sudo rpi-update

  2. Install PulseAudio as ALSA is no longer maintained

    1
    sudo apt-get install pulseaudio pavucontrol pulseaudio-module-bluetooth

  3. Compile and install the development branch of shairport-sync. Please also compile shairport-sync with Apple alac support (--with-apple-alac), PulseAudio support (--with-pa), and SSL support. I use PolarSSL for its "lightweight-ness" (--with-ssl=polarssl). Configure with ./configure --with-pa --with-avahi --with-systemd --with-apple-alac --with-stdout --with-ssl=polarssl --with-metadata --with-soxr, and install whatever missing libraries on your way...

  4. Fix your permission. policykit-1 should already be installed when you install pulseaudio, and you need to add pi to the group bluetooth and lp. Reboot for shits and giggles after you are done.

  5. Now you should able to pair without running as root. Run bluetoothctl:

    1
    2
    3
    4
    5
    [bluetooth]# agent on
    [bluetooth]# scan on
    [NEW] Device xx:xx:xx:xx:xx:xx Big Blue Live
    [bluetooth]# pair xx:xx:xx:xx:xx:xx
    [bluetooth]# trust xx:xx:xx:xx:xx:xx

But don't connect yet. We don't need to connect manually.

  1. Disable the built-in DAC on Raspberry Pi by commenting out dtparam=audio=on under /boot/config.txt, reboot for shits and giggles

  2. Configure shairport-sync at /usr/local/etc/shairport-sync.conf

    1
    2
    3
    4
    5
    6
    7
    8
    general =
    {
    name = "AirPlay Pi"; // This is going to be the name shown to your devices
    interpolation = "soxr"; // Despite what the configration said, RPi is more than powerful to handle soxr
    output_backend = "pa"; // this should not need explanations
    drift_tolerance_in_seconds = 0.010; // might as well
    alac_decoder = "apple"; // use alac decoded
    }

  3. Configure auto connect. Put the following to a file, and set appropriate permissions:

    1
    2
    3
    4
    5
    6
    7
    #!/bin/bash

    sleep 5

    /usr/bin/bluetoothctl << EOF
    connect xx:xx:xx:xx:xx:xx
    EOF

  4. systemd madness. Put the following to /etc/systemd/system/bt-connect.service:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    [Unit]
    Description=Connect to BT speaker
    After=shairport-sync.service

    [Service]
    Type=oneshot
    ExecStart=/path/to/the script in step 8
    RemainAfterExit=true
    User=pi
    Group=pi

    [Install]
    WantedBy=multi-user.target

  5. sudo systemctl daemon-reload and sudo systemctl enable bt-connect

VoilĂ , now you should have a functional AirPlay -> Bluetooth Raspberry Pi.


Possible issues

PulseAudio might not use a2dp and uses headset profile by default, resulting in a very horrible audio quality... If that's the case, shutdown shairport-sync, and run pulseaudio --start. Then run the script in Step 8 to connect to your speaker. Run pactl list sinks to identify, and run pactl set-card-profile <id> <a2dp or a2dp_sink>. Afterward, kill pulseaudio with pulseaudio -k and restart shairport-sync, also run script in step 8 to reconnect.

This is a short story about me, up until this point.

Short Preface

Growing up as the only child (and seen as a boy) in a traditional Chinese family (in China), it has its perks and disadvantages.

Perks:

  1. Treated like a emperor
  2. Treated like you are entitled
  3. "Don't worry about it"

Disadvantages:

  1. Basically everything else

Life goes on for many years: me and my cousins (Can you guess which one is me?)

New Direction

With a dad who has a MBA degree, and a mom who was basically a teacher her entire life, my parents decided that it would be a good idea for me to study aboard, specifically, the United States. Of course, my parents were very emotional when we waved our hands at HKG, when I was 14 years old.

New Environment

When I arrived in the States, I was greeted with my dad's best friends. While all other international students were living with their assigned host famililes, I was basically living with an extension of my family. Sandy, she treated me like her own son, even more so than her own kids, for reasons that I did not understand.

New Relationship

Well, when you were young, the hormone rush was real. My puberty came early, and I had my first "girlfriend" when I was like, 12. I still felt guilty that I did so many unspeakably horrible things to her. Likewise, I had a second "girlfriend" while I was in high school, 16, in the States. I, again, did many unspeakbly horrible things to her as well. I did not know why I was such abusive towards people that I care about.

New School

graduation (Graduated from high school, PC my dad)

High school went by without much hurdles, and UCSC was the only school that accepted me (and SJSU, and UCD), and I started my life in a college dorm, 18.

New Friends

  1. Alex was this person in the group who always seems to be more mature than the rest of the group. He approached me with kindness, however I responded with hostility.
  2. Tiffany was this girl in the group who always can have a new conversation with anyone. However, I evitably fell in love with her, for two years, until the abusive side of me swallowed the relationship.
  3. Taiki was this boy in the group who always seems like the quiet one.

New Conflict

I was very ego-centric, authoritarian, basically like my dad. It wasn't until I was 21, I had realized how fucked up I was as a human being. For that, I want to say special thanks to Alex, Tiffany, and Taiki. They were there when I was throwing my tantrum; they were there where no one else was there for me (not even my parents, seriously); they were there while I was at my lowest point.

New Struggle

Ever since I was young, there was this part of me thats always feels different. I would dress up from my mom's wardrope in secret sometimes, and felt bad about it because I was taught that this is wrong. On the other hand, the more I saw my dad, the more I got scared. I remembered vividly of how my dad cheated on my mom, and when my mom confronted him, he hit my mom with my toy. I remembered vividly of how my dad will yell at my mom for the slightest error out of nothing. I would secretly feel bad for my mom. As I grew older and my puberty hit me like a train, I thought that I was just another regular guy who is "like father like son". But, that got me scared again. It must have been a mistake. I'm not like my dad, I don't want to become my dad.

New Realization

To me, this is a blessing that I was at a liberal college, and learned about feminism and sexuality. It was Christmas in 2015, that I started to explore myself:

Canada

The reaction from my friends was, "wow." The reaction from my parents was, "what the fuck?"

The idea of "transgenderism" was still unknown to me, however, I found myself more at ease with feminine living attiude and inner self. I started to dress more feminine, I started to at least try to be more compassionated, I started to align myself with what I thought I should become. For the entire 2016, I was exploring myself, and trying to figure out myself. Some parts of me suddenly click, as if I have found my soul. Other parts of me with an internalized transphobia screams to me that I'm a freak. During that time of internal struggle, I found myself as Rachel, the lost child.

New Life

It was after my 22nd birthday, and a random morning sometime in December, I woke up from a dream that I could not recall. However, it was like a calling to me that I should call my doctor, about starting HRT. I've been researching many topics about myself, from the liberal side, from the conservative side, about "is transgenderism a mental illness", everything about transgender. It was to my conclusion that, no, I've been doubting myself my entire life, and I need to take back control of my own life.

New Me

I started HRT under very a detailed informed consent, and two (separate) letters from therapists. Immediately (exaggeration), I found myself at ease at myself. I had found the lost self for 22 years. It never occurred to me that HRT was the magical bullet that pierce through the fog, and saved me from doubts. I had found my lost emotions again. Hormones are the messengers of the Gospel, so to speak. I'm hopeful that I'm being myself.

Me and Alex (Me and Alex)

New Future

  1. Developed SlugSurvival so it can help my fellow students with their course planning, hoping that the school will take over and integrate
  2. Soon be an accounting intern at a non-profit in Santa Cruz, Rising International, help with their cause of ending poverty
  3. Continuing to be a peer advisor at the econ department
  4. Helping a professor for his economic thesis as an undergraduate researcher
  5. Still have to find a job

Synopsis

  1. Love my friends and neighbors as myself.
  2. Be thankful.
  3. No one else should define who I am other than myself.

Friends and Family

Tahoe

Thanks for Reading

bye

next
1 2 3 ... 16
Weightless Theme
Rocking Basscss
RSS