Smart plugs supported by EasyESP

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jgrad
Normal user
Posts: 71
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Smart plugs supported by EasyESP

#1 Post by jgrad » 05 Dec 2020, 15:05

Hi,

i am asking ESPeasy community about experiences with smartplugs which can be flashed with ESPeasy. I have experience with SonoffS20 (I have 4 of them) but I would like to switch to another type which is more narrow that it doesn't cover more than one socket place. If power monitoring is supported (like sonoff POW) it is a plus.

BRJ.

User avatar
Ath
Normal user
Posts: 1103
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Smart plugs supported by EasyESP

#2 Post by Ath » 05 Dec 2020, 16:34

I usually have a look at the Tasmota list of supported devices. The community there has gathered a lot of info about all kind of ESP8266 & ESP8285 based devices that can be flashed with their alternative firmware.
The list of plugs and Sockets is here

You might need to check back here if specific hardware is supported, f.e. for power measurement, not all chips used are supported by ESPEasy, even though it may be supported by Tasmota.

Usually the hardest part is getting the firmware on, as some of these devices are very hard to open without mechanically damaging them, and not all of them can be flashed OTA with ESPEasy. (The description to flash 'm assumes Tasmota, but ESPEasy is often possible, if the device has at least 1MB of flash).
/Ton

jgrad
Normal user
Posts: 71
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Smart plugs supported by EasyESP

#3 Post by jgrad » 05 Dec 2020, 18:30

I was already checking Tasmota list of supported HW, but for particular smart plugs I cannot find info which chip (8266/8265) and which power metering chip is used + how much flash memory smartplug have.

One option for me is to switch to Tasmota, but I would like to stay on ESPeasy for as much as possible number of devices.

For ESPeasy I used standard builds and for power metering I have experience only with SonoffPow where pluging does not allow any configuration how power metering chip is connected to ESP chip.

User avatar
Ath
Normal user
Posts: 1103
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Smart plugs supported by EasyESP

#4 Post by Ath » 05 Dec 2020, 19:29

Maybe you can list the plugs you are considering here, there may be others that have experience with them.

But if Tasmota runs on it, there is either an ESP8266 or ESP8285 chip in.
/Ton

jgrad
Normal user
Posts: 71
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Smart plugs supported by EasyESP

#5 Post by jgrad » 07 Dec 2020, 12:32

I was looking for following devices (many of them are appearing under different brands):

cwhb2020
Normal user
Posts: 6
Joined: 23 Dec 2020, 15:39

Re: Smart plugs supported by EasyESP

#6 Post by cwhb2020 » 26 Dec 2020, 10:02

I have successfully flashed Wi-Fi plugs sold by the name of Gosund SP111 with Tasmota.
The plugs i got have power metering working, some buyers reported they got plugs without power metering.

Anyway you can use the Tuya Convert https://github.com/ct-Open-Source/tuya-convert utility to flash any .bin, not only Tasmota, OTA into many ESP 8266 based device produced by the Tuya OEM, so flashing ESP-Easy should be no problem.

As Ath mentioned opening the device without permanently damaging it is tricky, i would not do it.
If OTA flashing doesn't work, just return the device, get your refund and try another one.

Just my 5C, hth

jgrad
Normal user
Posts: 71
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Smart plugs supported by EasyESP

#7 Post by jgrad » 26 Dec 2020, 19:07

Thanks all for feedback.

I ordered 2 devices from above list - when I receive them I will report about findings.

jgrad
Normal user
Posts: 71
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Smart plugs supported by EasyESP

#8 Post by jgrad » 24 Jan 2021, 15:41

Hi, I am back with some findings.

I receivad NEO Coolcam Smart Plug WiFi Socket 3680W 16A Power Energy Monitoring (https://www.aliexpress.com/item/32966183521.html).

Since I dont have "infrastructure" to do TuyaConvert OTA upgrade I opened plug (I followed procedure with pictures here https://github.com/ct-Open-Source/tuya- ... issues/666) and soldered wires for programming. First I flashed Blank 4M.BIN.

Then I flashed ESP_Easy_mega_YYYYMMDD_hard_other_POW_ESP8285_1M.bin and recognized that this build does not have full set of controllers supported.

Then I flashed predefined build ESP_Easy_mega_YYYYMMDD_hard_Shelly_PLUG_S_2M256.bin which have full set of controllers supported + support for HLW power chip in NeoCoolcam. Everything works as expected.

Related to configuration of PowerMonitoring plugin: I selected predefined configuration (Gosund SP1) + I had to make calibration using commands explained here https://espeasy.readthedocs.io/en/lates ... /P076.html.

I am sharing also NeoCoolcam SmartPlug pinout
//GPIO00 Button
//GPIO04 BL0937 CF
//GPIO05 HLWBL CF1
//GPIO12 HLWBL SELi
//GPIO13 Led1i (inverse logic)
//GPIO14 Relay1

Hope above info will be useful for somebody else.

Micha_he
Normal user
Posts: 323
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Smart plugs supported by EasyESP

#9 Post by Micha_he » 26 Jan 2021, 16:10

I understand it correctly, the 'Neo Coolcam NAS-WR01W' housing is screwed and it can be opened without destroying it?
Thanks for your help and your description...

Micha

jgrad
Normal user
Posts: 71
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Smart plugs supported by EasyESP

#10 Post by jgrad » 27 Jan 2021, 09:21

Yes, there is a screw below label inside socket - see picture appended.
Attachments
NeoColcamSmartPlug01.jpg
NeoColcamSmartPlug01.jpg (188.3 KiB) Viewed 10789 times

Micha_he
Normal user
Posts: 323
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Smart plugs supported by EasyESP

#11 Post by Micha_he » 27 Jan 2021, 09:47

Nice thanks. Then I can order some to test them with ESPEasy :)

Micha_he
Normal user
Posts: 323
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Smart plugs supported by EasyESP

#12 Post by Micha_he » 25 Feb 2021, 08:18

My NEO Coolcam NAS-WR01W are arrived. Opened, serial connected and 'xxx_hard_Shelly_PLUG_S_2M256.bin'-image flashed. Seems good, except that the name-change wasn't saved on the first attempts. But now it's ok.

Now I've take a look at the flash-device: It's a PUYA P25Q80. But this flash has only 1MB.

@TD-er:
Why can I still flash a 2MB file?
Is the 2MB-image on this device then problematic?
Is there another image which would be more suitable? (HLW8012/BL0937, MQTT, Switch, Dummy)

TD-er
Core team member
Posts: 5417
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Smart plugs supported by EasyESP

#13 Post by TD-er » 25 Feb 2021, 16:17

There is a "POW" image for 1M flash units.
But those are not "minimal OTA" so you cannot perform an OTA update on 1 M units unless the bin file (extracted size, so not .bin.gz) is less than 600k.

You cannot use a 2M bin file on an 1M flash.

Micha_he
Normal user
Posts: 323
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Smart plugs supported by EasyESP

#14 Post by Micha_he » 25 Feb 2021, 21:58

TD-er wrote: 25 Feb 2021, 16:17 You cannot use a 2M bin file on an 1M flash.
Maybe, but I've flashed it, it's booting and I can configure it.
TD-er wrote: 25 Feb 2021, 16:17 There is a "POW" image for 1M flash units.
But the only POW-1M is a image for 8285. But I mean, you said it will work on 8266 also?!
I'll test it...

TD-er
Core team member
Posts: 5417
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Smart plugs supported by EasyESP

#15 Post by TD-er » 26 Feb 2021, 00:09

Are you sure then it isn't a 2M flash unit then if you can congure it?
What does the sysinfo page tell you?

There are ESP8285 units out there which do have 2 MB flash built in.
I have never seen those though.

ESP8266 and ESP8285 do not differ a lot, so you may get away with running an ESP8285 build in an ESP8266, but make sure not to try to use any of the pins between GPIO-6 and -11. (including those)
ESP8285 may allow to use 2 pins more compared to ESP8266, so the ESP8285 buld does not block it for you to play with those, but on an ESP8266 it may result in a unit that's crashing and partly erasing the flash or at least corrupting it.

Micha_he
Normal user
Posts: 323
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Smart plugs supported by EasyESP

#16 Post by Micha_he » 26 Feb 2021, 08:05

As sure as I can be. A picture says more as thousand words...
NeoCoolcam.jpg
NeoCoolcam.jpg (228.83 KiB) Viewed 9485 times
Flash: Manufacturer=85 / Device=6014
TD-er wrote: 26 Feb 2021, 00:09 What does the sysinfo page tell you?
Too late, I've flashed the 'other POW 1MB 8285' image. Maybe with the next device, I've three of them.


Is it possible, that the flash-chips are larger than labled/the id says ? Maybe they (PUYA) produced only chips with min. 2 or 4MB and declares them smaller for compatibility!?

If I flash a image which is to large for the real flash size, should then the flash-process aborted with an error?
My idea: I flash a 2MB-blank to the second neo-coolcam-device. This should abort, if it's not fit in the flash.

TD-er
Core team member
Posts: 5417
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Smart plugs supported by EasyESP

#17 Post by TD-er » 26 Feb 2021, 10:21

Device=6014 that's a strange marking.
On my 1M devices (Sonoff ones) I do see 0x4014 and on 4M devices 0x4016

Even on the 1M builds, the sysinfo page should show the detected flash size.
But given the "14" at the end, it should be an 1M device and the datasheet also tells you so.

So I guess this is another PUYA quirk where I really doubt the settings are written correctly.
Or maybe the addressing works modulo 1M?
Then the 2M and 1M build will work well on these specific chips, as long as your bin size does not exceed the roughly 750k (SPIFFS is made larger for 2M builds)

Micha_he
Normal user
Posts: 323
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Smart plugs supported by EasyESP

#18 Post by Micha_he » 26 Feb 2021, 10:52

TD-er wrote: 26 Feb 2021, 10:21 Even on the 1M builds, the sysinfo page should show the detected flash size.
Which parameter shows the 'detected' flash size?
Last you said, the sysinfo-page show only the size which was specified for the image while it build !?

User avatar
Ath
Normal user
Posts: 1103
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Smart plugs supported by EasyESP

#19 Post by Ath » 26 Feb 2021, 10:57

Took a screenshot from a Shelly 1PM, that actually has 2M flash, where it looks like this:
Shelly_Flash-info.png
Shelly_Flash-info.png (4.69 KiB) Viewed 9456 times
/Ton

TD-er
Core team member
Posts: 5417
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Smart plugs supported by EasyESP

#20 Post by TD-er » 26 Feb 2021, 11:00

Take for example the sysinfo page of a NodeMCU board I'm running here:

Code: Select all

Storage
Flash Chip ID:	Vendor: 0xE0 Device: 0x4016
Flash Chip Real Size:	4096 kB
Flash IDE Size:	4096 kB
Flash IDE Speed:	40 MHz
Flash IDE Mode:	DOUT
Flash Writes:	0 daily / 8 boot
Sketch Size:	898 kB (2172 kB free)
Max. OTA Sketch Size:	1019 kB (1044464 bytes)
OTA possible:	true
OTA 2-step Needed:	false
SPIFFS Size:	934 kB (844 kB free)
Page size:	256
Block size:	8192
Number of blocks:	116
Maximum open files:	5
Maximum path length:	32
"Flash IDE Size" is the size used during compile (should be the same as in the bin file name)
"Flash Chip Real Size" The detected size, which is actually basing this on the "0x4016" value taken from the flash chip ID.
"Sketch Size" is important to you, if you're using a 2M image and the flash chip actually does take addresses as "modulo 1M" (thus address 1M+1 == 1)
"SPIFFS Size" is the size of your file system. Add roughly 12 - 16k on top of that which cannot be used for your sketch and you can compute the max. sketch you can upload without damaging your SPIFFS file system when using a 2M build on a 1M flash chip.

But like I said, it is really not standard behavior (as far as I know) to start at the beginning if you're past the max. address. But it's PUYA, which is known for doing things differently.

Micha_he
Normal user
Posts: 323
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Smart plugs supported by EasyESP

#21 Post by Micha_he » 26 Feb 2021, 15:23

I've done another test, with flash a blank 2MB. No problems, flash successful:
NeoBlank2M.jpg
NeoBlank2M.jpg (100.73 KiB) Viewed 9441 times
Here's the sysinfo from the fresh flashed 'hard_Shelly_PLUG_S_2M256'-image:

Code: Select all

Flash Chip ID:	Vendor: 0x85 (PUYA, supported) Device: 0x6014
Flash Chip Real Size:	1024 kB
Flash IDE Size:	2048 kB
Flash IDE Speed:	40 MHz
Flash IDE Mode:	DOUT
Flash Writes:	2 daily / 3 boot
Sketch Size:	708 kB (1080 kB free)
Max. OTA Sketch Size:	1019 kB (1044464 bytes)
OTA possible:	true
OTA 2-step Needed:	false
SPIFFS Size:	209 kB (127 kB free)
Page size:	256
Block size:	4096
Number of blocks:	52
Maximum open files:	5
Maximum path length:	32

TD-er
Core team member
Posts: 5417
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Smart plugs supported by EasyESP

#22 Post by TD-er » 26 Feb 2021, 15:53

I think you can write a GB of data to it and it will report a success. Whether your flash is then still working is another story :)

What I tried to tell you is that is looks like it is only using the last 20 bits of the flash address so if you try to read from address 1M + 1, it actually reads from address 1.
The layout of the flash on ESPEasy is like this:
Address 0 | sketch | OTA space | free space | Some parts we don't use | SPIFFS | last address

SPIFFS is allocated from the last address counting down, so regardless if you're using 1M or 2M flash, it will be at the end of the flash chip for a 2M build.
This is... given the idea the address is used in the flash chip by only considering the last 20 bits (1M).

If the chip was considering the complete address given, it would either return an error or just dispose of the data that's addressed above the 1M range.
But since your device appears to be working with a 2M image on an 1M unit, it is just using the last 20 bits of the address.

Micha_he
Normal user
Posts: 323
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Smart plugs supported by EasyESP

#23 Post by Micha_he » 26 Feb 2021, 18:32

Another result confirms your thesis:

I've read 1MB first from address 0x0 and then from 0x100000, both 1MB files are 100% identical.

I'm now stop this analysis and go back to the 'hard_other_POW_ESP8285_1M'-image, until we've a compile-service to compile a 1MB-POW-ESP8266 image.

My imagination would be:
A subfolder contain for each image a file with the necessary information (size, special parameter, controller, plugins) to compile it.
In a second subfolder (not synced via Github) the user can clone one of this templates, rename it and modify it.
After a restart from VSCode (or execute a special script), then new image-variant is available under the compile-environment.
So everyone can build their own special-configs and, if necessary, make available to other users.

But probably someone already had this idea and it is not possible :(

TD-er
Core team member
Posts: 5417
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Smart plugs supported by EasyESP

#24 Post by TD-er » 27 Feb 2021, 10:53


Micha_he
Normal user
Posts: 323
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Smart plugs supported by EasyESP

#25 Post by Micha_he » 27 Feb 2021, 15:42

I didn't understand the complete discussion, but I mean no.
My problem is: I need a system to compile some (more than one custom) special configurations and would like to make it available (manual) to others if necessary. But this in one simple configfile or script.
The default VSCode/Platformio environment with Github sync is available here.

So I can merge the repository to my local system and then compile the same e.g. five special builds, each time again (without change other files)

Haldi_2
Normal user
Posts: 29
Joined: 24 Aug 2020, 18:10

Re: Smart plugs supported by EasyESP

#26 Post by Haldi_2 » 28 Feb 2021, 22:36

cwhb2020 wrote: 26 Dec 2020, 10:02 Anyway you can use the Tuya Convert https://github.com/ct-Open-Source/tuya-convert utility to flash any .bin, not only Tasmota, OTA into many ESP 8266 based device produced by the Tuya OEM, so flashing ESP-Easy should be no problem.
That is a great idea i didn't even think about! Thanks a lot mate.

cwhb2020
Normal user
Posts: 6
Joined: 23 Dec 2020, 15:39

Re: Smart plugs supported by EasyESP

#27 Post by cwhb2020 » 03 Mar 2021, 18:51

Haldi_2 wrote: 28 Feb 2021, 22:36
cwhb2020 wrote: 26 Dec 2020, 10:02 Anyway you can use the Tuya Convert https://github.com/ct-Open-Source/tuya-convert utility to flash any .bin, not only Tasmota, OTA into many ESP 8266 based device produced by the Tuya OEM, so flashing ESP-Easy should be no problem.
That is a great idea i didn't even think about! Thanks a lot mate.
When i wrote 'any .bin' i forgot to mention it will most probably not allow bin files > 1MB
Anyway please let us know whether this worked for you or not ;-)

Haldi_2
Normal user
Posts: 29
Joined: 24 Aug 2020, 18:10

Re: Smart plugs supported by EasyESP

#28 Post by Haldi_2 » 20 Mar 2021, 15:53

So i got this NX-SM400 which according to Tasmota is similar to the Gosund SP1 which has an included Template.
Sadly OTA didn't work, Tuya firmware to new and not yet cracked so i had to Serial Flash it. (Guide in Portuguese but Pictures show everything needed)
There is an 8285 POW Build which works :)
DSC_0099_1.jpg
DSC_0099_1.jpg (134.16 KiB) Viewed 8334 times
At first i was astonished by the 335V shown, but guess it' can't magically calibrate itself. putting in a Voltage Meter I confirmed the 240.3V
But..... how about Current Calibration?
I got this really old "BaseTech Cost Control 3000" but i have absolutly ZERO clue how reliable that is!
What device or tricks do you guys use to calibrate these things?

