I’ve got the local Blynk server working on a Raspberry Pi and I have also been able to run a project from my smartphone to connect with an arduino. So most of the server seems so work correctly.
But the Blynk server doens’t seem to use my files “mail.properties” and “server.properties” which means for instance that I can’t send tokens by mail.
I have done the following:
I have put the files “mail.properties” and “server.properties” in the same folder as my “server.jar” file and changed them according to the instuctions under DOCS.
I have put the following line in my “rc.local” raspberry-file java -jar /home/pi/server.jar -dataFolder /home/pi/Blynk & -serverConfig /home/pi/server.properties &
I can also login to the Administration panel and when I look at “server.properties” in “Config” I see that it does not have the same settings as my “server.properties” file. So I assume the local server does not use my “mail.properties” and “server.properties” files. I have searched for answers in the community but haven’t found a solution.
Does anyone know what the problem is?
Thanks in advance en thanks to Blynk for the great app!
Bart
which seems to say the blynk server is NOT running. I can also NOT log in with the app on the server.
I am using the lasest version of the server (0.16.2). I must say I adapted “rc.local” under /etc and not “rc.local” under /etc/init.d since the latter didn’t seem to work.
Hope this makes things clearer so that a solution can be found.
bash: -serverConfig: command not found
pi@raspberrypi:~ $
Blynk Server successfully started.
All server output is stored in folder ‘/home/pi/./logs’ file.
So your command is probably correct but isn’t the folder “/home/pi/./logs” incorrect? I have a folder “/home/pi/logs”. But how can I change this so the correct folder is used?
My logs folder is not empty. You can verify in “printscreen 1.png” and “printscreen 2.png” in the attachment.
In my “server.properties” file there is a line “logs.folder=./logs” as instructed in DOCS. You can see this in “server.png” file in the attachment if you would like to check.
Ok, I think I know the problem. -serverConfig was added just recently. So it should have all properties specified. As workaround for now you may run server without it and it should work as expected.
I assume you mean by this that for the moment you can’t use -serverConfig but it will be updated soon? Does this for the moment also mean you can’t send tokens via email using the local server?
Hopefully this can be resolved soon. As a teacher I would like to use Blynk in the coming schoolyear using a Raspberry Pi as local server so I don’t have to rely on our crappy internetconnection
Now I am not following anymore. I specified all properties in the server.properties file as described in doc but it still doens’t seem to work. But I can get around that by logging in the administration UI.
Sending tokens still doesn’t work. I included “mail.properties” in the same folder as “server.jar” . When I open “mail.properties” in a browerser I get:
XXX is ofcourse not my password. When I ask my app to send a token I get following message:
Email was not send to your login acc.
Please check network connection.
ofcourse I have network connection since I can login to my local server en also run a project to drive an arduino. If sending emails will work I can start using it with my students.
18:51:55.523 INFO - Using data dir ‘/home/pi/Blynk’
18:51:57.995 INFO - Region : local
18:51:58.432 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
18:52:00.471 INFO - Plain tcp/ip hardware server port 8442.
18:52:00.488 WARN - ATTENTION. Certificate /home/pi and key /home/pi paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
18:52:04.176 INFO - SSL hardware port 8441.
18:52:04.231 WARN - ATTENTION. Server certificate paths cert : ‘/home/pi’, key : ‘/home/pi’ - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
18:52:05.904 INFO - Application server port 8443.
18:52:06.310 INFO - HTTP API port 8080.
18:52:06.381 WARN - ATTENTION. Certificate /home/pi and key /home/pi paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
18:52:08.059 INFO - HTTPS API port 9443.
18:52:08.134 WARN - ATTENTION. Certificate /home/pi and key /home/pi paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
18:52:10.139 INFO - HTTPS admin UI port 7443.
18:52:10.145 INFO - Web Sockets port 8082.
18:52:10.150 WARN - ATTENTION. Certificate /home/pi and key /home/pi paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
18:52:12.027 INFO - Web SSL Sockets port 8081.
19:03:38.546 INFO - mertensblynk@gmail.com app joined.
19:13:17.944 INFO - mertensblynk@gmail.com app joined.
19:16:19.929 INFO - mertensblynk@gmail.com hardware joined.
19:28:47.259 INFO - mertensblynk@gmail.com hardware joined.
19:31:07.871 INFO - mertensblynk@gmail.com app joined.
19:31:23.526 INFO - mertensblynk@gmail.com hardware joined.
19:52:26.452 INFO - mertensblynk@gmail.com app joined.
19:52:47.023 INFO - mertensblynk@gmail.com hardware joined.
19:56:15.501 INFO - mertensblynk@gmail.com hardware joined.
19:57:52.127 INFO - mertensblynk@gmail.com hardware joined.
19:59:27.247 INFO - mertensblynk@gmail.com hardware joined.