Skip to content

Have Tasker Subscribe to Topic #89

@chribro88

Description

@chribro88

Version 4.5.1

Is it possible to have tasker subscribe to a topic or can it only be done first through the app?

As a workaround I subscribed in the app to a topic +/+/hello and then attempt to have tasker filter the topic in the profile, such as:

        Profile: MQTT Received Req-Res
        	Event: Message Arrived [ Configuration:broker - 127.0.0.1 : +/+/hello : varmessage : varmqtttopiv : Topic Equals %MQTT_TOPIC : Message Equals  ]

        Enter Task: TestFlash

but the variable %MQTT_TOPIC does not seem to get passed to the plugin. I'm able to filter the messages in the task as so:

        Enter Task: TestFlash
        
        A1: If [ %varmqtttopiv eq %MQTT_TOPIC ]
        
            A2: Flash [
                 Text: %varmessage
                 Tasker Layout: On
                 Title: %varmqtttopiv
                 Continue Task Immediately: On
                 Dismiss On Click: On ]
        
        A3: End If

(also tried MQTT_TOPIC, but only when I hardcode the topic to 'testtopic' does it work)

Ideally, if Tasker could subscribe to the specific topic then it only be receiving the messages that it requires.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions