Navigating Self

My attempt to have a writing habit. Writing forces me to have clarity with how I'm living my life.

ComputersFinancesSystems and ProcessesThoughtsUncategorized

Category: Uncategorized

Installing an on-line UPS and homelab clean-up

My homelab’s state before clean up

This was the state of my homelab. Whenever I go at my server room and attempt to arrange things, I get paralyzed how to get started.

Primary blocking reason is how I should handle supplying power. Currently I have 2 separate line-interactive UPS. One for critical internet-related devices, the other for optional servers.

My original plan was to make a DIY UPS using devices for solar. I “thought” it was cheaper. I planned to use:

  • ATS (automatic transfer switch) if I have to have a maintenance, servers will keep running
  • SNAT 1kw inverter – act like a line-interactive UPS
  • Used LifePO4 battery
  • Rack DIN rail for safety devices – ATS, breakers, DIN power plug

I already bought the components but assembling everything was daunting. I had a safety concern mixing high-voltage devices to the same rack as the server. The rack DIN rails would also have exposed live wires and I wasn’t comfortable with the plan. I purchased before I thought through the plan.

I was in a limbo on how to proceed. My homelab has been in this state for more than a year.

Finding a reasonably-priced On-line UPS

I finally found a reasonably priced online UPS. It’s on-line meaning it has double conversion 230v AC -> 24v DC -> 230v AC. Any power fluctuation won’t reach the devices.

It’s KSTAR YDC9101S RT. It’s only 900w as I don’t intend to run anything more than that. It has a user replaceable battery. It can be replaced while plugged-in. And it can be rack-mounted!

Cost is 10k, including shipping. This is cheap as compared to other on-line UPS I checked. Second-hand UPS without battery is easily around 20k. So I bit the bullet and purchased it.

A proper UPS, finally.

Plan of action

I knew I’ll rabbit-hole to something else when I start working on my homelab. There’s always something else to do. What I did was list what I wanted to accomplish for the day and limit myself to 2 hours.

  1. Remove 2 line-interactive UPS
  2. Remove shoe rack
  3. Remove TP-Link 16-port Swtich
  4. Install KSTAR UPS
  5. Install 10GBe Netgear Switch
  6. Install rack drawer

With a clear plan of action, I started.

Removing deprecated stuff

  • Shoe rack – I used this as a poor man’s rack. It become unmanageable quickly
  • 16-port TP Link switch – turns out I don’t use more than 8 ports anymore. With a new 10Gbe switch, it’s more than enough
  • 2 extension cord
  • 2 UPS with modified batteries

Installing new stuff

After clean up
  • KStar On-line UPS (bottom)
  • Netgear 10Gbe Switch
  • Rack sliding cabinet – I felt like I needed this to put loose items such as USB keyboard and mouse, extra SFP modules, rack screws. I had instances where I spent an afternoon looking for those.

Finished everything in 2 hours. Listing out what I want to accomplish was handy. It keep me on-track. I feel good about the progress I made with my homelab.

Willingness to appear like a fool

Text manipulation question

I’ve been working on a migration script for a couple of hours. I thought I’m done with the hard part of API calls, creating a new workspace, configuring the workspace to make it work.

The remaining task involves updating the configuration code itself to point to the new service provider. I didn’t anticipate spending hours on this since it’s a straightforward text manipulation. I expected this to be something I already knew how to do.

Previously, my approach was to exhaust all possible solutions on my own, often waiting until the last minute before asking. I don’t want to risk appearing like a fool.

Now, I’ve adopted a different approach. I ask for help proactively and provide updates on the steps I’m taking in the process. The team can respond if they knew the answer and if they got time.

It’s just a question! A single question could not possibly define my overall skill level.

The responses I got have been helpful, and I was able to complete my task.

Ownership

I used to be sold to the idea of sharing economy. Uber, AirBnb, and not owning things. It fits well with my minimalist lifestyle.

I distinctly remember trying my first Uber ride. At that moment, I thought “Why would I need a car? A car that I have to maintain, and buy insurance for”. I even considered limiting everything I own in a backpack, which would allow me to move wherever I want, whenever I want.

Owning a car

Sure, owning a car is more expensive overall. But it buys me freedom. Uber is convenient only to places where they operate, at the time when there’s a demand. With a car, I have the flexibility to travel on my terms, have my own private space. I don’t have to worry about whether I can book a ride to the specific place I want to go at any given time.

Owning a place

“Most people, Kamala, are like a falling leaf, which is blown and is turning around through the air, and wavers, and tumbles to the ground. But others, a few, are like stars, they go on a fixed course, no wind reaches them, in themselves they have their law and their course”

Siddhartha

