Apple TV with Projector

During the Black Friday / Cyber Monday weekend I performed an impulse buy and acquired a Vankyo V600 native 1080p projector for $280.49. The regular price for this unit is usually $399.99. I was curious what a big picture experience would be like on the flat wall of my curved staircase, which connects our main and second floors.

Projecting a Korean Variety Show (during Daylight)

The above end result was pretty impressive for the amount of dollars invested. I had an old Apple TV 3rd generation that was lying around not doing anything, and thought this would be a perfect media source for the projector.

Connection Layout

For good sound, a pair of Edifier 1850DB speakers, connected to an Airport Express, already existed upstairs. All I had to do was connect the Apple TV to the projector and set the Apple TV to AirPlay to the Edifier speakers. All of this worked as expected. However, I did run into a snag. The volume signals from the Apple TV was quite low. Even when I cranked up the Edifier volume, it was still barely audible. It took me a long time to figure out how to change the volume on the Apple TV.

Hidden Menu

Apparently when a video is being played on the Apple TV, you have to press and hold the select (centre) button on the remote until a menu shows up pertaining to subtitles, audio, and speakers. You have to select the speakers and find the AirPlay speakers that the Apple TV is using. In my case, the Edifier speakers were labeled as “Upstairs Speakers”. The volume controls are presented by the blue slider bar.

Now everything works as expected on my private Local Area Network (LAN). We can play YouTube, or any iOS apps that does video. However, it would be nice for guests to be able to AirPlay to the projector. With the holiday season fast approaching, our dinner parties could be spiced up with this idea.

After fudging around with my firewall setup, the old Apple TV is now accessible from our guest WiFi. Now anyone can literally and figuratively project a video source from their mobile device on to my huge wall upstairs.

I am super happy how this turned out. We’ll have to wait for the final verdict from our guests this holiday season.

Plug-in Economics for Prius Prime

According to Toyota, our new 2020 Prius Prime PHEV gets around 4.3L / 100km of city driving. We will use this number since it is not too far off of the combine driving number of 4.4L / 100km. This means at the time of writing this post, the current fuel price at our neighbourhood pump is at $1.15 / L. If you do some fancy math, the Prime will yield us 20.2km per dollar invested at the pump (20.2 km/$).

Ontario Electricity Costs (Fall of 2019)

As depicted by the chart on the right, in Ontario we have three tiers of charging rates. The Prime in the winter can do about 35km with a 9kWh battery. The exact numbers are 40km / 8.8kWh, but this is perfect condition, and we use some battery for heating the vehicle. This will yield us the following:

TierYield
On-Peak18.7km/$
Mid-Peak27.0km/$
Off-Peak38.5km/$

So by comparing the above numbers, it makes perfect sense to charge the vehicle during Off and Mid Peak hours, and not so much during On-Peak hours. However the On-Peak comparison is so close that if the mileage rating was at 4.5L/100km then it is a wash.

With a bit more fancy math, you can actually calculate how much does gas have to cost per Litre before On-Peak charges make sense. This turns out to be around $1.24/L.

Hopefully you find this information helpful.

Let’s Plug-In

On October 30th, 2019, we purchased a Toyota Prius Prime 2020, choosing the Upgrade trim without the technology package. We traded in our 2012 Toyota Sienna 8 passenger Minivan with approx. 90,000km for $11,000. After all the government incentives, fees, taxes, and dealer’s rebates, we ended up forking out less than $27,000 for the vehicle. The only thing we opted for was the rust protection device.

We now have this plug-in hybrid electrical vehicle (PHEV) for almost a week. The vehicle is very comfortable to drive, and much more refined than my 2013 Subaru Impreza. The Prius comes in three drive modes, Eco, Normal and Power. I find the Eco mode to be too slow and has too much accelerator latency. I prefer the Normal mode. The Power mode can be pretty fun especially when you have a fully charged battery.

There are plenty of YouTube videos and written articles already talking about how the car drives, and I agree with their positive take on the Prius Prime. Therefore, I won’t repeat what has already been said. I will focus on what impact the ownership of a Prius Prime has on our residential electrical consumption.

We have yet to invest in a level 2 charger (240V – 16A) for the house yet, so we are just using our regular 120V plug to charge the 8.8kWh battery for the vehicle. So instead of charging the vehicle in 2 hours with the level 2 charger, we find that it takes around 5 hours to fully charge the vehicle. Toyota’s charging specification is pretty dead on and accurate here.

I raided our utility company’s web site and was able to extract the following graphs. Either click on the image or this link to open the graphs.

The consumption graphs above points to a day with no electrical vehicle as a baseline, followed by three days of charging the Prius Prime in the evenings. It looks like charging the Prius only amounts to an average of 1.5 kWh increase from baseline per hour of charge. The graph shows about four hours of heavy charging follow by a lower power charge during the last hour and a half.

At the current off-peak rate of ~$0.10 per kWh, we are looking at about an increase of less than a $1 per day, and this gives you about a realistic 36km of pure EV mode (all electric) of range per charge. So for a month, $30 will give you around 1,000km of range!

