I played around with the IOTStack stuff for a while, and I’m fairly certain I managed to get the gmail stuff working, but I couldn’t get the data storage to work so I gave up.
In the end I did a fresh install of the non-dockerised version of Blynk server and TBH it’s actually much easier neater that way.
I can’t get that to work, even with the non-dockerised version of local server, I just manually created the server.properties and mail.properties files in the same location as the .jar file and ignore the admin page for editing them.
Also, you have to enable “less secure apps” in your gmail account. I actually just created a new gmail account that is just for Blynk dispatcher emails and changed the security on that account.
I also like to use a Pi web based admin system called Webmin. It makes the Pi admin much simpler than having g to keep looking-up the commands to do simple stuff like checking for updates - but Webmin doesn’t seem able to run in a Docker container, and can’t help you to manage your dockerised apps.
I have to say that I felt much more in control when I switched from the IOTStack setup to the regular install, and that was after putting in quite a lot of time to the dockerised setup.
I’m using Blynk local server in a Docker container on a Synology NAS. It was a right pain to set up, but now it’s rock solid. May be of assistance to you…
My Docker container is called ‘Blynk’ and persistent files are in /docker/Blynk/ on the Synology
I can’t remember what I tweaked that finally made it work, but this is my setup that works: My ‘Execution Command’ is: java -jar /blynk/server.jar -dataFolder /data -serverConfig /config/server.properties -mailConfig /data/mail.properties Mounted Files/Volumes Folder: docker/Blynk Mount Path: /data
(This is your main persistent Blynk folder. Blynk will populate it with bits and pieces on first run, and then update over time) File: docker/Blynk/single_token_mail_body.txt Mount Path: /config/single_token_mail_body.txt
(This lets you define boilerplate for the token email) File: docker/Blynk/server.properties Mount Path: /config/server.properties
The folder structure and files (mail.properties, single_token_mail_body.txt and server.properties), need to have been created before you run Blynk. They sit in my docker/Blynk folder (the /data mount path).
When Blynk sends a ‘token email’, that email contains just the token, no explanation or anything.
Blynk uses any text you put in ‘Single_token_mail_body.txt’ as extra text in each ‘token email’ it sends. I think it’s more for when the email goes to someone you’ve shared a project with, so you can include instructions etc.
I just use it for neatness (and to get it working in case I need it one day!)
Hope that helps
Sorry, should have read your write up first. I’m not familiar with IOTstack, but I think Docker is platform agnostic.
If you want your .properties file to persist over reboots, you can mount the /config and /data folders outside the docker container (or mount individual .properties files, as in my first reply to you). When Blynk first runs it checks for the existence of the .properties files. If they are present it reads their instructions. If the files are not present Blynk creates them.
I would say that the Blynk admin page accesed through ‘https://youripaddress:9443/admin’ has never worked well for me, so I just edit .properties files directly. Those files are obviously hosted outside the docker container, so persist through reboots.
For info (and if you need help) I have automatic LetsEncrypt certificates, and also run NodeRed, and Mosquitto (MQTT) in other docker containers. I also have ‘quite a few’ Sonoff devices flashed with Tasmota.
None of the above, I just enabled raw data storage Does the data not persist on the Superchart? Or are you storing it for another reason? I’m not sure really as I don’t use them for much.
I feel I am about to get school’d
Personally I recently starting using this method:
I thinks that’s correct Pete. You maybe took the additional step of setting up Postgresql instead of using local storage. I read the guide and it put me off to be honest. The github may be out of date.
I actually have this setup:
On another note, I wonder if changing the settings in the Superchart widget changes the way the data is stored in the file system.
Yes thinking about it you’re right. Blynk creates them, but not in the folders you have mounted. As soon as you create them in the mounted folders, Blynk ‘prefers’ those files over the Blynk created files. I did have to tweak a lot to get it working, including deleting quite a few Docker containers (Synology doesn’t let you edit the ‘execution command’ after you’ve created the container, so you have to start from scratch each time). My Blynk starting without complaining of missing files might have been an artifact of all the tweaking I did. Sorry if I mislead.