I am running it now… and so far it is installing Java 8 just fine (on my old RPi)…
I have been through the pain of manually setting up Pi’s with Blynk on several occasions. It’s not so bad now as I have SD cards I can clone but I think an automated script is an excellent idea. Many people like to drive but they don’t have a clue how the engine works.
@fragolinux can you add the client too please
what client? The smartphone client has to be downloaded from app stores, then you have to go in settings and let it point to your local server, that’s it…
it’s detailed here: https://github.com/blynkkk/blynk-server#app-and-sketch-changes
No, thats the App… the Client is what we call the script installed on the Arduino/ESP/RPi, etc…
How to install Node.js library on Linux
http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/raspberry-pi/how-to-install-nodejs-library-on-linux
I have to use the “Manual Node.js installation” method due to the older processor on my RPi Model B
Well, it installed with no issues Very nice @fragolinux
That was easy… now I have to remember how to tweek it like my original, then copy all my data over, to give the old RPi a good test as my full time server… and soon, double duty as a client as well.
oh, and how to automatize that??? I’ve to take a look…
BTW the nodejs part is well covered in the script of my friend Peter Scargill, script to which a dedicate A LOT of time (with the author of course) to add always newer options and let it install on as many SBCs as we can… take a look here: https://tech.scargill.net/a-christmas-script/
no, you can have that automatic, too, we added that install part to Peter’s script quite some time ago… if it’s an old RPi, the script will recognize it and install the correct version… look my other comment up here for link
@fragolinux Well my old RPi was just too unstable it seems (lots of stuttering and flat out stopped running many times), so I set it aside…
Then today, I remembered I have a couple of C.H.I.P.s that I had once installed Blynk Server on ages ago… so I reflashed one with the latest headless firmware (Debian I believe) and ran your script on it.
It loaded up just fine and I have it running a test project to see if it is a worthy Blynk Server replacement for my netbook.
Once concern I have… your install seems to dump everything in the “main?” directory instead of in a Blynk folder off the home/chip directory (in my case)… that makes it a bit messy in my view.
Also, didn’t you have a “pre-done” server.properties
and mail.properties
file at one time… all ready for customising? I can’t find them anymore.
Wowzer… my life goals never included “learning Linux”… but here I am, regardless of my (lazyish) tendencies
OK, I found the Blynk folder, locked away in the root folder (of which I originally had no access to, as a normal user login). I managed to move everything Blynk related into the /home/chip/Blynk
folder and switch said folder to user permissions, and setup my email… then, for some reason, I needed to redo the /etc/rc.local
for proper server action at bootup.
Pheww… a bit more “attendance needed” then I originally hoped for But it seems to be working as “normal” now. EDIT - only now I have no idea how to update the server down the road… arggg, more learning needed
Perhaps there was a reason for having it in Root access… but might I recommend keeping it more like the “official” install locations and permissions?
New development… When I powered down the server to move it into its permanent location under a shelf…
While it rebooted fine and the server is running… it had wiped out the user account?? (well the account file was still there, just as 0 data and unregistered in the administration page).
Copying the file over from the backup folder and rebooting the server again brought everything back to “normal”.
Honestly, I am unsure if this is related to this install method or my ministrations in moving everything into a single, user provisionable, folder… it has happened once before (yesterday), but I can’t remember the time frame, and had written it off as a one-time glitch… guess it’s not
Any ideas on this?
Wow very nice
I’ve just learned of the release of 0.28.0 Blynk Server. For those who use that at home on a local server. It requires Java9 which is, as far as I can see, not yet available for the ARM CPU. So if you are running on a Raspberry Pi, stick to the previous server version, do not update untill the Java9 for ARM comes out!
I added -java8
version to release. For now should be ok.
Just some observations after running the script on my Ubuntu VM that looks like this:
Ubuntu 16.04.3 LTS
Linux ubuntu 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 GNU/Linux
The script creates the Blynk working directory with mkdir $BASE
as defined by BASE=~/Blynk
, which is fine by me
But, if you are a well trained Linux user and don’t login as root
but instead use sudo
for tasks that needs elevated privileges, the ~ (value of $HOME)
will point to the current user’s home directory, not /root
when you run the script.
“So? So what?” (quoting Lt.Gorman in Aliens )
At startup /etc/init.d/blynk
runs COMMAND="$(which java) -jar $BASE/BlynkServer.jar"
as user root, and since $BASE
still gets defined by BASE=~/Blynk
in the script, $BASE
equals /root/Blynk
- not /home/[username]/Blynk
where I installed it
Perhaps an excessive description for something that can be solved with a simple cp -R
, but I’m hoping to learn @Gunner some Linux
Otherwise it worked like a charm!
You and me both
Something went catastrophically wrong on my C.H.I.P. server… lost everything (but I had backups), so I fell back to my original Blynk server install (running on an old netbook ir refurbed with Mint) that I did almost a year ago and has been working ever since.
Snicker, snort… he said “trained”… ha ha… I honestly can’t remember, but I think I needed root a few times as I can’t seem to sudo when using WinSCP for easier file manipulation. But I am learning my way around the CLI… slowly, thanks to some RPi necessities.
just published an updated script version that adds the UPDATE switch…
this way you can rerun it to have latest java v8 jar version…
if you never run the script, do this to get the latest version with the new switch
sudo wget --no-check-certificate -O /etc/init.d/blynk https://gist.githubusercontent.com/fragolinux/a5e7d6153afab4c52d91d41ff9860b8c/raw
sudo chmod 755 /etc/init.d/blynk && sudo update-rc.d blynk defaults
sudo /etc/init.d/blynk install
if instead you already run the script, do this:
sudo wget --no-check-certificate -O /etc/init.d/blynk https://gist.githubusercontent.com/fragolinux/a5e7d6153afab4c52d91d41ff9860b8c/raw
sudo chmod 755 /etc/init.d/blynk && sudo update-rc.d blynk defaults
sudo /etc/init.d/blynk update
from now on, if you want to update, just run:
sudo /etc/init.d/blynk update
this will rename previous version to .OLD in /opt/Blynk folder and download a new version: just tested on 2 of my boards without issues… oh, and i moved the folder OUT of the the user folder and into /opt filesystem, a while ago…