Question about Free Limits

Yo Apps on 14 Apr 2022
Latest activity Reply by Christopher Stapels on 18 Apr 2022

Hi, Its my day 1... and just thought i should confirm something for sake of clarity. I found this table on the site...

But I want to know does Number of Messages include Reads & Writes... or only Writes because the other parameter is Message update interval limit ... and usually the word update is a part of the operation where there is a WRITE being committed. And thats what confused me...

So is that interval only for updating data... or is it even if you are reading data?

Thanks

Yo Apps
Yo Apps on 16 Apr 2022

Hi guys.... I did what you guys said... I read some of the docs and managed to make the example from your examples section. The PubSub, worked fine via MQTT.

BUT HERE IS where im stuck! I am going to be changing the value on the cloud's Field1 from a mobile or a web. Now I've tried it when i used the regular API from the browser to write https://api.thingspeak.com/update?api_key=XXXXXXXXXXX&field1=0 and works fine.

  • But I cant find a similar API to publish to that Field1 for the MQTT technology
  • And while Field1 has been subscribed to by an MQTT client, any attempts to write to Field1 via the conventional API fails too

I found a Flutter Pkg ... but do you think this can work with Thinkspeak? All I need from the mobile/web... is to publish... not to subscribe.

thanks will await your advice

Vinod
Vinod on 17 Apr 2022

Take a look at this example. You can do something similar using your JavaScript code.

Yo Apps
Yo Apps on 17 Apr 2022

Thanks for your reply & following up. Buddy, I did read it... Im sure it'll work from the desktop.. BUT unfortunately this isnt gona work in my case via the mobile. My mobile needs to send an updated value based on its position(geoLocation). Now to dynamically feed that from native Mobile code... into another JS(app)... seems like a system with too many breakage points.

BUT this seems promising... https://pub.dev/packages/mqtt_client what do you think?? I dint see thingspeaks name on the list... Are they any cautions if I try to connect this ie V3 with our Thingspeaks cloud channel???

Christopher Stapels
Christopher Stapels on 18 Apr 2022

It should work, but I haven't used it. Let us know if you get it working. I'm not clear what the issue was above with the client examples shown in our doc. It is possible to do simultaneous publish and subscribe . Are you trying to find a client that works on a mobile device?

Yo Apps
Yo Apps on 14 Apr 2022

Hi Christopher, I appreciate you taking time to clarify my confusion. Ok but not ask for a ball park figure... what if I read a field's last added value like once every 5secs? is that still acceptable? or is that high? how could i get some idea?

Christopher Stapels
Christopher Stapels on 14 Apr 2022 (Edited on 14 Apr 2022)

You can read every 5 seconds from one device without any fear of violating the policy.

Yo Apps
Yo Apps on 14 Apr 2022

Thanks! Thats beautiful... now I need to get back to some constructive coding with Thingspeak! thanks again.

Vinod
Vinod on 14 Apr 2022

If your channel can only be updated once every 15s with a free license, why will you be reading the value every 5s? That is just wasteful for your device and for ThingSpeak.

Yo Apps
Yo Apps on 14 Apr 2022

Yeah! nice catch... But not necessarily gona be writing every 15secs!!! Since I am new here... but have years of experience in RealTimeData... I cant find a notification listener in the docs. SO, I thought of a work around... what if I can poll every 5secs from my esp8266... and I detected an update to a field, then I could immediately fire a piece of code. But I'd be really happy to hear if you have another more efficient way of observing a field in your deeper experience with Thingspeak. will await your answer. Thanks for the reply Vinod bhai!

Vinod
Vinod on 14 Apr 2022 (Edited on 14 Apr 2022)

I would recommend a push-based mechanism. MQTT is perfect for this. Take a look at this MQTT javascript client tutorial: https://www.emqx.com/en/blog/mqtt-js-tutorial . ThingSpeak has an MQTT broker you can use to publish and subscribe to.

Yo Apps
Yo Apps on 15 Apr 2022

Yeah, I've heard of MQTT, but never really used it.. as with nodeJS my need was covered with SocketIO. OK will give this a reading over the weekend .. And get back to you. Thanks you guys have a great support

Christopher Stapels
Christopher Stapels on 14 Apr 2022 (Edited on 14 Apr 2022)

You can subscribe to updates with a device in MQTT , removing the need to poll.

Yo Apps
Yo Apps on 15 Apr 2022

Yeah, never really approved of polling either.. But never saw anything close to an observer pattern. OK this is new.. will give this a reading over the weekend .. And get back to you. Thanks you guys have a great support

Christopher Stapels
Christopher Stapels on 14 Apr 2022

Updates or writes to your channels consume messages and are time limited. Reading channel data does not consume messages and there are not necessarily time limits on reading. We ask you to use the reads responsibly. If you programmatically read channels at a high rate, we may block your address or restrict access. This is quite uncommon fortunately.