I've plugged a hairdryer which is "max 1800W" and it showed 1600W, so i've calibrated it with that.
DSC_0100_1.jpg
DSC_0100_1.jpg (82.69 KiB) Viewed 8334 times
having Leve 1, 2 and Cold only gives 3 Values which confirm proper power usage.

Now what doesn't seem reliable is the voltage drop! I've confirmed 240V when idle. But even the Basetech dropped down to 232V. The SM400 even worse to 223V.
Screenshot 2021-03-20 154115.png
Screenshot 2021-03-20 154115.png (38.09 KiB) Viewed 8334 times
Well yes 1600W is quite a bit of load... but this thingy is rated 16A. So that was far from it.

is there any easier/better way for Calibration?
Attachments
Screenshot 2021-03-20 155437.png
Screenshot 2021-03-20 155437.png (69.42 KiB) Viewed 8333 times

User avatar
Ath
Normal user
Posts: 1103
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Smart plugs supported by EasyESP

#29 Post by Ath » 20 Mar 2021, 16:38

You can calibrate the Power and Current values when using a plain, non-inductive and non-capacitive, load, like an ordinary light bulb or heating element like a toaster, that have a known wattage.
Voltage I'd check using a digital multimeter, 240V seems quite high (but I don't know what country you are in, it's not impossible you actually have 240V already), 223V seems more to be expected.
/Ton

