-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
AP config #966
base: development
Are you sure you want to change the base?
AP config #966
Conversation
This allows a Tuya device to pair with the tuya-convert AP without using EZ config Device must first be in AP config mode "slow blink" vs the EZ config "fast blink" Once connected to the IoT device's AP, running ./apconfig.py will bind the device to tuya-convert ./start_flash.sh can then be executed as normal, skipping the pairing process
Cool, looking forward to it! |
Using this script helped me from: |
Attempting to test this out but unclear on the steps. Is this correct?
Do you need to modify start_flash to skip the pairing step? |
@kueblc I am a bit lost, too. The apconfig gives me some long number and nothing else. The |
Thank you @kueblc - it works very well! |
if anyone stumbles upon this: the token needs to be the combination of the region (e.g. EU) + token + secret, as described in https://github.com/ct-Open-Source/tuya-convert/blob/master/scripts/smartconfig/smartconfig.py#L47 |
Hello @kueblc and all, I ran into the same problem like @darkmattercoder. Do I have to modify the Defaults section of the script apconfig.py, like replacing SSID "vtrust-flash" with the SSID of my Gosund device? Also would I have to change the BIND ADDRESS and what should be entered here? |
Yes - this sounds very interesting and might help to solve my issue, but would really be great if @kueblc could provide some more info / backtround on the steps required, because I also do not understand the full procedure ...
I´m a bit lost and your help would really be appreciated as I´m hopeful to be able to flash my last devices with that method finally ... thanks! |
Looks like unfortunately the developer is not actively monitoring this space anymore :-( |
No additional script or config modifications should be necessary. @tauno has the correct procedure.
At the point where The purpose of the Please let me know if there is anything else I can clarify. |
I should also note that connecting a third device is not necessary, since that is only to facilitate EZ config. |
thanks a lot @kueblc for the clarification. |
Wow @kueblc !!! Yesterday I tried For me this method of connecting "manually" and using Thanks @kueblc for making your work available to us! |
Thanks a lot, this is great feedback! I had flashed my two devices meanwhile using a USB-TTL adapter but will use apconfig.py for the next couple of devices as well |
Thanks for reporting back @MacSass, I'm very happy to hear it worked well for you |
hi everyone, I ordered following from Amazon and I am not able to get it to flash.
I wouldn't mind opening them to flash but it seems like there is no way way to open this either Any suggestions ? |
Make sure you have your device on „slow blinking“, only then you get an AP to show … I need to hold the button for my device, then it goes to fast blink, then I need to hold button again until it changes to slow blinking… |
here is videos of what it does https://www.veed.io/view/5877f0b6-85c2-4064-86ab-45a97e5bcbc0 as soon I let the button go it reboots and starts blinking fast. I never see additional AP created |
Hmm, as per https://support.tuya.com/en/help/_detail/K9hut3w10nby8 doing a second "hold button" when device is blinking fast should take you to the "led blinging slow" = AP mode. |
When I run the apconfig.py my gosound sp1 device is turning OFF. What can cause this issue? Thanks |
where can i get appconfig.py? I don't see it in tuya-convert folders |
this pull request is not merged yet, you need to use the version from https://github.com/kueblc/tuya-convert/tree/ap-config |
@montyx99 it will appear to "turn off" once it has successfully paired. |
Might this thread still be alive, even after the commit? I've tried this approach with several TopGreener TGWF115PQM plugs. No luck. (Yes the dreaded 4 pack from Amazon) My experience is that I get the plug in AP mode and the host gets a 192.168.175.100/24 wlan address, from the plug. Seems the formerly solid tuya-convert wins of the TopGreener plugs no longer work for us hobbyists even after the VERY helpful work on the general issue by Kuebic! |
@preese could you share your logs? I'm curious if the AP config succeeded and then failed at the provision stage. |
Here is the log. I'm using a RPI4 with fresh build from RPI Imager, 64bit and then tuya-convert+apconfig.py. This is a fresh trial today, with the same results. I've log before this point in time but thought this covers the issue. Let me know if earlier logs would help. |
@preese have you retained the logs from the tuya-convert directory? Recent reports have suggested that newer releases of RPi OS are not working as intended. You may want to try an older release (Buster). I have not been able to verify this myself. |
Not much progress. I did go back to a RPI OS based on Buster, and ran through all the steps a few times with similar results as before. A few tech points to be clear on.
In general is it better to run is on separate hardware, RPI, or use the more standard Docker version with small tweaks to config.txt file? Thanks for you persistence in looking into the issue! Sent you some Coffee! Large log file and concatenated smarthack-xx files below: |
Hi @preese, thank you very much for the coffee! Your process looks absolutely fine to me. Connecting over ethernet is the way to go in your setup. We stop dnsmasq and mosquitto to free up the ports for our own configuration. You will not need to connect your phone if using AP config. Keeping other wireless radios off for clean logs is a great idea. As far as whether to use your own hardware, a RPi, or Docker is mostly a matter of preference. I personally run this directly on a standard laptop running an Ubuntu based distro. I don't have an RPi available and the Docker version was a community addition. From your logs it seems the process is failing between the AP config and the server provisioning. I do not see any attempts from the device to connect to your AP or the web server. After you put the device into slow blink mode, you were able to connect to it's AP, so we can affirm that it does permit AP config. Does the device "click" or make any other observable changes when the AP config script is run? It might be that this device is not an ESP82xx (we can check the MAC address). Or it could be that the firmware has been patched to prohibit aspects related to tuya-convert, like it's SSID or password (we could try tweaking these). EDIT: Unfortunately it looks like it may be likely that this device is not an ESP82xx. You may have gotten lucky with an old batch, so it is still worth checking the MAC address you get when connecting to the device or opening the device to inspect the chipset. |
@kueblc I think you've hit the nail on the head, or is it put the last nail in the coffin! One MACADDR from the new set of four is 38:1f:8d:9f:4a:02. In my google searches this doesn't seem to be in any of the EXP82xxx MAC ranges. Plus your link to the blakaddr page suggests similar info about these TopGreener plugs. Let's call this one done. I do appreciate your work on the project and in this particular question specifically. In broader searching, I've run across this site: https://cloudfree.shop/ They offer several openHAB/HomeAssistant type device options pre-loaded with Tasmota. Including their own 15A plug, as well as Sonoff's S31 plug. Their prices are slightly higher then Amazon and no free shipping. However, just being able to directly use the device rather than poke around for a number of hours seems to offset the higher price. Shipping can be first class USPS, which comes pretty fast and was modest in cost, $5 for four plugs. |
Bummer, sorry to hear these plugs can't be cut off the cloud! Glad to help diagnose anyway and I appreciate your support and kind words. A while back I had considered trying to set up my own shop of cloudless IoT back when that was unheard of, glad to see there are more options popping up. Like you say, it might be worth a marginal cost for the convenience and security of getting exactly what you're looking for. I might still consider it if there's demand / room for competition. Wouldn't want there to be any (appearance of) conflict of interest with this project though! |
Hi All and special thanks to all behind the tuya-convert and @kueblc . This is about the new Gosund SP111 marked as 3680W which are resistant to standard tuya-convert.
And it does it at least couple of time after running ap-config.py. It does not stop it's own AP and it does not try to connect to our AP. I can take a dump of it's firmware if needed as if won't be successful with tuya-convert will program than via serial. Full dump of these packets:
|
Additional interesting finding, as by accident, I left
I've fully packet captures if required from the made up Access Point which was given as to which Gosund was to connect. |
This allows a Tuya device to pair with the tuya-convert AP without using EZ config
Device must first be in AP config mode "slow blink" vs the EZ config "fast blink"
Once connected to the IoT device's AP, running ./apconfig.py will bind the device to tuya-convert
./start_flash.sh can then be executed as normal, skipping the pairing process