Confirming that an external device is sending data

I am recent convert from Smartthings and have been using Hassbian for about 3 weeks. I’ve managed to port everything over and added a few new integrations and automations. I have made steady progress up until now but have gotten kind of stuck and am hoping someone would be kind enough to enlighten me.

I’m wondering how I can confirm that an external sensor, device, etc. is sending data on a regular basis.

Example 1:

I am using GPSLogger on my phone and my wife’s phone. It’s 100% reliable on my phone and slightly less on hers. As a first step in trouble shooting this I set up the following sensors and added them to the front end:

  • platform: template
    sensors:
    pat_last_updated:
    value_template: ‘{{ as_timestamp(states.device_tracker.herphone.last_changed) | timestamp_custom(“%m-%d-%Y-%H:%M:%S”) }}’
    bob_last_updated:
    value_template: ‘{{ as_timestamp(states.device_tracker.myphone.last_changed) | timestamp_custom(“%m-%d-%Y-%H:%M:%S”) }}’

What I was hoping to get here was the last time that GPSLogger sent an update. By observation it’s apparent that what this actually shows is the the timestamp for the last state change (home to not_home for example).

Is there a way for me to know when GPSLogger sends data? Ideally I’d like to perhaps have this reset some kind of timer that would send a notification if it expired.

Example 2:

I have a Raspberry pi in my garage doing some unrelated things. I installed Mosquito MQTT broker on the Home Assistant Raspberry PI and wrote a short python script to send temperature and humidity readings (from a DHT22) to Home Assistant once every minute. No issues getting this working. I’d like to monitor that data is in fact getting sent about once per minute. I have these setup as badges in the UI.

image

I assume it shows 4 minutes because the temperature hasn’t changed in 4 minutes. Is there a way I can get notified when a message is sent to the mqtt topic?