• 0 Posts
  • 14 Comments
Joined 1 year ago
cake
Cake day: July 3rd, 2023

help-circle







  • I don’t have an exact answer to your problem, but I do have a few ideas to think about. I’ve got a few ESP32 WROOM boards running in various applications, so I’m a bit familiar. So here’s my thoughts:

    • I only plug the module into data USB (computer) for the initial firmware provisioning. After that, it’s 100% wifi and USB is only for power using a power supply, not the computer. And I do the initial provisioning with just the bare ESP32 - no breakout board, nothing plugged into GPIO. Get the device up on wifi with NO other configuration in the firmware.
    • I use the “arduino” framework. I don’t know if that’s correct or really matters, I’ve heard it’s the same as “esp32dev” but I don’t really know. I use “arduino” because that’s what the examples used when I setup my first board.
    • Is it possible that the sensor module/board is using the same GPIO that the USB UART uses? There is a lot of shared usage of the GPIO that you’ve got to be careful to work around. The dev tools will often catch this when you compile your firmware, but not always. Again, using wifi after the initial provisioning might be enough if it is sharing GPIO with the serial port.
    • If you repower the ESP32 too many times rapidly it’ll boot into safe mode. You can change the settings on that, but you can also just work slowly - make sure the device is powered on for a few minutes to record a good boot in the flash. It outputs a message in the logs, so it’s handy to always be running the log command in a terminal while developing.

    Hope that helps! They are a lot of fun to integrate with HA.



  • Strange! Nothing jumps out at me as being an obvious problem with your setup. I’m doing something similar, though instead of rtlamr2mqtt (which I didn’t know about) I have a bash script run via cron that parses rtlamr output via jq and pipes that to mqtt (mosquitto), but there’s very little to it. I know the energy dashboard setup is picky about the energy recording entities.

    Mine looks like:

    state_class: total_increasing
    unit_of_measurement: ft³
    device_class: gas
    friendly_name: Gas Meter
    

    The name of the entity is sensor.gas_meter and the state is currently 113812 as an example.

    Might be worth reading through GitHub issues for rtlamr2mqtt, including closed ones, if you haven’t already. Or maybe a hass restart? Can’t think of anything else.