Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have Tasker Subscribe to Topic #89

Open
chribro88 opened this issue May 11, 2023 · 0 comments
Open

Have Tasker Subscribe to Topic #89

chribro88 opened this issue May 11, 2023 · 0 comments

Comments

@chribro88
Copy link

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.

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

No branches or pull requests

1 participant