-
Notifications
You must be signed in to change notification settings - Fork 64
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
Rebooting every few seconds? #39
Comments
I'm not working on the project but it appears since Satellite.cpp v7.0 hotword has been disabled locally |
Local hotword detection does not work on the latest version due to the fact that the newest esp library does not like the WakeNet library used. This should not cause the reboot however, so I will look into this. |
Ah, thanks guys, i missed that in the commit-log! So i play with the remote-wakeword detection for the time being... Does the fact, that you didnt remove the web-option mean, that there is hope for the WakeNet integration (this is also from espressif, right?), or is WakeNet dead for the ESP32? |
WakeNet development seems to have stopped. I was working in release 6, but the network stability was less good and also the M5 is not supported with that version (actually only the Matrix Voice is and that is the whole reason for the rewrite) I am hoping on either a new WakeNet library or a Porcupine library. Untill then.. no local hotword ;( |
I'm out of my depth, but I think the issue might be related to
and
So there are two places that try to react to a disconnection by starting the reconnect process? |
No, it only reacts to events when in a state. So what happens in the case you mention, the MQTTDisconnected state transits to itself when after 5 seconds no connection is succesfull. That event is ONLY fired in the I2S task, whenever the code detects that the audioserver is disconnected. |
Thanks. I'm trying to get it to work, but I'm a bit out of my depth. So far I've gotten it to stay in Idle without crashing. I'm seeing some things that I don't understand. Still seeing this double
If I do a test push of a message in the I2sTask, it arrives if I send a fake string. But the actual audio data never arrives.
Even when sending these fake packets, I2sTask still notices that the audioServer is disconnected. I'm not 100% sure it actually is. Not receiving audio data might be what Snips Watch is complaining about here, but I'm not sure. I believe this is after pressing the button:
I suspect Rhasspy has added the
|
I checked, and the microphone data does exist. It just doesn't see to be sent over.
|
The double MQTTDisconnected is indeed a bit strange. DId you put in the "idle react to MQTTDisconnectedEvent" in the MQTTConnected react as well? If not, please do and see if the other react is from the MQTTConnnected state |
No I hadn't. I have now, and will keep an eye out.
I upload via the Arduino IDE. I do have |
Found this in the PubSubClient issue queue: |
I've gotten a bit further!
That was the issue. I added |
Still reboots or is that issue also fixed? |
Yes. Altought I've made a number of changes (disabled color control and OTA), I think that's what fixed it. Also added:
because I noticed that task was created multiple times, and I wasn't sure if that was an issue. Can't speak for @hpmueller1971 though. At the risk of further hijacking this thread: my issue now is that I can't get Snips to react to "Hey Snips". I looked at the older code, but can't find which MQTT commands are needed to work with Snips. I've previously created satellites based on the Pi Zero, and there pointing the satellite audio server to the main server 'automatically' made it work. |
@flatsiedatsie For your Snips compatibility issues: have a look at https://rhasspy-hermes.readthedocs.io/en/latest/api.html. The documentation is not complete yet, but this should become the documentation of Rhasspy's dialect of the Snips Hermes protocol. It already should indicate which parts of the current protocol are Rhasspy-specific. |
The reboot issue re-appears if I disable sending audio data all the time. So if
|
I appreciate the suggestion Koen, but any concrete hints on what changed when Snips compatibility was removed would be greatly appreciated. I went over the code, but couldn't find anything concrete. Looking at the API won't help me either. I don't use audio playing ability. I already can't get it to simply detect the hotword on the main server. |
Sorry, I haven't touched Snips for a long time, so I can't give some concrete hints. Maybe ask on the Rhasspy forum? A couple of users there are still using Snips or have been using it very recently. |
I suspect it has something to do with Did the old code only work if you made changes to |
Pretty strange behaviour, are you using an ino file or my codebranch? I was already investigating the HW_REMOTE and am making some changes.
I think you need to check the void onMqttMessage function. Try changing this (on two places):
to this:
The old code was:
|
I already had :-) See the bottom of this post a few posts up. indeed, I couldn't find anything other than that. Still, Snips just isn't responding to "hey snips". In your experience, does the Atom Echo require saying it near or far from the device? You you have to speak loudly? I was wondering if I had to use "atomecho@mqtt" somewhere, but couldn't find any mention in the code anywhere. As far as I can tell, the current code is similar to the older versions. I also tried playing with |
Ah sorry, missed that. This is the finished message: Also, in later version you need top implement "playBytesStreaming". I suggest you disable the feedback to try this. I will try if I can spinup snips somewhere to help you out :) |
|
@Romkabouter thanks, that might be it. Don't worry about installing Snips, since Voco already drops a lot of Snips-isms too (satellites don't play audio streams). If you do really want you help out, you could try installing Voco on Webthings on a Raspberry Pi. |
I will do, intresting project :) |
@Romkabouter Alright, curious to hear your thoughts :-) |
@hpmueller1971 please check version 7.3: https://github.com/Romkabouter/ESP32-Rhasspy-Satellite/releases/tag/v7.3 |
@flatsiedatsie can you check 7.3 if you still see double creations of the I2Stask? |
I don't use PlatformIO, so I can't test that for you, sorry. I checked my code (which is essentially 7.1 in Arduino form), and it does already have the |
Ah ok, the fixes are small so you should be able to put it in your sketch as well :) |
Yes, but depending on which version of snips is used, you also need playBytesStreaming |
But isn't You mentioned that it would be necessary to play the audio files that indicate the wake word was heard. When I disabled the audio response, it still wouldn't work.
My code already has a similar "only start the task once" check, and since then it doesn't load multiple times. did you happen to try an installation of Voco yourself? I was hoping you'd have a look. You could probably more easily spot and fix the issue than I could. |
Yes, that is only required for playing audio. |
I have noticed something: wifi often crashes at boot. Currently the I2STask is created in the WifiDisconnected class. Perhaps that should wait until the wifi is connected? Otherwise streaming will attempt to start while there is no wifi yet? |
The WifiDisconnected is the initial state of the statemachine. That is why it is created there. |
Hmm, then why did it crash the wifi? I got a bit further: I've managed to get "Hey Snips" detected! But only straight after booting the ESP32.
Some strange things:
That says
The In Snips Watch:
The
If I press the button to start a session, then things look a little different in Snips Watch:
Here is seem that voice activity is up.. but it's perhaps not recognised as speech by the ASR? |
Can you please create a new defect for this? The original defect is something else |
It seems we were on the same track with the need for a delay to start the I2STask. I'll open a new issue, good call. |
Hi,
i successfully installed on an Atom Echo, it seems to work (ping, webui reachable), but it keeps rebooting every few seconds in a loop when in local hotword mode.
`ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
BootiM5Atom initializing...Loading configuration
{
"mqtt_host": "10.123.1.2",
"mqtt_port": 1883,
"mqtt_user": "",
"mqtt_pass": "",
"mqtt_valid": true,
"mute_input": false,
"mute_output": false,
"amp_output": 0,
"brightness": 30,
"hotword_brightness": 100,
"hotword_detection": 0,
"volume": 100,
"gain": 5
}
Enter WifiDisconnected
Total heap: 270760
Free heap: 196232
Enter WifiConnected
Connected to Wifi with IP: 10.123.1.33
Enter MQTTDisconnected
Enter MQTTConnected
Connected as satellite
Enter Idle
Backtrace: 0x4008ca58:0x3ffbe170 0x4008cc89:0x3ffbe190 0x400ec4b3:0x3ffbe1b0 0x40084ab9:0x3ffbe1d0 0x4000bfed:0x3ffeb550 0x4008a181:0x3ffeb560 0x400896e5:0x3ffeb580 0x400d2e75:0x3ffeb5a0 0x40089015:0x3ffeb820
Rebooting...
ets Jun 8 2016 00:22:57
`
The Backtrace looks the same every time. Should "local hotword" even work yet...?
Any ideas?
regards,
/hp
The text was updated successfully, but these errors were encountered: