Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
NodeMCU ESP8266 Blynk SSL Application for Linux Server Load Averages
Here is a useful SSL (HTTPS) application for anyone with a remote Linux server they want to keep an eye on using Blynk and the NodeMCU ESP8266. This little app also works (have tested as well) on the WeMos D1 ESP8266 Arduino board.
The NodeMCU setup could not be easier, just find a suitable mini-USB cable and plug it in
The Blynk app (running on aniPhone) looks like this:
Here is the Arduino sketch, which requires the ESP8288 board manager lib:
and you also need to install the Blink and the ESP8266 libs in your Arduino IDE (I assume you can do these tasks, if not please reply and ask).
Here is the Arduino sketch. You will need the SSID of your WIFI network and the password (if any) and your Blink app auth code:
Here is the very simple service side PHP code.
This PHP code defaults to JSON, but the Arduino sketch above uses a crude "string" method, so the type is set to "t" in the code.
I suggest you add some filtering on the $_REQUEST and maybe some basic security (authorization key) if you go beyond the testing phase. Set the logging to match your preferred logging path.
This API is so simple, I don't think anyone really needs it.... but I include it for completeness:
Basically, you will need to set up three Blynk gauges based on your visual and font size preferences, etc. There are many Blynk tutorials on the net, so I'll not repeat all those basic steps here unless anyone asks
If anyone would like to rewrite the API reply parser or modify to add the ArduinoJSON parser, please do so and post your code back.
25dBm for WIFI? That's around 300mW from the PA, (Power Amplifier).
I thought the limit inside the ISM band(s) was 20dBm, 100mW for low powered gear.
However...
That antenna IS loaded, so that is probably why the power increase so as to keep the ERP, (Effective Radiated Power), to 100mW...
Great stuff...
Bazza...
This User Gave Thanks to wisecracker For This Post:
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Quote:
Originally Posted by wisecracker
Hi Neo...
25dBm for WIFI? That's around 300mW from the PA, (Power Amplifier).
I thought the limit inside the ISM band(s) was 20dBm, 100mW for low powered gear.
However...
That antenna IS loaded, so that is probably why the power increase so as to keep the ERP, (Effective Radiated Power), to 100mW...
Great stuff...
Bazza...
Thanks. I've modified my service side to to check the RSSI for two modules, one runs on the balcony (with a wall between the ESP8266 and the WIFI router, and the other in the same room:
Hope this helps.
PS: Added MAC address to the service side logic as well, because I started testing with both a NodeMCU and a WeMOS D1 (both have ESP8266).
Update:
This Blynk app is really cool. I have two ESP8266 devices running and two iPhones with the same Blynk account, and it's working flawlessly. Very impressive.
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
WeMos D1 with ESP8266 Running the same Load Avg sketch:
Two iPhones running the same Blynk app:
This is awesome really. I think I will use some of the sonar modules I have to create a home surveillance Blynk app when I am bored. This app of course will let me know when anyone is moving around in my home when I'm not there LOL . Normally I am not really into home automation and surveillance apps (been there and done that a decade, maybe two, ago), but this ESP8266 is really amazing combined with the Arduino IDE for programming. They are so cheap, the sky is the limit!
A downside of this, of course, is the fact all of this kind of this very cheap, robust "IoT" tech can be used in the "new surveillance society" that civilization is marching toward.
The net is pregnant with "ESP8266 WIFI cams" and so many "surveillance-oriented" applications (and also "relay control" applications). I'm trying to think of a few ESP8266 apps that are a bit different (like this Linux server monitoring app) than what's well covered already in blogs and on YTubie.
Looking at your RSSI values they are all inside the """blockbusting""", (strong), area.
I am used to working below -120dBm on BWs less the 3KHz wide, often down -130dBm on SSB for SSTV for receiving, and, transmitting at power levels of +50 to 60dBm, 100W to 1KW...
Great work and you are getting it all working remarkably quickly. Kudos...
When I had my Arduino about 12+ years ago or so there were none of these add-ons so we had to design and build our own which, without serious test gear was beyond the average user. A Spec-An like our HP one cost us around 25,000 UKP in the mid 90s which would be needed to create a """clean""" 2.4 GHz signal at 300mW...
<thumbs up> <terrific> smileys here...
Last edited by wisecracker; 01-31-2020 at 07:33 AM..
Reason: Change 3HKz to 3 KHz...
This User Gave Thanks to wisecracker For This Post:
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
I agree.
Everything about tech is faster / easier / more fun compared to even a decade ago.
High quality test equipment is a fraction of the cost. Specialized integrated circuits are abundant and very inexpensive. The culture of "sharing, sharing, sharing" on the Internet via forums, blogs, code repos and videos (YT) binds it all together.
We truly live in remarkable times. I imagine in a few under years people will be able to order an entire quantum gravity amplifier chip, or the latest warp drive module, on AliExpress for $2. LOL
Back to 2020, I will order various ESP32 modules as soon as the Chinese sellers start shipping again.
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Update; Version 0.2
Changes: Added 30 minute session activity for members, guests and bots. Reorganized gauges. Changed name to "Load Averages & Users"
This more-than-like will be the last Blynk app I create because, with only six gauges, I have reached the limit of the "freebies" and if I create more apps and add more widgets, I will start to have to pay for them.
I may add some "color logic" when the numbers exceed certain thresholds, otherwise I'm most "done and dusted" with this test app.
Anyway, time to move on to another Arduino module.
This app was fun, fast useful and easy to build. Recommended for sure.
Here is a rapid prototype app I just put together which might be of interest to some people.
Basically, I have parsed the data from a Chinese web site which is tracking the Wuhan coronavirus, and cache that data every minute via a local cron file and make a simple API available to a Blink app. ... (6 Replies)
Hi folks,
How can i configure an AIX LDAP client to authenticate against an Linux Openldap server over TLS/SSL?
It works like a charm without TLS/SSL.
i would like to have SSL encrypted communication for ldap (secldapclntd) and ldapsearch etc. while accepting every kind of certificate/CA.... (6 Replies)
A client is accessing our JBoss server. In the past, we set up a keystore and everything worked fine.
That certificat expired and we've installed the new one. Now the client is getting the following error -
HTTP/1.1 500 Internal Server Error
Date: Mon, 14 Apr 2014 13:25:44 GMT
Server:... (1 Reply)
`/proc/loadavg` give me three indicators of how much work
the system has done during the last 1, 5 & 15 minutes.
How can i get a list of load averages
that each averaged over the last minute for 10 minutes? (2 Replies)
Hi
anyone know how to setup a setup a virtual IP to control 2 server load for linux? i only have 2 server, i don want to buy another just for the load balance... is there a way to do it?
Sumemr (0 Replies)
Hi,
I am seeing very high kernel usage and very high load averages on my system (Although we are not loading much data to our database). Here is the output of top...does anyone know what i should be looking at?
Thanks,
Lorraine
last pid: 13144; load averages: 22.32, 19.81, 16.78 ... (4 Replies)
Hi all
what are the ways by which we can know and generate a report of the space remaining, memory(ram) used and the load on the server over a period of time. (1 Reply)
Hello,
I'm facing a big problem with my hosting server (Dual Xeon 2.4GHz), I'm having a load in the CPU usage and the memory (maybe it's related) ALSO mySQL:
Server Load 5.34 (2 cpus) (to 22 sometime)
Memory Used 68.4 % (to 70% sometime)
When I go to 'CPU/Memory/MySQL Usage' I found:
... (3 Replies)