stefanwichmann / kelvin

Kelvin - The hue bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kelvin only applies defaultBrightness, defaultTemperature and schedules. Nothing else.

Dan0sz opened this issue Β· comments

Hi!

Maybe I'm missing something here, but I was under the impression that Kelvin will modify the light color and brightness to simulate daylight.

As I understood this, it's a sort of automatic process. Just like flux. In my case, Kelvin only applies the values specified under defaultBrightness and defaultTemperature, and it follows the defined schedules afterSunset and beforeSunrise. In between sunrise and sunset it never-ever simulates daylight. It just follows defaults.

Is this intentional and did I just misunderstood this app? Did I misconfigure something? Or is something indeed going wrong?

I didn't see anything notable in the log file. There was once an i/o timeout when it was validating the time stamp, but that occurred once and never returned.

I installed it using the docker image. I don't see anything being off.

Here's my config.json:

{
  "version": 1,
  "bridge": {
    "ip": "192.168.178.80",
    "username": "xxx"
  },
  "location": {
    "latitude": blablabla,
    "longitude": blablabla  
  },
  "webinterface": {
    "enabled": true,
    "port": 6066
  },
  "schedules": [
    {
      "name": "zolder",
      "associatedDeviceIDs": [
        5
      ],
      "enableWhenLightsAppear": true,
      "defaultColorTemperature": 2200,
      "defaultBrightness": 10,
      "beforeSunrise": [],
      "afterSunset": []
    },
    {
      "name": "keuken",
      "associatedDeviceIDs": [
        4
      ],
      "enableWhenLightsAppear": true,
      "defaultColorTemperature": 2200,
      "defaultBrightness": 50,
      "beforeSunrise": [
        {
          "time": "05:30",
          "colorTemperature": 2200,
          "brightness": 25
        }
      ],
      "afterSunset": [
        {
          "time": "18:30",
          "colorTemperature": 3000,
          "brightness": 50
        },
        {
          "time": "20:30",
          "colorTemperature": 2200,
          "brightness": 25
        }
      ]
    },
    {
      "name": "beneden",
      "associatedDeviceIDs": [
        2,
        3
      ],
      "enableWhenLightsAppear": true,
      "defaultColorTemperature": 2200,
      "defaultBrightness": 30,
      "beforeSunrise": [
        {
          "time": "00:00",
          "colorTemperature": 2200,
          "brightness": 5
        }
      ],
      "afterSunset": [
        {
          "time": "18:30",
          "colorTemperature": 2200,
          "brightness": 25
        },
        {
          "time": "19:30",
          "colorTemperature": 2200,
          "brightness": 20
        },
        {
          "time": "20:30",
          "colorTemperature": 2200,
          "brightness": 10
        }
      ]
    },
    {
      "name": "boven",
      "associatedDeviceIDs": [
        6
      ],
      "enableWhenLightsAppear": true,
      "defaultColorTemperature": 2200,
      "defaultBrightness": 50,
      "beforeSunrise": [
        {
          "time": "00:00",
          "colorTemperature": 2200,
          "brightness": 20
        }
      ],
      "afterSunset": [
        {
          "time": "19:00",
          "colorTemperature": 2200,
          "brightness": 20
        }
      ]
    },
    {
      "name": "Slaapkamer van Danell",
      "associatedDeviceIDs": [
        7
      ],
      "enableWhenLightsAppear": true,
      "defaultColorTemperature": 2200,
      "defaultBrightness": 50,
      "beforeSunrise": [
        {
          "time": "00:00",
          "colorTemperature": 2200,
          "brightness": 1
        }
      ],
      "afterSunset": [
        {
          "time": "21:00",
          "colorTemperature": 2200,
          "brightness": 1
        },
        {
          "time": "20:00",
          "colorTemperature": 2200,
          "brightness": 33
        }
      ]
    }
  ]
}

And here's the log file upon startup:

time="2021/05/12 09:27:08" level=info msg="πŸ€– Kelvin v1.3.2 starting up... πŸš€"
time="2021/05/12 09:27:08" level=info msg="βš™ Configuration /etc/opt/kelvin/config.json loaded"
time="2021/05/12 09:27:08" level=info msg="πŸ€– Initializing bridge connection..."
time="2021/05/12 09:27:08" level=info msg="Looking for updates..."
time="2021/05/12 09:27:08" level=info msg="Webinterface started on port 6066"
time="2021/05/12 09:27:08" level=info msg="⌘ Connection to bridge established"
time="2021/05/12 09:27:08" level=info msg="🌍 Working with location blablabla, blablabla from configuration"
time="2021/05/12 09:27:08" level=info msg="πŸ€– Devices found on current bridge:"
time="2021/05/12 09:27:08" level=info msg="| Name                             |  ID | On    | Dimmable | Temperature | Color | Temperature range |"
time="2021/05/12 09:27:08" level=info msg="| Licht boven het dressoir         |   2 | false | true     | false       | false |                   |"
time="2021/05/12 09:27:08" level=info msg="| Licht boven de eettafel          |   3 | false | true     | false       | false |                   |"
time="2021/05/12 09:27:08" level=info msg="| Licht in de keuken               |   4 | false | true     | true        | false |     2200K - 6500K |"
time="2021/05/12 09:27:08" level=info msg="| Licht op kantoor                 |   5 | false | true     | true        | false |     2200K - 6500K |"
time="2021/05/12 09:27:08" level=info msg="| Licht op de overloop             |   6 | false | true     | true        | false |     2200K - 6500K |"
time="2021/05/12 09:27:08" level=info msg="| Slaapkamerlicht van Danell       |   7 | false | true     | true        | false |     2200K - 6500K |"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht boven het dressoir - Activating schedule for Dec 5 2021 (Sunrise: 09:36, Sunset: 15:23)"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht boven het dressoir - Activating interval 00:00 - 09:36"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht boven de eettafel - Activating schedule for Dec 5 2021 (Sunrise: 09:36, Sunset: 15:23)"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht boven de eettafel - Activating interval 00:00 - 09:36"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht in de keuken - Activating schedule for Dec 5 2021 (Sunrise: 09:36, Sunset: 15:23)"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht in de keuken - Activating interval 05:30 - 09:36"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht op kantoor - Activating schedule for Dec 5 2021 (Sunrise: 09:36, Sunset: 15:23)"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht op kantoor - Activating interval 00:00 - 09:36"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht op de overloop - Activating schedule for Dec 5 2021 (Sunrise: 09:36, Sunset: 15:23)"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Licht op de overloop - Activating interval 00:00 - 09:36"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Slaapkamerlicht van Danell - Activating schedule for Dec 5 2021 (Sunrise: 09:36, Sunset: 15:23)"
time="2021/05/12 09:27:08" level=info msg="πŸ’‘ Light Slaapkamerlicht van Danell - Activating interval 00:00 - 09:36"

Any help would be appreciated!

Update: by removing the defaultColorTemperature and defaultBrightness I'm starting to notice that Kelvin takes over a bit more often.

Now I'm getting a lot of these warning messages:

time="2021/07/12 09:17:06" level=warning msg="Validation: Invalid ColorTemperature in &{ColorTemperature:87 Brightness:1}"
time="2021/07/12 09:17:06" level=warning msg="Validation failed in calculateLightStateInInterval"

So, Kelvin doesn't seem to respect the temperature ranges of light bulbs. Even though it detected them properly.

Hi @Dan0sz

Sorry to resurrect this comment, but did you have any luck with the approach above? Given what I've read about it, I'm surprised how limited the tool seems to be and I wonder if I'm missing something.

Hi! No, unfortunately. After a while, I just gave up and stopped using it.