Multiple questions on local server with docker container on Synology DSM

I just came to realize a week or two ago that legacy Blink is retiring by the end of this year. So this means I had to do something about my project. Since I have a Synolgy NAS at home I figured I could run the server myself and keep using the app without disruption. Which I did by running a container in Docker and now all seems working fine. I simply cloned the project, opened an account in the local server, imported the project through QR code. All good. However it wouldn’t be fun if it was all easy and straightforward. So I have these questions knowing well that Blynk is not supporting legacy anymore but I guess there are still some users out there willing to help:

  1. Is it possible to import all the old data I have in the cloud to my local server? If so how? I ask because from the app one can export data in CSV format but what I see in the data folder of the local server are .bin files.

  2. The same way I have blynk data on my volume is it possible to have both the server.properties and the mail.properties in a config folder in my volume? If so how? I tried fiddling around in a similar fashion as I did with the data while creating the container but that didn’t work as expected. Any help here would be appreciated. This would enable me to update Blynk without having to reconfigure both files each time. For what it is worth I am currently running Blynk local server 0.41.10 which I obtained through mpherg/blynk-server

  3. Looking at the logs the timestamps are 7 hours behind from my current time. I have tried changing the container server time with date -s in a terminal window but I get an date: cannot set date: Operation not permitted. Any clues how I can set the proper time?

  4. For those still using notifications, are you still able to use gmail? gmail has deprecated " Less secure app access" so I am not sure if this still even functional. I am pretty sure the credentials in the mail.property file are correct but I am getting errors such as this:

06:56:49.985 ERROR- Error sending email auth token to user : xxxxxx_xxxx@yahoo.com. Error: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 Can't sign in to your Google Account - Gmail Help n4-20020a6543c4000000b00412a708f38asm684047pgp.35 - gsmtp

Thank you for any help provided.

I don’t run a local server anymore, and when I did I used a dedicated Raspberry Pi.
I did try the Docker approach at one point, but couldn’t get along with it.

To try to answer your questions…

  1. No. unless you figure out the format of the .bin files and convert your data, but as you can only download around 2 weeks worth of data from the cloud servers it doesn’t seem worthwhile.

  2. You’re running a very old version of the server. The version that you can run will depend on whether your device is restricted to Java v8 or not, but there are certainly upgrades available either way.
    As far as the location of the .properties files are concerned, they can be located elsewhere, but you need to specify the path in the startup command.
    I guess that running Docker may complicate this, I’m not sure.
    Updated version of the server release and info on how to specify the .properties files paths can be found here:
    https://github.com/Peterkn2001/blynk-server

  3. The server always uses GMT. You appear to be in Thailand, so +7 hours is correct. Do you have the correct timezone set on your phone/tablet?

  4. I’m not aware of a viable workaround to the less secure apps issue.

TBH, despite the fact that I’m hosting a forked copy of the Blynk local server repository on my GitHub site, I don’t really believe in the viability of this approach. In my opinion, you’d be far better going with a Blynk IoT subscription that attempting to keep Legacy running via a local server. I’ve shared my thoughts on why this is the case several times on the forum recently, so I won’t bother going into those details here.

Pete.

Hello @PeteKnight

Thank you for taking the time to answer those questions. I will reflect on the viability of having a local server and in fact if I am staying with Blynk.
Reality is that I initially went with the cloud because the data is not critical and I don’t mind it being on a third party server. However when I saw the new Blynk v.2 prices and whatnot, I didn’t find it attractive to my needs. I only have one very small project and might add a second one, but that’s about it. The only real concern I had about the Free plan is the 7 days of historical data. I am not 100% sure if I understand this correctly but does this mean that only 7 days worth of data will be showing on the widgets? I also see some very limited widget options for the free account.

I might give it a try with the free account first see how it works for me although I would need to update the code on the sketch first and that’s not my forte!

Thanks again.

I’m not sure.

It could be as simple as adding two additional lines of code at the beginning of your sketch.

Pete.

If only it’s that simple it would be wonderful. The code I use is this:

I realize this is a different request from my first comment but any help in updating this to the new blink v.2 would be appreciated.

It looks like you’d just need to create a template in Blynk IoT and define your datastreams (take care with the min/max values, don’t use the defaults of 0/1) then create a device from that template and add the BLYNK_TEMPLATE_ID and BLYNK_DEVICE_NAME to the top of your .ino file and the new Auth token in the Settings.h file.
You’ll need to download the latest Blynk library 1.x.x and recompile the sketch and upload it.

Pete.

1 Like

What a struggle that was!

Instructions were rather simple but for some reason once I installed the new v1.1.0 libraries I kept having compilation errors. I really banged my head to understand what was going on with the little knowledge I had coding wise. It ended up being that certain libraries need to be placed in a certain order. For instance I had this:

#include <BlynkSimpleEsp8266.h>
#include <ESP8266WiFi.h>

reversing them solved the problem:

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

:hot_face: Interestingly I don’t get these compilation errors when using the old v0.6.1 blynk library.

This might seems obvious to most but I’m just a complete noob at this. Hopefully this can serve to anyone having similar issues.

1 Like