Announcement

Collapse
No announcement yet.

Energy Monitoring Smart Plug for under $10

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jim@beersman.com
    replied
    That is exactly what I needed. Works like a charm

    Leave a comment:


  • Michael McSharry
    replied
    It depends somewhat on how you configured Tasmota. In my case the topic is something like BLLINK/cmnd/Power for the topic and ON, OFF , 0 or 1 for payload. mcsMQTT will handle the standard payload for you. You need to define the publish topic as whatever you setup the Tasmota to be for commands. In the Information page from the Tasmota browser page you will be able to see what it is expecting as the full topic. Append Power if you are trying to control the relay. The information page from one of mine is shown below. Others configure it with the cmnd at the front so in that case it would be cmnd/BNLINK/Power.

    Click image for larger version

Name:	Capture.PNG
Views:	57
Size:	43.9 KB
ID:	1306478

    Leave a comment:


  • jim@beersman.com
    replied
    Just converted my first BN-LINK plug and every thing looks good using 6.5.0 and the appropriate template. What I have not been able to figure out is how to turn it ON and OFF using mcsMQTT plugin. I'm assuming it's publishing the proper command but I have not figured out what that is. Any help would be appreciated

    Leave a comment:


  • hivberger
    replied
    Originally posted by hivberger View Post


    I will do a full calibration run and report back...

    I ran PowerSet from the console using the wattage indicated by the plug and lo and behold, it works fine. Seems odd to me you need to separately calibrate power even when voltage and current have been calibrated. But I have no idea how the chip works.... devil is no doubt in those details.

    FWIW, however, FrequencySet returns {"Command":"Unknown"}

    Thanks much!

    Leave a comment:


  • hivberger
    replied
    Originally posted by Michael McSharry View Post
    I observed the data on the main Tasmota page for the smartplug. I see the Energy Today increment every two seconds. I ran a test for 10 minutes for a plug that was not used today until the test. The load is resisttive space heater using 1500 watts as shown by both the smartplug and killawatt meter. Voltage at 113V. After 10 minutes the Energy Today reading on the Tasmota page was 250. These numbers all line up to be reporting as expected.

    I don't recall the procedure I used to calibrate with Tasmota, but likely I used all calibration factors that were available. (FrequencySet, CurrentSet, VoltageSet, and PowerSet) based upon data that was showing on the Killawatt meter.
    Thanks for the sanity check. I will admit, I didn't calibrate power or frequency, only Voltage and Current. I guess I just figured that since power was reported correctly, it didn't need calibration. I also don't have an accurate way to measure frequency. I do have a UPS that reports 60hz, so I will set it to that...

    Hopefully taylormia will weigh in with a check since mine are theoretically identically configured (i.e., all of them do NOT use your firmware build). I'm on 6.5.0, and I believe I saw your build is based on 6.4.1 or something. Perhaps a regression was introduced, not sure.

    I will do a full calibration run and report back...

    Leave a comment:


  • Michael McSharry
    replied
    I observed the data on the main Tasmota page for the smartplug. I see the Energy Today increment every two seconds. I ran a test for 10 minutes for a plug that was not used today until the test. The load is resisttive space heater using 1500 watts as shown by both the smartplug and killawatt meter. Voltage at 113V. After 10 minutes the Energy Today reading on the Tasmota page was 250. These numbers all line up to be reporting as expected.

    I don't recall the procedure I used to calibrate with Tasmota, but likely I used all calibration factors that were available. (FrequencySet, CurrentSet, VoltageSet, and PowerSet) based upon data that was showing on the Killawatt meter.

    Leave a comment:


  • hivberger
    replied
    Originally posted by taylormia View Post

    I flashed with the built-in sonoff-basic.bin file and configured the module using the tasmota template for the BN-LINK - and it works great:

    https://blakadder.github.io/template...nk_bnc-60.html

    Taylormia and/or Michael McSharry,

    I too flashed 8 of these with Tuya-convert a couple of weeks back. I applied the template linked to above, but the energy monitoring doesn't quite work correctly. I calibrated voltage and current, and the reported Power is correct.

    I can report, however, that reported energy consumption is not at all accurate. That is, accumulated energy for these modules is always between 1.7 and 2x too high for a given power level.

    For example, I have a module reporting right now that 230W is being consumed. The reported voltage and current have been confirmed with a multimeter, and the reported power is verified to be the product of the voltage and current. i.e. V=121V, I=1.898A, P=230W. With that load, it takes about 1.5 minutes for 'Energy Today' to increment by .01 kWh. 1.5 min is .025 hours. .01/.025= .4 kW = 400 watts. That is about 1.74x too high.

    I've run the numbers for all kinds of loads from a 25w LED bulb up to 1400 watt level 1 EV charger. The accumulated kwh is always way too high.

    Can either or both of you verify that your kWh is being reported properly? Thanks!

    Leave a comment:


  • taylormia
    replied
    The ANCCY info was part of the BN-LINK template page. See the link for this page in my post above. ANCCY is supported with tuya-convert. See this page: https://github.com/ct-Open-Source/tu...atible-devices

    Leave a comment:


  • Michael McSharry
    replied
    Great!

    I did not know about templates. Thanks for pointing me to something new. I see that the template provides the functionality for special chips such as the one this module uses for energy monitoring.

    Where did you find the info about the ANNCY? Is it something supported in current Tasmota builds?

    Leave a comment:


  • taylormia
    replied
    Just wanted to follow up on this. I successfully flashed my 4-pack of the BN-LINK plugs with tuya-convert using the Proxmox container documented here:
    https://github.com/whiskerz007/proxm...vert_container . It's very convenient if you run ProxMox. If not, here's the tuya-convert github page for the normal process: https://github.com/ct-Open-Source/tuya-convert

    I flashed with the built-in sonoff-basic.bin file and configured the module using the tasmota template for the BN-LINK - and it works great:

    https://blakadder.github.io/template...nk_bnc-60.html


    All four plugs needed to be power calibrated - which was easy to do following the tasmota wiki here: https://github.com/arendst/Sonoff-Ta...ng-calibration

    Here's the plug web page after calibration with a 40w incandescent lamp:


    Thanks again Michael for your guidance, excellent support and awesome plugin:

    Leave a comment:


  • Michael McSharry
    replied
    Thanks for the suggestion, I already took care of the mcsTasmota.zip and left the SSID blank to force AP mode. I will update the manual too just to make others aware of what we learned.

    Leave a comment:


  • taylormia
    replied
    Michael, No apologies necessary. I am learning as you are with this experience...and in my opinion - having a bricked device once in a way is a fair price to pay
    Also, I should have asked you the about the correct procedure to flash your binary instead of assuming that I could directly flash it with tuya-convert.
    As far as the bricked plug - I will return it for a replacement.
    I just succeeded in flashing the sonoff_basic.bin on to another BN-LINK and doing a firmware upgrade to the mcsTasmota image. I will play with the power calibration after I get my replacement plugs.
    A couple of suggestions. Please add in your mcsMQTT manual to first do the flash 3 option on the BN-LINK before upgrading to your mcsTasmota image via "Firmware Upgrade" on the tasmota web page. Also, perhaps change the SSID/password in your image to be WPA compliant.
    Thanks again for all your help with this and your awesome mcSMQTT plugin!

    Leave a comment:


  • Michael McSharry
    replied
    Sorry to put you through all of this. I can confirm that when a AP is setup using WEP/ASCII that Tasmota does not connect.

    I had a router provided by my ISP and it came with SSID of default and no password. The open system worked for me since I live in a very remote area. When I replaced it with a Ubiquiti AP a couple years ago I was more sensitive of security so never ran into a WPA key length problem. I learned a few things working with you on this.

    It is not that hard for me to reflash it via serial since I know the layout. If you are interested in sending it to me rather than discarding it I can paypal you $10. Let me know at mcsSolutions at CenturyTel dot net if you are interested.

    Leave a comment:


  • taylormia
    replied
    Michael, here's what I found trying to get the mcsTasmota flashed BL-LINK to connect to the "default" SSID with "default" password on an old router with DD-WRT.

    Using WPA or WPA2: the minimum length of the password required is 8. "default" is 7 characters - so this cannot be configured on any WPA/WPA2 router
    Using WEP: "default" as a passphrase can be configured, but the plug does not connect. WEP network passwords are hexadecimal strings known as keys. A WEP network can have 4 different keys; each key is assigned a "Key Index" value. For WEP encrypted networks, you need the SSID, the key, and key number.
    From the mcsTasmota "my_user_config.h" file I do not see any configuration for a WEP hexadecimal key or key number

    Also, I found the following code in the tasmota "support_wifi.ino" file that leads me to believe that WEP is not supported in tasmota while WPA is supported.

    ************************************************************ **********
    void WifiWpsStatusCallback(wps_cb_status status)
    {
    /* from user_interface.h:
    enum wps_cb_status {
    WPS_CB_ST_SUCCESS = 0,
    WPS_CB_ST_FAILED,
    WPS_CB_ST_TIMEOUT,
    WPS_CB_ST_WEP, // WPS failed because that WEP is not supported
    WPS_CB_ST_SCAN_ERR, // can not find the target WPS AP
    };

    / Enable from 6.0.0a until 6.1.0a - disabled due to possible cause of bad wifi connect on core 2.3.0
    // Re-enabled from 6.3.0.7 with ESP.restart replaced by ESP.reset
    void WifiDisconnect(void)
    {
    // Courtesy of EspEasy
    WiFi.persistent(true); // use SDK storage of SSID/WPA parameters
    ETS_UART_INTR_DISABLE();
    wifi_station_disconnect(); // this will store empty ssid/wpa into sdk storage
    ETS_UART_INTR_ENABLE();
    WiFi.persistent(false); // Do not use SDK storage of SSID/WPA parameters
    }
    ************************************************************ *******

    So, because the mcsTasmota image has a built-in password of 7 characters, it will not connect to a WPA SSID due to WPA password requirements not being met, nor to a WEP SSID because WEP is not supported.
    Do you agree?

    I'm not willing to open the plug and mess with GPIO pins - so from my perspective - the plug is bricked.
    What are your thoughts?

    Leave a comment:


  • taylormia
    replied
    Got it. Thanks Michael for taking the time to explain. With the Luntak I used the flash 3 option which used the sonoff-basic.bin image. I will try with the old wifi router and report back.

    Leave a comment:

Working...
X