Comments (6)
Hi cawith,
thanks for reporting this issue.
Sadly volume management in docker can become tricky but we will find a solution for you. I see two ways to get through this.
- You enable the web interface as described in the README.
- We solve your problem by mounting the files to the correct place.
I highly suggest to take the first approach because it will be much easier than the second one. The second approach also might need some additional adjustments on Kelvin's side...
I assume you goal is to edit the configuration to your needs as easy as possible. In case of a container based deployment (like docker) you should use the web interface for this. Right now this isn't enabled by default (because it's not really pretty right now, lacks some features and I don't want to open ports on peoples computers without proper thought!) so we will have to enable it manually.
To enable the web interface we have to edit the config.json inside the container. To do this, you can follow these steps on your Synology:
- Start a container on your Synology (as you already did) without any volumes but with port 8080 mapped.
- Log into your Synology via SSH (see https://www.synology.com/en-global/knowledgebase/DSM/help/DSM/AdminCenter/system_terminal for instructions)
- Log into your running Kelvin container (see README)
- Start an editor via
vi /opt/kelvin/config.json
and in the sectionwebinterface
change the lineenabled: false
intoenabled: true
. Safe the changes and exit (:wq
in vi). - Restart the running container via the Synology web interface or inside your SSH shell by running
docker restart $CONTAINER_ID
(see README for details) - You should now be able to access the web interface of Kelvin on
http://$SYNOLOGY_IP:8080/
. Here you can easily adjust the configuration to your needs.
These instructions should get you going.
For the sake of completeness the needed steps for the volume solution. Volumes in docker are not really suited to get existing files or folder out of a container. The core of the problem is described here:
https://docs.docker.com/storage/bind-mounts/#mounting-into-a-non-empty-directory-on-the-container
So the only chance to get around this would be to separate the configuration and Kelvin's binary again, as it was the case before the current release. In this case Kelvin's would have to able to load the configuration from any external folder which it can't do right now. Currently is looks for the config inside the working directory. You could get around this using file system links, but this gets even more complicated...
Hope this helps!?! Let me know if you got Kelvin working!
from kelvin.
Hi Stefan,
Thanks for your quick answer.
I actually just solved it a bit easier just an hour before you posted this. I downloaded and ran the Windows version on my computer, which then created a config.json with the correct bridge IP and username/ID. Just edited this file with webinterface enabled before copying to the NAS and then mounting this file as stated in the readme.
Kelvin now works and the webinterface also works as expected.
I do have a few questions that I can't find any answers for anywhere:
-
How quick are the adjustments in brightness and temperature, when one of the times in the schedule are reached, and will it start adjusting up to the defined times or after the time has been passed?
-
What happens after midnight? Does the last setting from the "after sunset" schedule stick until the first before sunset?
-
If I have defined an action for a time, which with spring and summer coming shortly, someday will move into the "Daylight" time period, will I just be ignored until daylight time shortens again, or will it be applied at exactly sunset time?
I have another suggestion for a variable. Instead of only having schedules reacting to exact times, maybe it would be possible to add a "relative to sunset/sunrise" variable.
For example, I want lights to slowly turn dimmer a certain amount of hours after sunset. Of course I can define this by certain times as well, but with daylight times changing so much this time of year, I'd have to modify the config.json every week or so.
Maybe it would be possible to implement it so that "relative to sunset/sunrise" has priority over "precise time" schedule.
Example:
Let's say sunset is at 19:00
Schedule says light shall set brightness to 50% at 19:30
However "relative to sunset" variable is that 1 hour after sunset brightness shall be reduced to 75%. This then makes the system ignored all schedules between sunset and the last "relative to sunset" variables, which in this case is at 20:00. Does this make sense?
from kelvin.
Hi cawith,
first of all I glad you got it working. In the meantime I went for a long run, thought about this issue and came to the conclusion that both solutions (and yours as well) are way to complicated! This should be considered a bug! So let's change that first...
from kelvin.
Now to your questions:
-
Kelvin will always reach the wanted color temperature and brightness at the configured timestamp. In between these timestamps it will shift both values linearly every minute.
Example: Daylight ends at 20:00 with 2750K and 100% brightness, and you have configured a custom timestamp at 21:00 with 2300K and 80% brightness. Kelvin will now shift the color and brightness between 20:00 to 21:00 every minute. This also means that shorter intervals have a faster transition. -
Every day at midnight the schedule for the next day will be calculated. The interval between midnight and the first timestamp (custom or sunrise) will use the settings of this timestamp. Same goes for the interval between the last timestamp of a day and 23:59:59.
-
If you have a custom setting that falls into the daytime interval at certain times of the year, it will be ignored.
Regarding your proposal: This has been broad up before in other issues. I created issue #27 to discuss and evaluate this and the future direction of Kelvin. If you are interested please feel free to comment and ask there regarding relative timestamps. (Spoiler alert: Relative timestamps come with there own issues...)
Hope this helps. Feel free to ask if you have any more questions... now I will have to fix this bug! ;-)
from kelvin.
Ok, fixed with release v1.1.4
from kelvin.
Thank you very much for clarifying.
I found another issue, but will report it as a new issue. :)
from kelvin.
Related Issues (20)
- After the Upgrade to v1.3.3, Kelvin No Longer Reacts to Lights Turning On HOT 4
- Push new releases to Docker Hub? HOT 1
- Possible to have defined time take precedence over sunset?
- Daylight Savings Adjustment
- Can't run on mac HOT 2
- How to make Kelvin play nicely with the "Wake up with light" automation? HOT 1
- How to stop Kelvin for disabling when physical lightswitch turned off and on? HOT 5
- How do I change the lights at exactly sunrise and sunset? HOT 1
- Kel
- Auto update to 1.3.5 failing on raspberry pi HOT 2
- Hue API v2 support
- Previous versions were deleted from Docker Hub HOT 1
- 1.3.5 unable to serve GUI HOT 2
- Disable automatic Updates HOT 1
- "enable kelvin" greyed out in dashboard
- Home Assistant OS Plugin HOT 1
- Does not work when bulp is disconected from the power grid
- Half of lights not adjusting when enableWhenLightsAppear = false
- Kelvin only applies defaultBrightness, defaultTemperature and schedules. Nothing else. HOT 3
- Auto update installed bad binary on Raspberry Pi HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kelvin.