Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106286

How to log notify notify service calls or view notify service attributes (sms integration)

$
0
0

Question
Is there a way of viewing a notify services’ attributes in the Template editor, or logging the actual data sent by a notify service call (e.g. attributes, message, etc).

Background
I’m facing a recent peculiar issue with one of my notify services and trying to identify the root cause.
I’m running HA Container v.2021.10.7 in docker on Ubuntu 18.04 and using an unlocked Huawei E220 USB modem to send and receive SMS with the GSM modem integration.

Phone numbers are stored in secrets.yaml

sms_usera: '+44xxxxxxxxxx'
sms_userb: '+44xxxxxxxxxx'
sms_homealarm: '+44xxxxxxxxxx'

and the secrets are used to configure the notify recipients

notify:
   # sms
   - name: sms_usera
     platform: sms
     recipient: !secret sms_usera
   - name: sms_userb
     platform: sms
     recipient: !secret sms_userb
   - name: sms_homealarm
     platform: sms
     recipient: !secret sms_homealarm
   - name: all_sms
     platform: group
     services:
       - service: sms_usera
       - service: sms_userb

and loaded into template sensors for incoming SMS matching

  sensor:
    - name: sms_usera
      unique_id: sms_usera
      state: !secret sms_usera
    - name: sms_userb
      unique_id: sms_userb
      state: !secret sms_userb
    - name: sms_homealarm
      unique_id: sms_homealarm
      state: !secret sms_homealarm

I have various automations that handle:

  • sms notifications (when no internet connection)
  • incoming sms from authorised senders to perform specific actions
  • storing incoming sms from unknown phone numbers
  • periodic automated SMS communications between HA and our house alarm panel’s GSMComm (basically to keep the house alarm’s pay as you go SIM active by occasionally sending and receiving SMS).

Problem
This setup has all worked without issue for some time, however SMS communications with the house alarm panel from HA no longer seem to generate the response.
Note that SMS communications between HA and usera and HA and userb still function correctly, and SMS communications between the house alarm panel and phones functions correctly. This seems to be purely an recent communication issue between HA and the alarm panel only.

Because this automation is basically a closed loop I need to find a way of checking actual message content and recipient data - my suspicion is that HA is not actually sending the required messsage text to the alarm panel or the phone number is not configured correctly when loaded into the notify recipient.

With the logger set to debug for homeassistant.components.sms.gateway some data is logged but nothing regarding actual notifications.

Any help appreciated.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106286

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>