I have a rainwater collection system that feeds into several water tanks. I’d like to be able to monitor the tank levels for a variety of reasons, first and foremost because of the fact that we get almost no rain in the summer, and I have run the tanks to empty before.

In the past, I have used Milone eTape connected to an Atmel microcontroller to monitor water levels for a few different applications. I’d like to use this again if possible.

The eTape essentially acts as a potentiometer in a circuit. I’ve done some research on various ways to feed this into HomeAssistant, but I’m not really sure what’s best. My water tanks are just behind the wall from my HA server, so I could connect directly with USB, serial, or ethernet. WiFi or Zigbee or also options; nearly every other device I have connected to HA is Zigbee.

What I’m ideally looking for is a device that can take a voltage level between 0-5VDC, or a 5k potentiometer, and feed the result into HA. Building something isn’t out of the question (as long as I can program it in C or C++), but an off-the-shelf solution that integrates with HA would be ideal.

  • CameronDev@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    The esphome config is more like a build script, it builds an esphome binary with the config built in. They are fairly simple yaml files, and there is plenty of doco and examples about. Esphome will generate a basic config for you, and you can modify it to suit.

    So, to start with, you just need to install the esphome addon in HA. From there, you can plug the esphome dev board into the PC you use to access HA (ideally, youll want to use chrome, as it supports flashing the esp device directly), and in the esphome interface click the “New device” button. You choose a name for the device, and then click connect. Esphome UI will then connect to your board, and try to determine what it is, and will setup a basic “failsafe but does nothing” config, and it will flash it to the board.

    From there, you can unplug the board, and subsequent flashes can happen over wifi. Adjust the config and reflash until it works. Home assistant should detect the board when it next boots up and you can add it as a device.

    If you get dev boards, no additional hardware is required, its built into the usb interface. Software wise, you will need to use Chrome for the first setup, as firefox doesnt support WebSerial which is needed gor the first flash.

    If you have any other questions shout out.

    If you want something more “flash, then configure”, tasmota is another option. You flash the device from a webbrowser (https://tasmota.github.io/install), and then next time it boots it starts a wifi network you can connect to, and then you can connect to a web interface and use a gui to configure it and connect it to your HA. Esphome is a little more work upfront, but your configs can be backed up more easily.