{"id":17085653,"url":"https://github.com/cbpowell/espsense","last_synced_at":"2025-04-12T21:07:53.608Z","repository":{"id":47145557,"uuid":"286911254","full_name":"cbpowell/ESPSense","owner":"cbpowell","description":"Use ESPHome to emulate TP-Link Kasa HS110 plugs, and report energy usage to your Sense Home Energy Monitor  (or anything else on your network!) via ESP8266/ESP32 devices","archived":false,"fork":false,"pushed_at":"2023-11-04T19:31:56.000Z","size":52,"stargazers_count":47,"open_issues_count":0,"forks_count":16,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-12T21:07:29.494Z","etag":null,"topics":["energy-monitor","esp32","esp8266","esphome","report-energy","sense","sensor"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbpowell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-12T03:56:48.000Z","updated_at":"2025-04-10T20:45:34.000Z","dependencies_parsed_at":"2024-11-07T16:03:13.008Z","dependency_job_id":"9b8f0572-c697-4e79-99ef-78dfa1eeea27","html_url":"https://github.com/cbpowell/ESPSense","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbpowell%2FESPSense","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbpowell%2FESPSense/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbpowell%2FESPSense/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbpowell%2FESPSense/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbpowell","download_url":"https://codeload.github.com/cbpowell/ESPSense/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631677,"owners_count":21136562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["energy-monitor","esp32","esp8266","esphome","report-energy","sense","sensor"],"created_at":"2024-10-14T13:25:33.145Z","updated_at":"2025-04-12T21:07:53.577Z","avatar_url":"https://github.com/cbpowell.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESPSense\nUse ESPHome to create virtual TP-Link Kasa HS110 plugs, that report energy usage to your Sense Home Energy Monitor\n\nSimilar to the [SenseLink](https://github.com/cbpowell/SenseLink) project, ESPSense is an [ESPHome](https://esphome.io) custom component that emulates the protocol of [TP-Link Kasa HS110](https://www.tp-link.com/us/home-networking/smart-plug/hs110/) energy monitoring plugs. This lets you use your own ESP devices to report energy usage **directly** to your [Sense Home Energy Monitor](https://sense.com/)!\n\n**You should use this tool at your own risk!** Sense is not obligated to provide any support related to issues with this project, and there's no guarantee everything will reliably work, or even work at all. Neither I or Sense can guarantee it won't affect your Sense data, particularly if things go wrong!\n\n# Confirmed Compatible Smart Plugs\nOne of the more useful cases is flashing other (commercial) energy-monitoring smart plugs with ESPHome, and then using them with ESPSense with no other integration required. Check out [the wiki](https://github.com/cbpowell/ESPSense/wiki) for details on confirmed \"conversions\" of other plugs, and an [OTA flash guide](https://github.com/cbpowell/ESPSense/wiki/Flashing-ESPHome-via-OTA)!\n\nThe focus on the wiki is for plugs that are re-flashable \"over the air\" for simplicity, but if you're comfortable with soldering (and opening the plug) there are  an incredible number of compatible plugs/devices compatible with ESPHome.\n\n# Usage\nModify/create your ESPHome YAML definition to include:\n1. an `external_component` directive, that specifies this component\n2. a top level `espsense` directive, to configure the ESPSense component by specifying which ESPHome sensor(s) to utilize for power data for each plug (note: these can also be [template sensors](https://esphome.io/components/sensor/template.html) that return a wattage value!)\n\nFrom the included example YAML file:\n\n```yaml\nexternal_components:\n  # Pull the esphome component in from this GitHub repo\n  - source: github://cbpowell/ESPSense\n    components: [ espsense ]\n\n# Template sensor as an example\nsensor:\n  - platform: template\n    name: Test Sensor\n    id: test_sensor\n    unit_of_measurement: W\n  \nespsense:\n  # You can define up to 10 \"plugs\" to report to Sense\n  # Power value can come from any of the following:\n  #   * A power sensor (in Watts)\n  #   * Calculated from a current sensor (in Amps) and a voltage sensor (in Volts)\n  #   * Calculated from a current sensor (in Amps) and a fixed voltage value\n  plugs:\n    - name: espsense\n      power_sensor: test_sensor\n      # current_sensor: some_current_sensor\n      # voltage_sensor: some_voltage_sensor\n      # voltage: 120.0\n      # encrypt: false\n      # mac_address: 35:4B:91:A1:FE:CC\n```\n### Power Sensor\nNote that whatever sensor you tell ESPSense to monitor is assumed to report a **state in the units of watts!** If you want to report the power usage of a device indirectly (such as scaled on another parameter, or simply if on or off), you'll need to create a template sensor in ESPHome to calculate/report the wattage.\n\n### MAC Address\nBy default, the first plug defined will use the hardware MAC address of your device, if no MAC is explicitly configured. If additional plugs are defined (on the same hardware device) and no specific MAC is configured for those, a MAC address will be automatically generated for each from a hash of the provided plug name.\n\n### Voltage and Current\nSense does not currently care about plug voltage or current readings, but this is implemented to support data collection by things other than Sense, or in case Sense does eventually implement it!\n\n### Encryption\nTP-Link plugs use a light \"encryption\" of the transmitted data, and the Sense monitor does expect to receive the data in encrypted form, so generally you will want to leave the `encrypt` setting as default (true). However you can specify to disable encryption if desired, which could be utilize for your own custom data collection approaches.\n\n\nCopyright 2020, Charles Powell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbpowell%2Fespsense","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbpowell%2Fespsense","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbpowell%2Fespsense/lists"}