Shop OBEX P1 Docs P2 Docs Learn Events
WiFi controlled outlets - Page 2 — Parallax Forums

WiFi controlled outlets

2

Comments

  • OK, I've got it. This is triple-checked and I'm quite certain of it, verified to the ESP8266 pins and even though the pin numbers don't match that FCC document, it's all consistent with the set of signals (even the three grounds) and the pinout of the ESP.
    1	GND
    2	Power 3v3
    3	CHIP_EN 	reset sw
    4	XPD_DCDC / GPIO16
    5	MTMS / GPIO14
    6	MTD1 / GPIO12
    7	MTCK / GPIO13	power sw
    8	MTD0 / GPIO15	Y to main board, D8
    9	GPIO2		D3
    
    10	GPIO0
    11	GPIO4
    12	DVDD / GPIO5
    13	U0RXD
    14	U0TXD
    15	EXT_RSTB
    16	GND
    17	TOUT / No Connection?
    18	GND
    
    All of them are verified to the chip except TOUT; I can't find any evidence that pin 17 is connected to anything past the first via on the daughterboard. Interesting that the invisible reset button is connected to CHIP_EN; maybe it just doesn't work? D3 is the wifi LED, and D8 the ON LED controlled by the same pin as the relay.

    You could easily work with the daughterboard on its own by feeding it 5V or more; the 1117 regulator is on the daughterboard and it's fed from an unregulated transformer/rectifier/cap set on the main board. Flashing it will be a bit of a chore since six wires will need to be hooked up to put it in the right mode and feed it data. I'll probably try that later by tack soldering.
  • Nice job with the pinout. Do you know if the firmware that comes with these outlets can be saved? It would be nice to have the option to reflash these with the original firmware that they come with.
  • Unlikely, since the firmware was undoubtably written with the ExpressIF SDK. We would be depending on it to be willing to extract itself. I have made preparations to wire it up for flashing but before I do I'll eavesdrop a bit on the current firmware to see if it's doing anything over the UART.
  • Does anyone know of another place to buy these modules? My local Home Depot doesn't have any.
  • I am starting to feel this was a Home Depot exclusive that they are abandoning, which is why it's so cheap. Search on the brand "eco" is useless although "eco plugs" does pull up the control app readily in the Play store. I left the actual hardware and packaging at work but I'll see if there are any other clues tomorrow.
  • localroger wrote: »
    I am starting to feel this was a Home Depot exclusive that they are abandoning, which is why it's so cheap. Search on the brand "eco" is useless although "eco plugs" does pull up the control app readily in the Play store. I left the actual hardware and packaging at work but I'll see if there are any other clues tomorrow.
    Looks like it comes from here: http://www.kab-cable.com/product_description.php?PNo=484

    Unfortunately, I don't see any way to order the directly from the factory.
  • No, they're a Chinese OEM. Click on "our factory," they're in Guangdong. They probably made this product on spec for Home Depot. That does suggest, however that a lot of other wifi outlets that look similar may also have ExpressIF lurking inside.

    It is interesting that unlike most of the demo ESP modules, this outlet is FCC certified. You need that when you're selling them at Home Depot. Presumbly if I hadn't ripped the shield off (which isn't strictly necessary once you know the pinout) it would STILL be FCC cert if I reflashed it before putting it back together. That could be a useful thing.
  • Here is the manufacturer's site
    http://www.kab-cable.com

    They show various products but no "where to buy" that I can find...
  • To give a handle on what a bargain this is... The "main" board with the 110VAC stuff on it is connected to the "control" board by a cable with only three conductors. It sends unregulated power (stepped down and I suspect isolated by a transformer) up to the control board and receives a signal which comes straight from one of the ESP8266 pins to switch the relay.

    This means you could THROW THE CONTROL BOARD AWAY and this is still a great self-contained kit for a MCU like a Basic Stamp, Prop, or Arduino, possibly powered by the module, to control an outlet with proper grounded 110VAC plugs. For about four dollars.

    As I hinted above if you can get it hooked up to flash and comm with it the control board can work without the main board if you give it 5V or unregulated power. That gives you one switch (I doubt Reset does anything useful) and a couple of LED's built in, which is more than most ESP dev boards have.
  • David Betz wrote: »
    Does anyone know of another place to buy these modules? My local Home Depot doesn't have any.

    You can try Walmart:

    http://www.walmart.com/ip/Generic-CT-065W-WorkChoice-1-Ol-Wi-Fi-Indoor-Switch-White/46721978

    or ebay:

    http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&_nkw=wifi+outlet+2+pack&_sop=15




  • That's brilliant detective work, EE351. That walmart product is definitely the same and probably through a similar OEM style contract. I thought of eBay but my eBay search-fu is obviously weak.
  • EE351 wrote: »
    David Betz wrote: »
    Does anyone know of another place to buy these modules? My local Home Depot doesn't have any.

    You can try Walmart:

    http://www.walmart.com/ip/Generic-CT-065W-WorkChoice-1-Ol-Wi-Fi-Indoor-Switch-White/46721978

    or ebay:

    http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&_nkw=wifi+outlet+2+pack&_sop=15



    Thanks for the links. Not quite as good a bargain as Home Depot though. :-(

  • localroger wrote: »
    To give a handle on what a bargain this is... The "main" board with the 110VAC stuff on it is connected to the "control" board by a cable with only three conductors. It sends unregulated power (stepped down and I suspect isolated by a transformer) up to the control board and receives a signal which comes straight from one of the ESP8266 pins to switch the relay.

    This means you could THROW THE CONTROL BOARD AWAY and this is still a great self-contained kit for a MCU like a Basic Stamp, Prop, or Arduino, possibly powered by the module, to control an outlet with proper grounded 110VAC plugs. For about four dollars.

    As I hinted above if you can get it hooked up to flash and comm with it the control board can work without the main board if you give it 5V or unregulated power. That gives you one switch (I doubt Reset does anything useful) and a couple of LED's built in, which is more than most ESP dev boards have.

    Did you notice the unconnected pins on the main board and the daughter board? I'm thinking that these connections are used on the CT-065 advanced version that does the power monitoring feature.

  • The really weird thing is that the unconnected pins on the control board did not seem to connect to any of the pins on the ESP daughterboard, although they did to the kindalookslikeaJTAG connector on the other end of the control board, but those don't seem to go anywhere else. As with TOUT that's a bit of a mystery.
  • OK got it hooked up, but it won't be possible to close the plug with all the jumpers. Before trying to flash it I took a listen to the stock firmware, and wow this thing spits out some diagnostic data at 115K. This is bootup (I edited out our wifi password which is there in the clear):
    *****************BOX INFOR********************
    ^_^Hello,ESP8266!
    FirmWare Ver:1.6.0
    SDK Ver:1.0.0
    Compile Time:May 28 2015,14:17:55
    data  : 0x3ffe8000 ~ 0x3ffe89e4, len: 2532
    rodata: 0x3ffe89f0 ~ 0x3ffe90a0, len: 1712
    bss   : 0x3ffe90a0 ~ 0x3fff4228, len: 45448
    heap  : 0x3fff4228 ~ 0x3fffc000, len: 32216
    [Memory_Infor]Heap is:31944
    *****************************************
    [Flash]Read the Dst:1
    [^_^]Get Power Detect Write_OffSet_flag:10
    [Flash]SN SGquSQTJc2  Read Flash 3 Sector0+1024+512 Successful !
    [Flash]Factory Infor IP: 210.65.89.22 SSID:ECO-Plugs Wifi_Main_Name:ECO- Read Flash 3 Sector0+1024+512+128 Successful !
    nRouter_Conn_Flag:1 
    [15SX_D]Write 2014-01-01-0-0-0 to Flash
    [15SX_D] Basic SN:SGquSQTJc2 alias:rogers light pwd:7800ABE3 
    [15SX_D]Internet Top-Cms:61.220.255.143 M-P2P:210.65.89.22 S-P2P:210.65.89.22 Wifi_Main_Name:ECO- 
    [Wifi]Try to re-Connect SSID:MICHELLI PWD:[REDACTED]
    ^_^Connect Front Router SSID:MICHELLI, PSW:[REDACTED]
    ^_^Creat UDP BoardCast :25!
    ^_^Creat Comm Server Success :80 !
    [Memory_Infor]Heap is:21320
    ^_^Creat TCP Upgrade Server :1932!
    [15SX-D]SSID: SGquSQTJc2 in_ssid:SGquSQTJc2 PWD:7800ABE3 Main_Name:ECO-7800ABE3 Version 1.6.0 2015-05-28 
    [15SX-D]P2P-Svr Create esp_udp Socket at Port: 4819 p2p_port:11615 
    Main_Name:ECO-7800ABE3 TopCms:61.220.255.143 Wifi_Main_name:ECO-
    [Memory_Infor]Memory is:20976
    mode : sta(38:2b:78:00:ab:e3)
    add if0
    No Press Long Key,Exit Time!
    [Flash]Write Flash DST:1 
    scandone
    add 0
    aid 12
    pm open phy_2,type:2 0 0
    cnt 
    
    connected with MICHELLI, channel 8
    dhcp client start...
    [15SX_D]Send Reg to P2P Server :210.65.89.22 
    ip:192.168.1.165,mask:255.255.255.0,gw:192.168.1.1
    [15SX_D]Send Reg to P2P Server :210.65.89.22 
    
    [15SX_D]Check Internet Time ! my time_zone:-14 
    [15SX_D]Callback Net_Time_Server Information!
    2016-1-6 8:24:47
    [P2P_ModTimer]P2P Server Send New Date and Timer!
    [Timer]Date and Timer the New Update!
    Time_tab: year:2016 month:1 day:6 hour:8 minute:24 second:47
    [Sch]Check Have 0 Schedule!
    
    [Task]Analyze Today Task!
    [NightLamp_Infor]Night Lamp Open!
    Year:2016-1-6 Conver Day:6
    Get_AstrTab_Total_iTimer:1717257
    [AstrTab_Timer]StartTimer:6:59,EndTimer:17:13
    [Night_Lamp]Off Timer:7:4, On Timer:17:8
    [RDM_Infor]RDM Handle Open!
    @#@#@!!!!!!SDate:0-00-00,NDate:2016-01-06,EDate:0-00-00
    ret_start:-2,ret_end:-2
    [Hashtable]Add Node to Hashtable:689574593 Ack:689574593
    [UDP_COMM]CMD_Type :50017 
    {^_^}Date:2016-1-6,Timer:8:25:0
    
  • Interesting. Is there anything coming over the uart when the plug is in operation?
  • It looks like it's creating a few local servers on boot up, specifically at ports 80 and 1932. Maybe these are accessible via a webpage?
  • Heater.Heater. Posts: 21,230
    Interesting 1932 is not any well known port number.

    Perhaps try telneting into it.
  • Yes there is traffic whenever it receives a command and occasional random traffic as it checks timer states and whatnot.

    Anyway, it's now dead for its original purpose. With just the jumper between GPIO0 and ground, it accepted a flash and now it's running Lua and I can toggle the relay from the command line. I'll have to see if I can get the housing back together with the ribbon cable still tacked in.
  • That's good to know it accepted the new firmware without issue. When I have more time this weekend, i'm going to try to the arduino ide after I experiment with the stock firmware a bit more.
  • Pictures!
    P1010290.JPG
    P1010292.JPG
    P1010293.JPG
    1600 x 1200 - 441K
    1600 x 1200 - 442K
    1600 x 1200 - 463K
  • Reading over the thread I ran into this...
    I tried a little experiment with the ECO WiFi outlets:
    I set a timer to turn on at specific time and turn off a few minutes later.
    Then I unplugged the power to my router.
    The device turned on the light at the appropriate time and turned it off at the appropriate time.

    Therefore I must conclude that the outlet has memory and a clock. The timer settings were stored and activated properly even thought the WiFi was not available.

    It is more sophisticated than I suspected.

    As you can tell from the pictures there is no battery or RTC chip in these things, under that shield it's just the ESP8266 and its support flash. I suspect, also based on my log of the bootup debug dump, that it's dependent on the servers to get the time and maybe even its configuration. It's probably made to be as self-sufficient as possible to deal with internet outages and downtime but I see no way it can keep the time across a power failure unless it can phone home.

    All in all I see it as being a lot more useful hacked than with the factory firmware. With NodeMCU it took me all of five minutes to pound in a couple of lines of Lua code to make it blink my desk lamp like a turn signal, which the stock firmware won't do. And my first real application for one of the ones I bought will probably be a simple timer to turn off a rock saw. I'll use the wifi to spy on it from the other side of the house but it doesn't even really need wifi, just the programmability. And you can't beat that for the price.
  • Do you guys have any concerns about these units pluged in around your home. At one time I had the full complement of X-10 devices in use around the house, never had a serious problem with them but, I did have a couple of them get zapped by lightning or voltage spikes, freak thing maybe, how well does UL test anymore? If it is like the drug companies, the human's are the guinea pig's. 120v AC does crazy things sometimes.
  • MikeDYur wrote: »
    Do you guys have any concerns about these units pluged in around your home. At one time I had the full complement of X-10 devices in use around the house, never had a serious problem with them but, I did have a couple of them get zapped by lightning or voltage spikes, freak thing maybe, how well does UL test anymore? If it is like the drug companies, the human's are the guinea pig's. 120v AC does crazy things sometimes.

    Well they're rated for up to 15 amps, but I wouldn't feel safe plugging in anything near that amperage. I think these would be fine with a 1 to 2 amp load.
  • localrogerlocalroger Posts: 3,451
    edited 2016-01-11 21:30
    X10 lamp modules had problems because they used solid state switches which doubled as dimmers and didn't work with reactive loads including transformers, flourescents, and other things that weren't incandescent bulbs. These switches are relay based and are more like X10 appliance modules, which in my experience were quite reliable.

    X10 modules also have to couple the power straight to the electronics so they can implement the powerline communication protocol. These modules have transformer isolated electronics.
  • Could you give some more details on how you flashed this thing? I have a it connected to tx and rx and am getting the same response you got, however I am pretty new to ESP8622 and would love to explore this thing, Do you think it would be possible to add a sensor to this thing? (temp or motion)?
  • You fellas have reminded me that I still have a couple of X-10 outlet modules installed in this house, been there since 1999. I do feel the need for modern day remote control, and if it can be done from a phone with bluetooth, all the better. The X-10s battery operated remotes were a little unreliable for me.
  • fload, you will need a flash loader and you need to jump GPIO0 to ground while it boots up to put it in flash mode. There are a number of loaders for generic or standard firmware but that just implements AT commands like and old school modem, you will need another MCU and really high baud rate to keep up with traffic.

    Look up the NodeMCU project though, they grafted a Lua interpreter onto the stock firmware so you can run powerful commands and create scripts from the command line. They also have a very simple and easy to use flash loader. Then also look up ESPLorer which makes it easy to push files to the ESP flash file system. (Yep, NodeMCU has got a flash file system.) This makes it easy to build and manipulate Lua scripts.

    Lua isn't a cure for everything. The ESP firmware is still a bit beta and sometimes a bit flaky but while some people swear by the Arduino library that couples to the default AT command firmware, I'm getting very comfortable with Lua. As I said above, within a few minutes of getting Lua booted I entered a command line that made the relay blink once a second -- while the command line continued to operate for more commands. There's not a lot of memory but that's a limitation we in Propellerland are used to :-)

  • Oh and yes, there are some unused GPIO pins brought out from the daughterboard, so it should be possible to add some I/O. The NodeMCU libraries support both I2C and SPI but I think that's through ESP hardware and it might be pin restricted, and I'm not sure what pins are used for what. (Dang I love the Propeller's pin agnosticity.)
  • ercoerco Posts: 20,244
    localroger wrote: »
    Dang I love the Propeller's pin agnosticity.

    I wonder if the good Reverend Whit echos your sentiment. :)

Sign In or Register to comment.