OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) MQTT Plugin Beta test version Reply To: MQTT Plugin Beta test version




I have been thinking a bit further in how my plugin integrates with the rest of the system, and I think it may need some more work!

I have hijacked your notify_change routine which had stubs for code. However the manner in which I have implemented it means it simply sends the appropriate MQTT messages as I intended, but it does not allow other routines, systems or internal plugins to be notified of the changes.

If the Blinker system allows the signal to be received in multiple places, then each plugin could simply implement the same code as in that responds to the signal.

If not then the notify_change plugin will need to know who wants to know of these events, and then call a series of routines similar in purpose to my publish_mqtt function.

It could be that other external systems require to be notified of changes eg the mobile app. If MQTT is defined as the standard way this will happen, then the plugin I developed will meet this need. If however they need/want direct notification then some changes will be required.

I am happy for my plugin to be adapted to fit in with any overall plans for OSPi.