Basement Watchdog (Glentronics) BW-WIFI Module Integration

I recently upgraded my Basement Watchdog backup sump pump system and decided to add the BW-WIFI module to put it on my network and also to access status from their app on my Samsung S21+ Ultra phone.
Has anyone developed (or is in development) of an integration to Home Asisstant for this BW-WIFI module? This would be some great information to use in Home Assistant.

Thanks,
Dave

2 Likes

Am also interested in this. Mine is branded as Pro Series Sump Pump Wifi Module though so may be that we need to find something specific to Glentronics.

I just looked at the Pro Series Connect and it looks identical to my Basement Watchdog Connect so I would assume you are correct, we need a Glentronics API. I have already contacted Glentronics support about an API and they claim there is no API, but I find it hard to believe there are not some simple REST commands or something that can get the info from the unit locally. I will post here if I learn more. I also posted a note on the FB HA Users page. There seems to be much more traffic there.

I assume by the lack of an update that nothing ever came of this? :neutral_face:

Similarly I have a Basement Guardian with a wifi module. No obvious open ports, communicates over TLS, based on expessif. Looking at the module it’s from Grid Connect.

I’m also interested in somehow integrating this with Home Assistant . . . if anyone has further clues.

I have this hacked together… You are more than welcome to use it.

2 Likes

Thanks!! This is awesome!

Anyone look into just communicating direct to the USB port?

Yes, but that’s not a USB port, it’s a TTL serial port. I opted to monitor/connect mine with ESPHome instead. Info is here. If you choose to go this route, be sure to verify you have a solid monitoring strategy that won’t be impacted by a power failure!

2 Likes

THATS AWESOME, thanks for sharing!

This looks like EXACTLY what I’m looking for! Except it’s read only.

I have to imagine that “white (d-)” cable is the RX line. Have you tried sending anything in? Did you reverse engineer this just by reading the output, or did you sniff the comms to/from the wifi module? I believe the wifi module is capable of resetting/silencing the alarm after the pump runs.

I have my pump in the FAR corner of a crawl space, only accessible through a frustrating removable floor panel, and we have rather unreliable electrical service. All that to say, the “pump ran” alarm is often triggered & can only be cleared by holding the button down for 5 seconds right now.

If I could simply send the right magic code in via serial connection that would be a massive PITA removed from my life.

If you don’t have the wifi module, I’m curious if anyone in this thread who does can possibly sniff the white (d-) line for that magical reset code the wifi module sends.

I don’t own the WiFi module. This is all based on observations made over about a week’s time. I don’t even own this pump - it’s installed at my parent’s home. I built this so I could monitor their pump while they’re out of town. I had the pump on my workbench for a few days before i installed it. I opened the control panel and the white wire doesn’t exist. It’s TX only to the WiFi module, so no matter which you end up using, you have to go press that reset button.

This works perfectly on a cheap ESP32C3 Super Mini board with rx_pin set to GPIO20. Thank you!


1 Like

Would you be willing to put your full code (masking private of course). I just installed the pump at my in-laws house and would like to monitor it remotely w/out spending another $120.

esphome:
  name: esp-sump-pump-watchdog
  friendly_name: esp-sump-pump-watchdog

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: esp-idf

# Enable Home Assistant API
api:
  encryption:
    key: "***"

ota:
  - platform: esphome
    password: "***"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp-Sump-Pump-Watchdog Fallback Hotspot"
    password: "***"

captive_portal:

# Enable logging
logger:
  baud_rate: 0   # keep hardware UART free for BWSP; logs over Wi-Fi only

substitutions:
  rx_pin: GPIO20  # <- set to the ESP RX pin wired to the pump's green D+ (TX)

# BWSP-A serial: 1200 8N1, RX-only (pump TX -> ESP RX). Use a 5V->3V3 divider
uart:
  id: bw_uart
  rx_pin: ${rx_pin}
  baud_rate: 1200
  parity: NONE
  stop_bits: 1
  data_bits: 8

