Comments (6)
@stefanwichmann I just updated. It seems that CPU usage has dropped from ~20% to ~6% CPU which is a significant improvement. Thanks!
from kelvin.
Hi Emily,
thanks for giving Kelvin a try!
Sadly the observed behavior is normal when using Kelvin. Currently the Hue bridge has no way of informing users that the state of a light changed. So the only way to realize programs like Kelvin is to ask the bridge for changes again and again... Kelvin currently does this every second for every light! This is why you see a load of 20%... If I would reduce this polling frequency it would take much longer for Kelvin to become active once you turn on a light.
If you feel adventurous and now a little bit about go you can adjust the polling value here: https://github.com/stefanwichmann/kelvin/blob/master/light.go#L45
If you are just concerned about energy consumption I think you should not worry to much. The Raspberry PI Zero is a low power device by design and the CPU isn't the only component using energy. If you take the memory and the wifi chip into consideration, the 20% shouldn't matter to much.
Nevertheless I would love to see a way for Kelvin to consume less energy while maintaining the same level of service. If you have ideas I am all ears! :-)
from kelvin.
Anything C++, and I'm your girl but Go... not really :D
Still, it's a 1 GHz CPU with around 1 IPC so a 20% load for a polling frequency of 1 Hz sounds high to me.
Is there an easy way for me to profile and see where the time is spent? I tried dumping stacks from gdb but that didn't really give much without symbols.
from kelvin.
This blog post provides an introduction to go profiling:
https://blog.golang.org/profiling-go-programs
If you feel like it, give it a try! This help would definitely be very welcome. Can't promise a timeline but will also look into it...
from kelvin.
@stefanwichmann Can we make that light update interval a configurable option? With the 'remember-last-light-state' option in the new firmware update - I don't require my lights to change that much when I switch them on. Also, I have a large number of bulbs at home, to the point where I can't use the mobile app while Kelvin is running.
from kelvin.
Just released Kelvin 1.2.0 which should improve the performance a lot! Especially in setups with many lights... Let me know if it works for you!
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.