I want to install a NodeMCU-12E v3 ESP8266 WiFi board, with its own power supply, in various places, to perform various functions and report various data back to the app.
I want to control all the separate units from the one app so everything is in the one place.
But I will need a different IP for each NodeMCU board in the sketch on each board.
Is there another way to address each board?
How do I set this kind of system up, if it’s possible?
As @Shadeyman points out, the basics are covered in the documentation.
To answer your specific questions…
Yes, each NodeMCU will need it’s own IP address to be able to exist on your Wi-Fi network. Depending on how you’re structuring your code, these will either be assigned automatically by allowing the your DHCP server (router) to assign them automatically, or you can specify them manually in your code and have a different set of code for each board.
Although it sounds a bit clunky, I use the latter approach for a variety of reasons:
- You’re less likely to run into connectivity issues.
- I use Over The Air (OTA) updates to be able to re-flash my devices with updated code without having to get physical access to them. This requires each device to have a known IP address and life is much easier if each device has it’s own OTA name/description so that you can identify it when doing an OTA update.
- It’s sometimes handy to be able to ping a board to check that it’s still online. The App will show the Connected status of each board (provided you’ve followed the documentation and given each one it’s own Auth Token) but that’s about whether it’s connected to the server, which isn’t necessarily the same as being connected to the Wi-Fi network.
Blynk doesn’t directly use the IP address to address each board, it’s done via the Auth Token, but you don’t have to worry about the mechanism, just follow the system used in the documentation and it will work.
It’s also worth thinking about using Tabs in the app. You may want the controls and data from all devices to be visible on one screen in the app, but sometimes you want to arrange the data so that it’s specific to just one or two devices and in this case you can use Tabs to arrange the widgets assigned to each board.
Pete.
Thank you for the guidance.
sorry for the delayed reply.
Thanks for the link, I will take a look.
sorry for the late reply.