Compare commits
No commits in common. "main" and "gh-pages" have entirely different histories.
|
|
@ -1,2 +0,0 @@
|
|||
ko_fi: ajfriesen
|
||||
custom: ["https://www.ajfriesen.com/#/portal"]
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
name: Build Binary
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: pc-switch.yaml
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
docs/public
|
||||
docs/resources/
|
||||
docs/node_modules/
|
||||
docs/package-lock.json
|
||||
docs/.hugo_build.lock
|
||||
21
LICENSE.md
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Andrej Friesen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
29
README.md
|
|
@ -1,29 +0,0 @@
|
|||
# pc-switch
|
||||
|
||||
Remote shutdown and start you PC/server with Home Assistant.
|
||||
|
||||
Powered by ESPHome.
|
||||
|
||||

|
||||
|
||||
Just connect your power, reset and power led front panel connector to appropriate pin pairs, power the ESP8266 and you can turn on and off your PC via Home Assistant.
|
||||
|
||||
## Use cases
|
||||
|
||||
- Hide your PC in a closet or on a shelf without the need to press the actual button. You can just connect any other button via home assistant
|
||||
- Setup automation based on time, motion or the moon phase, or whatever you like to power on your PC
|
||||
- No funky magic packets anymore with flaky wake on LAN (never worked for me)
|
||||
- No addons with admin access (password) to your Windows PC
|
||||
- Add voice commands via Home Assistant to Google Assistant
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
# Project Documentation
|
||||
|
||||
You can find all product documentation, related blog post on my dedicated [pc-switch website](https://www.ajfriesen.com/pc-switch/).
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 180 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – Categories</title><link>https://ajfriesen.github.io/pc-switch/categories/</link><description>Recent content in Categories on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/categories/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – Community</title><link>https://ajfriesen.github.io/pc-switch/community/</link><description>Recent content in Community on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/community/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
/* PrismJS 1.28.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+csharp+cpp+go+java+markdown+python+scss+sql+toml+yaml&plugins=toolbar+copy-to-clipboard */
|
||||
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
|
||||
div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;z-index:10;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – Contribution Guidelines</title><link>https://ajfriesen.github.io/pc-switch/docs/contribution-guidelines/</link><description>Recent content in Contribution Guidelines on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/docs/contribution-guidelines/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – How to build the pc-switch</title><link>https://ajfriesen.github.io/pc-switch/docs/how-to-build/</link><description>Recent content in How to build the pc-switch on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/docs/how-to-build/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
|
After Width: | Height: | Size: 180 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – Documentation</title><link>https://ajfriesen.github.io/pc-switch/docs/</link><description>Recent content in Documentation on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/docs/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – Overview</title><link>https://ajfriesen.github.io/pc-switch/docs/overview/</link><description>Recent content in Overview on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/docs/overview/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – Similar Products</title><link>https://ajfriesen.github.io/pc-switch/docs/similiar-products/</link><description>Recent content in Similar Products on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/docs/similiar-products/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 980 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 498 B |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 807 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "pc-switch",
|
||||
"version": "1.0.0",
|
||||
"home_assistant_domain": "esphome",
|
||||
"funding_url": "https://www.ajfriesen.com/#/portal/signup/",
|
||||
"builds": [
|
||||
{
|
||||
"chipFamily": "ESP8266",
|
||||
"parts": [
|
||||
{ "path": "firmware.bin", "offset": 0 }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 137 KiB |
BIN
images/v1.0.jpg
|
Before Width: | Height: | Size: 629 KiB |
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – pc-switch</title><link>https://ajfriesen.github.io/pc-switch/</link><description>Recent content on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
if (typeof Storage !== 'undefined') {
|
||||
const activeLanguage = localStorage.getItem('active_language');
|
||||
if (activeLanguage) {
|
||||
document
|
||||
.querySelectorAll('.persistLang-' + activeLanguage)
|
||||
.forEach((element) => {
|
||||
$('#' + element.id).tab('show');
|
||||
});
|
||||
}
|
||||
}
|
||||
function persistLang(language) {
|
||||
if (typeof Storage !== 'undefined') {
|
||||
localStorage.setItem('active_language', language);
|
||||
document.querySelectorAll('.persistLang-' + language)
|
||||
.forEach((element) => {
|
||||
$('#' + element.id).tab('show');
|
||||
});
|
||||
}
|
||||
}
|
||||
116
pc-switch.yaml
|
|
@ -1,116 +0,0 @@
|
|||
substitutions:
|
||||
name: "pc"
|
||||
uppercase_name: "PC"
|
||||
|
||||
|
||||
esphome:
|
||||
name: "${name}"
|
||||
platform: ESP8266
|
||||
board: nodemcuv2
|
||||
|
||||
project:
|
||||
name: "ajfriesen.pc-switch"
|
||||
version: "1.0.1"
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
dashboard_import:
|
||||
package_import_url: github://ajfriesen/pc-switch/pc-switch.yaml@main
|
||||
|
||||
# Put ota password here
|
||||
ota:
|
||||
|
||||
# Your wifi config
|
||||
wifi:
|
||||
# ssid: ""
|
||||
# password: ""
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "PC-Switch Fallback Hotspot"
|
||||
password: "fallback-wifi"
|
||||
|
||||
captive_portal:
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "pc-switch WiFi Signal"
|
||||
update_interval: 60s
|
||||
|
||||
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
|
||||
|
||||
- platform: gpio
|
||||
pin: D7
|
||||
id: reset_pin
|
||||
internal: true
|
||||
|
||||
- platform: template
|
||||
name: "Reset Switch"
|
||||
id: reset_switch
|
||||
internal: true
|
||||
turn_on_action:
|
||||
- switch.turn_on: reset_pin
|
||||
- delay: 300ms
|
||||
- switch.turn_off: reset_pin
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: D0
|
||||
id: pc_power_sensor
|
||||
name: "${name} Power State"
|
||||
device_class: power
|
||||
icon: "mdi:desktop-classic"
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: "${name} Power Button"
|
||||
id: power_button
|
||||
icon: "mdi:power-standby"
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle: power_switch
|
||||
|
||||
- platform: template
|
||||
name: "${name} Force Power Off"
|
||||
id: force_power_off
|
||||
icon: "mdi:power-plug-off"
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle: power_switch_force
|
||||
|
||||
- platform: template
|
||||
name: "${name} Reset Button"
|
||||
id: reset_button
|
||||
icon: "mdi:restart"
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle: reset_switch
|
||||
|
|
@ -0,0 +1 @@
|
|||
User-agent: *
|
||||
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://ajfriesen.github.io/pc-switch/docs/overview/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/docs/how-to-build/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/docs/contribution-guidelines/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/docs/similiar-products/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/docs/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/categories/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/community/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/search/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/tags/</loc></url><url><loc>https://ajfriesen.github.io/pc-switch/web-flasher/</loc></url></urlset>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – Tags</title><link>https://ajfriesen.github.io/pc-switch/tags/</link><description>Recent content in Tags on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/tags/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-switch – ESP Web Tools installer</title><link>https://ajfriesen.github.io/pc-switch/web-flasher/</link><description>Recent content in ESP Web Tools installer on pc-switch</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://ajfriesen.github.io/pc-switch/web-flasher/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||