-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gosund WP3 Module Configuration #6
Comments
That plug looks very much like the Teckin SP10. Try these settings. |
The plug functions as configured using @sylvandb's TanTan WP3 settings. The only issue I'm having is that when I press the button in the socket TASMOTA is seeing a "multi-press" |
Sorry I've never run across the multi-press issue. By chance, is the plug connecting to your MQTT server? all my plugs are laggy to commands via the browser or button until I configure the MQTT settings. |
Change to switch1 and use the switchmode you want along with you can do a long press for other actions. |
@digiblur - sorry, a bit like Greek to me. Can you elaborate in "TASMOTA for Dummies"? ;-) @axiom00 - yes it may be the lag of the plug sending the button to the MQTT broker and then the command being turned around before the action is taken on the relay. Perhaps the "switch" config Travis is suggesting make the relay action "local" w/o having to wait for a command back from the broker? But I need some hand holding. Also, if the button is giving the wrong "information" or it's having to "debounce" in some way, that may compound the lagginess. |
@SynAckFin BTW, I'm finding that if the flash fails, if I just up-arrow and repeat the command, after a few times, the flashing goes through successfully. The only remaining issue at the very end is that it says it fails to configure the newly flashed sonoff-xxxx. But, once it fails, and I point my browser to the IP, there it is in full TASMOTA glory. I received four Gosund WP3 plugs this afternoon... and now have TASMOTA on all four. Still working out the kinks of the TASMOTA module configuration, but I'm on the home stretch. What I thought was going to be a weekend project ended up taking an evening. Gee, thanks! Now what am I going to do all weekend ;-) I have attached the capture of my terminal session so you can see everything that transpired. Perhaps there are some clues in there. As you can see, I just kept running the script over and over until it finally succeeded for each plug. Your Walkthrough was spot on! As you did, the only thing I did was to create an empty ssh file in the boot folder before I plugged the SD card into my RPi. Was able to SSH to it and drove all of this in headless mode. Easy, peasy! Thanks for the great work... and to all who contributed in troubleshooting the project! Perhaps a few more enhancements can come from my log. Cheers! |
@meingraham change the config to Switch1. The one downside is you would lose the ability to do a 40 second long press for a factory default, but I have WiFi Manager as default anyways so it will go into AP mode if it loses it's WiFi connection. I then set switchmode1 5 in the console to allow for a toggle and long press. I also changed setoption32 from the default 40 (4 seconds) to 7 for 0.7 second long press. Then I set a rule1 of I have this on my night stand and use it to fire off various actions in the house. Yes I could have used a DIY D1 mini with some other buttons but this was simple as it was already in case for me with a power supply and a button. I don't use the actual relay at all. Usually when you go to a switch the response time is quicker since it also doesn't have to wait to see if you are doing a double press. |
@digiblur Travis, Thanks. Changing from a button to a switch helped considerably. As I understand it, the rule is not needed for "regular" operation of the socket; yes? The rule just takes advantage of having the button and performing actions in addition to triggering the relay. Basically:
Thanks. Mike |
You will need a rule on the state=3 of the switch to send out the long press action. If there is no rule for state=2 then yes it will toggle the relay. |
That's picture is the GPIO config I'm using. You can swap which LED GPIO you assign as LED1i if you want to change colors. Did you configure an MQTT server? If not, I suspect that is causing your delay (it seems to be trying to find a server). Once I configured an MQTT server the lag went from annoying to barely noticeable. |
@sylvandb - yes, I have MQTT set up. The lag is minimal now that I have GPIO4 set up as a switch. |
Blitzwolf SHP worked on my gosund device. |
Do you mean that the module configuration for the BlitzWolf SHP**1** worked for your Gosund WP3? Where is that documented? I looked over on the TASMOTA wiki and it only had the SHP2/4/6. How different is your configuration from what I have above? Thanks. Mike |
Here is how my device is configured. @GeorgeIoak recommended it in the original thread and it worked. My device is: https://www.amazon.com/Assistant-Required-Enabled-Control-Gosund/dp/B072ZX8RTZ |
That's the plug I purchased. It has power monitoring? |
No, I don't think any of the small (only covers 1 outlet) US style plugs has enough room for the power monitoring. If you go to the BlitzWolf product page you'll see that all of their other plug styles have the monitoring except the SHP1. I have one of the Gosund plugs taken apart but not unsoldered from the mains pins which would allow me to inspect the backside of the PCB and confirm what components are on it. I do have a BlitzWolf completely taken apart but I haven't reversed engineered it yet. Right now I'm in the mode to try and get as many of these devices converted to Tasmota and then I'll start digging into them a bit more. I'm trying to provide as much information as I can to @SynAckFin and @kueblc as I can. |
I didn't think so in such a small package. I was wondering since the SHP2 config sets up power monitoring. I'll probably stick with setting up a "custom" configuration as a Generic module to not confuse the issue. No need to generate the extra payload data and have the web page show non-existent sensors. Yeah, I wasted no time getting my Gosunds flashed. I'm paranoid that Tuya (or their licensees demands) will decide to close the door on the OTA hack. Hopefully not. I only needed one mini-plug right now. I got four for good measure and flashed them all. Each one ended up being less than $6 each after some discounts (regularly $8.50 in the 4-pack). Can't beat that! 18 months ago I bought some TP-Link "mini-plugs" (ha!) for $27 each and I thought that was a bargain! Mike P.S. Thanks for ALL the testing and disassembling you're doing. Your contributions to the Tuya OTA process will benefit me and many others tremendously! |
@meingraham I tried the generic configuration mentioned in this post on my plug, and it stops responding. There must be some hardware difference between our plugs. Back to Blitzwolf. |
@meingraham Yeah, If I had to place a bet I would say that none of these that are small enough to not block the 2nd outlet won't have energy monitoring. I want to try and map out the button, LED, and relay on these and see if they all map to the same GPIO pins. That would be ideal for Tasmota as we could just submit a PR to add a new device for small US style plugs. I've seen 3 different WiFi modules used in the 4 different plugs I've taken apart so I might need to buy a few more (or donations gladly accepted) to take apart to get a real database of these created. They're can't be that many different reference designs of this style out there! Looking at my Gosund WP3 the only marking difference I see in mine is that mine has a B10 at the bottom, not B12. That might be some kind of date code though. I only have 1 of these in actual use and I'm not even sure what I'll do with these since I can't think of what I would want to control. |
This isn't the best picture but it shows the Gosund WP3 on the left(the one with the wires) and the BlitzWolf BW-SHP1 on the right. You can see that the board layouts are nearly 100% identical. The silk screen is different and the 2 electrolytic caps with TH inductor at the top of the board are in slightly different locations. If I find time today I'll come back with GPIO mapping for the 2 boards if we think it's necessary. |
If there isn't any power monitoring on the plug it is usually better to just add the device to the Tasmota Wiki in the other devices section. Then folks can just set it up in Generic easily and no additional firmware code space is needed. |
From what I can tell and recognize this design has a bridge rectifier to go from AC to DC. Then that is fed to some unknown switching regulator to drop the voltage. Then a standard AMS1117 regulator is used to provide the 3.3V. Other than that there's the usual protection around the relay being driven by a transistor and the 2 color LED and button |
@digiblur - I added the Gosund WP3 to TASMOTA other devices based on my flashing & configuration experiences. If we find that there are different varieties of Gosund WP3 itself (I don't mean similar/identical switches from different vendors), then we can expand the wiki accordingly. |
One other difference between these 2 designs I forgot to mention is that the actual WiFi module is different which could of course lead to different GPIO assignments. The BlitzWolf uses the Hysiry ESP8266-S3 module and the Gosund uses the Tuya TYWE2S I'd be willing to bet that these 2 companies just buy what's available and brand them with their logo so as with most Asian products what you buy one day may not be exactly the same the next day. |
I hate it when companies put the same branding, model numbers, etc. on different products. That will make things confusing and error prone. So far I've been impressed that the Smart Life app can tell different products apart... Probably it has some unique identifier "This is a Gosund WP3" regardless of the actual implementation, combined with standardized API for on/off is all it needs. |
@sylvandb Looking at the factory firmware for different devices shows that they pass a product_key which most likely is used in the Smart Life App. These 2 plugs are physically different (same small US plug style) so I want to get a factory firmware image from a BlitzWolf and see how close it is to the Gosund.
|
Yours looks like it might have been a 250V design even though the rating says 125V. I'm looking at the Short of cracking this one open and tracing the connections, perhaps some trial and error for the GPIO/LED permutations. |
I agree with @meingraham , your plug's marking look curious. I have my Gosund open but I didn't get too far mapping out the GPIO pins but I think @meingraham already has his working. I was able to capture some additional logs and firmware today and we succeeded in finding some new information so Colin is digesting the new data. |
How do you guys open these? This specific one hibernate and comes back to life every 3 months or so. Hoping to catch this alive soon and load tasmota. |
@dhami220 Sorry, but what do you mean:
To open these you need to find a thin tool like a knife and slowly work your way around the seam. It can help if you put this in a vise and gently squeeze to help break the bond between the 2 halves. I found that the Gosund was much easier to open than the BlitzWolf. |
The seam is right around the base (facing the wall when plugged in)? I've only tried a couple, and they were glued/welded very tightly. I think my next step would have been a saw but maybe I'll try a vice... |
Thanks guys! Now I know where the seam is and will try to get my third one opened up. @GeorgeIoak: I bought two plugs back in 2017. Used one right away and when I try to use the second one 6 months later, found it to be dead. Vendor sent me a replacement and that worked fine. The one that was dead surprising turned on couple of times in last year or so (I was trying all sort of things; keep the button pressed, plug in a load, hold button before plugging in etc.), but process of bringing it to life is not repeatable. Once it turns on, I can provision it, and it works for a few days and then dies again. I was hoping it is some kind of software issue and hopefully, loading tasmota will fix it. Something else I observed yesterday. Out of the three gosund plugs I have, I was able to flash the one that was sent to me as a replacement. Likely part of a different batch and had different gosund firmware (1.0.6? - should have recorded it). The second one that is alive (from the first batch) is not asking for an update (which is needed for the script to work). |
@dhami220 The unit that is intermittent sounds like a poor soldering issue more than software issue. I would practice opening that unit first so you can learn how it is done and if it really breaks it won't be a big a deal because it wasn't working properly before. I'm not sure you need a firmware update for the script to work. We're learning new things about the default firmware and the process used to communicate and provision them. Hopefully soon "we" will be able to update the scripts and create a more fool proof firmware replacement method. Unfortunately the Gosund that I opened is one of the harder units to attach wires to. Both the Tx and Rx "pins" are on the inside of the WiFi module. It took 2 of us for me to read the firmware on this unit, one person held the clips and the other worked the computer and other wires. |
Put the unit in a vice and cracked open without much trouble. Looked around for loose connections and saw one of the capacitor lead loose in the pcb hole. bent the wire slightly and plugged it in. SPARK AND SMOKE. Now i think it is really dead :). |
I'm not sure bending the cap lead was the best approach but I definitely wouldn't use that unit now. I'd be curious to see a couple of pictures though |
I don't see any obvious signs of damage, which capacitor did you bend the lead on? What I do notice is that this board is the same as what is in the BlitzWolf that I have and not the same as the Gosund that I have. The 2 designs are very similar but they do use a different WiFi module. I can't remember if we compared the GPIO assignments but I'm willing to bet that we're going to find the insides of these plugs are going to be different which means 1 person's Gosund could have different GPIO assignments then the next person's Gosund. I could be wrong so I'll try to map out both units today (or maybe we already have this information?). As a manufacturer it would make sense to use whatever components are available but I would also try to make the same firmware for all of the devices. |
@dhami220 - Could you provide a couple of front/back close-up photos of the Wi-Fi module (the PCB installed vertically) to see if the specific type of Tuya module can be ascertained. Thanks. Mike |
@meingraham Here are the pictures of the wifi module. @GeorgeIoak The black capacitor on the left had one wiggly leg. Felt like the solder joint on the bottom side of the board was damaged. |
@dhami220 - Thanks for the photos. @GeorgeIoak - I haven't had to open my Tuya devices (thank you!) so I cannot compare to anything. I thought the Wi-Fi module photos might have some distinctive markings. Can you tell from the photos what kind of Tuya module it is? Or will it require looking under the metal shield? Regards. Mike |
@meingraham That is the ESP8266-S3 WiFi Module It is used in the Gosund as well as the Dual plug I have called the slitinto |
Ah, it is, in fact, the metal shield which identifies it. Good reference site. I think I'll add that link to the wiki. |
The other WiFi module I've run into
|
Thanks. I updated the wiki on TuyOTA and TASMOTA. |
These settings worked on the Tuya OUKITEL smart plugs from amazon. Flashed them with Tuya OTA process. |
@amitubale What model of the OUKITEL plug; the X6P? |
Yep X6P. |
I assume I'm supposed to configure this as a Generic Module. Using @sylvandb TanTan WP3 configuration, this is what I have:
Does that look right?
The text was updated successfully, but these errors were encountered: