-1

I'm quite new to MQTT/Pub/Sub and Core IoT. So please forgive me my limited skills.

I managed to connect my ESP8266 to Core IoT by using this repository on GitHub. After the first telemetry was publish I wanted to do a little bit more - just tiny steps to learn. My Goal was to switch the In-built LED off and on - depending on the message-content which is published to the corresponding topic. But none of the, via the Core-IoT website published, messages arrived. I guess it's because my subscriber is set to "pull" - but I want Pub/Sub to automatically push all new messages to the subscriber. So I switched to push but now I need an endpoint-URL. I'm a bit confused because I thought this whole system is based on MQTT but a endpoint-URL sounds more like HTTP. Do I really have to set up a endpoint-URL, and if yes, how can I do that for my ESP8266?

Long story short: I want to execute some actions, based on the message-content which should pushed by Pub/Sub to my device. How can I do that?

Thanks for reading and have a nice Weekend!

Stuckz
  • 33
  • 6

1 Answers1

0

As per what I see on the Github README.md, it seems that the project is meant to use a Pull subscription. The pull subscription needs to use this command to read the telemery messsages:

gcloud pubsub subscriptions pull --limit 500 --auto-ack <your-subscription-name>

You will need to have the Google Cloud SDK installed for using that command.

On the other hand, the push subscription needs an endpoint where the Pub/Sub service delivers messages. The push endpoint must be a publicly accessible HTTPS address and the server for the push endpoint must have a valid SSL certificate signed by a certificate authority.

Kind regards, Manuel

Malaman
  • 175
  • 4