Esphome pulse_meter

Hi
I try to use the pulse meter with a hall sensor
my code is

esphome:
  name: est-poe-32
  friendly_name: EST-PoE-32

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

web_server:
  port: 80

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12
  manual_ip:
    static_ip: 192.168.1.162
    gateway: 192.168.1.254
    subnet: 255.255.255.0
sensor:
  - platform: pulse_meter
    pin: 33
    id: "TEST"
  

When i try to install my code on my device
i received always that error message

INFO ESPHome 2024.2.0
INFO Reading configuration /config/esphome/est32.yaml...
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing est-poe-32 (board: esp32dev; framework: espidf; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40406.240122 (4.4.6) 
 - tool-cmake @ 3.16.9 
 - tool-ninja @ 1.10.2 
 - toolchain-esp32ulp @ 2.35.0-20220830 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Reading CMake configuration...
Dependency Graph
|-- ArduinoJson @ 6.18.5
Linking .pioenvs/est-poe-32/firmware.elf
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/est-poe-32/src/main.o:(.literal._Z5setupv+0xd8): undefined reference to `vtable for esphome::pulse_meter::PulseMeterSensor'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/est-poe-32/src/main.o:(.literal._Z5setupv+0xdc): undefined reference to `vtable for esphome::pulse_meter::PulseMeterSensor'
collect2: error: ld returned 1 exit status
*** [.pioenvs/est-poe-32/firmware.elf] Error 1
========================= [FAILED] Took 71.16 seconds =========================

Please advise me
Thx

sensor, switches, etc all go under captive_portal:
likewise network stuff goes above captive_portal

This is not correct.

There is no order to a yaml dictionary.

You can order it alphabetically if you want.

Heck I don’t even use captive portal.

Nope, it’s not technically correct. If you think it’s a good thing for everyone to stick with a common config organization or a standard if you will. Call it what you want but, I call it a positive development.

That will make no difference to their issue. They don’t even use captive portal.

You are just confusing matters.

I wasn’t claiming it would. I was trying to get them to organize in what is the most common order so that when they look at their config and compare it with others, it’s not all backwards and more difficult to learn. It’s kind of a “big picture” thing. Some people see it, some don’t.

Did you have an answer for the question or you just stopping by stir up the OCD folks with chaos?

If I did I would have answered by now. I spent a bit of time researching it and could not come up with a solution.

That is no reason to send them on a blind goose chase about completely unrelated matters though

Does the missing full stop mess with your OCD?

Oh, come on now. Some exaggeration is to be expected but, doing a copy and paste falls way short of most people’s definition of, “A blind goose chase” and seeing how people aren’t knocking each other over in order to try to help this person, maybe making a mountain out of a mole hill for suggesting the idea of doing something similar to PEP 8 is a little ridiculous.

and it’s kind of a waste of time. I’ll do the mature thing and not engage in an unproductive and unhelpful waste of time debate about nothing.

It’s completely unrelated to the issue and will only cause them confusion.

They could even interpret this poorly worded statement:

to mean:

captive_portal:
  sensors:
    - ...
  switches:
    - ...

Which would stuff them right up.

4 Likes

I tried to compile the firmware based on your config and everything worked just fine. As I don’t have the dev board you are using, I couldn’t install and test it, though.

So I don’t think there is anything wrong with your yml file. The error message you get says the linker fails on something (ld returned 1 exit status plus the two lines before that which say undefined reference ...).

Maybe you have a problem with your toolchain/ESPhome installation? (outdated/installation problem/…) I suggest you uninstall and reinstall ESPhome and try again.

1 Like

Oh. That reminds me. What are you trying to compile this on?

It could be running out of memory.

I wonder if thats the problem… they appear to be using one of the ethernet boards and if you look at what they used for friendly_name it appears to be one of the esp32 POE boards. Does using the generic, “esp32dev” for the board type, cover etho esp32 poe boards or are did they select the wrong type of board to setup and thats why its failing?

I received this error also. Cleaning the build file fixed the issue.

In your main ESP home dashboard, navigate to the module with the issue, select the three dots located in the bottom right adjacent to ‘logs’ and select ‘clean build files.’

This should address your issue, unless there are other outstanding kinks.

Cheers.

Thats interesting. Im not even 100% sure what that is for? Does that just delete cached downloads for libraries and files from Git repos?