Closed Caswell1000 closed 6 years ago
Nobody can help if an issue can not be reproduced. And for reproduce an issue, the tester needs to do the same as you. And you do not real want that a tester try every of the hundred apps with thousand of possible configuration variety.
An android app "
MQTT Dashboard
" does not exist, it exists "IOT MQTT Dashboard", "Linear MQTT Dashbard" and several other "MQTT Dash" apps. Which of these hundred apps do you are using? And how did you configure it?
In general
Try reproduce A simple test using mosquitto and the same Tasmota configuration you re using confirms that the MQTT on Tasmota is working as expected. The problem can only be the Android app you are using but we do not know which app and how (config).
Here the tests with same config as you on Tasmota side but using command line mosquitto_pub for for publishing topics:
CMD: Status 6
MQT: /stat/Testchip/STATUS6 = {"StatusMQT":{"MqttHost":"172.17.9.3","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_0EBA54","MqttUser":"mqttdev","MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
CMD: Topic
MQT: /stat/Testchip/RESULT = {"Topic":"Testchip"}
CMD: FullTopic
MQT: /stat/Testchip/RESULT = {"FullTopic":"/%prefix%/%topic%/"}
$ mosquitto_pub -h localhost -u mqttdev -P ****** -t '/cmnd/Testchip/Power' -m ''
MQT: /stat/Testchip/RESULT = {"POWER":"OFF"}
MQT: /stat/Testchip/POWER = OFF
$ mosquitto_pub -h localhost -u mqttdev -P ****** -t '/cmnd/Testchip/Power' -m 'ON'
MQT: /stat/Testchip/RESULT = {"POWER":"ON"}
MQT: /stat/Testchip/POWER = ON
$ mosquitto_pub -h localhost -u mqttdev -P ****** -t '/cmnd/Testchip/Power' -m '1'
MQT: /stat/Testchip/RESULT = {"POWER":"ON"}
MQT: /stat/Testchip/POWER = ON
Thank you, Its IoT MQTT Dashboard, and I am using iot.eclipse.org as a broker, the screenshot is shown below:
The screenshot of my configuration is as follows:
The app shows that there is connection to the broker
Is there something wrong with the topic, apart from the leading "/", please assist, I am a noob, but I also read a lot, it could be that I am missing something small, the sonoff is on "Pulsetime 10"
Thanks for taking your time to respond.
Remove the on
and add it to field Value to Publish
as that is what you want; you want to publish the On
value for topic /cmnd/Techchip/power
. Keep reading you're almost there ;-)
Brilliant, this works perfectly, what's the proper way to subscribe on the iot mqtt bash board app if you want to get the messages from the sonoff in the app, I tried the one below, but I get "n/a" , otherwise thanks a lot for the advise, I'm so excited. Thank you very much.
@Caswell1000: You always do the same mistake - do not add parameters (here like -n
) to topics - a subscribe topic /cmnd/Testchip/status -n
does not exist, there exist for example /stat/Testchip/STATE
having a JSON object.
Please carefully read MQTT Topic definition, it's already described.
Thank you @curzon01 , "/cmnd/Testchip/Power" in the subscription returns the value I have used under value to publish, my hope is to get something that the sonoff publishes, i.e. a direct status message from sonoff, not what I put under value to publish. I actually need to subscribe to a stat message, but "/stat/Testchip/Power" returns n/a so does "/cmnd/Testchip/status", perhaps the subscription is meant to just give you the same value one puts under value to publish.
In graphics: When The Publication is:
And the Subscription is:
the result is :
but when the subscription is:
I get :
How do I get a status report from the sonoff??
Thanks for all the help that you are providing.
Try enable json converter
/stat/Testchip/POWER
not
/stat/Testchip/power
Many Thanks, everything is now in order, /stat/Testchip/POWER worked, I appreciate all the help I've had.
Hi , I use same app but i not found for me.
This is mi config MQTT in sonoff Tasmota.
and this is mi Broker
how activate a power1 on? Is posible activate a relay whitout local mosquito broker, only a public broker same https://api.cloudmqtt.com? Explained me who is this? Thank you. I am a novice, and sorry for my english. Regards Centiane.
I flashed Tasmota 5.11.1 (Thanks Arends for the dev work you are doing), I configured MQTT using the available menus, and tested them on the console menu. "Power ON", "Power OFF", "Power 1", etc, all work on the console.![image](https://user-images.githubusercontent.com/35820171/35958663-976a693a-0caa-11e8-8be8-e3030e8ef2e5.png)
I installed an app called MQTT dashboard on Android, and sent a topic like this /cmnd/Testchip/Power
and it results in this output (which seems to be correct):
All topics with payloads, whether numerical (1, 2, 3, ...) or alphabetical ("ON", "OFF", "TOGGLE") result in:
I am very keen to solve this problem, but my attempts with different combinations and different MQTT broker apps yield the same, please advise how I can change my Topic to make Payloads work.