On the upside, doing this math on the server meant data in progress will be tracked and saved in a real database, kept on a real storage device instead of fragile flash memory. Much like our Split Single Phase Energy Meter, the 6 channel energy meter uses curr. restore_mode: ALWAYS_ON The rest are pre-adjustment current wrong. pin: GPIO1 on_turn_on: This will download the .bin firmware file to your computer. Does your Update 2019-06 Preventative measures mean I cant flash any plug with tuya convert anymore? The logs will display Wi-Fi strength and connection status. This is a pure resistive (500Watt-ish) load and the Meter is an in-line ammeter This may take some time to complete. Add at least 10 values and then find the average. However, these now seem to be shipped with updated firmware that is not yet supported by tuya-convert. name: ${plug_name}_Relay # Enable Home Assistant API platform: gpio sensor: In order to avoid getting flooded with data, we can use ESPHome sensor filters to aggregate data points. power_id: energie_wasmachine_Wattage Installation on a RPI3 B. Logs show no errors, but the communication is never started. Did you by chance try the plug in the Tuya App? Ive got one that I purchased december 2018 and never connected to the app. In this guide, you will learn to build a smart energy monitor or smart electricity meter from scratch using the ESP8266 module, such as NodeMCUAnd the ESP32, or D1 MiniAnd the SCT013Non-invasive AC sensor. Special mention to @cantavro for his contribution to pay for the materials. To learn more, see the Power Management section of the Home Assistant documentation. You can get this real value from your electricity meter. Once that is uploaded and active I advise you to do some calibration with an external meter. In this video we are going to upload the actual config we are going to use in ESPhome, calibrate the energy meter and then make it available in Home Assistant and build a simple graph, if you want to follow along, take a look at the video and find all text fields you might need below! But i dont want to use smart plugs or sonoff. name: ${plug_name}_Voltage current: web_server: on_press: restore_mode: ALWAYS_OFF Best will be to get a different Tuya based brand! According to Tasmota, The Teckin SP23 appears to be a clone of the BlitzWolf SHP2, but I dont see that listed as an option on ESPHome. Once done, you can see the actual current values. platform: total_daily_energy name: ${plug_name}_Wattage By any chance do you know the new GPIO for this board? To measure the current and calibrate the sensor, you need to install it on the phase wire (usually red) coming from the electricity meter to your homes distribution box. platform: gpio The docs should always be correct. Thanks for the great videos. (And 8 Ways to Shrink It), The xXx video game with co-op must include Vin, Survivle is a new Wordle clone with exactly the, Explanation of the second season tribute to Bridgerton, Robert Cremo III: 5 quick facts you need to know, How to activate the Great Rune of the Fetus, Final evolution of pokemon scarlet and violet may be. If you are going to power the ESP module with a USB cable and feed the PZEM-004T module from its 5V/VCC and GND pins, check that these pins offer the desired current. After this startup the software again and follow the instructions. You would be surprised I was down in Mexico a few years ago on a trip and right on the busy street. pin: GPIO14 Save my name, email, and website in this browser for the next time I comment. logger: name: ${plug_name}_Voltage While I can type some commands and move around its directories, its not something Im used to or like to deal with. Once you have the file in place in the files directory wewe can start the flash script. Once we have voltage and current, multiplying them gives us power at a particular instant. However, the energy_XX_Total Daily Energy in the plug web interface seems to be different from the total usage in Grafana, using the integral and cumulative_sum, like you explained in your video. Ravi is an expert tech explainer, IoT enthusiast and Linux lover with a background in Big Data and Application Development. Update 2019/08/24 - For v1.2 of the board your voltage calibration will be high, >64,000. In the search bar, type Homepage Then click Homepage listed under Home Helper Community Additions. For anyone checking got a pack of 4 Gosund Sp1 from amazon.de worked very easy with tuya-convert or rpi3. Alternatively, we can perform this calculation on Home Assistant server with the unfortunately named integration integration. platform: gpio name: ${plug_name}_button But by default it does not reset at midnight, so the number keeps ticking upwards. Also Available. You can buy a 3.5mm female audio jack to connect your existing SCT013 AC clam sensor to the ESP or strip the SCT013s 3.5mm jack wire and then plug it into the circuit. (Works for PC or Raspberry Pi without WiFi), PR10-C Power Meter:http://geni.us/h8kokVq. Now make the following changes before saving. If you dont have a Raspberry Pi, you can also use your old laptop. substitutions: Ive also done the same for the current_resistor and voltage_divider values so you can always edit them at the top! I can confirm that this still works with the Gosund plugs currently sold on Amazon.de. Besides, it also helps you conserve energy and prevent wastage. select file com Port, browse to .Wastebasket Firmware file and then click ESP . Connect the NodeMCU, ESP32, or D1 Mini board to your PC or Mac using a micro USB cable. If we have space in the frame, we can buy boxes with support for din rail (in AliExpress there are several models) and place the components inside. If it does work, then add the power monitor. inverted: True unit_of_measurement: kWh, # Extra sensor to keep track of plug uptime Curiously, I found no way in Home Assistant user interface to add this to my instance, I had to go and manually edit configuration.yml as per documentation. Flashing ESP32 with ESPHome Flasher via USB Other home automation software supporting MQTT can also use this integration. Powered by Discourse, best viewed with JavaScript enabled. 2 minute read. Press question mark to learn the rest of the keyboard shortcuts. Should we do our computation on the microcontroller or on the server? Whole home power monitoring and additional power circuits with ESPHome and Home Assistant. Got 16 Gosund SP-1s from Amazon.de and they all running ESPHome atm. name: ${plug_name}_LED_Blue After I restarted Home Assistant, a new tally started counting up on my dashboard, but I could not do anything else with the user interface element. With this, optimize expenses and detect possible phantom consumption. Or watch the video below and then decide if you want to set this up. There are certainly advantages to either approach, but right now I lean towards server-side because that lets us put the microcontroller to sleep. You can then replicate the code and change the CS_Pin and CT identifiers. 2 minute read. To configure the Home Assistant power dashboard, you need to add the sensor to Home Assistant. Did you make it work yet? sel_pin: Debian 11 (bullseye) has been available for use on the stable channel for several months now. platform: gpio Doing more processing with this data is on the to-do list. https://esphome.io/components/esphome.html#esphome-changing-node-name, Hi Guys, Any thoughts? After flashing the firmware, the ESP MCU will connect to Wi-Fi and be online in the ESPHome Dashboard. current: pin: GPIO4 This differs per Linux version, in my case Im using Ubuntu 18.10 which renames adapters. Its time to find out how much electricity your computer uses and how to reduce it. current_res: 0.00221 # Enable Web server Follow these steps to install the ESPHome add-on in HA. Fill in your details below or click an icon to log in: You are commenting using your WordPress.com account. # Remember to change the platform and board as appropiate to your ESP module. This isnt a full tutorial on how to setup Home-Assistant and have it send its data to InfluxDB and then then let Grafana use that data. inverted: True Even replaced the antenna with a external one for better coverage. Currently trying to figure out why that is. I recommend using the following meters for that, these are quite a bit more expensive but come with an easy to read and responsive screen and it has a factory good factory installed auto-adjusting calibration! switch.toggle: ${plug_name}_LED_Blue inverted: True SCT-013-000 100A/50ma - 3900. digi_nrg_2chan32.yaml - Included in this repo i am now planing to do some scripting and use RPI with custom board for 3phases Because then yes, they try and prevent this method! (LogOut/ Comment document.getElementById("comment").setAttribute( "id", "ae13a12ece5cf3ffd936cae4736abd87" );document.getElementById("b61f091a2c").setAttribute( "id", "comment" ); document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() ); Tuya, the manufacturer of these plugs has taken some preventative measures that make the below mentioned OTA flashing method impossible. , Energy meters: yaml from CircuitSetup, and can not get it to communicate Once the software is configured and the circuit is connected, we can plug in the transformer, we wait a few seconds and we can access the Web Server by typing the IP of the device in any Web browser.+. Well, this probably wont be much help but I wrote my own firmware as I build a device based around this board with an STM32 Blue Pill, ILI9225 TFT screen and W5500 Ethernet module. But why are you copying config from other people, and not the documentation? you could look at these configurations: Then replace the ones in filters The values are as described above. SCT-013-050 50A/1V - 15420 A simple way to achieve this goal is by installing energy meters per device and/or globally throughout the home. Save it and click fix. Wide open meter boxes with exposed terminals. Will give you more information than just sticking a current clamp on the analog input of an ESP8266, more accurate and more reliable. Thanks. Ever since weve moved to our new house we have been having trouble keeping our energy usage in check. I dont know much about Unix systems. However, what I can suggest for you is to start your ESPHome configuration from scratch. It can easily be hooked up to an ESP8266 or ESP32 to wirelessly transmit ene, The Expandable 6 Channel ESP32 Energy Meter can measure the amount of current being used by 6 circuits at a time! You can also customize the cards in your room to add a scale that shows the current demand. pin: GPIO15 Once this is done, turn on the NodeMCU by connecting it to a micro USB power source. For now, and for testing. If not, then something is up with your WiFi. Will it work? port: 80 Dont use someone elses. 1.2 Amps 252.8 Volts 542.4 Watts Meter 2.11 Amps UK Style: https://geni.us/1DTCc Tutorial, April 14, 2022 Oh wow, I got scared when I saw that the feed from the street is screwed in and the terminals are exposed! power: esphome: name: ${plug_name}_Wattage This DIY project involves AC voltage/current, and its a killer. I dont use ESPHome, but have you checked the documentation? The third video is about using Grafana to make some nice graphs about all the data we are now collecting in Home-Assistant. id: ${plug_name}_Relay Hi there! The Home Assistants energy dashboard was introduced with the release of HA 2021.8, making it easy to get insightful information about your daily, monthly or yearly energy usage. Do not cut the cable or pierce the internal wires. An intelligent Internet of Things (IoT)-based energy monitoring system allows you to track energy usage in your home or office in real time. 8g (Without Wemos). Do you perhaps have periods where your device uses 0 Watt? It does make it easier to put a clamp around though. 1.2 Amps 245.1 Volts 529.5 Watts Meter: 2.11 Amps https://github.com/esphome/esphome-docs/blob/current/devices/teckin_sp20_us.yaml. unit_of_measurement: A 8 minute read. Split Core Current Transformer 100A/50ma Also enable guardAnd the auto update, And the appear in the sidebar. Which build is correct? I cant get CircuitSetup 2 ch unit ESP 32 to join my network. If it is ESPHome not sending data to HA when it is 0, or if HA does not transfer it to InfluxDB. platform: uptime This post has been sponsored by donations from users who visit it. Entry IP From the sensor (you can find this in the logs) and click He presents. # Lower value gives lower voltage readout The button on the top works. Although this is a written guide its meant to be used in conjunction with the video I made. In the smart energy meter File and copy and paste This YAML code. ESPHome provides two parameters to mitigate wear: we could set min_save_interval to a longer duration in order to reduce the number of writes, or we could set restore to false and skip writing entirely. name: ${plug_name}_Amperage on_press: multiply: 0.001 whether it is on or off. Tags: Enter the name of the configuration, such as smart energy meter, and click next one. pin: I immediately bought several Blitzwolf BW-SHP2 via the AliExpress the affiliate link as a token of appriciation and for adding them to my home automation setup of course. 1.1 Amps 245.7 Volts 516 Watts Meter: 2.11Amps id: ${plug_name}_Wattage (LogOut/ If your electricity meter does not display the current value, or you cannot access the meter, follow the next method to calibrate the sensor values. Check the records and replace the values. He chooses Connect this computer. If we have made the connections well and the line that we are measuring is currently consuming, we will see how the values shown change. Since the smart energy meter is online and connected to the Internet, you can upload the code wireless. Does it work? Energy, number: GPIO3 Note down the file Measured Current: Transmission status x.xxxx A with the value. Once that is running and youve entered yes, open a second terminal window or SSH session and run the following to see the wifi log file. You can quickly access the dashboard from the sidebar and check how much energy is being used today. Now that we handle Docker more or less adequately, and that we have instantiated a few services on our server with it, the system begins to fill up with data 2022 Daniel Martn Gonzlez. unit_of_measurement: V No updates right now, but the 2.0 method should work on plugs that have the blocked firmware! make sure what version you have https://www.esphome-devices.com/devices/BlitzWolf-BW-SHP2-Power-Monitoring-Plug/. Tnx. After installation, click Begins. These are based on the 6 channel board with 1X gain. number: GPIO12 Be careful while removing the extension board cable. To connect SCT013 to ESP32 or NodeMCU, you can buy This unit is on ebay To connect or connect the SCT013 sensor to a D1 Mini, NodeMCU, or ESP32. Voltage works in reverse, to get a higher voltage, use a higher number in voltage_divider! time: Through the interior of the ring we will have to pass the Phase cable (Black) on which we want to make the measurements, and it may or may not be the same as the one we have used to give current to the circuit. CircuitSetup 6 Channel or 2 Channel Board If I had to guess, if it doesnt connect to your WiFi, you would have something wrong in the WiFi section of your config. name: ${plug_name}_Status, switch: inverted: True Someone commented on my videos that since a recent version of ESPhome its now possible to use variables or as they are named in ESPhome:substitutions. Your email address will not be published. SCT-013-030 30A/1V - 9210, SCT-024TSL-B27 200A/100mA - 12597 *(2 chan board, gain_pga = 4X), For the 2 channel board and the 9VAC power supply: pin: GPIO2 If your file is not on the machine you are running the flash software on (for instance you are using a Raspberry Pi with a clean raspbian install) you need to transfer it over. We have two methods to perform this power integration: onboard the microcontroller with ESPHome, or on the Home Assistant server. Im not fully sure what module you have, I show the EU Gosund version. # Multiplication factor from W to kW is 0.001 Instructions for setting up ATM90E32 energy metering sensors. Im looking for an idea to monitor the power consumption of my minipc with HA. # Higher value gives lower watt readout Since releasing this video and article a new method of calibrating these plugs has become available within ESPhome, this is easier to use and delivers a better (more accurate) result in the end! You can then use this information as events in Home Assistant to create automation, such as sending you notifications on your smartphone or via Alexa or Google Assistant. then press Open Web UI To launch the ESPHome Dashboard. Home Assistant is open source home automation that puts local control and privacy first. For those who also have a BW-SHP6 (instead of the BW-SHP2!) The following code is just a template that can be adapted to the needs of each one: We can now generate the compiled binary from the .yaml file and put it in the ESP module. The easiest way to do this is by downloading the file on your desktop as instructed in the video and then running a program called WinSCP or FileZilla Client. there is something that i do wrong on that part. This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. To get a higher wattage use a lower number for the current_resistor. Cheap Compatible WiFi dongle: https://geni.us/e2oGA password: PASSWORD name: ${plug_name}_LED_Blue digi_nrg_6chan32.yaml - Included in this repo 3.5mm Jack for CT. Also the schematic and Demo firmware is available on Github, search formottramlabs. password: PASSWORD Check the tuya-flash github page, they have a wiki with the pinouts for lots of different models! number: GPIO13 id: blue_led Hi i got the SP1-C_V2.4 Blitzwolf BW-SHP2 switch: at home assistantgo to the Settings and click Add-ons, backup and admin. To combat this problem Ive bought a bunch of 10$ energy meters which can be flashed without any soldering to the awesome ESPhome firmware! First of all, thx for the tutorial, helping me to manage the calibrating process. Can you explain if the complete git clone needs to be transferred to the root map of the raspberry pi? Awesome vid! digiNRG - Whole Home Power Monitoring with ESPHome, Sample Calibrations for Gain Voltage (gain_voltage), CircuitSetup 6 Channel or 2 Channel Board. Wondering if computers use a lot of energy? board: esp8285 platform: total_daily_energy You can also add beautiful infographics with Micrograph card integration. If you are not familiar with ESPHome, I recommend you read this article and go through its documentation here. Evereything works (including the button press) except for the red LED, maybe someone could figure that out? mode: INPUT_PULLUP We are going to follow a fairly simple scheme that can be adapted to different needs and assemblies. name: ${plug_name}_LED_Red Config is as suggested by Pat Ive taken one apart and checked the signals and it seems correct. I am trying to integrate the CircuitSetup 2 ch unit into HA with ESP home and cant get it to work. We are going to need these later on! NodeMCU, D1 Mini, or ESP32 microcontroller. Thank you in advance for your help!! Your email address will not be published. Changes should be made with small numbers, so try raising or lowering the numbers by 5 to start with. platform: gpio Can you speak more to this? Note: If you elected to add expansion boards, refer to the two physical jumpers on the top of each expansion board. power_id: ${plug_name}_Wattage click Memorizes Then click proven. Its available for Windows, macOS, and Ubuntu. And the led turns red as soon as the relay is switched on, time: Since the ESP module really works at 3.3V and if you want to power the PZEM-004T module with this voltage, it is recommended to place a 1K resistor between 5V and RX of the PZEM-004T itself. pin: GPIO3. restore_mode: ALWAYS_OFF The Tasmota website has a lot of information about this behaviour. Here are the steps you can follow to build a smart IoT based energy monitoring device to track energy consumption. switch.turn_off: red_led, platform: gpio unit_of_measurement: W doesnt connect wifi to my network and Home Assistant / ESPHome. ota: Just to let you know that I got 4 Gosund SP-1 from Amazon.es and this tutorial is still valid. Thanks for this post! The former means we lose some amount of data when we reset, the latter means we lose all the data. How can i set it up to the correct level? unit_of_measurement: V the map tuya-convert is now on the raspberry only the command /install_prereq.sh cant exclude. This will install the ESPHome Dashboard into your home assistant. Change), You are commenting using your Twitter account. I mostly look at the Grafana graphs and those seem correct with what I would expect. I bought 4 TP23 (via provided link) and successfully flashed them. platform: hlw8012 What do you use to display the data from your energy meter? He spends most of his weekends working with IoT devices and playing games on Xbox. esphome flashed and working good. I cant figure out why this is. name: ${plug_name} I just get an error This entity does not have a unique ID. wifi: Yep. 2.0 Amps 248.1 Volts 914.5 Watts Meter 2.10 Amps ESPHome will compile the code and create the binary or .bin firmware file, like smart energy meter. Once the firmware is compiled, click Download project. The calibration can be changed in the ESPhome code by varying the current_resistor and voltage_divider values. To build this smart energy monitoring device, you need the following. . Crazy to me as well. Change your Wi-Fi credentials and passwords. If more things go wrong or nothing seems to happen make sure to take a close look at the other log files also located in the scripts directory, they can give you valuable information what might be wrong. api: On Aliexpress, this seller is selling versions pre-flashed to Tasmota, https://www.esphome-devices.com/devices/BlitzWolf-BW-SHP2-Power-Monitoring-Plug#hardware-revision-v23base-config, https://www.esphome-devices.com/devices/BlitzWolf-BW-SHP2-Power-Monitoring-Plug/, Prise connecte avec suivis de consommation Scrample, uRADMonitor Home Assistant and uRADmonitors, https://community.home-assistant.io/t/esphome-blitzwolf-bw-shp6-configuration/113938/2, https://esphome.io/components/esphome.html#esphome-changing-node-name, TuyaOEMNode-RED | , Lots of External HDD on a single Power Supply, Home Assistant Mikrotik Multicast storm, 4$ Xiaomi Temperature Sensor for Home Assistant. Once ready we can go to the circuit. flash. , etc. Madeline announces her due date after revealing the, Cowboys don't have a closed door when signing the 4-Time Pro Bowler, Thanos' son revealed the true secret of Marvel's ultimate power, Kirby and the Forgotten Lands wild mod bodes well for the future of the series, Supreme Court Reimposes Death Sentence for Boston Marathon Bomber. inverted: True id: energie_wasmachine_Wattage id: red_led Measurement, switch.toggle: relay 3 minute read. I have been receiving reports that the Teckin plugs sold in the US now contain an incompatible Realtek chipset. I work in high voltage utility and industrial applications and you wouldn't believe the damage an open CT circuit can cause. Does it work? Lots of how-tos have been written for that, so check one of those if you dont have this setup yet. As always, it can be done by USB or if we already have it previously configured by OTA. switch.turn_on: red_led inverted: True (LogOut/ id: homeassistant_time, binary_sensor: ssid: SSID restore_mode: ALWAYS_ON Older stock (so also if youve already had it for a while) will work just fine. Relay: GPIO4 platform: ESP8266 First, create a minimal configuration that just connects to WiFi. number: GPIO12 Well, to answer my own question, heres what Ive done so far. 9VAC Power Supply, If you have any to add or changes to these, pleast let us know! It's the setup/calibration too for reference material later. I didn't know they could exist like that, everywhere I lived, the terminals that hook up to the street mains were always covered and totally inaccessible because safety. ESPHome is a Home Assistant add-on that will be used to create and flash custom firmware on an ESP32, NodeMCU, or D1Mini microcontroller. The Total Daily Energy component accumulates value from a specified power sensor and integrates a daily tally. I flashed ESP32 with Obviously you would need to also provide a D1 Mini with ESPHome and a SCT013 current transformer. current_resistor: ${current_res} Monitor, The system collects data in logs and displays it in a meaningful way that you can use further to perform actions, such as sounding an alert or sending notifications on your smartphone or Alexa/Google Assistant for high power usage or when power usage reaches a certain threshold. 2020-12 Some version are still flashable, some are not, its becoming harder and harder to identify. I'd been following the CircuitSetup folks on crowdsupply and this video pushed me over the edge and I ordered a 6 channel for myself. voltage_div: 940 voltage: The inspection plate is off of course and the room it is in even has a lock as well that stays locked. name: ${plug_name}_Relay ESPHome, Home Assistant running on RPi 4 under Docker / Portainer That I dont know, if you can flash something to the plugs that support Homekit, then it can work, other then that, I dont kow. With the price of electricity at historical highs, and the forecast of its continuous increase, we believe that it is necessary to have a way of measuring electricity consumption and the parts of the house with the highest energy consumption in order to optimize its use, and, in this way reduce our bill. 5 minute read. Find the newly created project and click release. Lots of stuff to coverand Travis does a good job. The steps are as follows. Download home stripper tool and launch it. https://community.home-assistant.io/t/esphome-blitzwolf-bw-shp6-configuration/113938/2, Also for those who can give a static IP but face issues with DNS (like it stays temp_flash.local), you can change the name: I have no updated this article for this (this method still works) but Frenck, a colleague has made an excellent article how to use this new method.