Closed WizBangCrash closed 5 years ago
I don't know why your device is restarting every 40-50 secs. Maybe a faulty unit. Can you provide logs, please?
Thanks for the response. Can you point me in the right direction for some notes on how to get a copy of the logs?
Sure, you can use screen
command after connecting your device to computer:
screen /dev/<your_device> 115200
Thanks. I'll get some logs to you as soon as I can.
Hi @RavenSystem,
I have used the screen
command to capture a few iterations of the rebooting sequence.
I've had a look at the results and don't yet know enough about the SDK to understand what is going wrong, but you can clearly see a message on line 79 showing that the SonOff has connected to my WiFi network (connected with MyWiFiNetwork, channel 9
) and got an IP address (line 81) and then in line 85 we get a message stating wifi_config: wifi_config_station_connect: No configuration found
I have followed the same setup procedure with this device as I have with the Sonoff Basic's I have previously configured.
Any help you can give would be most welcome.
I've also uploaded an additional log of me connecting to the RavenCoreXXXXXX SSID and setting the WiFi parameters.
You can see me update the WiFi settings at line 77. The device then reboots, connects to my wifi at line 129 and states it has successfully connected on line 148.
The HomeKit server is then started (line 156).
On line 177 I get the following: RC >>> Resetting device to factory default
just after an mDNS announcement :-(
I hope this helps in getting to the bottom of the issue.
Is your GPIO0 released?
Yes. I had soldered a wire to on to R19 to hold GPIO0 low during the re-flashing process, but I desoldered it write after flashing and have checked that there is nothing holding it low. I am finding that the device just resets a random amount of time after booting. I have found that now I can monitor the logs I am able to time things so that I can get all the way through to pairing the device to HomeKit and then anything from a few seconds to a minute or two after the first mDNS broadcast the device resets.
Device keep doing factory reset?
Yes. So all config is lost on each reset.
FYI I flashed the device with the Tasmota firmware today as I was concerned it was a hardware related issue with the Sonoff unit. Tasmota software loaded and worked fine. No resets. If I get time this week I will look at building your firmware locally and adding some debug code to try and get to the bottom of the issue. Have you ever used VSCode and Platform to build RavenCore? I'm familiar with this and wondered if you had already tried it?
Sorry, I forgot GPIO that performs factory reset is GPIO10 in Dual type, not GPIO0. Check status of GPIO10.
I use Xcode for coding, and gcc to compile.
GPIO10 (pin 19) is connected directly to an input pin on an 8051 device that controls the LEDs on the touch pads and the main LED.
Sorry, another mistake. I have read all your logs, and problem is with GPIO-0 for sure.
Can someone explain which type of T1 supported? Only 3ch? Or I can use 1 and 2 ???
All are supported: 1ch -> dev type 1. 2ch -> dev type 2.
I have the same problem. Any solution?
Hi @pmstmb , I never did get to the bottom of this. I couldn't set up my own debug environment and @RavenSystem closed the issue. I ended up switching to Tasmota (https://github.com/arendst/Sonoff-Tasmota) as it had no issues with the T1 R2. I'd still like to switch back to RavenSystem at some point though as I'd prefer to have just a HomeKit environment and not need an MQTT server. I may come back to it in a few months when I've finished my current project.
Hi
Thank you for your replay. I hope, in future will be possible to use ravencore for sonoff touch. It is better, that is not neccessary to use bridge. I flashed sonoff touch with tasmota now, it works perfectly, but only I have to use bridge for homekit.
Hi @pmstmbhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpmstmb&data=02%7C01%7C%7C575fa6d49e514bc1a08108d6a0ed4d2a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636873338385711926&sdata=UbJJBwee4IMgM%2BI%2F0ibO%2BNQBgQ4CiTh0lIYBR7cDnfg%3D&reserved=0 , I never did get to the bottom of this. I couldn't set up my own debug environment and @RavenSystemhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRavenSystem&data=02%7C01%7C%7C575fa6d49e514bc1a08108d6a0ed4d2a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636873338385721943&sdata=yk%2BCnUydWa8LJBfXHJNifCU%2BqaWUo9eYkK5SofZ67CQ%3D&reserved=0 closed the issue. I ended up switching to Tasmota (https://github.com/arendst/Sonoff-Tasmotahttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Farendst%2FSonoff-Tasmota&data=02%7C01%7C%7C575fa6d49e514bc1a08108d6a0ed4d2a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636873338385731942&sdata=%2FpxTeJuBftadu2GcbV%2Bgemaof7HH5IopAkPaqnDcbG8%3D&reserved=0) as it had no issues with the T1 R2. I'd still like to switch back to RavenSystem at some point though as I'd prefer to have just a HomeKit environment and not need an MQTT server. I may come back to it in a few months when I've finished my current project.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRavenSystem%2Fesp-homekit-devices%2Fissues%2F123%23issuecomment-469440041&data=02%7C01%7C%7C575fa6d49e514bc1a08108d6a0ed4d2a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636873338385741953&sdata=3F%2FrvmHQ0tQKOuMe37fh7djjWe5J3sDOgM2XrT7rXis%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAt_ZjD7NhwvDdjOu2kZhiDiqFYmaODCkks5vTZhNgaJpZM4ZJkXp&data=02%7C01%7C%7C575fa6d49e514bc1a08108d6a0ed4d2a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636873338385751957&sdata=2w8N64lLAv7NgGWEFSDUiOEFjoNs8m2lyI3DOeFTMoo%3D&reserved=0.
my sonoff t1 with 3 switches, is running just a switch on homekit, could anyone help me?
Hi, I have been using RavenCore for a while with the multiple Sonoff Basic units in my house. Last week I bought a Sonoff T1 and have re-flashed with RavenCore but I cannot get it to pair with HomeKit. Having spent some time debugging the issue it appears that after the unit has been configured on the network and the ravencore firmware has been downloaded OTA the unit reconnects to my WiFi, stays up long enough to advertise it's presence to HomeKit, but reboots before the device can be added in the HomeKit app.
The sequence I follow is:
RavenSystem/ravencore
and OTA binary tomain.bin
before clicking "Join"After these steps I see the device in HomeKit when I try to add an accessory, but if I monitor my router logs I can see that the Sonoff unit is only staying connected to the Wifi for about 60 seconds and then disconnects. It reconnects about 10 seconds later and then repeats this cycle.
If I watch the sonoff device I see the following:
Any advice on how to resolve this would be most welcome :-)
My Sonoff is: