![]() |
Re: [ANNOUNCE]: SleepAnalyser
Hi caco3
sleepanalyser takes a noticable ammount of cpu/battery. To improve on this I changed the duration value during recording to only show hour:minute. E.g. remove the seconds. This apperantly save lots of screenupdates. In my case it gets me 2 to 3% less battery drain during the night. |
Re: [ANNOUNCE]: SleepAnalyser
Quote:
It would be better only update the screen if the display is on? |
Re: [ANNOUNCE]: SleepAnalyser
Hi Mirakels and Jaguilar
My original idea was only to update the screen (incl. graph) when the display is on. How ever i have not yet figured out how to detect if the display is on. I expect I can get that information with dbus, but how? |
Re: [ANNOUNCE]: SleepAnalyser
Caco3,
Using "dbus-monitor --system" in the terminal, received these signals: 1- signal sender=:1.9 -> dest=(null destination) serial=1553 path=/com/nokia/mce/signal; interface=com.nokia.mce.signal; member=display_status_ind string "off" 2- signal sender=:1.9 -> dest=(null destination) serial=1556 path=/com/nokia/mce/signal; interface=com.nokia.mce.signal; member=display_status_ind string "on" Signal 1 when display off, and signal 2 when on! Register in dbus listening these signals and be happy! :) |
Re: [ANNOUNCE]: SleepAnalyser
Thank you a lot!
What do you mean with "register at the bus?" Do I then have to listen all the time? Isn't that also power sucking? Or can I get a trigger when a certain event occures? I guess I could somehow use dbus-scripts, but as it is only in Extras-Devel, most people could not use it. |
Re: [ANNOUNCE]: SleepAnalyser
When you register in dbus listening for a signal you provide a callback function. When the signal is emited the function is called. There is no power sucking!
This code works for you: Code:
#!/usr/bin/env python2.5 |
Re: [ANNOUNCE]: SleepAnalyser
Hi jaguilar
Thank you sooo much for your help! Now I can make SleepAnalyser even more power saving. Now I just have to figure out how to make big buttons without repeating theme (http://talk.maemo.org/showthread.php?p=798347) |
Re: [ANNOUNCE]: SleepAnalyser
Nice program!
I used to use Sleepy before, but this is nicer looking. (more candy) What I am missing from Sleepy, is to able to see several sleeping times (nights) top of eachothers to visually compare. Also Sleepy will tell how much "deep" sleep was there. Similarly SleeyAnalyzer could tell total cumulative time of those Green, Dark Green, Red, Light Red zones....and maybe also max length of those. In example: Your "max deep sleep" (light green) was 20 minutes long, total 2h 10m. Horizontal scrolling of diagram with finger and not just with arrow-buttons would be nice. BTW, not really about sleep, but this same program could have an option to alarm when just some treshold of movement in some selectable time period have occured. Maybe alarm could be a slient phone call and/or SMS message also. Could be usefull as a burglary alarm inside of luggage or attached to a hotel door. Could be a separate program, but the internal logic would be so much similar to SleepAnalyser this could be included also IMO. Besides, the name "SleepAnalyzer" would then also mean it analyzes if N900 is not disturbed by shaking, moving or tilting. Let N900 "sleep" or it acts. Some optional delay, so SMS is not send if owner STOPs the delayed alarm. |
Re: [ANNOUNCE]: SleepAnalyser
Quote:
But keep going with the excelent job in SleepAnalyser! |
Re: [ANNOUNCE]: SleepAnalyser
Hi Guys
In the newest devel version I changed a lot in the ui. It now more gets into how it should be for daily usage. I still have to figure out how to make big buttons (with QT Designer or in python). I was told to do it with stylesheets, but how? If you know how to do it, please let me know. Also please still test and vote for the version 1.6-28 in testing. It is quite stable ond has only very minor bugs. I want to get it into extras, so others also can profit from the alarm function. |
All times are GMT. The time now is 13:24. |
vBulletin® Version 3.8.8