PJTewkesbury/MMM-WebHookAlerts

Undefined error, no webhook available

Closed this issue · 3 comments

Hi there, I am running MMM in a docker. I have installed the module and added the template code to config.js.
The page loads with error UNDEFINED at the top of the page and the webhooks do not respond. All other modules load fine.
Is there part missing in the documentation that I need to resolve?

Logs:
[02.06.2022 13:23.15.552] [LOG] [2022-06-02 13:23:15] [MMM-WebHookAlert] Socket Notification recevied : START
[02.06.2022 13:23.15.552] [LOG] [2022-06-02 13:23:15] [MMM-WebHookAlert] Config at start [object Object]

Code
{
module: 'MMM-WebHookAlerts',
position: 'fullscreen_above',
config: {
fadeSpeed: 30,
displaySeconds:90,
templates:
[
{
templateName: "AzureDevOps",
template: "

{{resource.definition.project.name}}


{{message.text}}
",
},
{
templateName: "SimpleAlert",
template: "
{{message}}
",
title : "{{Title}}",
displaySeconds:10,
fadeSpeed:10,
}
]
}
}

My mistake, doesnt appear to be an issue.

Hey @isaacery02 how were you able to get this solved, I am having the same issue.

I can send commands to it just fine, but the page just says undefined

0|mm       | [14.06.2022 22:46.48.024] [LOG]   [2022-06-14 22:46:48] [MMM-WebHookAlert] Socket Notification recevied : START
0|mm       | [14.06.2022 22:46.48.029] [LOG]   [2022-06-14 22:46:48] [MMM-WebHookAlert] Config at start [object Object]
0|mm       | [14.06.2022 22:46.48.050] [LOG]   Create new calendarfetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 300000
0|mm       | [14.06.2022 22:46.49.314] [INFO]  Calendar-Fetcher: Broadcasting 8 events.

0|mm  | [14.06.2022 22:47.44.715] [LOG]
0|mm  | [2022-06-14 22:47:44] [MMM-WebHookAlert] Incoming webhook notification : {"message":"Your pizza is ready!"}
0|mm  | [14.06.2022 22:47.44.717] [LOG]   [2022-06-14 22:47:44] [MMM-WebHookAlert] {"displaySeconds":90,"fadeSpeed":30,"templates":[{"templateName":"AzureDevOps","template":"<div style='height:100%; background-color: #202020; color:white;border: 3px solid black; padding:5px'><h1>{{resource.definition.project.name}}</h1><br/><b>{{message.text}}</b></div>"},{"templateName":"SimpleAlert","template":"<div class='fullscreen' style='border:1px solid black;'><b>{{message}}</b></div>","title":"{{Title}}","displaySeconds":10,"fadeSpeed":10}]}
0|mm  | [14.06.2022 22:47.44.741] [LOG]
0|mm  | [2022-06-14 22:47:44] [MMM-WebHookAlert] Incoming webhook notification {"message":"<div class='fullscreen' style='border:1px solid black;'><b>Your pizza is ready!</b></div>","displaySeconds":10,"fadeSpeed":10,"title":""}