mqtt web sockets code publish.single(topic, payload,....does not work.

4 views (last 30 days)
The example code
Publish Using WebSockets in Python on a Raspberry Pi
does not work.
my python 3 code executes to the last line of the ThingSpeak example code
print ("There was an error while publishing the data.")
I have been successfully using the same channelID, writeAPIKey and mqttAPIKey with a Arduino for some time using code at
How do do I identify the error with the web sockets publish code.
i can print on Terminal the topic and payload strings. they appear correct.
Barnard Richards
Barnard Richards on 23 Feb 2021
Graham, You are correct my Rasp Pi connects and uploads correctly.
I am also uploading from a couple of Arduino MKR1010 successfully.

Sign in to comment.

Answers (0)


More Answers in the  ThingSpeak Community


Find more on Write Data to Channel in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!