Git Product home page Git Product logo

mqttclpro's Introduction

mqttclpro

https://play.google.com/store/apps/details?id=in.dc297.mqttclpro

MQTT Client for android with tasker integration

Connect to any MQTT v3.1 broker and subscribe to topics. Perform Tasker actions on message publish or publish messages on tasker events. The app still might be rough around the edges.

Tasker Integration works as follows:

-To publish messages from tasker simply create a action in tasker. The configuration is pretty simple. You may use tasker variables in topic and message.

-To perform action whenever a message is received. Create a event in tasker from the plugin. Currently if any message is published on the topic configured, the event will be fired. need feedback on this as to how you guys want this to be implemented.

-Add/Remove topics easily!

-Messages are automatically saved!

-SSL support (Experimental)

-Publish Messages

-No notifications as of now. Coming soon!

Planned features: Full SSL support

Notifications

Better tasker integration according to the feedback from you guys

Feedback is highly appreciated!

If you found the application helpful. Please consider buying me a beer.

Special thanks to: Dale Lane - http://dalelane.co.uk/blog/?p=1599 (This was my inspiration)

StackOverflow Community :D

FilePicker - https://github.com/Angads25/android-filepicker

SSL Support - https://gist.github.com/sharonbn/4104301

Interfacing with other apps

You may use the below code in your app to send actions to the app.

Connecting to a broker

String innerAction = "in.dc297.mqttclpro.tasker.activity.Intent.MQTT_CONNECT_ACTION";

//the following numeric value can be read in the interface of the app next to

//the broker nickname and host name

long brokerId = 1;

Bundle b = new Bundle();

b.putLong("in.dc297.mqttclpro.tasker.activity.Intent.EXTRA_BROKER_ID",brokerId);

b.putString("in.dc297.mqttclpro.tasker.activity.intent.ACTION_OPERATION",innerAction);

Intent intent = new Intent("com.twofortyfouram.locale.intent.action.FIRE_SETTING");

intent.putExtra("com.twofortyfouram.locale.intent.extra.BUNDLE",b);

intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);

context.sendBroadcast(intent);

Publishing a message

String innerAction = "in.dc297.mqttclpro.tasker.activity.Intent.MQTT_PUBLISH_ACTION";

//the following numeric value can be read in the interface of the app next to

//the broker nickname and host name

long brokerId = 1;

String topic = "sample/topic";

String message = "this is a message";

boolean retained = false;

//qos as String

String qos = "0";

Bundle b = new Bundle();

b.putLong("in.dc297.mqttclpro.tasker.activity.Intent.EXTRA_BROKER_ID",brokerId);

b.putString("in.dc297.mqttclpro.tasker.activity.Intent.EXTRA_TOPIC",topic);

b.putString("in.dc297.mqttclpro.tasker.activity.Intent.EXTRA_MESSAGE",message);

b.putString("in.dc297.mqttclpro.tasker.activity.Intent.EXTRA_QOS",qos);

b.putBoolean("in.dc297.mqttclpro.tasker.activity.Intent.EXTRA_RETAINED",retained);

b.putString("in.dc297.mqttclpro.tasker.activity.intent.ACTION_OPERATION",innerAction);

Intent intent = new Intent("com.twofortyfouram.locale.intent.action.FIRE_SETTING");

intent.putExtra("com.twofortyfouram.locale.intent.extra.BUNDLE",b);

intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);

context.sendBroadcast(intent);

mqttclpro's People

Contributors

dc297 avatar dns53 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mqttclpro's Issues

app-friendly intent interface

It would be nice if this app could be easily used as a plugin for a generic app using in.dc297.mqttclpro.tasker.receivers.FireReceiver intent interface. This is possible and working now (and I am using it with my small app) but for an external app is impossible to know the Long id of the broker for the connection or the publish action. It would be nice to specify in the intent interface the String id of the broker as an alternative to its Long id.

Won't Connect

Fails to connect to my broker. The standalone MQTT Client app works OK but not this Tasker plugin

I only receive one update per app restart

