microbox Active Member Licensed User Longtime User Apr 9, 2017 #1 Hello everyone, just want to ask if it is possible to create an application on B4a that can send data to thingspeak? I'm aware that using arduino is possible but in my case I want to use my app B4A in sending data, I hope this can be possible.
Hello everyone, just want to ask if it is possible to create an application on B4a that can send data to thingspeak? I'm aware that using arduino is possible but in my case I want to use my app B4A in sending data, I hope this can be possible.
Erel B4X founder Staff member Licensed User Longtime User Apr 9, 2017 #2 I'm sure that it is possible. You can use the MQTT library to publish messages: https://www.mathworks.com/help/thingspeak/mqtt-api.html?requestedDomain=www.mathworks.com Upvote 0
I'm sure that it is possible. You can use the MQTT library to publish messages: https://www.mathworks.com/help/thingspeak/mqtt-api.html?requestedDomain=www.mathworks.com
DonManfred Expert Licensed User Longtime User Apr 9, 2017 #3 https://de.mathworks.com/help/thingspeak/rest-api.html Seems they have a REST Api which you can use using okHTTPutils2 I dont know how to use the MQTT Protocol with the B4A MQTT Client... Upvote 0
https://de.mathworks.com/help/thingspeak/rest-api.html Seems they have a REST Api which you can use using okHTTPutils2 I dont know how to use the MQTT Protocol with the B4A MQTT Client...
Erel B4X founder Staff member Licensed User Longtime User Apr 9, 2017 #4 MQTT library + tutorial: https://www.b4x.com/android/forum/threads/iot-mqtt-protocol.59471/#content Upvote 0
monic Active Member Licensed User Longtime User Apr 9, 2017 #5 Hi, You all beat me too it but I did find other methods https://uk.mathworks.com/help/thingspeak/examples.html and a java example is listed but the rest api would be the easy option. Upvote 0
Hi, You all beat me too it but I did find other methods https://uk.mathworks.com/help/thingspeak/examples.html and a java example is listed but the rest api would be the easy option.
microbox Active Member Licensed User Longtime User Apr 13, 2017 #6 I need to update the channel with a parameter, I tried this way B4X: nc2 = nc2+1 job1.PostString("https://api.thingspeak.com/update?","api_key=JODU2H2LYNPU6XXX&field2= '"& nc2 & "'") but no luck with the above code...the code below works B4X: job1.PostString("https://api.thingspeak.com/update?","api_key=JODU2H2LYNPU6XXX&field1=200") Hope anyone can tell what I'm missing.. Thanks for the time, microbox Upvote 0
I need to update the channel with a parameter, I tried this way B4X: nc2 = nc2+1 job1.PostString("https://api.thingspeak.com/update?","api_key=JODU2H2LYNPU6XXX&field2= '"& nc2 & "'") but no luck with the above code...the code below works B4X: job1.PostString("https://api.thingspeak.com/update?","api_key=JODU2H2LYNPU6XXX&field1=200") Hope anyone can tell what I'm missing.. Thanks for the time, microbox
DonManfred Expert Licensed User Longtime User Apr 13, 2017 #7 Try it this way if nc2 is just an integer. B4X: job1.PostString("https://api.thingspeak.com/update?","api_key=JODU2H2LYNPU6XXX&field2= "& nc2 ) Make sure that it is not a mistake that you used one time field1 (works) and field2 (does not work) Upvote 0
Try it this way if nc2 is just an integer. B4X: job1.PostString("https://api.thingspeak.com/update?","api_key=JODU2H2LYNPU6XXX&field2= "& nc2 ) Make sure that it is not a mistake that you used one time field1 (works) and field2 (does not work)
microbox Active Member Licensed User Longtime User Apr 13, 2017 #8 Thanks DonManfred...now works fine. Upvote 0