Romkabouter/ESP32-Rhasspy-Satellite

Arduino Compile fails

Closed this issue · 5 comments

Good evening,
i tried to reproduce the steps mentioned in the readme, but after installing the libraries Arduino is throwing the following compile errors:

/Users/norbert/Downloads/Matrix-Voice-ESP32-MQTT-Audio-Streamer-master/MatrixVoiceAudioServer/MatrixVoiceAudioServer.ino: In function 'void onMqttMessage(char*, char*, AsyncMqttClientMessageProperties, size_t, size_t, size_t)':
MatrixVoiceAudioServer:245:7: error: 'StaticJsonBuffer' was not declared in this scope
       StaticJsonBuffer<300> jsonBuffer;
       ^
MatrixVoiceAudioServer:245:29: error: 'jsonBuffer' was not declared in this scope
       StaticJsonBuffer<300> jsonBuffer;
                             ^
MatrixVoiceAudioServer:247:16: error: 'ArduinoJson::JsonObject {aka class ArduinoJson670_0_0::ObjectRef}' has no member named 'success'
       if (root.success()) {
                ^
MatrixVoiceAudioServer:278:7: error: 'StaticJsonBuffer' was not declared in this scope
       StaticJsonBuffer<300> jsonBuffer;
       ^
MatrixVoiceAudioServer:278:29: error: 'jsonBuffer' was not declared in this scope
       StaticJsonBuffer<300> jsonBuffer;
                             ^
MatrixVoiceAudioServer:280:16: error: 'ArduinoJson::JsonObject {aka class ArduinoJson670_0_0::ObjectRef}' has no member named 'success'
       if (root.success()) {
                ^
MatrixVoiceAudioServer:299:7: error: 'StaticJsonBuffer' was not declared in this scope
       StaticJsonBuffer<300> jsonBuffer;
       ^
MatrixVoiceAudioServer:299:29: error: 'jsonBuffer' was not declared in this scope
       StaticJsonBuffer<300> jsonBuffer;
                             ^
MatrixVoiceAudioServer:301:16: error: 'ArduinoJson::JsonObject {aka class ArduinoJson670_0_0::ObjectRef}' has no member named 'success'
       if (root.success()) {
                ^
Mehrere Bibliotheken wurden für "WiFi.h" gefunden
 Benutzt: /Users/norbert/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WiFi
 Nicht benutzt: /Applications/Arduino.app/Contents/Java/libraries/WiFi
exit status 1
'StaticJsonBuffer' was not declared in this scope

Do you have a hint how to fix this?

thanks in advance

Norbert

Hi,

You need to install the ArduinoJson library: use version 5.13.24, this is the latest stable.

Let me know if it works :)

Hi,

i had a beta version installed, which leads to the compile fail. Downgrading to the actual stable solved the problem, thanks.

Now the Matrix Voice is running standalone this blue fading ring, the device is pingable over network and updatable OTA. But SAM can not discover the device, even if i change the MQTT_IP IPAddress to the server with the SAM installation. I think i have a misunderstanding of the way the device communicates. Can you please help me again?

Yes, you have :)

The software only implements the audio_server, which means: It publishes the audio_stream to your Snips Server (the MQTT_IP address).
Is also subscribes to a specific set of topics (like the hotword topic) to be able to react if a hotword is detected. Default, it responds by setting the led ring to GREEN, but other colors are also possible. See the readme for that on how. I am now busy to be also able to play the audio form the playBytes topic but having a bit of a hard time with that.
So, the MQTT_IP should be your Snips device. That way, the audio from the Voice is streamed to your Snips, making it possible to put this device somewhere on the wall (or so), while your Snips could be in your serverroom ( or any other place).

Sam finds snips instances, which this software is not :)

AH OK,

so this tool replaces the mechanical connection between matrix voice and the snips hardware, right?
I have replaced the MQTT_HOST & MQTT_IP address with the docker container running snips, but could not get a reaction after saying (shouting) the default hotword or change the led colors with the mentioned mqtt topics. I think it needs further investigations by me.

Yes indeed.
I do not know how you have setup your system, so can't tell what the problem is in your case.