At home, I have a Intel NUC running PagerMon (GitHub - pagermon/pagermon: Multimon-ng pager message parser and viewer) with a RLT stick on it. It captures all the pager traffic (POCSAG protocol), and display it on a website. So far, so good. I can see the posts of other fire departments and ambulances, so that works fine…
I have created a filter on a specific CAP code (kind of a “telephone number”), and set the webhook that have to be used to send everything to directadmin.
As destination URL, I’ve set http://10.0.0.100:8123/api/webhook/-c3okJuIGk9oVAVYpbktqYxfd (the NUC and the device running HA are in the same 10.0.0.0/24), and i selected some extra info field I want to have such as Message, Source, Timestamp, Alias and Agency.
When the webhook is triggered, a plug have to be switched on for 5 minutes (after 5 minutes it have to switch off) and a SMS have to be send to me (using Twilio, that is already working at HA for something else). That SMS needs to contain the Agency, the Alias and the Message. And also I want to have the latest intervention as a tile on HA if possible…
I think I can manage to set the automation that it will switch on the plug. But don’t know how I can disable it after 5 minutes. Also, I need (a lot of) help with the SMS that have to be send and some help wish the tile too.
I am a newby on HA, so please be gentle and patient
How can I get the alias and the message out of that json, and send to me by SMS? Last question : I need to have the message and the alias on a tile in HA. But how do I do this?
This post led me to PagerMon which seems like a great application. Just started using it the other day and developed a plugin to get messages into home assistant via MQTT.
Just wanted to share it with you as it seems like it could help you out. I’m currently testing it on my machine but will hopefully be implemented in a release soon.
Can be found here if you have the knowledge to set it up: GitHub - ChoffaH/pagermon at develop
I tried implementing the MQTT plugins in your fork, but ended up getting about 9 duplicated messages in pagermon for every message received. Is this something you’ve noticed?
No I haven’t had that problem. My fork is based on the develop branch so there are other changes made by the owner since the last release that might affect you.
Is “Duplicate filtering” still on in your settings?
Ah yes, I’ve just had a quick look and can see a lot of changes vs master. Can quite easily back out my changes, or just leave as is for the time being, where I’ve disabled the added plugin. Something to play with later, or possibly look at setting up a virtual server on a different machine, and bounce the message data there for testing.
BTW, I don’t use Duplicate Filtering. Seems to be the software looping something in this instance
Thanks
Okey, does it still duplicate messages when my MQTT plugin is disabled?
Doesn’t feel like my plugin should cause that
Might take a look at implementing my changes on master as well
As soon as I disable the plugin, the duplicates stopped. Tried it a few times and had same behaviour.
For clarity, how I attempted to implement was copying in the 2 files for the plugin, and adding the reference in the other file - essentially the changes shown in github when comparing to develop. I can see when comparing to master, there are a lot(!) more changes than just these.
I’ve run npm install now. Was still finding duplicate messages coming through. I’ve now set the filter to exclude duplicats, and its running. But, havent yet had any MQTT messages triggered. Have set it for a number of frequent codes and will see what happens
@krisken lookin into the same needs as you had last year. Just wondering where did you find the simpel webhook plugin screen? You have way more options than I have, following the current documentation you need to add a webhook via automations…
Where did you managed to find all the fields from your webhook screenshot? Thanks in advance.
Returning to this thread as I’ve just implemented some notifications based on MQTT after originally having some troubles.
For context, I am using the simple webhook, then in Node-Red, doing some basic filtering and then publishing to MQTT topics, which I can then select in HA for different automations.
To answer your question on how to extract the alias, message etc, this is shown in the trigger, and reference to trigger in the message data below. If needing to look further, you will want to look at jinja formatting
Below runs 3 actions:
iphone notification with specific sound
echo show at my desk will announce (though I have low volume and look at the screen). Future edit will break the pagermon message and select what to announce (via node-red adjustment)
Flash a lamp in my office
Like your example, this is for a capcode that I also receive on my pager/app