Thingspeak broker address not working

3 vues (au cours des 30 derniers jours)
JUDITH NJOKU
JUDITH NJOKU le 15 Fév 2021
Commenté : Nipuna le 12 Mai 2022
is it just me or is the broker address https://api.thingspeak.com/ not working?

Réponse acceptée

Christopher Stapels
Christopher Stapels le 16 Fév 2021
The mqtt broker gives really limited messages. If you had parts of the format wrong for the subscribe method, it will probably just fail silently.
Read the documentation for MQTT closely to make sure the format is correct. I havent dont the simulink example, so I would reccomend you try mqttfx or the MATLAB based MQTT client (on FEX). Once you get the syntax correct using MQTTFX or MATLAB, its usually easier to make sure you enter the correct settings in blocks in simulink.
Sadly the RPI example in the thingSpeak doc has an outdated library (to do list), but it might give you a different starting point if the simulink version wont work.

Plus de réponses (3)

Christopher Stapels
Christopher Stapels le 15 Fév 2021
It is working great across all of my many channels, I did not see a break near the time you posted this. What command did you try to send to the server?
  3 commentaires
Christopher Stapels
Christopher Stapels le 16 Fév 2021
api.thingspeak.com is the RESTful service. mqtt.thingspeak.com is the correct address for the mqtt broker. If you try that address in the config settings, what do you get?
JUDITH NJOKU
JUDITH NJOKU le 16 Fév 2021
I tried mqtt.thingspeak.com first. I only decided to change it when I could not receive any message on the Thingspeak channel.

Connectez-vous pour commenter.


Naim Slama
Naim Slama le 24 Avr 2022
the same thing host broker not connected help please i want to read from thingspeak using microbit and esp01 thx
  1 commentaire
Vinod
Vinod le 24 Avr 2022
Modifié(e) : Vinod le 24 Avr 2022
I'd recommend starting with reading the documentation which has some excellent examples for you to get started.

Connectez-vous pour commenter.


Nipuna
Nipuna le 12 Mai 2022
I have used ThingSpeak for two years without any issue to send data via MQTT from my LoRa gateway.
Since last week I can not see my data publish on any of my channel. I then tested it with MQTTX app
The log files says it is publishing but the channels dont get data
Any suggestions
  2 commentaires
Vinod
Vinod le 12 Mai 2022
Your topic to publish appears to be incorrect. The client should be publishing to : channels/<CHANNEL_ID>/publish
Take a look at the documentation.
Nipuna
Nipuna le 12 Mai 2022
Hi Vinod,
Thanks for the guidance, actually the error was that I put the API Write code after the Publish.
This worked after I remove the API write key, in early versions there were no MQTT device creation option. Thanks for the help.
Topic:- channels/<CHANNEL_ID>/publish
Data:- field1=45&field2=60&status=MQTTPUBLISH

Connectez-vous pour commenter.

Communautés

Plus de réponses dans  ThingSpeak Community

Catégories

En savoir plus sur Read Data from Channel dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by