Help me understand how I can use Blynk for my IOT project

Hello,

I’m looking to create a fun project with my kids using two Raspberry Pi’s and some sensors attached to each Pi. I see that Blynk allows me to install the server locally on my own hardware. What I would like to do is be able to collect the sensor data from both Raspberry Pi’s and have my local Blynk Server server up a dashboard of this sensor data.

I do have a lot more reading to do on how to use/setup Blynk but some of the Getting Started has me confused on whether or not I can use Blynk for my little IOT project as I intend. I have the following questions that I hope this community will help point me in the right direction so I can begin setting up and testing:

  1. It seems I would use a phone app to create my dashboard. In using my own local server, do I still need to create a Blynk Account?
  2. How can I point the phone app to my local server? I see the Phone App has me select the hardware (in my case Raspberry Pi’s). Can one project under this mobile Blynk App have more than one Raspberry Pi?
  3. How do I get both Raspberry Pi’s connected to my local Blynk Server. Are their configurations to be made on each Raspberry Pi to point back to my local server?
  4. I prefer to use Linux (Ubuntu) for a Blynk local server. What are the requirements? I see that Java 8 required. (OpenJDK, Oracle) is required. Is that it? Just a base install of Ubuntu Server (no desktop) and nothing else (no apache or mysql) is required? How is the dashboard served up from my local Blynk Server?

Sorry for all these questions. Thank you in advance for any advice you can provide to me.

Thank you.

Hello.

Yes.

https://github.com/blynkkk/blynk-server#app-and-sketch-changes

Yes. See link above.

https://github.com/blynkkk/blynk-server#minimal-requirements

Yeap.[quote=“greavette, post:1, topic:8772”]
nothing else (no apache or mysql) is required?
[/quote]

nothing else. Just Ubuntu + Java 8.

What do you mean?

@greavette

'1. Yes you create a “Blynk” account on your local server.
'2. A single project can control dozens of devices but to be honest Pi’s are not well supported. A big proportion of Blynkers appear to come from an Arduino background (C++ derivative) whereas the Pi’s require you to have java coding experience.

I guess Java is much newer than C++ and Pi’s are much newer than Arduino’s so the knowledgebase is much bigger for Arduino C++.

If you have Java skills then working with the Pi should be fine but don’t expect a lot of support from fellow Blynkers as they don’t have the skillset. I think another reason for this is that if you have excellent Java skills you might not need Blynk i.e. you could create your own Android / iOS app yourself.

I don’t advocate using an Arduino though. The best way IMHO is the $3+ ESP’s as they run Arduino code but have WiFi, huge amounts of memory and are dirt cheap.

'3. Yes every device you want to connect to the server (local or otherwise) is configured with software.

'4. Just Java 8. The $5 Pi Zero runs Blynk server so almost anything will do. No Apache, no MYSQL, just Java 8. The dashboard on your Smartphone has a field to enter a domain name (e.g. blynk-cloud.com) or an IP address (LAN or WAN).

Hello @Dmitriy and @Costas. I very much appreciate you taking the time to answer my forum post.

So installing Blynk on my local Ubuntu server seems simple enough. Just install java on Ubuntu and add in some port forwarding on my router.

On my mobile app (android in my case) I update the Server settings and select custom and I point to my ubuntu server address over whatever port I setup in my port forwarding.

Is there any encryption to be setup at this point for my phone app to talk to my local server?

This is where things are still a little fuzzy for me. I’ll have two Raspberry Pi’s each with 2-3 sensors attached to them. I use my mobile app that I’ve logged into and created an account on my local server. Using this app do I then create a project and point to my two Raspberry Pi’s? My Pi’s may not be on the same network as my Ubuntu server so do I need to set up my Pi’s first locally on the same lan as my local Blynk server?

I’m unclear what you mean that I need Java skills for having my Pi talk to my local Blynk server? Maybe what I’m unclear about is what needs to be installed on my Raspberry Pi when I connect it to my project. Do I select the first Raspberry Pi, create the widgets and dashboard items I need then create the auth token and put this on the Raspberry Pi. When that auth token is placed ‘Somewhere’ on the first Raspberry Pi the Pi will now connect to my local Blynk server and send data to it?

What else on the Pi do I need to install to send my sensor data to the locally installed Blynk server?

I’m planning on using a SparkFun Blynk Board on both my Pi’s and some Grove sensors. I’m assuming I’ll need a Grove addon board along with my Blynk Board to make this work.

I won’t be running my Blynk Server on a RaspberryPi. I’ll be running my Blynk server on my home network in an Ubuntu virtual machine. My Raspberry Pi’s will be at my cottage providing sensor data for us to see. Perhaps a Pi Zero as my Pi board with a Grove Pi addon and a SparkFun Blynk Board would work as well?

Does the Blynk Server I have installed on my ubuntu server serve up the webpage or will I only be able to view my Pi Sensors on my phone?

Thank you.

Please number your questions.

  1. Each project has a token (32 character code). Each device that wants to connect to the server has to have the token embedded. You can have “unlimited” devices with the same token so each of your Pi’s are give the same token.

  2. Unless your are a network guru like @Lichtsignaal then it will certainly be easier to have everything on the same network to start with.

  3. Each device that connects to the server has to be “coded up”. The ESP’s are coded up with the Arduino IDE and others. There are lots of sample sketches provided by Blynk and Blynkers to do this coding up but almost nothing for Pi’s. If all you want to do is turn an LED on and off then there is a sample piece of code for the Pi but going beyond this requires you to be a “coder”.

  4. AFAIK the Sparkfun board is a decent ESP but I haven’t looked at how they interface with Pi’s. As they are ESP’s they use the very popular Arduino C++ code. You would have to look into interfacing the Sparkfun board with your Pi’s. I have limited knowledge of the Grove stuff other than enabling the Grove power lines on the Wio Link (another ESP board).

  5. Do you mean the Smartphone dashboard which is not a webpage or do you mean the admin interface to the server that is a webpage? Really Blynk is a Smartphone app but they have an API for you to access the data in other forms. Windows users can use an Android emulator like Droid4X to “see” their Smartphone on their PC’s and I believe it also runs on Ubuntu.

If you are using Sparkfun Blynk board and Grove do you really need the Pi’s? What will the Pi’s provide that you don’t have on the Blynk board and Grove sensors?