We have driven the car for about 5.5 days, and racked up in excess of 300km. We still have 7/8 of a gas tank left, and the only reason why we used the gas is due to a test drive to the Toronto Premium Outlet mall in Milton. Otherwise our daily usage pattern, which consists of largely local errands, would allow us to just keep on using the battery.

Now the game is up. How long do you have to wait for me to update this blog entry when I fuel up our new Prius Prime for the first time? Watch and see, any wagers?

The Mechanics of Rights

Lately the phrase, “I have the right to …”, comes up a lot. Living in a society where basic and human rights exist and are protected and enforced by law is a good thing. These rights represent the rise of our social beliefs from savagery to civility, and encourage all of us to treat each other humanely.

We have long since conquered are basic needs, such as food, and shelter. Aside from members of our own species we do not fear any other species invading the security of our homes and families. We live largely in peace, and we argue and debate about things that really does not impact our basic needs. Instead, the things that we bicker about largely involve with how to improve our discretionary free time, such as:

  • How to make and spend money;
  • How to protect ones ownership and assets;
  • How to punish those who do not adhere to social norms;
  • How to maintain and climb whatever progress ladder that you want to climb;
  • How to change leadership;
  • Dream up new rights so that we can all be more comfortable;

We take for granted that it is this peaceful social atmosphere that allows us to contemplate how we can improve ourselves when living, working, and generally dealing with others. Without this basic-need social security blanket, all bets are off with rights.

I therefore assert that the notion of rights, whether they are human, civil, and even corporate are luxuries afforded by peaceful societies when they have enough time and sensibilities to create and enforce these rights. They are not a right but a privilege that we as a society has decided to define and maintain so that there is a higher sense of equality (protecting the weak from the strong), and civility.

Therefore it becomes very dangerous when people who would like to pursue new or change existing rights by adopting methods that endanger or violate the basic-need social security blanket. Radicals who justify the use of violence and threaten the basic social fabric and infrastructure to achieve their desire changes are also jeopardizing all other rights, threatening the livelihoods of others.

In essence, rights cannot be had, without peace and law. This is why I find very ironic that the people of Hong Kong are fighting for new rights by risking the current livelihood that others have enjoyed for so many years. Whether they know it or not, they are pursuing a path of country building and not protesting. Country building is much harder than instituting new rights. Many country’s foundation are ladened with blood and sacrifices.

Thoughts on the Hong Kong Protests

On the Maslow hierarchy of needs scale, Hong Kong currently share many of its basic needs with the mainland, including food, fresh water, and electricity. The end game of these protests should give due consideration to these geographical dependencies. Even if a political divorce is possible in the long run, it will be really difficult to live independently when you are still forced to share the same bed.

A symbiotic existence between Hong Kong and China seems to be unavoidable, as such finding common ground seems to be a better approach than inflammatory tactics based on hate and violence. The latter dehumanizes the opposition and ironically for all people of Hong Kong, erodes the one of the core values of a democracy, basic human rights. This is the same value that the protestors are advocating for.

Observing from recent history, it is really hard to pinpoint a country involved in the Arab Spring events that are better off now than before. Perhaps conciliatory talks can give rise to more creative possibilities of coexistence, and the elixir of democracy does not have to be the only arrow in the quiver to achieve peace and prosperity.

Leviton Decora Smart Dimmer with HomeKit

I purchased these DH6HD HomeKit compatible dimmer switches from Leviton from February of 2018 (over 1 1/2 years now).

When they work, they are great. BUT! My HomeKit app frequently report these switches with “Not Responding”. The only remedy that I know of is to remove the accessory and then re-add it again.

The process of adding the accessory is extremely frustrating and time consuming. Adding the accessory to the WiFi network is a hit and miss affair. It really is a crapshoot.

Today after three tries adding the Leviton without success, I almost gave up. Finally I discovered the following process in this reddit article. Even the technique outlined by the article did not work until I restarted the avahi-daemon.service on my Linux server, figuring that it may interfere with the Bonjour discovery process when adding the accessory.

Using the WiFi setup of the iPhone to add the Leviton device to the WiFi network definitely works smoother than using the Home app. Here are the steps:

  1. Reset the light switch by pressing and holding the on position of the switch until its LED light switches rapidly from red and amber. This can take more than 10 seconds.
  2. Set the iPhone to the appropriate WiFi network.
  3. Goto the iPhone WiFi menu, and you will the Leviton switch available for adding to the WiFi network. Add this device to the network.
  4. If an error is encountered when adding to the network, then restart the avahi-daemon service (or other mDNS service that may be competing).
  5. Once the switch is added to the network, proceed to add the switch with the Home app.

Apparently there is a firmware update for these switches. However, the update from 1.4.13 to 1.4.32 fail with the Leviton iOS app.

If you are thinking of getting a light switch for your home automation project, I would steer away from these switches!

DIY Garage Stereo with DML Speakers

I wanted music in my garage when I am cleaning my bike or doing some other work. However, I did not want to spend a lot of money but I also wanted to make sure that it sounded okay.