Sure, being able to move at whim seems nice. Having tried it though, I felt lost. “What the hell am I doing? What am I trying to prove?” is what I remember thinking when I was moving to my 4th hostel.

Having my own place allows me to establish roots. It gives me a home, a space where I feel at ease and can be myself, doing things that suit me. Unlike renting, where even something as simple as putting a nail in the wall requires permission, ownership offers the freedom to make decisions about the space without constraints.

Owning a decision

Ownership extends beyond material things, it includes decisions too. When I own a decision, I take responsibility for the resulting outcome. Regardless if it’s good or bad.

If in my mind it’s somebody else’s fault, how the hell can that help? Owning a decision puts myself in a position where I can correct myself when I acknowledge I made a bad move.

Ownership comes with higher costs — more money, more responsibility, more time and effort. However, the sense of having more influence over the direction of my life makes it worth it for me.

Microsoldering: Upgrading iPhone 6s from 16gb to 128gb

I stumbled upon a video that upgrades an iPhone 6s from 16gb to 128gb a couple of years back. It was super fascinating to learn that it was possible at all. It remained at the back of my head.

Years later (this year), I finally pulled the trigger to try it out when I found out that tools needed to do it are relatively cheap, and a broken 8-year-old iPhone 6s are cheap too. I have zero soldering skills, let alone microsoldering. But I just had to try it.

First attempt: broke the PCB pads

Too much force pulling out the NAND IC

The NAND IC is the actual storage and what needs to be replaced to upgrade. What I did not expect was it’s soldering back the IC that’s the easy part. Removing the factory-soldered IC is hard because aside from the solder itself sticking to the motherboard, there’s an underfill that acts as an adhesive too.

I’m not supposed to put force pulling it out, but I did not know nor have the experience to know which is which.

If the PCB pads are broken, it’s connection to wherever it’s supposed to connect is gone.

Giving up: maybe this is not for me

Workbench with failed upgrades

I burned through 3 iPhone 6s at this point and I kept doing the same mistake of breaking the PCB pads. I’m losing hope and very frustrated and started questioning why I’m doing this at all.

Broken pads on my 4th attempt

Luckily, on my 4th attempt, the pads I’ve broke turned out to be “redundant” pads. It means as long as at least one can make a good connection, it will still work.

Board view of an iPhone 6s. Red dots are redundant pads. It connects to the same end point.

Super happy when I learned this!

Reballing and putting back the NAND

To put back the NAND IC, it needs to be reballed. Reballing is putting back the solder on it’s connection points that will be then used to connect back to the motherboard.

I used a medium-temperature solder paste with BGA70 stencil. This turned out to be easy and fun to do.

Putting it back is as easy as placing it in the correct orientation and heating it up. There will be a small movement as it place itself when the solder melt.

Finally made it work!

All these happened in span of weeks. For every failed attempt, I had to source another cheap broken iPhone 6s. I can only try again if I have another phone available. So there’s a lot of pent-up frustration.

I haven’t been able to clean up one of my tables because I haven’t finished this hobby yet. All the parts are scattered around, and it’s still a work in progress.

So when I finally made it, I felt so relieved. I can finally move on.

Things I learned:

  • Previously, my approach to malfunctioning electronics was simple: if it didn’t power up, the whole component has to be replaced. Board-level repair was not even considered. Now, I’ve become more comfortable with electronics, and I’ve gained a better understanding of how they work.
  • Electronic components can surprisingly withstand a lot of heat. My hot air workstation is set at 360C to remove and put back components, and it still work!
  • It’s hard to do microsoldering without a microscope. But a microscope’s price is hard to justify for something I do not do professionally. It costs around 14k. So I tried to make do with my 20/20 vision and my phone’s macro lens.

I could not see this helping me with my professional career at all. This is just one of those passionate, dedication to the pursuit of short-term goals. This is just me indulging my curiosity.

I can finally clean up my dining table.

Finding a Philippine-based VPS

When I learned the term about multihoming, I revisited my interest again to have a VPS (Virtual Private Server) to setup as a VPN (Virtual Private Network) for my home network.

I wanted it to be hosted in the Philippines because of latency. Major hosting providers uses Singapore or Hong Kong to cater the PH market. But the latency is just too high at around 30ms.

I found one in LightNode. The cost is reasonable too for $7.7 USD/month.

LightNode’s dashboard

The drawback is it looks to be limited to 100mbps only. Which is still reasonable.

Speed test from/to VPS to my home internet

Checking the hops, it looks like they are hosted within PLDT’s data center:

IP information

This is why the latency is at a very good range of 7ms. It does hop at one NAT which I think adds the 2ms. Overall this is good.