# Poll UART and parse
interval:
  - interval: 100ms
    then:
      - lambda: |-
          static std::string line;
          while (id(bw_uart).available()) {
            uint8_t b;
            id(bw_uart).read_byte(&b);
            char ch = (char)b;
            if (ch == '\r' || ch == '\n') {
              if (!line.empty()) {
                int v=-1, c=-1, st=-1;
                if (sscanf(line.c_str(), "%d %d %d", &v, &c, &st) == 3) {
                  float batt = (v >= 0) ? (v / 100.0f) : NAN;

                  // publish only on change to cut API chatter
                  static float last_batt = NAN;
                  static int   last_c = 999, last_st = 999;

                  if ((isnan(last_batt) && !isnan(batt)) || (!isnan(batt) && fabsf(batt - last_batt) >= 0.01f)) {
                    id(bw_batt_voltage).publish_state(batt);
                    last_batt = batt;
                  }

                  if (c != last_c) {
                    id(bw_charge_status_text).publish_state(
                      c==6 ? "Charged" :
                      c==4 ? "Float" :
                      c==5 ? "Load Test" :
                      c==3 ? "Trickle" :
                      c==2 ? "Operating" :
                              ("Unknown (" + to_string(c) + ")")
                    );
                    last_c = c;
                  }

                  if (st != last_st) {
                    // status text
                    id(bw_system_status_text).publish_state(
                      st==0 ? "OK / Normal" :
                      st==1 ? "Pump Activated" :
                      st==8 ? "Check Battery" :
                      st==9 ? "Check Battery, Pump Activated" :
                      st==19? "No Battery / Disconnected, Pump Activated" :
                      st==20? "Power Failure" :
                      st==21? "Power Failure, Pump Activated" :
                      st==48? "Check Battery" :
                      st==49? "Check Battery, Pump Activated" :
                      st==58? "No Battery / Disconnected" :
                      st==59? "No Battery / Disconnected, Pump Activated" :
                              ("Unknown (" + to_string(st) + ")")
                    );
                    // binary sensors
                    id(bw_system_normal).publish_state(st == 0);
                    id(bw_check_battery_fuse).publish_state(st==8 || st==9 || st == 19 || st==48 || st==49 || st==58 || st==59);
                    id(bw_pump_activated).publish_state(st==1 || st==9 || st==19 || st==21 || st==49 || st==59);
                    id(bw_power_failure).publish_state(st==20 || st==21);
                    last_st = st;
                  }

                  // Optional debug:
                  // id(bw_raw_line).publish_state(line.c_str());
                }
              }
              line.clear();
            } else {
              line.push_back(ch);
              if (line.size() > 64) line.erase(0, line.size()-64);
            }
          }

sensor:
  - platform: template
    id: bw_batt_voltage
    name: "Battery Voltage"
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement
    accuracy_decimals: 2
    update_interval: never
    icon: mdi:car-battery

text_sensor:
  - platform: template
    id: bw_charge_status_text
    name: "Charge Status"
    icon: mdi:battery-charging-medium
    update_interval: never

  - platform: template
    id: bw_system_status_text
    name: "System Status"
    icon: mdi:alert-circle-check
    update_interval: never

  - platform: template
    id: bw_raw_line
    name: "Raw Line"
    icon: mdi:code-braces
    update_interval: never
    internal: true

binary_sensor:
  - platform: template
    id: bw_system_normal
    name: "System Normal"

  - platform: template
    id: bw_check_battery_fuse
    name: "Check Battery/Fuse"
    device_class: problem

  - platform: template
    id: bw_pump_activated
    name: "Pump Activated"
    device_class: problem

  - platform: template
    id: bw_power_failure
    name: "Power Failure"
    device_class: problem




    
2 Likes


I just got this one installed, not sure the others seem to look different. Can I do this without getting the wifi module? I used the dry contacts wired to a zigbee switch but If getting the better data via the usb port that would be cool?
Does it power the ESP well? I dont really have a an easily accessible other outlet unless I change out the one to the sump or add an adapter or something. Is powering the ESP risky to the controller / sump? …cause thats the last freaking thing I need rn.

Does it have a USB port on the side? Try it and let us know.
It powers the ESP as well. I don’t think it’s risky if you connect everything correctly.

Thanks for sharing the code and I noticed luckily in there about the voltage divider/leveler.
I just got a flooded basement so dont need wrecking this. Ultimately all these alerts will require attention so not sure just hacking the zigbee reed switch to the dry contacts so I can get remote alerts already serves its purpose.
Your watchdog device seems to have more relevant alerts.

PDF Manual I found suggest that should work here hopefully w/ your code.
Deluxe Controller
The Deluxe Controller features a series of
warnings (audible and visual) that pinpoint
potential problems with the pump, switch and
power conditions. The controller will sound an
alarm when power has been interrupted, when
the pump has run for more than 10 minutes
continuously, or when the 9V battery is low. The
9V battery (sold separately) runs the controller
during a power outage, allowing it to sound an
alarm if the circuit breaker trips, the controller is
not plugged in securely, or the home’s power is
interrupted. Note: The 9V battery will only power
the controller, not the pump. The Deluxe
Controller is equipped with a USB data port. The
purpose of this port is to allow communication with the Pro Series Connect Modules. The
Pro Series Connect Modules are separately sold accessories that will allow the user to stay
connected and receive remote notifications of potential problems and needed maintenance
while away from home. The Deluxe Controller has a dial (located in the battery
compartment) to adjust the number of seconds that the pump will run after the float
drops. The Deluxe Controller will also run the pump once a week for approximately four (4)
seconds. This test will exercise the pump and help ensure the pump is working properly.

Really appreciate this. I know this is years old... but when I enter in my user creds, it's coming back stating it cannot connect to the server. Are you or is anyone else having this issue by chance?

I've verified the following:

  1. I can reach glentronicsconnect.com by going to the URL manually via the same network/ISP.
  2. I can successfully log in to glentronicsconnect.com once at that URL with my credentials.

Please disregard - Must have been some momentary connectivity issue... it is now working after waiting a few minutes and trying agin.

Thanks again for this integration!