Skip to content

Nmis mqtt event#141

Merged
markdueck1 merged 5 commits intonmis9_devfrom
nmis-mqtt-event
Mar 27, 2026
Merged

Nmis mqtt event#141
markdueck1 merged 5 commits intonmis9_devfrom
nmis-mqtt-event

Conversation

@kcsinclair
Copy link
Copy Markdown
Collaborator

Hi Team,

I have added the nmis-mqtt-event plugin to the contrib directory for your consideration.

Cheers

Keith

Comment thread contrib/nmis-mqtt-event/mqttevent.pm Outdated
# get mqtt config from config file.
if (NMISNG::Util::existFile(dir=>'conf',name=>'mqttevent')) {
# loadtable falls back to conf-default if conf doesn't have the file
my $mqttConfig = NMISNG::Util::loadTable(dir=>'conf',name=>'mqttevent');
Copy link
Copy Markdown
Contributor

@markdueck1 markdueck1 Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't handling the error condition (the file may exist but not be valid). The other submission you made is. It should log the error and return early.

Comment thread contrib/nmis-mqtt-event/mqttevent.pm Outdated
if (NMISNG::Util::existFile(dir=>'conf',name=>'mqttevent')) {
# loadtable falls back to conf-default if conf doesn't have the file
my $mqttConfig = NMISNG::Util::loadTable(dir=>'conf',name=>'mqttevent');
$topic = $mqttConfig->{mqtt}{topic};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all assuming the {mqtt} entry exists

Copy link
Copy Markdown
Contributor

@markdueck1 markdueck1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error handling on the table load needs to be fixed

@markdueck1 markdueck1 merged commit a456c40 into nmis9_dev Mar 27, 2026
@markdueck1 markdueck1 deleted the nmis-mqtt-event branch March 30, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants