pc-switch evolves to a product?

Currently looking into how to make the pc-switch a real product. Additionally, there are some software updates for the pc-switch for ESPHome.

pc-switch evolves to a product?
Rendering of old pc-switch version

As you may or may not know, I created the pc-switch a year ago. However, I lost interest since hardware debugging is not something I enjoy.

I completely lost it when I tried to create a version with an external antenna. That tiny 0 Ohm resistor you have to move is beyond my skill.😅

​So the project halted. But I get an email for every new subscriber. And it looked like many of them were coming because of one of the pc-switch articles. About 50 people registered because of the pc-switch. No marketing, no nothing. Is that enough traction? I do not think so, but it is enough to get me thinking. Back in my mind, I always wanted to make this available as a product people can buy. This would be an interesting experiment for me.

So I am trying to beat the game. The game of getting this manufactured, shipped, etc. Figuring all these things out. So I am talking to people and asking around.

Current Progress

I had my first meeting with a company that might help me get this thing real. I got into the next round and preparing for that.

Things I am doing right now:

General questions

  • Design with external antenna. The small onboard WiFi antenna from the D1 mini and alike do not work in a metal case reliably.
  • Do we need an ethernet port?
  • Do we want to have even POE?
  • What about the cost?
  • USB-C Port, because everything else is a hassle these days. For easy flashing and external power if your PC does not have always-on USB power.
  • Use a ESP32 variant instead of the ESP8266
  • Apply for Made for ESPHome
  • Apply, if possible, to be listed here on the Ready-Made Projects for ESPHome

So if you have a minute of your time and you are interested please take the small survey:

pc-switch questionnaire
Just a few questions regarding what you would pay for the pc-switch and if you would like to have ethernet or even POE?

Figure out which ESP32 module to use

There are a couple of ESP32 out there. First, they need to be supported by ESPHome. According to the docs I just have the option of:

  • ESP32 Looks possible.
  • ESP32S2 has no Bluetooth. No Bluetooth means no Made for ESPHome certification AFAIK.
  • ESP32S3 Could be a good choice.
  • ESP32C3 Could be a good choice. Based on riscV.
  • ESP32H2 has no WiFi and is out. Only Thread and Zigbee. Guess this is out for now.

So now I have to choose between the ESP32, ESP32S3, and the ESP32C3​ and then figure out which module. Since maybe not all of them offer a variant with an external antenna. Taking the module with the external antenna means I do not need to do a WiFi certification since that is already done and might be expensive.

If someone has more experience choosing one of these I am open for feedback.

Building the pc-switch website

Just a work in progress. It is a static website with a landing page and then documentation on how to use the pc-switch. This will change a lot I guess.

pc-switch
Documentation about the pc-switch

Software Updates

Last but not least: ESPHome recently added a breaking change that does not allow pin reuse.

So I fixed this by just allowing the double use of the pin in this commit. But that is the wrong approach.

switch:
  - platform: gpio
    pin: 
      number: D6
      allow_other_uses: true
    id: power_switch
    internal: true
    on_turn_on:
    - delay: 300ms
    - switch.turn_off: power_switch

  - platform: gpio
    pin: 
      number: D6
      allow_other_uses: true
    id: power_switch_force
    internal: true
    on_turn_on:
    - delay: 5000ms
    - switch.turn_off: power_switch_force

Wrong approach to fix the double pin error

The better approach is to define the pin once and create a template switch that will allow multiple uses of that switch like in this commit:

switch:
  - platform: gpio
    pin: D6
    id: power_pin
    internal: true

  - platform: template
    name: "Power Switch"
    id: power_switch
    internal: true
    turn_on_action:
      - switch.turn_on: power_pin
      - delay: 300ms
      - switch.turn_off: power_pin

  - platform: template
    name: "Power Switch Force"
    id: power_switch_force
    internal: true
    turn_on_action:
      - switch.turn_on: power_pin
      - delay: 5000ms
      - switch.turn_off: power_pin

I updated all the code for the project and feel free to update your instances:

pc-switch/pc-switch.yaml at main · ajfriesen/pc-switch
esp8266 board to turn on/off your PC with Home Assistant and ESPHome - ajfriesen/pc-switch

❤️ Enjoy the content?

Forward to a friend and let them know where they can subscribe (it is here).

If you are interested in the pc-switch please take a minute and answer a few questions regarding cost, do you want ethernet or even POE?

pc-switch questionnaire
Just a few questions regarding what you would pay for the pc-switch and if you would like to have ethernet or even POE?

Have a great day!