I’m putting in a PetSafe Pet In Ground Fence (Containment System) in a new house and realized today that the new ‘basic’ model doesn’t have an audible alarm when the loop (in ground wire) is broken like my older model…They want you to spend an extra $100 for a $2 piezo buzzer to be included with the unit…Nevertheless…Is there any device that I can affix to the unit to monitor weather the led loop light and signal home assistant to send me a notification if it changes (led goes off)? Model below:
Ugh… I don’t think it’s going to be easy, or pretty… to help us give the best advice, a few things specs are needed.
- Does this thing operate on batteries, or plug in?
- What voltage (ie wallwart output, or battery count)?
- What environment will it be in (outdoors in rain, or inside the home)?
- Are you willing to hack it (take it apart and solder inside)?
If it’s outside and battery powered, I’d probably rig up a custom programmed esp with it’s own battery to monitor the LED voltage (I have a similar device powered by 18650 that listens to a PIR sensor… battery would last several years in this application). If it’s plugged in, I’d probably do the same, but use the devices bus for power and programmed with basic esphome components (would also use esphome in the former case, but haven’t found all the needed bits to do it). There’s many ways to get this done… I hate those ghetto light sensor methods but they can work… could even measure current through the loop with a hall sensor, since the device obviously sends a signal at least once in a while.
[edit: Just realized a peizo might be enough for your needs. If so, you might consider doing an HA independent hack. Just wire up a fet to the LED that turns on a piezo when the LED turns off. That would cost a $1 or 2 and an hour of soldering/hacking… much cheaper than a $100 peizo, lol (depending on the value of your time of course… $100/hr is pretty good though). If this sounds like your plan and you need help, I’m more than willing… just would need some good photos of the PCB and some voltage measurements. ;)]
I have this same system and wanted a way to monitor if the fence losses continuity. I have been doing a lot of yard work and have broken the wire a few times now. The unit sits in my garage and it can takes a few days to know if the line has a break in it. I am willing to crack open they control unit and soldier in some leads to monitor the led if it’s off.
I’m pretty new to the HA scene but have been a software engineer for the past 20 years. So I should be able to program something if someone is willing to give me some advise and point me in the right direction.
Thank you in advance,
Kevin
I started typing a reply about measuring input current, but then realized this is a system that uses a collar to stimulate the dog, and the fence part is merely a wireless transmitter. With this in mind, the fence is serving as an antenna actually, and input current is likely to be independent of the wire. So normal means of measuring i & V are likely not going to work well; they may end up damaging the transmitter circuit, or make the transmission too weak to actually trigger a nearby collar.
Even if I had the schematic for this, I’m not much an rf guy to say if running Xamps or Yvolts through the antenna terminals would be safe or not. So I’d use a hands off approach, which unfortunately is a little more complicated.
I’d use an esp32 to power it (for esphome). The sense circuit would have a pair of dry-contact relays between the ends of the wires and the terminals on the device. The relays would switch the wire contacts from the transmitter device, to a volt sensing circuit. That sense circuit would just be 3v3 bus on one side, and a small resistance to ground on the other side… code would use “input_pulldown” and just measure digital state on a GPIO pin. So every X minutes the relays briefly remove the wire from the transmitter, connect the wire to the measure circuit, measure continuity (sense pin high), and return to normal operation if continuous. If it measures open circuit (sense pin low), it would then send a notification via telegram, etc.
Doing it this way would mean there are brief times when the fence is down. How long the fence has to stay down? Well, on the scale of time it takes for the relays to close/debounce/open/debounce (~0.2sec?). So likely it wouldn’t even be possible for your dog to escape stimulus, even if he/she got lucky and timed the crossing right during disconnect period.
Lastly, relay longevity will have to be balanced with sensing period. The more often you check the wire, the sooner the relays will need replacement. This is HA though… with esphome you can have it not check the wire unless the dog is actually in the area.
Kev
edit: Note that this may need isolation to prevent spikes from damaging the esp. So the same sensor overall, but add an opto-isolator between the sensor output and GPIO pin, and separate power supplies for the ESP and the sense circuit.
Also, above I presumed input current wouldn’t change much with/without a continuous wire… but if not then sensing input current is much simpler. So might be worth hooking up your meter to see what it does there.
So the led flashes/turns on when the loop is damaged? Use esphome and a photoresistor taped over the led. When the led goes on the esp will send a signal to HA. You can use the analog to digital sensor component.
Thank you. I will take a look. I know I did hit it with my multi meter before to check continuity and I thought there would be voltage sent briefly every so often.
I will see what needs to be done. If I figure it out I will share what I did.
Thanks again
Mike,
I will take a look at this seems pretty straight forward.
Thank you,
Kevin