Hi,
I have a Raspberry Pi 3 Model B working well with local Blynk Server installed. The Pi runs with latest Rasbian Stretch Lite 2017-11-29 Kernel version:4.9.
I have an Arduino Etherten (Uno) connected by ethernet to our local network operating some relays switched by Blynk for Android on my mobile.
Unfortunately whenever the Pi iloses power I cannot get the Blynk local server file to autostart and I have to manually run “java -jar server-0.29.5-java8.jar -dataFolder /home/pi/Blynk”
To try enable server auto restart I have followed the suggested GitHub page (https://github.com/blynkkk/blynk-server#blynk-server) which advises
"find /etc/rc.local file and add:
java -jar /home/pi/server-0.29.5.jar -dataFolder /home/pi/Blynk &
I have also tried executing
crontab -e
& added the following line
@reboot java -jar /home/pi/server-0.29.5.jar -dataFolder /home/pi/Blynk &
Again no success. I have looked on many posts but I am still lost.
My Blynk sketch on my Arduino is as follows:
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
char auth[] = "9aef232fd4574ef7872fbaa6be3372c3";
byte mac[] = {
0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02
};
IPAddress ip(10, 0, 1, 184);
void setup()
{
// inserted delay for power up of ethernet device on Arduino Etherten
delay( 250 );
Ethernet.begin(mac, ip);
Blynk.begin(auth, IPAddress(10,0,1,18), 8442);
}
void loop()
{
Blynk.run();
// Remember to avoid delay() function!
}
My Arduino and Pi both have static IP addresses.
Thank you in anticipation of any advice.
Kevin