I was couch surfing one day and came across this YouTube video.

YouTube Video: https://youtu.be/CKIye4RZ-5k
YouTube Channel: Tech Ingredients

The video talks about joining audio exciters to extruded polystyrene boards, traditionally used for insulation. I was intrigued.

I purchased a pair of DAEX25TP-4 by Dayton Audio from solen.ca. They look like this:

Dayton Audio DAEX25TP-4

I joined these exciters to FOAMULAR CodeBord Extruded Polystyrene Rigid Insulation which I purchased from Home Depot. I simply purchased a 24″ x 96″ and cut them in half so that I have a pair.

FOAMULAR CodeBord Extruded Polystyrene

Last I bought a cheap Lepy LP-2020A Class-D amplifier.

Lepy LP-2020A

I had an old Airport Express lying around which I can use as my source material by piping Apple Music through it. Here is the end result in my garage.

For less than $100, the sound is loud and good! The low end can be improved with a sub, but I won’t be doing that since this will be rarely used. The next step is to install some shelving and hide the wires so it is more presentable.

NAS RAID-1 Fail

This past weekend my media NAS server was intolerably slow. When I investigated, I found out that one of the RAID-1 partitions is experiencing read errors and is timing out. I decided to risk a reboot and to my surprise the RAID-1 partition did not recover with one fail drive, but mdstat recorded with an inactive status, something like this:

md2 : inactive sdc1[0](S)

After some Google search, I found that I had to do the following to resurrect the md2 device.

madam --stop /dev/md2
mdadm --assemble --force /dev/md2

This reactivated the md2 partition. I replaced the failed drive and re-added the new drive to the md2 device. The RAID-1 partition is now rebuilding.

The inactive state is a new experience for me, so this was a bit of a surprise.

During this exercise I also found out that the SATA connectors on my SATA add-on card were loose causing intermittent connections. I will have to find a way to address this in the future.

Traffic Violation?

This morning on the way to work after picking up breakfast from McDonald’s (the one on 9989 BAYVIEW), I decided that heading East bound on Major Mackenzie from Bayview to Leslie was too busy, so I decided to turn right onto Boake Trail from Major Mackenzie.

After my right turn I was stopped immediately by a police officer. He told me that I was not allowed to turn right.

Since I had a dashcam installed on my car, I replayed the footage and found that there was simply no sign indicating that a right turn is restricted. The matter was even more confusing when there is a dedicated right turn lane. See for yourself below.

Dashcam Video

Also on Google Maps, the no right turn sign is also non-existent.

I decided to contest this matter. I am providing this quick blog entry as near to a contemporaneous note as possible of the event this morning in case I need to refresh my memory three months from now in court.

Update: My sharp eye wife spotted the no-left turn sign beside the traffic lights. So even with the video and Google Map reference I missed it on multiple, post-event analysis. The dedicated right turn lane threw me off and baited me into the turn, an honest mistake.

Old Media Server with OpenVPN

I am in the process of building and configuring a media server for my parents. After my recent media server upgrade, I have extra gear lying around. By purchasing a power supply and a small case, I can cobble together another media server with my old processor and motherboard. I will call this my parent’s media server. The goal is to replace the current Raspberry PI unit that is currently running OSMC acting as their media server. Although the OSMC solution with Raspberry PI has been working really well, it is under powered to play any HEVC encoded video at full 1080p HD resolution.

I wanted to convert the majority of our video media to HEVC simply to save storage space. If I do this with my media library, I will not be able to share our media with them because of their under powered Raspberry PI.

To solve this issue, I installed Ubuntu 18.04 along with Kodi on my parent’s media server that I just created. I have been testing this solution for the past couple of weeks and both the hardware and media player works really well.

I also configured the box to auto mount USB disks, and installed SAMBA so that both videos and music files can be shared with other devices on the same network. The SAMBA is primarily used by my parents with their SONOS speakers.

With this media server at their location, I can also consider future upgrades such as replacing their WiFi network with a Ubiquiti solution, and even ponder on a site-to-site VPN solution with both of our networks.

Perhaps that is looking too far into the future. My immediate concern is how to remotely administer the box. With the Raspberry PI, I just had a simple SSH setup. However with the extra horse power, and a full blown Ubuntu distribution, I can now setup OpenVPN.

I followed these instructions on the DigitalOcean site, and it worked flawlessly. During the setup, I made a major error. I skipped the firewall (ufw) setup on the box, thinking that I don’t need a firewall because an external firewall already exists. However, OpenVPN will not route external traffic to the internal private network if IP masquerading (NAT) is not setup properly. Thanks to a coworker’s advice, I configured the firewall with IP forwarding NAT, but also change all default actions to ACCEPT so that the firewall only function as a NAT router. Lesson learned!

Since this VPN will only be used by me for remote management, I will not configure any HTTPS tunnelling or install and configure ObfsProxy. We will continue to use UDP and stick with the default 1194 port.

We will do some final testing before finally deploying it to my parent’s place.