Heya, and thanks for making a great app.

I wanted to use this as an efficient bridge between Tasker and Home Assistant. However, I'm having some trouble. I've successfully subscribed to a few topics (on cloudmqtt), and the app receives messages as expected once I subscribe. After the initial message, however, nothing happens until I force close and restart the app or reboot my phone.

I've tried manually publishing messages, but that didn't work either.

I'm on a Samsung Galaxy S7 Edge running (stock) Android 7. Any idea?

Can't install on Android TV

Not sure if bug or not, but I can install Tasker to my Android TV (Nvidia Shield), but I am not allowed to install this plugin, which is weird. I'm assuming there is no technical issues, just some manifest that needs to be updated?

Received Message Details Overwritten

The most recent release (version 2.4) the messages received screen appears to be showing more details but they are overwriting each other in places, see screenshot.
screenshot_20170312-145023

Crash on start (tablet with android 4.4.2)

Hi, since a week or so the app crashes during start on android 4.4.2 tablet.
It worked without problems before - so it would be great it this old device was usable for mqtt again.
I know it is not on the supported device list - but it would be great if possible.
I sent you a crash report - hope this helps.

Feedback

Been using this for a few days now and have a couple of suggestions/requests

  1. Alert on matching the topic message rather than the just the topic or there's no point specifying the message in the subscribe dialog.

  2. Implement Will (and Birth ?) functionality unless I've somehow missed how to set this.

Thanks for your excellent work so far, hope you enjoyed the beer ;)

Failed to connect

I can't connect to my server using MQTT Client for Tasker. It is not very likely to be a connection problem as I can connect to the same server with other apps (even with MQTT Client - standalone verson).
I enter server settings (server uses username and password) and exit the settings screen, where I get a "Failed to connect..." error. See the screenshot attached.
Can I post any logs?

Regards,
over.
image

Unsubscribe from Beta version doesn't work

I registered for the beta version testing, decided I couldn't get on with it so unregistered, uninstalled and reinstalled from play store. A day or 2 later an update was flagged as available and lo and behold I was back on the beta again.

Version 4.2.2b Broken

Just updated to latest version (I'm still on beta as far as I know) Version reported as 4.2.2b by App Manager. Crashes immediately when opening, tried uninstalling then reinstalling still crashes, logs submitted. Could only get app to run by clearing data but then, after inputting connection details etc it still doesn't work, stuck at initialising. Was working OK (well other than the usual frequent disconnects) before upgrade.

[UX improvement] Display full topic names in subscription list view

When the MQTT Client app mqttclpro is started/opened, a list of current subscriptions is visible. Topic names are truncated at 20-ish characters, because these names usually take up more space than the screen offers. So far so good.

I haven't found any way to access the full topic names on this screen. Which is a problem, when the first part (20-ish characters) of topics are the same, as there is no way to select the specific topic a user is looking for. In my case, the first part is quite generic, and identical on many topics. The specific differences in topics are in the last part, out of view. This introduces problems when deleting a topic.

Hey, when rotating the device from portrait to landscape, more screen estate is available. This could offer more characters to be displayed, and better information on topic names. Unfortunately, this has no effect on truncation, but results in more visible unused whitespace.

The detailed view after clicking on the topic does not have this restriction, but a topic without a message has no detailed view. A click on the topic only flashes "No messages received." briefly.
To be able to delete a certain topic subscription from the list, I have to publish a specific message to that topic, after which I can identify the topic, and then delete it. This leaves room for improvement in usability/user friendliness.

Apart from 1) using the available screen estate better in horizontal/landscape mode, and 2) allow a detailed view for topics without messages, I don't know the ultimate solution for this. Many apps use scrolling text, automatically or manual, to allow access to offscreen text. Not sure if that's doable at all, or the way to go here.

Use phone local time for Topic Updates

The times listed by the topics and the times listed for messages within each topic are 7 hours ahead.
I have verified that my phone timezone is set correctly etc..
ps
Thanks for the awesome app. This new tasker-subscribe feature has made my week/year.

