Trigger an action in HA when a specific IP on my network calls specific domain?

Hi and thanks in advance for any help!

I have a doorbell (Amcrest Video Doorbell) that doesn’t have a chime. I am notified by push alert on my phone when someone rings. I’d like to build an automation that uses our Google Home as a chime by monitoring network requests from the doorbell IP to the cloud service domain (amc-crs.easy4ipcloud.com).

I have the Adguard Home integration installed, and can see the network request in the query logs each time the doorbell rings, but there doesn’t appear to be a way to subscribe to a log event in Adguard for use in HA. I’m wondering if anyone can point me in the right direction as far as existing options, or software I might look into to build this myself.

Take a look at the thread “AD110 Initial Impressions”. There is a detailed post describing how to use Tasker on an Android phone to trigger HA actions from SmartHome push notifications.

This method won’t trap requests to the cloud service, but since you were already considering using Adguard app on your phone, Tasker+SmartHome app may be just what you need.

Isn’t there a way of doing this without including the phone in the loop?

what exactly are you wanting to do? The Amcrest core integration (or dahua custom integration) can now listen for AD110/AD410 doorbell events to trigger automations. Use of Tasker to capture phone notifications was an early workaround.

Hi Gary. Ok, as one of the goofiest hobbies ever I guess… I am running weewx (amazing open source) software on my Raspberry PI which listens to, collects, analyzes and sends out weather data from my PWS (Personal Weather station) - it is an AmbientWeather WS-2902C - which has limited communication capabilities - but weewix is intercepting network traffic from it - and I send it all over the world…

The below 3 lines are from one of the logs in the weewx system (I put blank lines between them for readability) regarding my weather station. They are notification of successful rest API calls made by weewx to three additional weather web sites with the latest weather data from my location:

Jul 5 23:00:30 kruse-pi weewx[701] INFO weewx.restx:
Windy: Published record 2022-07-05 23:00:00 EDT (1657076400)

Jul 5 23:00:30 kruse-pi weewx[701] INFO weewx.restx:
WindGuru: Published record 2022-07-05 23:00:00 EDT (1657076400)

Jul 5 23:00:30 kruse-pi weewx[701] INFO weewx.restx: CWOP: Published record 2022-07-05 23:00:00 EDT (1657076400)

There are many others in addition to the three above (windy.com, windguru.com, and CWOP (Citizens Weather Observation Program - which feeds intro NOAA) but that is a simple example of three weather sites where I am pushing weather data. However once you set that up though - there is nothing else to do with it! So - weird hobby, right? Therefore that morphed into me using the same hardware to get into home automation (telling me to close specific open windows when it starts to rain, etc. etc. we know how that turns into an unending rabbit hole of a hobby - turning on cameras and lights in the middle of the night if there is motion in the front yard, creating a home grown alarm system, reminders to close the garage door, yadiyadiayada!) So here’s the rub -

This instance of Weewx is running on a Raspberry PI 4B 8GB running a 1TB SSD (rather than a micro SD card) for performance reasons. Also on that same RPI, I have Home Assistant Supervised running in a docker.

I don’t care what the mechanism is other than something elegant (ideally by listening to network traffic, not by log scraping), reliable and lightweight, but I am trying to determine the best way to be notified within Home Assistant (a lovelace card or whatever) of the most recent time I have sent data to each of these websites, being updated each time another API call is successfully made by weewx. (Some sites are fed every second, some every 5 minutes, a few only every 10 minutes - I go by their API rules…)

So, Home Assistant supports MQTT, but out of the box functionality for weewx as I understand it MQTT is only available for sending the weather data to destination/s via MQTT, not reporting when RESTful API calls are successfully published, which is the notification I need coming into Home Assistant on the same Raspberry PI.

Weewx software experts on their forums suggest I override the parent function in the source code which makes the rest API call to also call HA with MQTT - but that is not good to change because when I update my weewx software to the latest version my changes would be blown away. They also suggested I could have a cron job on the RPI which would scrape the most recent additions to that log and publish an MQTT message to HA but that isn’t very elegant either.

Hence this is why I am looking for something that can run from within HA that will monitor network traffic and be able to act upon specific rest api calls it sees coming from the RPI and going to specific destinations only. Do you know of anything that can do that without having to have a cell phone in the middle of the setup - or at least some kind of log scraping utility/add on within HA?

Thanks for your time and I look forward to hearing back

Here are some of the web sites that are showing my weather station data :slight_smile:

AWEKAS (Germany web site showing data from all over the world although my weather station is in new Jersey lol): AWEKAS Automatisches Wetterkarten System

CWOP: GW1060 Location

PWSWEATHER: https://www.pwsweather.com/station/pws/kruse1

METWOW: Met Office WOW -

WUNDERGROUND: Personal Weather Station Dashboard | Weather Underground

METEOSERVICES: Kruse1-Wetterbericht

OPENWEATHERMAP: Weather forecast - OpenWeatherMap

WINDGURU: Windguru station - Ridgewood, NJ, Kruse1

WINDY: Windy: Wind map & weather forecast

AMBIENTWEATHER: https://ambientweather.net/dashboard/3e5ec6331a8884e1ac1d5fbd2812ba11/tiles

NATIONAL WEATHER SERVICE: Time Series Viewer

WEATHER.US: Temperature, observations Bergen from 01/24/2022, 11:00am | Amateur weather stations

APRS.FI: Google Maps APRS

AMBIENTCWOP: AmbientCWOP

The HA FILE Sensor can create values from a plain text log file based on a matching template. you can also use a Linux GREP to parse text files, executed via HA’s command_line integration.

This post provides additiional examples… Sensor for monitoring the logfile - #2 by gpbenton

1 Like

Thank you Gary. I did look into the file sensor but that only looks at the lst ros in the file so that wouldn’t work. But, I’m looking at your other suggestions - !