Blynk + ST_Anything

Hello, I am trying to use Blynk and ST_Anything Smartthings in one sketch at the same time. Problem is both want to establish a WIFI connection. Any idea how to overcome this problem ? Is there a way to connect to Blynk, passing the auth code without establishing a new Wifi connection ?

Many thanks for your help !

Tony

Did you try looking for an available solution on this Forum?

Yes I did and I also tried with Blynk.Config(auth, server, port) … But this throws an error in the sketch void setup() :

‘blynk’ was not declared in this scope

ST_Anything starts a WIFI connection and then I just need Blynk to connect to WIFI as well using the auth string.

Regards,

Tony

should be Blynk.config(...), you also need to have Blynk header included, as in every Blynk example sketch.

Not sure what you mean by Blynk header ?

My sketch includes

#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h>

And then in void setup() :

Blynk.config(auth, blynk-cloud.com, 8442);

Try Blynk.config(auth, "blynk-cloud.com", 8442); <— note the “quotes”

or even just Blynk.config(auth);

And don’t forget the Blynk.run(); in the void loop()

Thx Gunner, was reading posts and doing some more testing …

Indeed Blynk.config(auth); without server and port name seems to work.

And yes, I have Blynk.run in void loop()

Sketch compiles correctly now but when I start the Blynk App it says test is offline … (test is the app on IOS)

In my debug window it shows “[5396] Connecting to blynk-cloud.com:8442

but does not seem to succeed in connecting … Will try a few more alternatives .

Well, that means it is at least trying… now I suspect the reason it is not connecting is that whatever non-Blynk WiFi connection method you are using may not be actually working?

I am using ST_ANything … It automatically makes a WIFI conneftion when initializing and that sems OK as it is transmitting data read from sensors to my Smartthings hub … Apparently Blynk does not like sharing the wifi ? Maybe I should have Blynk coinnect to another SSID ?

Is this an ‘open’ connection or perhaps it is a direct, proprietary link? like encryption or tunneling?

It may not be Blynk that doesn’t like the sharing?

That might be the problem indeed … ST_Anything connects to my hub with a static IP address.

I changed the sketch so that Blynk makes it’s own WIFI connection to another router/SSID. This results in :

[10350] Connecting to blynk-cloud.com:8442
[11301] Ready (ping: 1ms).

BUT … Data isn ot received by the IOS App …and still gives “is offline”

PS : I have othe Blynk Apps working perfectly …

Well, it is connected to something… perhaps double check the authcode used in the sketch as compared to the App project you think it is supposed to connect with.

Also, in case you also use a Local Server, make sure you have logged into the Cloud Server when checking devices using that server… they (Cloud and Local) are not the same, even if you use the same login info.

It is connecting and it did send data to the IOS once. I now have connection to two different SSID’s (WIFI Access Points) but they seem to mess up each other somehow. Will need to do some further debugging. Will keep you posted if I find a stable solution !

Again, thanks for your help !!

Tony