Go Back   HomeSeer Message Board > 3rd Party Plug-Ins/Scripts > Plug-ins by Author > Click Here for List of Author Forums > MCS Plug-Ins and Scripts > mcsMQTT (3P)

mcsMQTT (3P) Discussion of mcsMQTT plug-in

Thread Tools Display Modes
Old April 18th, 2018, 11:43 AM
mwolter mwolter is offline
Seer Deluxe
Join Date: Feb 2017
Location: San Diego
Posts: 261
Feature Request: Run script after receiving MQTT message

There are several cases where I would like to have the value and string of a device updated when an MQTT message is received.

An example would be uptime. It is best if the value sent by the sensor is in seconds. This way an event can run based on a threshold. For instance, if the uptime is less than 10 seconds, send an alert. Or if it's over one week, reboot the device.

On the other hand, a human-readable value is also nice, so at a glance, it's easy to understand. For instance, 2d 2h 2m is a whole lot easier to understand than 180,120.

An easy way to make this work would be to run a script after an MQTT message is received. The device ID and payload would need to be able to be passed into the script as parameters. Not really too interested in running a script via an event. It's too easy for device associations to be lost, events don't survive HS software upgrades very well, a new event would have to be created for each device (no way to pass in the device ID for the device that triggered the event), no way to pass in the MQTT topic, etc.

Other than my particular uptime example. I'm sure there are plenty of other instances where running a script after the value is received would be helpful.

Is it possible to add a field to the association or manual tab where the path to a script can be added? The PI would need to pass in the Device ID as well as Payload to the script. Might even be handy to have the topic passed to the script as well.

Last edited by mwolter; April 18th, 2018 at 01:08 PM.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Poll - Possible Feature Request or Can I do it via script? charlesmbell Insteon Thermostat (3P) 7 August 29th, 2016 07:12 PM
Feature Request: Message Delete and Message Unread Event Triggers heatvent HomeSeer Phone 0 September 18th, 2010 12:22 PM
Loto Script feature request Bestgear Jon00's plugins and scripts 7 January 2nd, 2008 05:17 PM
Feature request: Message sending directly... eaba RokuSeer Plug-In 21 December 3rd, 2007 08:57 PM
Feature Request - Alert on 'Recurring Message' dpriest ACRF Processor (3P) 0 January 26th, 2006 08:08 AM

All times are GMT -4. The time now is 01:32 AM.

Copyright HomeSeer Technologies, LLC