Blynk Server version v0.17.2 released

This is small release. However it is required for new upcoming widget - Eventor. What’s new :

  • Finished Eventor widget;

  • Finished “Set property” feature;

  • PinMode settings refactored and logic changed;

  • Refactored GCM messaging for better throughput;

  • LCD now stores 6 last message in order to restore latest state;

  • Added support for table, player, time input widgets;

  • Widgets with analog pins not processed correctly fix;



What is the easiest way to update this on raspberry Pi?

Do I lose everything by updating?
Or do I need to back things up?

No. All your data is stored in dataFolder that you should specify during start.

I made a startup script for this situation, I always make a symbolic link to the server-xx.x.jar file called server.jar so I don’t have to adjust the script file. Here’s the snippet, I believe it has been posted before, but hey, the Internet is a big place :wink:



COMMAND="/storage/java/jre/bin/java -jar /storage/blynk/server.jar -dataFolder

status() {
       	echo "==== Status"

       	if [ -f $PID ]
       		echo "Pid file: $( cat $PID ) [$PID]"
       		ps -ef | grep -v grep | grep $( cat $PID )
       		echo "No Pid file"

start() {
       	if [ -f $PID ]
       		echo "Already started. PID: [$( cat $PID )]"
       		echo "==== Starting"
       		touch $PID
       		if nohup $COMMAND >>$LOG 2>&1 &
       			echo $! >$PID
       			echo "Done"
       			echo "$(date '+%Y-%m-%d %X'): START" >>$LOG
       			echo "Error"
       			/bin/rm $PID

kill_cmd() {
       	SIGNAL=""; MSG="Killing "
       	while true
       		LIST=`ps -ef | grep -v grep | grep server.jar | awk '{print$1}'`
       		if [ "$LIST" ]
       			echo; echo " $MSG $LIST" ; echo
       			echo $LIST | xargs kill $SIGNAL
       			sleep 2
       			SIGNAL="-9" ; MSG="Killing $SIGNAL"
       			if [ -f $PID ]
       				/bin/rm $PID
       			echo; echo "All killed" ; echo

stop() {
    echo "==== Stop"

    if [ -f $PID ]
        if kill $( cat $PID )
        then echo "Done."
             echo "$(date '+%Y-%m-%d %X'): STOP" >>$LOG
        /bin/rm $PID
        echo "No pid file. Already stopped?"

case "$1" in
            stop ; echo "Sleeping..."; sleep 1 ;
            echo "Usage: $0 { start | stop | restart | status }"
            exit 1

exit 0

Make sure to change the COMMAND parameter to your liking and system :slight_smile:


so, i have 0.00001 XP points with Linux, do i just:

  1. remote to my Raspberry Pi via VNC Viewer
  2. open terminal
  3. right click, paste your script
  4. change COMMAND to my system
  5. watch it do stuff
  6. reboot Raspberry Pi

if my server .jar is stored in /home/pi/ would you know what my COMMAND line should be?

@Dave1829 that is almost right.

1b Copy the new server jar file to the Pi and if you don’t create symbolic links then save it as server-0.17.2.jar. If you use symbolic links then save it as server.jar. Remembering to save your old jar file to something like server.001 (next time .002 etc) before pasting in server.jar (only for symbolic linking).

4 If you call the script you will probably need to issue the following command “chmod +x” (prefixed with sudo if you are not logged in with root access to the Pi).

6 the script means you don’t have to reboot the Pi but you could do if you wished. The script includes this line "echo “Usage: $0 { start | stop | restart | status }” so you can call the script with these self explanatory arguments.

7 I think the COMMAND line for you (without symbolic linking) and assuming you used the default dataFolder would be:

COMMAND=“java -jar /home/pi/server-0.17.2.jar -dataFolder /home/pi/Blynk”

1 Like

Ok, if your stuff in is in /home/pi, is the Blynk jar file there too?

You can do as follows to create the script. It depends a bit on your OS, but I’m assuming you run Raspbian? Behind the command I’ll put in brackets what the command does, for your convenience :wink:

Put the script on the server

cd /home/pi
hostname~ # ln -s server-0.17.x.jar server.jar {this makes a link to the current server jar file}
hostname~ # touch {this creates the script file}
hostname~ # chmod +x {this makes the script executable on Linux, as Costas mentions too}
hostname~ # nano {this executes the editor to put the script in}

So, with nano started, you can copy/paste the script to the file.

Now you need to edit your COMMAND var. For you it would be something like:

COMMAND="/prefer/full/path/here/to/java -jar /home/pi/server.jar -dataFolder
/data/folder/here" {of course with correct paths for data folder and java link. Java should be in your PATH variable, but I still like it to be the full path, just in case ;)

Now press CTRL-X to exit and Y to save the script.

Now you can run the script with the parameters:

hostname~ # ./ start

That’s basically it to get it running. The next server upgrade you can download the new jar file and:

hostname~ # rm server.jar
hostname~ # ln -s new-server.jar server.jar

And run the script with the restart parameter :slight_smile:

From this you can see the server.jar is actually a link:

OpenELEC:~/blynk # ls -ltha
total 38738
drwxr-xr-x   14 root     root        1.0K Aug 27 16:57 ..
drwxr-xr-x    5 root     root        1.0K Aug 27 16:28 static
drwxr-xr-x    4 root     root        1.0K Aug 27 16:27 .
lrwxrwxrwx    1 root     root          17 Aug 27 16:27 server.jar -> server-0.17.2.jar
-rw-r--r--    1 root     root       13.7M Aug 27 16:27 server-0.17.2.jar
-rw-r--r--    1 root     root       12.5M Aug 10 06:52 server-0.17.0.jar

I have tried it on one of my Pi’s and it all checks out but you might find you need to manually kill your running server the first time without the script.

If you don’t like the weird command line for running scripts you can copy “” to just “server” and then you can use the following commands (sh just replaces ./):

sh server start
sh server status
sh server restart
sh server stop

I should add that removing file extensions is not good form but just like with running python scripts it saves a few more keystrokes.

1 Like

ok, i am almost crying, but his is as far as i got:

pi@raspberrypi:~ $ cd /home/pi
pi@raspberrypi:~ $ ce /home
bash: ce: command not found
pi@raspberrypi:~ $ cd /home
pi@raspberrypi:/home $ cd /pi
bash: cd: /pi: No such file or directory
pi@raspberrypi:/home $ sudo cd /pi
sudo: cd: command not found
pi@raspberrypi:/home $ cd /pi
bash: cd: /pi: No such file or directory
pi@raspberrypi:/home $ cd
pi@raspberrypi:~ $ sudo cd /home
sudo: cd: command not found
pi@raspberrypi:~ $ 

is it because i am using VNC viewer to remote in to my Pi?


so i did the @Dmitriy method:

pi@raspberrypi:~ $ ps -aux | grep java
root       380  3.0 15.4 227236 68588 ?        Sl   Aug27 102:00 java -jar /home/pi/server-0.17.0.jar -dataFolder /home/pi/Blynk
pi       22292  0.0  0.4   4272  2000 pts/0    S+   11:25   0:00 grep --color=auto java
pi@raspberrypi:~ $ sudo kill 380
pi@raspberrypi:~ $ ps -aux | grep java
pi       22307  0.0  0.4   4268  1972 pts/0    S+   11:25   0:00 grep --color=auto java
pi@raspberrypi:~ $ sudo java -jar server-0.17.2.jar -dataFolder /home/pi/Blynk

then it said:

Blynk Server successfully started.
All server output is stored in folder '/home/pi/./logs' file.

then i changed the crontab thingy and it seems to have worked OK.

is changing these values is only possible from Hardware side to change ?? is there any plane to interface it to restful and websockets ?


Sure. As usual we do simple version. Waiting for feedback and adding more and more.

1 Like

It’s way easier to use something like Putty to SSH into your Pi box.

How far does your experience with the command line go? I know I’m really old and I grew up with it … so it’s a little more easy for me to use. If you want some more detailed Linux knowledge passed, please send me a PM. I don’t think it’s appropriate to do that here, since it’s totally not Blynk related, but I’d be willing to help you get on track of course :slight_smile:

@Dave1829 you might also want to look at WinScp which also has a Command line facility.

@Dmitriy I just updated the Android app to 1.14.0 and now app is force closing!

Did I do something wrong?

@Dave1829 1.14.0 is working for me.

Do you use local server? Is it updated to 0.17.2?

Yes, i updated that last night, see above!

I thought i needed to update both to get the new app features?