Customizing My iPad Magic Keyboard Case w/ the WordPress Logo

The over priced magic keyboard case is great in nearly every way. It’s a solid protective case, easy to take the iPad off of, always around the iPad for the times I do need to type, great keyboard to dock on.. it’s all the things. Except I find it hard to open. I fumble 9/10 times to open it. Without a cutout groove like the macbook, the hardest part, for me, is knowing which side is up by feel, so I know which side has the weight (as it‘s counter intuitive to and very different than macbooks we’re all used to), for which direction to force.

Pick a side any side *rolls the dice

I know, I know, there’s a giant cut out for the camera to the top iPad side, so that’s the indication thats heavy side, as well the impressions with the Apple logo and bend seams. But that just isn’t enough for me and my brain, for whatever reason.. even after a month of heavy use. Out of frustration, I nearly wrote “iPad” and “keyboard” on the two sides with a white acrylic pen, but opted to just go with a less obvious indicator, a sticker instead.

The stickers I had on hand were from work, WordPress VIP, which is a beautiful graphic that encompasses WordPress well, it’s a great sticker and has meaning close to my heart – however it just wasn’t the right fit, the black was glossy instead of matte, and it didn’t play nice covering the embossed Apple logo:

I thought about ordering developer stickers (you know the style) and putting a bunch on, but just felt weird and inauthentic buying them outright instead of collecting them from conventions and things like that (something, something, COVID). I then thought it’d be cool to use that acryclic pen for just the “W” WordPress logo, but I was fearful as I don’t have steady enough hands for that, even when tracing. So I thought about stencilling, and that’s when I remembered I own a 3d printer, am capable of creating things in CAD and have lots of spray paint!

Gearing up to design the ”W“ logo, I headed to thingiverse.com first, just in case someone could save me the time, and wouldn’t you know it. The logo, in the cutout I wanted, was already made perfectly for a two colour coaster:

I took it into Cura, scaled it to the size I wanted for the 11” case adjusting the width and hight and lowering the depth a bit, and started printing the free design with $0.09 of material:

Beautiful logo. I tell ya, this thing looks great on it’s own.
Good size. I should of printed a nub to help peal it off when paint is on it, but I’ll manage w/ a pair of tweezers.

With the stencil printed, I grabbed a can of spray paint and headed outside. I practised the shot many times before on cardboard to ensure I got the distance and angles right.

Then after carefully finding centre, ensuring I had the right side or orientation, second guessing myself, then finding perfectly the centre again, I hit it with a splash of spray paint, and Voila:

I sprayed way too close and pooled the paint. Gahh, life needs a undo button. However, I think I got it looking alright:

It’s a bit blotchy right now, I may end up roughing it up a bit with sand paper. I imagine this well wear well overtime. In retrospect as I see the image of the stencil on the case, I think I should of taken the time to design the inverse of this for that cleaner logo look instead of the silhouette/blast look – but, I’m happy with it.

I now clearly know which side is up, and customized my stuff with the best logo, that means the most to me: WordPress has been at the centre of my life in the centre of my career for well over a dozen years it’s been putting food on my table for me and my family, I’m proud to have this logo on my gear.

Update:

Much like a regrettable tattoo, I began to dislike the blast/silhouette look on this more and more each day. It was a bit extreme for me and my modest iPad. I wanted just the logo itself, in a more subtle/clean look. So I found lifes undo button and just sanded it off:

Whatever silicon/plastic/magic material this is made off, it held up well to sanding. Looked no worse off once completed.

I then designed a stencil for just the logo, opening up Shapr3d I cut out the logo and built some scaffolding to hold the floating pieces in place.

I’ve shared this stencil here: https://www.thingiverse.com/thing:4720428

To my surprise, it printed well enough, as I hadn’t done overhangs without supports like this before but it printed just fine:

After centering, masking, and painting (lightly this time, to avoid pooling) I finally got the look I was after:

Much better. No more obnoxious ‘blast’. Admittedly, the lines aren’t as clean as I had hoped for, I may of been able to get it a bit cleaner by pushing down on the stencil while spraying, but I think it still looks good and will wear well.

Building a Sleep Training Light with ESP8266, ESPHome, & Home Assistant

My kids, specifically the eldest, loves to wake up before 7. My wife and I, do not like to wake up before 7. My kids can’t read the time yet or understand why every month the sun seems gets up at a different time.

Our solution to help stop this was a sleep training clock: a visual way to differentiate sleeping time with awake time. Online they run about $40 and, in my opinion, are just over the top with features and buttons. A simple scheduled LED was all we were after. So I built one with an esp8266, ESPHome, & HomeAssistant:

Requirements:

Wiring it Together

I’ve just moved to using an iPad as my primary personal computer so I no longer have Fritzing, so my crude drawing in Notes.app will have to do:

Common anaode RGB wiring to an ESP8266, pins D5, D6, D7.

Setting up ESPHome Module

In Home Assistant follow the ESPHome Add Module wizard filling in info about your ESPHome and WIFI networking settings. Editing the file once complete, mine looks like:

esphome:
  name: sleep_training_light
  platform: ESP8266
  board: esp12e

wifi:
  ssid: !secret wifi_name
  password: !secret wifi_pass
  manual_ip:
    static_ip: !secret sleep_training_light_ip
    gateway: !secret ip_gateway
    subnet: !secret ip_subnet

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "sleep-training-light"
    password: !secret fallback_pass

# LED
# @see https://community.home-assistant.io/t/inverse-rgb-led-values/170069/3
# common Anode
light:
  - platform: rgb
    name: "Sleep Training Light"
    red: output_red
    green: output_green
    blue: output_blue  
    
output:
  - platform: esp8266_pwm
    id: output_red
    #D6
    pin: GPIO12
    inverted: true
  - platform: esp8266_pwm
    id: output_green
    #D7
    pin: GPIO13
    inverted: true
  - platform: esp8266_pwm
    id: output_blue
    #D5
    pin: GPIO14
    inverted: true

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret api_pass

ota:
  password: !secret ota_pass

Add to HA

Home Assistants notification area should alert you to the new ESPHome device. You can add this entity.

Automation

At time of writing, I found the Confugration > Automattions area of Home Assistant a bit buggy, I ended up mostly setting up the automation via the File Editor. Here’s why my /config/automations.yaml looks like:

- id: sleep_training_light_night
  alias: Sleep Training Light -> Night
  description: ''
  trigger:
  - platform: time
    at: '20:00:00'
  action:
  - data:
      brightness: 80
      entity_id:
      - light.sleep_training_light
      rgb_color:
      - 162
      - 116
      - 255
    service: light.turn_on
    entity_id: light.sleep_training_light
  mode: single
- id: sleep_training_light_wakeup
  alias: Sleep Training Light -> Wake Up
  description: ''
  trigger:
  - at: 07:00:00
    platform: time
  action:
  - data:
      brightness: 0
      entity_id:
      - light.sleep_training_light
      rgb_color:
      - 0
      - 0
      - 0
    entity_id: light.sleep_training_light
    service: light.turn_on
  mode: single

This turns on the light at 8:00pm, and turns off the light at 7:00am.

Case

I designed a custom case (will update this post with a link to the thingiverse.com design shortly) for another project (IR Blaster) and reused it for this one, however I printed with clear filament and kept the RGB LED inside, giving the box a nice glow: