aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKaufman Home Automation <[email protected]>2022-03-18 17:18:54 -0700
committerGitHub <[email protected]>2022-03-18 17:18:54 -0700
commitf238ae7e1ad0104769f5217c2d14f1bfac5bf16f (patch)
treee9ce05e8028a4480658f0f1088b726850567c717
parent7907ed4e94ff755d9dbf6bbf7ec69d60b40cb696 (diff)
downloadPLF10-f238ae7e1ad0104769f5217c2d14f1bfac5bf16f.tar.gz
PLF10-f238ae7e1ad0104769f5217c2d14f1bfac5bf16f.zip
Delete config-update directory
-rw-r--r--config-update/kauf-plug-update.yaml133
-rw-r--r--config-update/webserver-v1.min.css2
-rw-r--r--config-update/webserver-v1.min.js1
3 files changed, 0 insertions, 136 deletions
diff --git a/config-update/kauf-plug-update.yaml b/config-update/kauf-plug-update.yaml
deleted file mode 100644
index e31c80e..0000000
--- a/config-update/kauf-plug-update.yaml
+++ /dev/null
@@ -1,133 +0,0 @@
-packages:
- kauf_plug_base:
- url: https://github.com/KaufHA/PLF10
- files: kauf-plug.yaml
- refresh: 0s
-
-
-dashboard_import:
- package_import_url: github://KaufHA/PLF10/kauf-plug.yaml
-
-
-substitutions:
-
- # use hold instead of press for toggle action
- sub_on_press: script_timer_start
- sub_on_release: script_timer_stop
- sub_on_release_quick: script_toggle
- sub_on_release_short: script_toggle
-
-
-esphome:
- name_add_mac_suffix: true
-
- # overwrite project for different letter suffix
- project:
- name: "kauf.plf10"
- version: "1.86(u)" # 'u' stands for update bin file
-
- on_boot:
- then:
-
- # wait until ESPHome tries loading wifi credentials
- - wait_until:
- lambda: 'return ( wifi_wificomponent->tried_loading_creds );'
-
- # enable AP if credentials couldn't be loaded or force_ap is set
- - lambda: |-
- if ( !wifi_wificomponent->loaded_creds || id(force_ap) ) {
- ESP_LOGD("KAUF on_boot","------------------->>>>>>>>>>>>>>>>> wifi not configured, enabling ap and waiting");
- wifi_wificomponent->set_ap_timeout(15000);
- }
-
- - wait_until: # wait until wifi connects
- wifi.connected
- - globals.set: # clear global so ap doesn't come back up next time
- id: force_ap
- value: 'false'
-
- # set ap timeout to max 32 bit value in milliseconds. About 3.5 weeks.
- - lambda: |-
- ESP_LOGD("KAUF on_boot","------------------->>>>>>>>>>>>>>>>> wifi connected, cranking ap timeout back up");
- wifi_wificomponent->set_ap_timeout(2147483647);
-
-
-globals:
- - id: force_ap
- type: bool
- restore_value: yes
- initial_value: "true"
-
-
-# re-adding wifi component so that hotspot will be enabled
-wifi:
-
- # enable wifi ap, which was not needed in dashboard import version
- ap:
- ssid: ${friendly_name} Hotspot
- ap_timeout: 2147483647ms # maximum 32 bit value. About 3.5 weeks in milliseconds.
-
- # by default, fast_connect is disabled. Will automatically be enabled by wifi component
- # needs to be set false here as dashboard import version sets true
- fast_connect: false
-
- # add forced hash which isn't needed for dashboard import. Allows saving wifi credentials across update.
- forced_hash: 1432266978
-
-
-captive_portal: # for fallback wifi hotspot
-
-
-web_server:
- # host css and js file directly on device
- css_include: "webserver-v1.min.css"
- css_url: ""
- js_include: "webserver-v1.min.js"
- js_url: ""
-
-
-
-script:
-
- - id: script_force_ap
- then:
- - logger.log: "------------------->>>>>>>>>>>>>>>>> HELD BUTTON 5 SECONDS, FORCING AP"
-
- # blink LED for 10s then restart to get captive portal to turn on.
- - globals.set:
- id: force_ap
- value: 'true'
- - script.execute: blink_led
- - delay: 10s
-
- # we have to restart because ESPHome's AP won't show the captive portal once wifi has been connected.
- - button.press: restart_button
-
- # blink LED forever. Used when button is held to re-enable AP. Stops blinking because plug restarts.
- - id: blink_led
- mode: queued
- then:
- - switch.toggle: blue_led
- - delay: 333ms
- - script.execute: blink_led
- # clear wifi credentials and reboot. causes AP to be enabled.
-
- - id: script_timer_start
- then:
- - delay: 5s
- - script.execute: script_force_ap
- - id: script_timer_stop
- then:
- - script.stop: script_timer_start
-
-button:
- - platform: template
- id: clear_wifi_button
- name: $friendly_name Clear Wifi Credentials
- entity_category: diagnostic
- disabled_by_default: true
- on_press:
- then:
- - lambda: 'wifi_wificomponent->clear_stored_creds();'
- - delay: 2s
- - button.press: restart_button
diff --git a/config-update/webserver-v1.min.css b/config-update/webserver-v1.min.css
deleted file mode 100644
index 3b4c2c5..0000000
--- a/config-update/webserver-v1.min.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Based off of https://github.com/sindresorhus/github-markdown-css */
-.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.5;color:#24292e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body a{background-color:transparent}.markdown-body a:active,.markdown-body a:hover{outline-width:0}.markdown-body strong{font-weight:bolder}.markdown-body h1{font-size:2em;margin:0.67em 0}.markdown-body img{border-style:none}.markdown-body pre{font-family:monospace,monospace;font-size:1em}.markdown-body hr{box-sizing:content-box;height:0;overflow:visible}.markdown-body input{font:inherit;margin:0}.markdown-body input{overflow:visible}.markdown-body [type="checkbox"]{box-sizing:border-box;padding:0}.markdown-body *{box-sizing:border-box}.markdown-body input{font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body a{color:#0366d6;text-decoration:none}.markdown-body a:hover{text-decoration:underline}.markdown-body strong{font-weight:600}.markdown-body hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border:0;border-bottom:1px solid #dfe2e5}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse}.markdown-body td,.markdown-body th{padding:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:0;margin-bottom:0}.markdown-body h1{font-size:32px;font-weight:600}.markdown-body h2{font-size:24px;font-weight:600}.markdown-body h3{font-size:20px;font-weight:600}.markdown-body h4{font-size:16px;font-weight:600}.markdown-body h5{font-size:14px;font-weight:600}.markdown-body h6{font-size:12px;font-weight:600}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0}.markdown-body ul,.markdown-body ol{padding-left:0;margin-top:0;margin-bottom:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0!important}.markdown-body>*:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre{margin-top:0;margin-bottom:16px}.markdown-body hr{height:0.25em;padding:0;margin:24px 0;background-color:#e1e4e8;border:0}.markdown-body blockquote{padding:0 1em;color:#6a737d;border-left:0.25em solid #dfe2e5}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1{padding-bottom:0.3em;font-size:2em;border-bottom:1px solid #eaecef}.markdown-body h2{padding-bottom:0.3em;font-size:1.5em;border-bottom:1px solid #eaecef}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:0.875em}.markdown-body h6{font-size:0.85em;color:#6a737d}.markdown-body ul,.markdown-body ol{padding-left:2em}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li{word-wrap:break-all}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:0.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table{display:block;width:100%;overflow:auto}.markdown-body table th{font-weight:600}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid #dfe2e5}.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body img{max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px;word-wrap:normal}.markdown-body:checked+.radio-label{position:relative;z-index:1;border-color:#0366d6}.markdown-body hr{border-bottom-color:#eee}#log .v{color:#888}#log .d{color:#0DD}#log .c{color:magenta}#log .i{color:limegreen}#log .w{color:yellow}#log .e{color:red;font-weight:bold}#log{background-color:#1c1c1c} \ No newline at end of file
diff --git a/config-update/webserver-v1.min.js b/config-update/webserver-v1.min.js
deleted file mode 100644
index fe912ba..0000000
--- a/config-update/webserver-v1.min.js
+++ /dev/null
@@ -1 +0,0 @@
-const source=new EventSource("/events");source.addEventListener("log",function(t){const e=document.getElementById("log");let n=[["","e"],["","w"],["","i"],["","c"],["","d"],["","v"]],o="";for(const e of n)t.data.startsWith(e[0])&&(o=e[1]);""==o&&(e.innerHTML+=t.data+"\n"),e.innerHTML+='<span class="'+o+'">'+t.data.substr(7,t.data.length-11)+"</span>\n"}),actions=[["switch",["toggle"]],["light",["toggle"]],["fan",["toggle"]],["cover",["open","close"]],["button",["press"]],["lock",["lock","unlock","open"]]],multi_actions=[["select","option"],["number","value"]],source.addEventListener("state",function(t){const e=JSON.parse(t.data);document.getElementById(e.id).children[1].innerText=e.state});const states=document.getElementById("states");let row,i=0;for(;row=states.rows[i];i++)if(row.children[2].children.length){for(const t of actions)if(row.classList.contains(t[0])){let e=row.id.substr(t[0].length+1);for(let n=0;n<row.children[2].children.length&&n<t[1].length;n++)row.children[2].children[n].addEventListener("click",function(){const o=new XMLHttpRequest;o.open("POST","/"+t[0]+"/"+e+"/"+t[1][n],!0),o.send()})}for(const t of multi_actions)if(row.classList.contains(t[0])){let e=row.id.substr(t[0].length+1);row.children[2].children[0].addEventListener("change",function(){const n=new XMLHttpRequest;n.open("POST","/"+t[0]+"/"+e+"/set?"+t[1]+"="+encodeURIComponent(this.value),!0),n.send()})}} \ No newline at end of file