I’m going ahead and continue to use this and integrate it with my home network setup.

Next step is to understand multihoming.

Why I have a separate workspace

What happens when I open my laptop at home

I used to think that I needed a separate workspace because working from home was challenging due to my kids. They would close my laptop, type on it, and constantly demand my attention, making it difficult to work.

While it’s partially true, I realized that it’s not the main reason. 

My main reason for needing a separate workspace is rooted in my values that family comes first. Given the choice between working and attending to my kids, prioritizing my kids is a no-brainer. Whenever they are around, it’s tough choosing anything else because I know that it’s not forever that they’d want me around. I just got to enjoy it while they do.

I still have to work though. Being physically away from my kids allows me to do my job and be able to provide.

It’s a small nuance, but the end result is still the same — I have to be away working.

This is more on resolving an internal conflict when I have to work long hours. There are instances I question myself “Akala ko ba priority family? Ba’t puro ako trabaho?”. Now, I have a clear answer.

Working in 2-hour blocks

Ever since two of our kids started school at different schools with different schedules, I’ve been trying to figure out a way to still effectively work.

Here’s what I’m trying to follow:

My goal is to have an 8-hour workday. I divide this to four 2-hour blocks.

Daily Planning

In daily planning, I try to be specific with what I want to accomplish on each block. Once that’s clear, I try to do tasks that takes less than 5-minute to do if I have the energy (most of the time I don’t and procrastinate 😛).

Operations Work

The initial 2-hour block mostly involves handling operational tasks for Human Made. During this period, I address change requests, support tickets, and emails. This works well because I’m usually the only person available around this hour. I can respond faster to our APAC customers.

It’s also good for me as it puts my head in to work mode.

Sprint Work / Meetings

In the following 2-hour blocks, the tasks are mixed bag. Sometimes more support work if there’s an active incident happening, sometimes I’m able to focus on sprint work.

Working in the evening enables me to participate in meetings with my team. This timing works well as those in the EMEA region are in their mid-day, and those in the Americas are just starting their day.

This schedule is not something I can consistently follow. Some days, completing even a single task is a struggle, while on other days, I effortlessly breeze through my to-do list. It’s a give-and-take scenario. When I’m struggling, I spend more time to work to still deliver, and during good periods, I spend more time at home. It’s a recurring cycle.

I think plans isn’t meant to be followed to the dot but rather to provide guidance and structure. Having things pre-decided makes it easy to get back on track when I feel lost.

Just hit publish

I’ve been wanting to write and publish for a while, but I’ve been overly critical about what’s worth sharing or not.

I often consider things that, in hindsight, prove to be unnecessary, such as:

It has to provide value

I learned that sharing my personal experiences in itself have value. It brings up visibility on my interest that might resonate with other people too.

It has to be worth other’s people time

We’re clearly bad judges of our own creations. We should just put them out there and let the world decide. – Derek Sivers

I could not possibly know what’s worth other people’s time. It’s an imaginary audience in my head that put unnecessary pressure on me. Publish and let people decide.

It has to be structured, easy to read

At this point, it doesn’t matter how my posts are structured. The goal is be comfortable on publishing and sharing stuff. The goal is to keep on sharing. It could be a single sentence or a well-thought of piece. It doesn’t matter.

In general, writing does not have to be for other people. However, the thought that someone else might read it forces me to structure my writing enough that it makes sense. If I were writing solely for myself, I would write things that would not make sense even to me a few weeks, months, years from now.

Writing for other people is just an excuse to force myself to extract clarity out of what’s inside my head.

ISP for Family and Friends

One of the hobbies I picked up this year was to be an Internet Service Provider (ISP) wannabe using Fiber to the Home (FTTH).

I was just so fascinated with FTTH technology and how accessible acquiring the equipment needed to implement it. It’s expensive, but not out-of-reach expensive. Imagine the jump of technology from CAT6 (4 pairs of copper wires) limited to 100 meters, to a single strand of fiber than can support over 100 km length at faster speed! It’s super fascinating for me. 

I kept researching how it works. Knowing myself, I will only learn if I put skin in the game.

In the process, I learned a ton of new acronyms:

OLT: Optical Line Terminal

EPON OLT on my server rack

This is the most expensive part of this hobby. OLT is like the network switch for fiber. It allows transmission to multiple ONU (more on this later).

I chose the cheapest OLT I could find, specifically looking for a local supplier so I can quickly get a replacement if ever it malfunction.

I got a HiOSO HA7302CST. It’s an EPON OLT that has 2 PON ports that can connect up to 128 ONUs.

PON: Passive Optical Network

9 dBm EPON Module

