Giter VIP home page Giter VIP logo

esphome-sound-level-meter's Issues

SPH0645: values are wrong

Hello

i try your component and if i use advanced example code i have 121db and if i speak or clap my hand nothing happend.

I try the minimal sample code and i get 104db and same, not a lot of difference if i speak or clap my hand close to the mic nothing change.

I use a SPH0645 like this :

i2s:
  bck_pin: GPIO23
  ws_pin: GPIO18
  din_pin: GPIO19
  sample_rate: 48000            # default: 48000
  bits_per_sample: 32           # default: 32

any idea please why i doesnt work?

SLM doesn't start automatically on boot when a switch is configured

Hello,

First thanks for the nice component. Works very well! I use it as a barking detector when we're not home ;)

I faced a small issue : despite having is_on: true in the yaml (as defined in the example config on the repo), when the ESP boot the sound level meter is turned off. I have to use the switch in HA to enable it.

While digging in the logs, I saw that the switch has a default restore mode to off. Adding restore_mode: ALWAYS_ON solved my issue. But his makes the is_on: true parameter useless (in case the switch is configured). So maybe there's a nicer way to work around this or a small information to add to the the docs/examples.

Hope this helps.
Thanks again for the nice work!
Regards,
Olivier B.

Is it possible to stream the captured audio to Home Assistant?

Hi.

I know this is not the purpose of this cool project, but could anybody think of a way to capture the audio and stream it to Home Assistant, so we can feed it to any media_player device?

Voice Assistant already does it, but I cannot find a way to use the audio for another purposes apart from STT or even replay it in HA. Thus I'm looking for another approaches, like streaming to FFmpeg integration or something like that.

Any ideas are welcome. Thanks!!

Can't get value

Hej I have an issue that it is only working with wrong channel. f.eks. when i set L/R to GND so the channel should be left but it is only working with right channel which is teoritically wrong. and the lowest i get is 75 dBA in a quiet room which is totally wrong.
Do you have any tips that i can do?
I am using INMP441 mic and ESP32 devkitc v4.
Have you had also those issue when u working with Ivan's code.

WiFi implementation

hey buddy
I hope that u can maybe help me, everything is working fine but when i implement wifi somehow it is not working with freertos i get constantly this error:
Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception).
Debug exception reason: Stack canary watchpoint triggered (Mic I2S Reader)
Core 0 register dump:
PC : 0x4008f75b PS : 0x00060736 A0 : 0x8008589a A1 : 0x3ffe89c0
A2 : 0x3ffbf6b0 A3 : 0xb33fffff A4 : 0x0000abab A5 : 0x00060723
A6 : 0x00060720 A7 : 0x0000cdcd A8 : 0xb33fffff A9 : 0xffffffff
A10 : 0x3ffe9230 A11 : 0x3ffb6884 A12 : 0x3ffb6af8 A13 : 0x00000042
A14 : 0x007bf6b0 A15 : 0x003fffff SAR : 0x00000004 EXCCAUSE: 0x00000001
EXCVADDR: 0x00000000 LBEG : 0x4008a505 LEND : 0x4008a515 LCOUNT : 0xfffffffa
and her is my wifi code
/*
WiFi Connectivity Implementation

This C++ file manages WiFi connectivity using the WiFi library and NeoPixel feedback.
It includes functions to connect to WiFi networks, handle multiple network options, and indicate connection status.

Purpose:

  • Connect to available WiFi networks using stored credentials.
  • Provide feedback using NeoPixel LEDs to indicate successful or failed WiFi connection attempts.

Author: [Latif Faghiri]
*/

#include "Arduino.h"
#include "Wifi.h"

// Constructor
MyWiFi::MyWiFi() : pixels(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800) {
// Do Nothing
}

// Getting Wifi
void MyWiFi::begin() {
wifiMulti.addAP(WIFI_SSID1, WIFI_PASSWORD1);
wifiMulti.addAP(WIFI_SSID2, WIFI_PASSWORD2);
}

// Connecting to Strongest Wifi
void MyWiFi::connect() {
begin();
Serial.print("Connecting: ");
int WiFiAttempt = 0;
int WiFiTimeout = 10;

// Checking
while (WiFi.status() != WL_CONNECTED && WiFiAttempt < WiFiTimeout) {
delay(100);
Serial.println(".");
WiFiAttempt++;
}

if (wifiMulti.run() == WL_CONNECTED) {
Serial.print("\nSuccessfully Connected to: ");
Serial.println(WiFi.SSID());
Serial.println(" ");
Serial.print("IP-Address: ");
Serial.println(WiFi.localIP());

// Neopixel should light blue to confirm connection
for (int i = 0; i < 2; i++) {
pixels.setPixelColor(0, pixels.Color(0, 0, 255));
pixels.show();
delay(500);
pixels.clear();
pixels.show();
delay(500);
}
} else {
Serial.println("Failed to establish WiFi connection");
Serial.println("Please try again!!!!!!!");
}
}

int MyWiFi::status(){
return WiFi.status();
}

what do i do wrong

AtomS3U microphone

Hello,

I'm trying to use this component with AtomS3U - SPM1423, but this has only MIC_CLK & MIC_DATA pins.
Any ideea what to do with the ws_pin? It looks like it's mandatory.

Screenshot 2024-05-14 at 20 24 03

I tried also this external mic (based on the same chip) - pdm - the same, the WS pin is missing.

Regards,
V

sensor.community yaml does not install

Sorry to bother, I am fairly new to EspHome and have little skill in programming. I am running EspHome on a Home Assistant Yellow.
My aim is building a small and cheap dnms device with solid measurement quality and good wifi. People in my town are asking for this to record their noise environments. I have selected a seeed xiao ESP32-S3 with PSRAM and a ICS43434 mic for this and want to send measurement data to sensor.community for general logging and make this data available to others like our RIVM and city council.
Searching for the right software for this I found your topic.

I copied and tried to install your sensor-community-example-config.yaml but I get compilation errors pointing to wdt functions/files not found.

Could you point me in the right direction to get your yaml installed?

Best Regards,
Peter


substitutions:
name: esphome-web-81d65c
friendly_name: Xiao ESP32-S3 ICS43434 DNMS

external_components:

  • source: github://stas-sl/esphome-sound-level-meter

esphome:
name: ${name}
friendly_name: ${friendly_name}
name_add_mac_suffix: false

includes:
# should contain single line: #include <esp_task_wdt.h>
- wdt_include.h <------ file not found error

esp_task_wdt_init()

platformio_options:
board_build.flash_mode: dio
build_flags: "-DBOARD_HAS_PSRAM"
board_build.arduino.memory_type: qio_opi
project:
name: esphome.web
version: '1.0'
on_boot:
then:
- lambda: !lambda |- <---- when I comment out the wdt_include.h script starts compiling but stops here
// increase watchdog timeout to 30 seconds
// so that ESP32 don't crash on long http requests
// which might happen with sensor.community quite often
esp_task_wdt_init(30, false);

esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino

psram:

Enable logging

logger:
level: DEBUG

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.