Messages lost when disconnected

I was experiencing some issues in connectivity to the broker, network connection periodically lost etc. And discovered that messages that triggered by the plugin during this time are simply lost.

Consider this test case:

  1. Start up mosquitto broker somewhere in the lan
  2. MQTT client app opened, configured. Top message says "connected to tcp://....."
  3. Tasker task opened and tested that plugin delivers the message (via remote mosquitto_sub)
  4. Restart mosquitto
  5. Run the task test again. Toast shows up Unable to publish as we are not connected
  6. Wait for reconnect timer. Try again. Message finally delivered.

This is in the logcat. Service correctly triggers reconnection ofcourse.

10-15 08:19:29.815 21255 21255 I db      : putting message
10-15 08:19:29.829 21255  3103 I mqttclpro: test/topic : 1 : 2 : false
10-15 08:19:29.850 21255  3103 I mqttclpro: scheduling next ping for Sun Oct 15 08:39:29 GMT+03:00 2017
10-15 08:19:35.934 21255  3106 I mqttclpro: Connecting...
10-15 08:19:35.948 21255  3106 W System.err: Не удается подключиться к серверу (32103) - java.net.ConnectException: Connection refused
10-15 08:19:35.948 21255  3106 W System.err:    at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:79)
10-15 08:19:35.948 21255  3106 W System.err:    at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:650)
10-15 08:19:35.948 21255  3106 W System.err:    at java.lang.Thread.run(Thread.java:761)
10-15 08:19:35.948 21255  3106 W System.err: Caused by: java.net.ConnectException: Connection refused
10-15 08:19:35.948 21255  3106 W System.err:    at java.net.PlainSocketImpl.socketConnect(Native Method)
10-15 08:19:35.948 21255  3106 W System.err:    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:334)
10-15 08:19:35.948 21255  3106 W System.err:    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:196)
10-15 08:19:35.948 21255  3106 W System.err:    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
10-15 08:19:35.948 21255  3106 W System.err:    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)
10-15 08:19:35.948 21255  3106 W System.err:    at java.net.Socket.connect(Socket.java:605)
10-15 08:19:35.948 21255  3106 W System.err:    at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:70)
10-15 08:19:35.949 21255  3106 W System.err:    ... 2 more
10-15 08:19:35.949 21255  3106 E mqttclpro: unable to connect192.168.100.55:1883 exception is Не удается подключиться к серверу
10-15 08:19:35.949 21255  3106 E mqttclpro: Не удается подключиться к серверу (32103) - java.net.ConnectException: Connection refused
10-15 08:19:35.949 21255  3106 E mqttclpro:     at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:79)
10-15 08:19:35.949 21255  3106 E mqttclpro:     at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:650)
10-15 08:19:35.949 21255  3106 E mqttclpro:     at java.lang.Thread.run(Thread.java:761)
10-15 08:19:35.949 21255  3106 E mqttclpro: Caused by: java.net.ConnectException: Connection refused
10-15 08:19:35.949 21255  3106 E mqttclpro:     at java.net.PlainSocketImpl.socketConnect(Native Method)
10-15 08:19:35.949 21255  3106 E mqttclpro:     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:334)
10-15 08:19:35.949 21255  3106 E mqttclpro:     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:196)
10-15 08:19:35.949 21255  3106 E mqttclpro:     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
10-15 08:19:35.949 21255  3106 E mqttclpro:     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)
10-15 08:19:35.949 21255  3106 E mqttclpro:     at java.net.Socket.connect(Socket.java:605)
10-15 08:19:35.949 21255  3106 E mqttclpro:     at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:70)
10-15 08:19:35.949 21255  3106 E mqttclpro:     ... 2 more
10-15 08:19:35.957 21255  3106 I mqttclpro: Scheduling next connect at Sun Oct 15 08:19:50 GMT+03:00 2017
10-15 08:19:39.905 21255 21255 I db      : putting message
10-15 08:19:39.919 21255  3083 I mqttclpro: test/topic : 1 : 2 : false
10-15 08:19:39.928 21255 21255 I mqttserv: Client ID: 1508023239468b58d80787
10-15 08:19:39.936 21255  3091 I mqttclpro: Connecting...
10-15 08:19:39.956 21255  3091 I mqttclpro: scheduling next ping for Sun Oct 15 08:39:39 GMT+03:00 2017
10-15 08:19:39.961 21255  3091 I mqttclpro: Successfully connected
10-15 08:19:39.961 21255  3091 I mqttclpro: Subscribing to all topics
10-15 08:19:39.963 21255  3091 I mqttclpro: [Ljava.lang.String;@5a57db8
10-15 08:19:39.967 21255  3091 I mqttclpro: scheduling next ping for Sun Oct 15 08:39:39 GMT+03:00 2017
10-15 08:19:46.684 21255 21255 I db      : putting message
10-15 08:19:46.704 21255  3106 I mqttclpro: test/topic : 1 : 2 : false
10-15 08:19:46.719 21255  3106 I mqttclpro: scheduling next ping for Sun Oct 15 08:39:46 GMT+03:00 2017
10-15 08:19:48.540 21255 21266 W SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/in.dc297.mqttclpro/databases/in.dc297.mqttclpro' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
10-15 08:19:48.540 21255 21266 W SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/in.dc297.mqttclpro/databases/in.dc297.mqttclpro' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
10-15 08:19:48.541 21255 21266 W SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/in.dc297.mqttclpro/databases/in.dc297.mqttclpro' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
10-15 08:19:50.998 21255 21292 I mqttclpro: Re-Connecting...
10-15 08:19:51.971 21255 21255 I db      : putting message
10-15 08:19:51.994 21255  3083 I mqttclpro: test/topic : 1 : 2 : false
10-15 08:19:52.024 21255  3083 I mqttclpro: scheduling next ping for Sun Oct 15 08:39:52 GMT+03:00 2017

I am too tinkering with mqtt application in java. MqttDeliveryToken.getMessage(), returned by the MqttTopic.publish(), may be considered to actually check for message status. At least for qos 1 or 2.
https://github.com/eclipse/paho.mqtt.java/blob/75594f0b226b14911f397b69059c18a50eaabb54/org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/MqttDeliveryToken.java#L38-L45

Plus, MqttClient can itself store messages, if I am understanding this correctly:
https://github.com/eclipse/paho.mqtt.java/blob/75594f0b226b14911f397b69059c18a50eaabb54/org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/MqttClient.java#L43-L58

(edited: code link to the comment, persistence)

Unable to publish empty (null) message

In order to remove an old obsolete retained message on a mosquitto broker topic, I tried to send a new retained message with an empty (NULL) payload to the topic in case, as was suggested on the mosquitto mailinglist. Sending this message with a mosquitto_pub client works as intended and removes the retained message from the topic.

I can't seem to publish an empty message with mqttclpro MQTT Client. If I enter the topic without a message, the pub topic isn't stored, resulting in a missing configuration. If I edit an existing pub config and remove the message, the change isn't stored in the config.

I think fixing/changing this would improve the plugin, making MQTT more "payload agnostic", while adding the support of retained message removal this way.

PS: This plugin is awesome, thanks a lot for your great work!

Reconnection interval

If I restart the broker, the app often reconnects too frequently (like, once per second) instead of using the configured interval and gets blacklisted by the broker (hbmqtt) but continues to try to reconnect forever.

Feedback from beta version

Not so much complaints, just observations:

  • Lost all settings on upgrade.
  • When I first tried to enable a connection, it crashed. Sorry, don't have any more details.
  • Looks like tasker setup needs to be redone. All references to app invalid.

Macrodroid cannot create action

When setting up this plugin as Tasker/Locale plugin action MacroDroid shows this toast

Extra com.twofortyfouram.locale.intent.extra.BUNDLE is required. To resolve this issue, put the bundle extra in the Activity result intent

right after trying to save it, and this in the log:

10-12 17:26:50.234  7590  8272 V Lumberjack: Loaded plug-in map in 37 milliseconds
10-12 17:26:50.238  5719 10779 I ActivityManager: START u0 {act=com.twofortyfouram.locale.intent.action.EDIT_SETTING cmp=in.dc297.mqttclpro/.tasker.ActionEditActivity (has extras)} from uid 10269 on display 0
10-12 17:26:53.568  7590  7590 I Lumberjack: Received result code RESULT_OK
10-12 17:26:53.573  7590  7590 V Lumberjack: Encountered errors: [BUNDLE_MISSING]

Looking at the code, it contains many commented out sections processing that bundle. Why is that?

Also, this should probably be prefixed with com.twofortyfouram.locale, not in.dc297.mqttclpro.tasker:

public static final String EXTRA_BUNDLE = "in.dc297.mqttclpro.tasker.Intent.EXTRA_BUNDLE";

incoming message ignored if tasker still processing previous message

If an incoming message is received before Tasker is finished processing the old message (e.g. two messages received at the same time), the new message will get logged and then ignored. Ideally it should be queued and processed after Tasker has finished processing the first message.

At least this appears to be what is happening. I delayed a task from exiting, and tried sending new incoming messages.The same results. If you want me to gather any more evidence or retry that test - to double check my findings, I can do so.

Connection

Hi - we just had a discussion on the Android site - I'm seeing another issue in here about not reconnecting and I'm wondering if they are connected.

So in my situation I have DEBIAN running on the phone - with an MQTT broker - and TASKER talks to the MQTT broker - using your plug in - so that for example from Debian I can send an MQTT message to ring a doorbell using Tasker's access to MP3 files.

All of that works great BUT if you reboot the phone this NEVER works - until you open your App and check settings - so I'm wondering (just a thought) if Tasker starts BEFORE Debian - so the broker ISN'T READY, your APP tries to connect, fails - and simply does not keep retrying - possibility? That might answer the other issue I noticed about not reconnecting on change of network.

It is absolutely imperative given what people do with Tasker that the connection survives such issues and if it fails - keeps on trying regardless - I wonder if you could let us know when an update - even an experimental one- is ready to try.

frequent disconnects

Hello,

As much as a like this, it seems to disconnect frequently for no apparent reason. Still trying to work out why. I have tried changing the keep alive from 1200 seconds to 60, but it doesn't appear to have helped.

So far if I try to reproduce the problem on demand, it works perfectly :-(

When it does disconnect, it doesn't appear to retry to connect unless the screen is on. Although that could also be coincidence too.

This is on Android 7.1.2 connecting to mosquitto 1.3.4.

Regards

[UX improvement] Setting/using variable names

After a lot of trial and error, and digging through old github issues, I managed to set received MQTT messages as Tasker variables, which works perfectly by the way in mqttclpro. The current "tooltip" says:

"Message tasker variable name"

My first failures resulted from:

  1. including the % in the name (like Tasker and other plugins usually do)
  2. trying uppercase (global) variable names, while only lowercase (local) var names are allowed

Reading old issues, other users seem to have met similar problems when trying mqttclpro for the first time. This increases the learning curve, and could probably easily be improved. My suggestion for improvement:

  1. include the % when setting the variable in mqttclpro (imho more consistent with other Tasker usage);
  2. explain the restriction on the use of lower case var names;
  3. add an example or perhaps default var name

Combined, this results in a "tooltip" along the lines of:

"Tasker variable name in lowercase, i.e. %varmqtt", or
"Lowercase Tasker variable name, i.e. %varmqtt"

Without implementing (1), this would of course render as:

"Tasker variable name in lowercase, i.e. varmqtt", or
"Lowercase Tasker variable name, i.e. varmqtt"

Hope this helps.

Multiple Brokers Support

Hi Guys

@brianmay @mcspr @stipe76 @Sellig28 @Pengman @acefed @trisk @ShaddyDC

I have started working on Multiple Brokers support for MQTT Client. It will have all the features of the current version of MQTT Client. At the same time I am planning to update the underlying code on which the app works. The behavior of reconnector will change. Offline message buffer will be introduced. So, no more of that "Unable to publish...." toast. Overall, the code would be much simpler.

I am planning to start a beta channel on play store. So that it is easier to test the app and roll out bug free versions to production.

Let me know if you guys have any feature requests and if anybody would like to contribute.

I'll keep you guys posted on the progress.

Cheers!
Deepesh

Tasker not getting events

I have reinstalled your app multiple times, deleted events from Tasker, and recreated them, but Tasker does not pick up any changes. Your app shows the new messages, but Tasker does not see them.

Tasker message topic variabile needed

Actually when a tasker event is fired,there is no chance to know what was the topic of the message that caused the event but only its payload. Knowing the actual topic string is required because the generating subscription could have wildcards (. or #). I think this should be rather easy to implement. Maybe just adding few lines of code in QueryReceiver.java and a variable name choosing line in the tasker event UI.

No license

Hello,

There is no license associated with this, which makes it default to "All rights reserved." plus some exceptions for GitHUB, as per their ToS.

As I believe the intention was to make this open source software, can you please give it an open source license?

https://help.github.com/articles/licensing-a-repository/

Thanks

Publishing with Automate app doesn't work

Hi,

I'm using the Android Automate app from LlamaLab and the MQTT client can be integrated as a plugin but I don't get messages published. The Automate app executes the plugin action and no error is shown in the log but the message doesn't appear in the MQTT client UI (subscribed to #).
I can publish messages in the MQTT client UI or subscribe to topics from other publishers.

Control Connection via Tasker

It'd be amazing if we could use Tasker to enable/disable the connection to the server/broker when we want. That'd, for example, allow us to only try to connect whilst being at home. We could also make attempts to reconnect rely on a number of other factors. It's just a lot more flexible than the current keep-alive interval.
Maybe, if we're adventurous, we could even connect to different servers in different locations.
On that note, it'd also be nice to get the current connection state. That'd allow for some decent status checking and notifying the user if something's wrong in a user-defined way.
I feel like that would be a useful and logical extension to the existing functionality.
Thank you for putting time and effort into this project, btw; I really appreciate it!

Touch interface going crazy on Fire 7

Had to uninstall the latest version from my Amazon Fire 7 as after a few minutes of use I start getting phantom inputs on the touch screen which make the tablet unusable. Restarting (with great difficulty) the tablet settles things down for a while but the issue soon returns. Thought I had a hardware problem initially but uninstalling your mqtt plug in fixed it.

Failure to Reconnect

Frequently, after being away from home or after the phone has 'slept' overnight the MQTT client loses connection and fails to reconnect until I reopen the client on my phone.

Publish of null message rejected

Null (i.e. empty) is a valid MQTT message often used to clear a retained message from a topic but your MQTT client reports "Invalid message value" and fails to publish

Autorestart after upgrades

I think this might be possible, but I have no idea how. As in I have not noticed this problem for other apps that need to be running constantly.

Currently after Google Playstore upgrades this app, it won't get restarted. Meaning events get lost.

I have turned off auto-updates for this app as a result, so I can manually restart after upgrading.

Text color white on white in topic dropdown

There is an issue with the text color in the dropdown where you can select the topic in tasker.
On an older device with android 4.4.2 the text color is white (very very light gray) and the background is white too - so you cannot really read the topic.
On never devices everything is fine.
I know that this old device is not supported - but everything works fine so it would be great to see this minor bug fixed.
Thanx a lot!

Constantly reconnecting

This is unusable for me now. The connection is lost and reconnects constantly, every second or so. Uninstalled and reinstalled. Rebooted phone. The last change lost all my previous data, and now can't stay connected

Events do not trigger Taster rules

Since last updated publishing messages via tasker action doesn't work - nothing gets sent.
Also received Mqtt events do not trigger Taster rules anymore.

Doesn't work with CloudMQTT

Hey, thanks for your PlugIn! Sadly I can't use it with CloudMQTT, because I can't connect to the server. I suppose that it has something to do with Websockets?! Owntracks worked fine for me, but I used it to publish Position and Battery Level which is unnecessary with Tasker + a proper MQTT publishing PlugIn. Since yours was recently updated I hope that you can help here.

My Settings:
SSL: Off
URL: Server found in the CloudMQTT Console
Port: 1XXXX (first one, not the SSL, not the TSL/Websocket one)
Username: taskerSmartphone (as specified in CloudMQTT)
Password: as specified in CloudMQTT
Client ID: S3Neo

Payload:
{
"_type":"data",
"phone":%DEVID,
"battery":%BATT,
"bt":%BLUE,
"air":%AIR,
"wifi":%WIFI,
"date":%DATE,
"time":%TIME,
"freemem":%MEMF,
"gps":%GPS,
"silent":%SILENT,
"uptime":%UPS
}

In CloudMQTT my users (one for phone, one for tablet) have read and write set to true and the subscribed topic is: "devices/phone/#" for the phone and "devices/tablet/#" - I plan to publish to "devices/phone/sys/data".

Since I'm using Home Assistant on my Pi, I've a Home-Assistant User who subscribed everything (#) with Read/Write on true aswell. My Home Assistant MQTT Component should be configured correctly (the same way it worked with Owntracks).

I could set up Mosquitto or whatever on my pi, but CloudMQTT is more comfortable to me (and I'm a bit afraid that my Pi3 crashes or whatever... so I'm interested in "do everything possible externally, except it's more comfortable directly on the pi". But since I like the CloudMQTT pipeline... well, it would be nice, if it would work with your plugin :D.

Thanks for your help!

Background Task Crashes

Hello,

The background task currently seems repeated crash, and won't stay running. As such any attempt to send outgoing messages from tasker fails.

The foreground process seems to work, although I can see crash messages after sending a message.

I first noticed this problem today.

Any ideas?

Tasker reports (a lot of) missing icon warnings in log

When opening Tasker, I am frequently welcomed with a bunch of log entry warnings reporting a missing icon reference in mqttclpro, see screenshot below. Current version does this, and so did the previous version which was the first version I installed.

Currently using Samsung Galaxy S6, Android 7.0, Tasker v5.0u4, MQTT Client 2.2.2

Not sure if I'm missing something in the interface, the plugin functionality seems normal.

screenshot_20170822-084811

[Feature request] Trigger Tasker event on wildcard topic subscriptions

Subscribing to a wildcard topic in the MQTT Client app works correctly, I can see mqttclpro register the incoming messages nicely. Hooray!

However, when a Tasker profile is created with the context Event > Plugin > MQTT Client, using the wildcard subscription set earlier, it does not trigger the event on incoming messages.

Selecting a subscription without a wildcard in the topic name does trigger the event correctly, as expected.

Example topics:
client/system/devicename/category/action/type => Profile activated OK
+/+/devicename/category/action/type => Profile not activated
Requested:
+/+/devicename/category/action/type => Profile activated OK

Not sure if this as a bug or feature request... you probably didn't have time to implement this yet. So I called it a request, which sounds more friendly :-P

Changing in using certificate anfroid 7

Hi,
I use ssl connexion but since android 7 there are some updates.
Android Keystore for self signed certificate is no more used for android apps.
Could you update your app to select an android certificate authority with a certificate. All can be a p12 certificate.

Thank you.
Sellig28.

Simultaneous messages confusion

I am getting some weird results that I can't really explain yet. It is possible I have got something wrong - I have only just woken up when this happens :-). I will update this as I get more details. I now seem to get different responses at times when multiple messages are received at the same time, such as:

  • One message is ignored and the other message is processed twice.
  • Once message is processed once and the other message is processed twice.
  • Both messages are processed once as expected.

The log shows both messages received once as expected.

Will try to do more testing when I get a chance.

No message when screen are locked/off.

The message is received only when the phone are unlocked. I have a Nexus 5 with Android 7.1.
I've tried disable battery optimization for MQTT client. I want to use it with tasker action. So kind of need to receive messages when screen are off. Thanks for any help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.