PON is what the technology is called. It’s passive, meaning it does not require electrical components to split or combine the signal. It literally uses light to transmit data.

There are 2 common types of implementation. EPON and GPON. EPON has symmetrical speed, GPON have faster downstream speed. GPON is what PLDT, Globe use as it has more capacity per fiber line. EPON is generally cheaper.

ODN: Optical Distribution Network

Planning the layout of my NAPs

ODN is how the fiber are physically laid out.

We have a couple of properties in the same village. What I did is I installed a 1:8 NAP on each property to provide internet service to the house itself and it’s nearby neighbors.

NAP: Network Access Point

First ever NAP installation. Daming excess wires!
Improved later on

NAP are the boxes where the signal from PON is split. It can be split on different ratios with different signal loss depending on how large the split is.

Splitter TypeInsertion Loss (dB)
1:24.0
1:47.4
1:810.5
1:1613.5

I opted to use 1:8, since I’m not seeing myself acquiring a lot of subscribers.

ONU: Optical Network Unit

A patched Converge 5v5 modem connected to my EPON

ONU are the modem that converts the signal from fiber and make it available through Ethernet and WiFi.

Connection information from ONU to OLT

I learned that Huawei EchoLife HG8145V5 is very popular modem in Facebook Marketplace because it’s what the major telecom uses. Unused modems from disconnected/terminated subscribers are being sold in the second-hand market.

It’s possible to reuse it outside the telecom’s network because there’s an exploit for Huawei modems that allows root access to the device and convert it from GPON to EPON ONU. This was fascinating too!

SC-UPC / SC-APC: Subscriber Connector

There are two types of subscriber connectors. SC-UPC (Blue) and SC-APC (Green). The difference is how their end is polished (angled vs not angled). It can be interchangeably used, but it will incur a notable signal loss.

Terminating a fiber line

I learned how to terminate it myself. So much easier than terminating a CAT6 cable.

Loss Budgeting

Optical Power Meter to check signal strength: -5.02 dBm

From the OLT, you start with the PON module signal which in my case is 7-9 dBm depending on the module. The loss must not to be more than -27 dBm when it reaches the ONU.

For every split and every termination, there will be signal loss incurred.

A computation is required to get an estimate of the final signal strength. I learned that it’s called loss budgeting — making sure that the signal does not go below the threshold from OLT to ONU.

I’m now an ISP for around 12 houses in our village. It’s mostly family and friends. No plans on expanding, just wanted to scratch an itch and learn about the thing. Fun stuff!

Enterprise-grade CCTV on a Consumer-grade Hardware

Surveillance Station Dashboard

My Mom asked for a CCTV at their place. There were disputes were a CCTV would have been beneficial to quickly sort out the issue.

I initially setup the “easy” kind of CCTV. An IoT WiFi-based camera, but it turned out not to be reliable. It saves its data on a MicroSD, and it easily burn out after a couple of months, wireless connection gets disconnected intermittently, and the camera itself is unpredictable and hangs from time to time.

I switched to PoE-based solution which is far better that what I initially installed.

Network Video Recorder

With PoE Camera, it does not have it’s own storage. The data has to be stored somewhere, which is the NVR (Network Video Recorder)

I have an existing server for Crystaldrin Network which serves various purposes including a NAS (Network Attached Storage). I was looking for something I could virtualize and use the same storage already available.

I explored a couple of software solutions and I decided on Synology’s Surveillance Station. The good things is, it’s Linux-based, and there’s a community that allows it to run in a virtualized environment: https://xpenology.com/forum/

I chose to emulate DVA3119 since I had a unused Nvidia GTX 1060 3gb lying around which would allow me to use deep learning features such as facial recognition and object detection.

GTX 1060 3gb
After installation to the server

I have it running on my Proxmox server with the GPU passed-through to guest virtual machine.

The GPU gets successfully detected by the virtual machine after booting it up.

Object Detection

This is where things got exciting for me. I think the usefulness of a CCTV comes with the ease on how easy it is to find what you’re looking for.

Surveillance Station’s interface itself is very intuitive. It also have a mobile app so it can be accessed remotely.

What’s more is they added features that can detect objects (e.g. plate number, people, vehicles). With this info, you can filter by time and date and/or people and/or plate numbers.

Backup Power

To make it more enterprise-y, it has to be somehow resilient to power interruption. Since the camera are powered over ethernet, I only have to have a backup power for the PoE switch.

I used SNADI 1kw with a 12V 100Ah LifePO4 battery. Based on my computation, it should run around 6 hours without power from Meralco.

#

This was a fun project. I get a lot of satisfaction finding uses for old hardware. This project is definitely one of those.

2020 © Jerico Aragon