Haldi_2
Normal user
Posts: 29
Joined: 24 Aug 2020, 18:10

Re: Smart plugs supported by EasyESP

#30 Post by Haldi_2 » 20 Mar 2021, 17:13

i checked with a digital Multimeter. Voltage is around 238V-240V Normal should be around 230V here in switzerland. So that is correct.

Lightbulbs are not used anymore here, we only got LED's and stuff, thats energy saving 5W so not really usefull.
The Toaster is a great idea. Sadly our toaster broke down yesterday... so gotta way until new one arrives. BUT i do have this Eggcooker here.
Which "should" be 350W. I say should because it actually shows 370W
DSC_0104.JPG
DSC_0104.JPG (203.39 KiB) Viewed 8322 times
DSC_0105.JPG
DSC_0105.JPG (157.71 KiB) Viewed 8322 times
Does that count as a non-inductive and non-capacitive load?


P.S on another note... seems like i'll have to build my own ESPeasy build.
The "ESP_Easy_mega_20210223_hard_other_POW_ESP8285_1M" i'm using doesn't have the "Generic UDP" Controller included -.-

Edit:
Tried to send Sensor data via ESPeasy P2P Networking...
Sadly this nees BOTH devices to have the same Sensor for it to work. so i can't share the HLW8012/BL0937 to another ESPeasy device which is another build version.
So now i'm trying to figure out how to run the rules to copy all the data into a dummy device every second which can be shared.
on Energy#Power do
TaskValueSet,4,1,[Energy#Voltage]
TaskValueSet,4,2,[Energy#Current]
TaskValueSet,4,3,[Energy#Power]
TaskValueSet,4,4,[Energy#Powerfactor]
endon
Edit2: Well guess Dummy Devices can't be shared :( They do transfer the name but not the data values.

TD-er
Core team member
Posts: 5417
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Smart plugs supported by EasyESP

#31 Post by TD-er » 20 Mar 2021, 18:31

Heating elements are almost always a perfect resistive load, and thus the simplest loads to measure and use for calibration.
But since they are essentially a resistor, the power consumption depends on the supplied voltage.
The net voltage differs during the day.
It may depend on a number of factors, like in a neighborhood with lots of solar panels on a sunny day it may be as high as 250V (in the Netherlands) and when a lot of electric heating systems are on, it may be as low as 210V.

P = U * I and I = U/R
=> P = U^2/R

Meaning with constant R the heating element may consume less or more power in Watt depending on the voltage.

User avatar
Ath
Normal user
Posts: 1103
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Smart plugs supported by EasyESP

#32 Post by Ath » 20 Mar 2021, 18:48

Haldi_2 wrote: 20 Mar 2021, 17:13 Tried to send Sensor data via ESPeasy P2P Networking...
Correct, but that P2P also has other features like sending commands directly to another unit.
Prerequisites:
- All units involved must have a unique Unit nr, and not Unit 0 or 255
- You don't need the P2P Controller, just set up the 'Inter-ESPEasy network' UDP Port to the same value (8266 is the iana registered value, but I've used 65500 since the beginning of time, well, ESPEasy time :o)

Lets assume the receiving Unit nr is 1, and the sending unit is 2
Add this code on unit 2

Code: Select all

on Energy#Power do
  SendTo,1,"event,EnergyValues=[Energy#Voltage],[Energy#Current],[Energy#Power],[Energy#Powerfactor]"
endon
And on unit 1 you will need a rule like this:

Code: Select all

on EnergyValues do
 TaskValueSet,4,1,%eventvalue1%
 TaskValueSet,4,2,%eventvalue2%
 TaskValueSet,4,3,%eventvalue3%
 TaskValueSet,4,4,%eventvalue4%
endon
/Ton

Haldi_2
Normal user
Posts: 29
Joined: 24 Aug 2020, 18:10

Re: Smart plugs supported by EasyESP

#33 Post by Haldi_2 » 20 Mar 2021, 19:23

TD-er wrote: 20 Mar 2021, 18:31 Meaning with constant R the heating element may consume less or more power in Watt depending on the voltage.
Oh....
Makes sense. So the 370W with 239V would be around 356W if it were proper 230V.


Ath wrote: 20 Mar 2021, 18:48 Correct, but that P2P also has other features like sending commands directly to another unit.
Ohhhhh Rules can do anything if you know how.
Thanks a lot! That's one sweet solution.



Edit:
Mhmmm... there seem to be some issues with Voltage.
Sometimes it spikes to 4000
Screenshot 2021-03-20 194720.png
Screenshot 2021-03-20 194720.png (192.65 KiB) Viewed 8297 times
Might that be due to 2second interval? I'll try with different invertvals for longer periods.

Edit2: Nope. Set timint to 120 seconds but it still get errors with Voltage 4204 and Current 0 and PowerFactor 0. Only Power stay correct.
Screenshot 2021-03-21 095213.png
Screenshot 2021-03-21 095213.png (69.76 KiB) Viewed 8257 times
I think it would be best to move to this Topic.
viewtopic.php?f=6&t=8321&p=50919

Haldi_2
Normal user
Posts: 29
Joined: 24 Aug 2020, 18:10

Re: Smart plugs supported by EasyESP

#34 Post by Haldi_2 » 31 Jul 2021, 07:46

Short update: I've added 2 very easy rules that improve the Handling of the Smartplug.
Someone who reads this might want to copy&paste it on a first setup of his own Smartplug.

First there is a Switch Input on GPIO3 (had to deactivate Serial in Advanced for that to work... worst choice of pins on my device ever)
Screenshot 2021-07-31 074047.png
Screenshot 2021-07-31 074047.png (71.68 KiB) Viewed 2356 times
Then we use the switch to turn the device On and Off... with security! If the device is drawing power you can't shut it off :) because i use it for my Computer and don't want people to shut down my PC.

Code: Select all

On Button#State=1 do
     gpio,14,1
endon

On Button#State=0 do
  if [Energy#Current]<0.2
     gpio,14,0
  endif
endon
The second one is for the blue light. Sadly the red light is connected to the relais, so whenever power is on, there is a red light.
If the system draws more than 0.08A = Active and show the blue light. Check every 5 seconds.

Code: Select all

On System#Boot do    
  timerSet,1,1     //Set Timer 1 for the next event in 30 seconds
endon

on Rules#Timer=1 do
  if [Energy#Current]>0.08
      gpio,13,0
  elseif [Energy#Current]<0.08
      gpio,13,1
  endif
  timerSet,1,5   
endon
Actually extremely easy and basic rules. But when i first setup my Smartplug i didn't have enough time to tinker with it, and afterwards never really bothered about that part ^^

TD-er
Core team member
Posts: 5417
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Smart plugs supported by EasyESP

#35 Post by TD-er » 31 Jul 2021, 14:41

Hmm, maybe 5 sec is a bit short here.
You must press the button and then let the PC start I assume?

What happens if the PC is put to sleep? I can imagine the power may drop below 80 mA since that's already over 17 Watt considering 230V mains voltage.

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests