Closed gatovelho closed 8 years ago
@gatovelho, are you getting any exceptions logged in the mqtt-spy log file?
Clean log.
For this log, the reply script was put in the publish directory (the fail case)
If you want I can also send log for the other setup (w/simplereply2 on the app dir)
Thank you! I will take a look...
Log when the script is on the app directory:
...
2016-04-04 12:59:06,162 INFO [JavaFX Application Thread ]
[MqttConfigurationUtils ] - Auto-complete for server URI
(192.168.1.3:1883 -> tcp://192.168.1.3:1883)
2016-04-04 12:59:08,701 INFO [JavaFX Application Thread ]
[BaseScriptManager ] - Adding script simplereply2.js
2016-04-04 12:59:08,983 INFO [JavaFX Application Thread ]
[NewSubscriptionController ] - Subscribing to
...
OK found a solution:
the script name (simplereply2.js) must be entered with full path in Subscriptions:
(be4)
(after) <Subscription createTab="true" qos="0" topic="/mcu/rgbled_status/" scriptFile="C:\Users\Ulisses\mqtt-spy\simplereply2.js"/>
I just removed some of the content that I believe was not being useful
Many thanks for the info - I'll add checking if the scripts exists when setting it up (in the location mqtt-spy thinks it should be in) and also if it is a relative path, looking for it in the configured script directory.
Okay. And I just removed my config file. Probably not useful for anyone. Regards!
Hi - I've added checks to warn the user if the script does not exist. When you type in the name of the script and submit it, it gives you a warning when the path is incorrect. Available in the latest beta.
Thank you for your care.
I will gladly check it.
Best Regards,
Carlos
Às 20:07 de 13-05-2016, Kamil
Baczkowicz escreveu:
Hi - I've added checks to warn the user if the script does not
exist. When you type in the name of the script and submit it, it
gives you a warning when the path is incorrect. Available in the
latest beta.
—
You are receiving this because you were mentioned.
Reply to this email directly or view
it on GitHub
--
I’m open to any suggestions, I’ve been wrong before.
This is now available in 0.5.1. Let me know if you find any further issues!
Hello,
I am using a simplereply2.js script for auto feedback/callback on a message topic. It is being declared in the connection manager, in the subscriptions/topic/script entry tab, by complete name (including .js)
This script, apparently, is not called/executed when it resides in the configuration/scripts directory , to where the scripts are saved by default, but is properly executed when located in the current mqtt-spy directory.
Besides being used as a callback, it publishes log in a /log topic I have defined.
All goes well from the application directory, but not from the publishing script directory.
Best regards, Carlos