I want to inform the front end a certain event occurs on the backend, to be 
more exact: when a report is finished. Does something like this exist?

If not, my ideas:

My front end is running a MQTT client and can be configured to listen to 
such events. My idea is to hook into a report and emit a MQTT message when 
finished. Is this possible, if yes, how? Something like this:

[StdReport]
    [[FTP]]
        skin = Ftp
        enable = true
        user = replace_me
        password = replace_me
        server = replace_me
        path = replace_me
        secure_ftp = False
        #HTML_ROOT = /var/www/html/weewx
        port = 21
        passive = 1
        
        afterReport = run_something


The other idea is to create a report and placing it after the report I want 
to trigger the message, assuming Reports in[StdReport] are run sequentially:

[StdReport]
    [[FTP]]
        ...
        
    [[MQTTInform]]
        skin = mqttInform
        topic = weather/reportFinished
        ...


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/1eda5109-e33d-456f-8671-5ef57bea4f8bn%40googlegroups.com.

Reply via email to