Ok Here it goes! And yes I have been all over the internet on this one. Hopefully I can explain my situation. I make solar tracking controllers. They read directional sensors and aim the panels towards the sun with linear actuators. The solar trackers are sometimes placed a far distance from APs or other wireless.
I am now developing a new solar tracking control with telemetry using Blynk. A very wonderful app. My workbench apparatus here is using an ESP8266-01 to connect to my AP. All is well and good. I now need to add some remote monitoring from a distance. I need the ability to connect to a solar tracker from a distance further from the typical wireless connection AP. I think Xbee is the answer. Has anyone developed a Blynk Xbee API? I need it. Suggestions, other options?
Doesn’t XBee just get treated as a Serial link, from the sketches point of view? If so, then use Serial or USB based library. But you cannot use the ESP library then… so I am unsure if you can make it work with an ESP8266 But if all you need is an ESP-01, then an UNO (or just the chip) or even an ATtiny s could probably work.
The idea is to NOT use an ESP8266 and go with an alternative like the Xbee. I just do not know how to make communication with the Blynk server using Xbee. I need to use Xbee because it can transmit at a much longer distance than ESP’s do.
Appreciate.
I suspect you are thinking that an Xbee is a traditional MCU? AFAIK it is not, at least in the sense that would work with the Blynk libraries.
For that you have to treat it as just a long distance transceiver link, possibly between TWO other MCU devices, one for sensors (or you might be about to hook them directly to on xBee for that?) and the other which needs to use something like Ethernet/WiFi to connect to the Blynk Server (via internet or network).
Again, search this forum for Xbee and start reading what others have tried.
Thanks Gunner, I completely understand your comment(MCU connect between two). That is what I am attempting to. The xbee’s may have a non traditional MCU(Good thought). But there are libraries for Arduino obviously.
Where I am at now is to use an ESP-01/ESP8266 to wifi(for blynk) and bridge an Xbee(master) with the MCU and then to an Xbee mesh. I would rather use an Xbee board standalone MCU master that can communicate with Blynk. The Master would then communicate with the xbee clients(solar tracker units). May not happen, but I have workarounds which also use precious memory.
Humbly I say, I have searched for tens of hours on this subject. I would not have asked this question if I found the answer first. There are many that are trying to do the similar. Xbee’s from Digi are amazing devices. Please do some searching yourself, there may be an opportunity here for a new xbee library and Blynk. And the Digi company my appreciate!
But even then you still need to get it connected to a server somehow, and for that it would need it’s own WiFi, which seems to only be available on the XBee Wi-Fi… and that seems no better than normal WiFi
Or use a Serial link with another dedicated transceiver like GSM or ESP-01 (in AT mode)… Which brings you right back to the better concept of using as a link, not a standalone.
But I don’t own any Xbee hardware and am not a Blynk developer, so no sense in my going down that rabbit hole too deep
I have looked into the XBee Wi-Fi as well. Not compatible with Blynk. Which brings us back, yes. Node Red the same issue.
Digi has their own Blynk, but not fully enhanced like our Blynk with all the great widgets. I guess I am stuck with my original plan to just connect a black box to the wifi(or direct connect to router) Xbee inside black box and go from there. Should work fine. Digi also offers a wifi gateway which is promising(like my black box). I have a meeting with Digi tomorrow. It will be interesting. This is going to be an adventure. But I will figure it out and share my findings.
Thanks for all your replies guys. Xbee may or may not be the answer. Dunno and confused. What I am actually looking for is a solution to talk to devices located a distance from 100-300 yards and also handshake with the Blynk server.
With this ESP8266(ESP-01) I am using currently, I have blynk widgets all over the place and working(reading and writing back and forth). But obviously range is limited with the ESP. Xbee can transmit much further with many other features. My idea for longer range is to connect both an xbee and a ESP8266 to the same MCU(Arduino) to make a gateway(master). A total workaround. But may not be a good one.
The Idea:
The ESP-01(via Arduino) connects with the blynk server. The Xbee will communicate data to the Arduino and handshake data via the ESP to Blynk. The gateway Arduino “master” connects to the local wireless within range through the ESP. The master gateway(with both ESP and Xbee in a black box) will then link with other Xbee(slaves)in the network. Hopefully you get what I am saying. But there has got to be a better way to what I am trying to accomplish.
Dean
It would be easier to understand if you didn’t refer your MCU devices as Blynk widgets, and a diagram would probably help.
You’ve had some suggestions about alternatives, but. Don’t seem to like them.
If I was going to do this with XBee, which wouldn’t be my first choice, then I’d have a centralised Raspberry Pi running Node-Red with XBee and Blynk plug-ins 8nstalled, along with Mosquitto for MQTT messaging.
I’d then have remote sensors connected directly to the XBee boards (if that’s possible with the boards you’re planning to use) or connected to some other MCU and using the XBee as a long range modem.
I wouldn’t run any Blynk code on the remote boards, just code for the XBee networking and MQTT messaging (plus code to read the sensors and write to GPIOs outputs to control relays etc).
Node-Red would handle the communication with Blynk, by translating the MQTT messages into data to be sent to the Blynk server, and vice versa.