-
-
Notifications
You must be signed in to change notification settings - Fork 870
add new Kogan-Smarterhome-Smart-Power-Board-With-Usb-Ports-Energy-Meter #1506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
splitice
wants to merge
5
commits into
esphome:main
Choose a base branch
from
splitice:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f853d26
add new Kogan-Smarterhome-Smart-Power-Board-With-Usb-Ports-Energy-Meter
splitice a8ea4e0
Update index.md
splitice 4084f84
Update index.md
splitice 472ee03
Apply suggestions from code review
splitice 3295dda
Update index.md
splitice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
218 changes: 218 additions & 0 deletions
218
...es/Kogan-Smarterhome-Smart-Power-Board-With-Usb-Ports-Energy-Meter-Old/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,218 @@ | ||
| --- | ||
| title: Kogan SmarterHome Smart Power Board With USB Ports & Energy Meter | ||
| Model: KASPS10A3P3UA | ||
| date-published: 2020-05-25 | ||
| type: plug | ||
| standard: au | ||
| board: esp8266 | ||
| --- | ||
|  | ||
|
|
||
| [Kogan SmarterHome™ Smart Power Board With USB Ports & Energy Meter - (KASPS10A3P3UA) - Manual](https://help.kogan.com/s/article/KoganSmarterHomeSmartPowerBoardWithUSBPortsEnergyMeterKASPS10A3P3UAManual) | ||
|
|
||
| ## GPIO Pinout | ||
|
|
||
| | Pin | Function | | ||
| |--------|----------------------------| | ||
| | GPIO00 | Push Button | | ||
| | GPIO01 | Green LED (Inverted: true) | | ||
| | GPIO13 | Relay 1 | | ||
| | GPIO14 | Relay 2 | | ||
| | GPIO03 | Relay 3 | | ||
| | GPIO15 | Relay USB | | ||
| | GPIO12 | HLW8012 SEL Pin | | ||
| | GPIO04 | HLW8012 CF Pin | | ||
| | GPIO05 | HLW8012 CF1 Pin | | ||
|
|
||
| **Note:** In the below configuration, the push button (and surrounding LED) is configured to only control Relay 3 (End Plug) | ||
|
|
||
| ## Basic Config | ||
|
|
||
| ```yaml | ||
| substitutions: | ||
| device_name: kogan_strip_1 | ||
| device_ip: 192.168.x.x | ||
| plug_icon: mdi:power-socket-au | ||
| usb_icon: mdi:usb-port | ||
| plug1_restore: ALWAYS_ON | ||
| plug2_restore: ALWAYS_OFF | ||
| plug3_restore: ALWAYS_OFF | ||
| usb_restore: ALWAYS_ON | ||
|
|
||
| # Higher value gives lower watt readout | ||
| current_res: "0.00250" | ||
| # Lower value gives lower voltage readout | ||
| voltage_div: "799" | ||
|
|
||
| esphome: | ||
| name: ${device_name} | ||
|
|
||
| esp8266: | ||
| board: esp8285 | ||
|
|
||
| wifi: | ||
| ssid: !secret wifi_ssid | ||
| password: !secret wifi_password | ||
|
|
||
| logger: | ||
|
|
||
| api: | ||
| reboot_timeout: 15min | ||
| encryption: | ||
| key: !secret encryption_key | ||
|
|
||
| ota: | ||
| password: !secret ota_password | ||
|
|
||
| binary_sensor: | ||
| - platform: gpio | ||
| pin: | ||
| number: GPIO0 | ||
| mode: INPUT_PULLUP | ||
| inverted: true | ||
| name: "${device_name}_button" | ||
| on_multi_click: | ||
| - timing: | ||
| - ON for 5ms to 350ms | ||
| - OFF for at least 750ms | ||
| then: | ||
| - switch.toggle: relayusb | ||
| - timing: | ||
| - ON for 5ms to 350ms | ||
| - OFF for 5ms to 350ms | ||
| - ON for 5ms to 350ms | ||
| - OFF for at least 750ms | ||
| then: | ||
| - switch.toggle: relay1 | ||
| - timing: | ||
| - ON for 5ms to 350ms | ||
| - OFF for 5ms to 350ms | ||
| - ON for 5ms to 350ms | ||
| - OFF for 5ms to 350ms | ||
| - ON for 5ms to 350ms | ||
| - OFF for at least 750ms | ||
| then: | ||
| - switch.toggle: relay2 | ||
| - timing: | ||
| - ON for 5ms to 350ms | ||
| - OFF for 5ms to 350ms | ||
| - ON for 5ms to 350ms | ||
| - OFF for 5ms to 350ms | ||
| - ON for 5ms to 350ms | ||
| - OFF for 5ms to 350ms | ||
| - ON for 5ms to 350ms | ||
| - OFF for at least 750ms | ||
| then: | ||
| - switch.toggle: relay3 | ||
|
|
||
| - platform: status | ||
| name: "${device_name}_status" | ||
|
|
||
| light: | ||
| - platform: status_led | ||
| id: green_led | ||
| pin: | ||
| number: GPIO1 | ||
| inverted: true | ||
|
|
||
| switch: | ||
| - platform: gpio | ||
| name: "${device_name}_plug1" | ||
| pin: GPIO13 | ||
| id: relay1 | ||
| icon: ${plug_icon} | ||
| restore_mode: ${plug1_restore} | ||
|
|
||
| - platform: gpio | ||
| name: "${device_name}_plug2" | ||
| pin: GPIO14 | ||
| id: relay2 | ||
| icon: ${plug_icon} | ||
| restore_mode: ${plug2_restore} | ||
|
|
||
| - platform: gpio | ||
| name: "${device_name}_plug3" | ||
| pin: GPIO3 | ||
| id: relay3 | ||
| icon: ${plug_icon} | ||
| restore_mode: ${plug3_restore} | ||
| on_turn_on: | ||
| - light.turn_on: green_led | ||
| on_turn_off: | ||
| - light.turn_off: green_led | ||
|
|
||
| - platform: gpio | ||
| name: "${device_name}_usb" | ||
| pin: GPIO15 | ||
| id: relayusb | ||
| icon: ${usb_icon} | ||
| restore_mode: ${usb_restore} | ||
|
|
||
| sensor: | ||
| - platform: hlw8012 | ||
| sel_pin: | ||
| number: GPIO12 | ||
| inverted: true | ||
| cf_pin: GPIO04 | ||
| cf1_pin: GPIO05 | ||
| current: | ||
| name: "${device_name}_current" | ||
| unit_of_measurement: A | ||
| voltage: | ||
| name: "${device_name}_voltage" | ||
| unit_of_measurement: V | ||
| power: | ||
| id: ${device_name}_wattage | ||
| name: "${device_name}_wattage" | ||
| unit_of_measurement: W | ||
| current_resistor: ${current_res} | ||
| voltage_divider: ${voltage_div} | ||
| change_mode_every: 8 | ||
| update_interval: 15s | ||
|
|
||
| - platform: total_daily_energy | ||
| name: "${device_name}_daily_energy" | ||
| power_id: ${device_name}_wattage | ||
| filters: | ||
| - multiply: 0.001 | ||
| unit_of_measurement: kWh | ||
|
|
||
| - platform: wifi_signal | ||
| name: "${device_name}_rssi" | ||
| update_interval: 5min | ||
|
|
||
| - platform: uptime | ||
| id: uptime_sec | ||
| name: "${device_name}_uptime" | ||
| update_interval: 5min | ||
|
|
||
| text_sensor: | ||
| - platform: template | ||
| name: "${device_name}_upformat" | ||
| lambda: |- | ||
| uint32_t dur = id(uptime_sec).state; | ||
| int dys = 0; | ||
| int hrs = 0; | ||
| int mnts = 0; | ||
| if (dur > 86399) { | ||
| dys = trunc(dur / 86400); | ||
| dur = dur - (dys * 86400); | ||
| } | ||
| if (dur > 3599) { | ||
| hrs = trunc(dur / 3600); | ||
| dur = dur - (hrs * 3600); | ||
| } | ||
| if (dur > 59) { | ||
| mnts = trunc(dur / 60); | ||
| dur = dur - (mnts * 60); | ||
| } | ||
| char buffer[17]; | ||
| sprintf(buffer, "%ud %02uh %02um %02us", dys, hrs, mnts, dur); | ||
| return {buffer}; | ||
| icon: mdi:clock-start | ||
| update_interval: 5min | ||
|
|
||
| time: | ||
| - platform: homeassistant | ||
| id: homeassistant_time | ||
| ``` | ||
Binary file added
BIN
+13.8 KB
...y-Meter-Old/kogan-smarterhome-smart-power-board-with-usb-ports-energy-meter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This archived configuration includes secret references beyond the allowed WiFi secrets (e.g.,
!secret encryption_keyand!secret ota_password). Device-page examples should not require secrets other thanwifi_ssid/wifi_password; please remove these and present a config that can compile without extra secrets.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This guide can be deleted if deemed so. I've just archived it as is.