Planet maemo

madman2k

introducing sensors.py

2014-12-07 12:30 UTC  by  madman2k
0
0

sensors.py is a new python wrapper for libsensors of the lm-sensors project. libsensors is what you want to use to programmatically read the sensor values of your PC with Linux instead of parsing the output of the sensors utility.

sensors.py is not the first wrapper – there are two alternatives, confusingly both named PySensors.

PySensors (ctypes) follows a similar approach to sensors.py by using ctypes. However instead of exposing the C API it tries to be a object-oriented(OO) abstraction, which unfortunately lacks many features and makes the mapping to the underlying API hard. Furthermore it does not support Python3.

PySensors (extension module)  does not use ctypes and thus is more efficient, but if you write a python script probably compiling a extension module is worse than losing some performance when reading the values.
Additionally there is python3 support and also some OO abstraction. The latter is somewhere in between the C API and proper OO: sensors_get_label(chip_name, feature) is ChipName.get_label(feature) instead of feature.get_label().

So what makes sensors.py immediately different is that it does not try to do any OO abstraction but instead gives you access to the raw C API. It only adds minor pythonification: you dont need to mess with pointers, errors are converted to exceptions and strings are correctly converted from/ to utf-8 for you.

However working with the C API directly is tiresome at times – therefore there is also an optional iterator API, which is best shown by a demo:

import sensors

sensors.init()

for chip in sensors.ChipIterator("coretemp-*"):
    print(sensors.chip_snprintf_name(chip)+" ("+sensors.get_adapter_name(chip.bus)+")")
    
    for feature in sensors.FeatureIterator(chip):
        sfi = sensors.SubFeatureIterator(chip, feature)
        vals = [sensors.get_value(chip, sf.number) for sf in sfi]
        label = sensors.get_label(chip, feature)
        
        print("\t"+label+": "+str(vals))

sensors.cleanup()

result:

coretemp-isa-0000 (ISA adapter)
	Physical id 0: [38.0, 80.0, 100.0, 0.0]
	Core 0: [37.0, 80.0, 100.0, 0.0]
	Core 1: [35.0, 80.0, 100.0, 0.0]
	Core 2: [38.0, 80.0, 100.0, 0.0]
	Core 3: [36.0, 80.0, 100.0, 0.0]

for a more sophisticated example see the example.py in the repository.

Categories: News
peterleinchen

2014-12-02 Meeting Minutes

2014-12-03 22:29 UTC  by  peterleinchen
0
0

Meeting held 2014-12-02 on FreeNode, channel #maemo-meeting (logs)

Attending:
Jussi Ohenoja (juiceme), Philippe Coval (RzR), Peter Leinchen (peterleinchen)

Absent:

Summary of topics (ordered by discussion):

  • Community feedback
  • Election(s)

Topic (Community feedback):

Topic (Election(s)):

  • Discussion about council election and how to attract members to nominate themselves (or get nominated ;-).
  • Discussion about board election and who is going to announce/hold this election.
    Reading the bylaws of Hifo,
    not to be mistaken for bylaws of Maemo e.V.
  • Clarification with HiFo board is needed about that.

Action Items:
  • -- old items:
    • Check if karma calculation/evaluation is fixed. - Karma calculation should work, only wiki entries (according to Doc) not considered. Works (might be cross-checked...)
    • NielDK to prepare a draft for letter to Jolla. - Obsolete
    • Sixwheeledbeast to clarify the CSS issue on wiki.maemo.org with techstaff. - Done
    • juiceme to create a wording draft for the referendum (to be counterchecked by council members). - See
    • Peterleinchen to announce resignation of DocScrutinizer*/joerg_rw from council. Done
    • Everybody to make up their own minds about referendum and give feedback.
    • RzR to contact Doc (neo900) and smokku (cordia) Done
    • Peterleinchen to announce the next council election Done
    • Juiceme and chemist to clarify the bank account situation
  • -- new items:
    • Council to clarify with HiFo board about the upcoming board election
    • Next weeks tasks: referendum, sub pages on m.o for e.V., preparing election, attracting members to candidate
Categories: council
peterleinchen

2014-11-25 Meeting Minutes

2014-12-02 22:38 UTC  by  peterleinchen
0
0

Meeting held 2014-11-25 on FreeNode, channel #maemo-meeting (logs)

Attending: Gido Griese (Win7Mac),
Jussi Ohenoja (juiceme), Philippe Coval (RzR), Peter Leinchen (peterleinchen)

Absent:

Summary of topics (ordered by discussion):

  • Election and referendum
  • Dead/old/obsolete content on entry page http://maemo.org
  • Ongoing tasks: referendum, election, e.V. sub pages, supporting freemangordon, ...

Topic (Election and referendum):

  • Discussion about election and referendum.
  • It was commonly agreed that the referendum cannot be held together with the next council election.
  • Time schedule for election was discussed and agreed like:
    candidates acceptance starts 14 dec,
    contemplation period 14 - 28 dec,
    election box is going to be open 28 dec to 4 jan
  • Short discussion about possible candidates, the number of needed candidates and how to attract them to enter council.
  • The current council members declared their willingness to candidate in the next election under some circumstances. One of them would be the number of users that declare their nomination It was clearly mentioned that we need some "fresh blood".

Topic (Dead/old/obsolete content on entry page http://maemo.org):

  • Old link to Cordia is removed and a new link to a fresh wiki page has been placed there.
    Please have a look here or direct link to wiki page .

Topics (Ongoing tasks: referendum, election, bank account of e.V., e.V. sub pages, ...):

  • Juiceme was the one who served the voting machine last time.
  • Bank account for Maemo e.V. has not yet been created due to the resignation of (cashier) nieldk and the location of juiceme in a different country than e.V..
  • The referendum and the (co-)operation with Maemo e.V. will be one of the main/first tasks for next council.
  • The topics referendum and sub pages are again shifted to be discussed in next week's meeting.

Action Items:
  • -- old items:
    • Check if karma calculation/evaluation is fixed. - Karma calculation should work, only wiki entries (according to Doc) not considered. Works (might be cross-checked...)
    • NielDK to prepare a draft for letter to Jolla. - Obsolete
    • Sixwheeledbeast to clarify the CSS issue on wiki.maemo.org with techstaff. - Done
    • juiceme to create a wording draft for the referendum (to be counterchecked by council members). - See
    • Peterleinchen to announce resignation of DocScrutinizer*/joerg_rw from council. Done
    • Everybody to make up their own minds about referendum and give feedback.
    • RzR to contact Doc (neo900) and smokku (cordia) Done
  • -- new items:
    • Peterleinchen to announce the next council election
    • Juiceme and chemist to clarify the bank account situation
    • Next weeks tasks: referendum, sub pages on m.o for e.V., preparing election, attracting members to candidate
Categories: council
peterleinchen

2014-11-11 Meeting Minutes

2014-12-02 22:37 UTC  by  peterleinchen
0
0

Meeting held 2014-11-11 on FreeNode, channel #maemo-meeting (logs)

Click to read 1048 more words
Categories: council
madman2k

If you use your laptop as a desktop replacement, you will at some point get an external display and a mouse/ keyboard for more convenient usage.
At this point the laptop becomes only a small case of non-upgradable components.

Click to read 2118 more words
Categories: Articles
admin
Firefox for Mobile Firefox for Mobile Let's build a browser engine! Part 7: Painting 101 - http://limpet.net/mbrubec... November 5 from Matt Brubeck - Comment - Like
peterleinchen

2014-10-21 Meeting Minutes

2014-10-26 21:19 UTC  by  peterleinchen
0
0

Meeting held 2014-10-21 on FreeNode, channel #maemo-meeting (logs)

Attending: (xes), Gido Griese (Win7Mac),
Jussi Ohenoja (juiceme), Peter Leinchen (peterleinchen)

Partial: Sicelo Mhlongo (sicelo)

Absent: Philippe Coval (RzR)

Summary of topics (ordered by discussion):

  • Mailing list moderation
  • Dead/old/obsolete content on entry page http://maemo.org
  • Ongoing tasks: referendum, Code of Conduct, karma, e.V. sub pages, letter to Jolla

Topic (Mailing list moderation):

  • Jussi found out accidentally that the mailing list maemo-community bounces back a feedback to non-subscribed senders like "message is suspended until a moderator checks the content". But mails ending up in a queue that has not been checked for the last 1,5 years.
  • There was a short discussion about the way to handle:
    1.) we change the message to "posting is forbidden from unregistered accounts, please see bla bla bla..."
    2.) we actually get someone to check&moderate the postings. (council for example)
  • At the end juiceme took over the responsibility to check those logs from now on and moderate the mailing list(s).

Topic (Dead/old/obsolete content on entry page http://maemo.org):

  • On the top page of m.o are very old contents, like the announcements from 2013/2010. Furthermore the link to the "abandoned" Cordia project.
    And as I thought the Nokia links (which in fact are working and need to be there, at least the one to http://www.nokia.com/global/wayfinder).
    The one to https://developer.nokia.com is working, but not fully related to Maemo (but to MeeGo and therefore now MS).
  • So the council/board should decide what to do with that Cordia link. And if we keep the announcements ticker on entry page for e.V. reasons, or remove it and use t.m.o as announcement platform (as they belong together now).

Topics (Ongoing tasks: referendum, Code of Conduct, karma, e.V. sub pages, letter to Jolla):

  • Freemangordon showed up late and asked about contacting Jolla for fre(e)mantle source code support.
  • These topics were again shifted to be discussed in next week's meeting.

Action Items:
  • -- old items:
    • Check if karma calculation/evaluation is fixed. - Karma calculation should work, only wiki entries (according to Doc) not considered. To be cross-checked ...
    • NielDK to prepare a draft for letter to Jolla. - Obsolete
    • Sixwheeledbeast to clarify the CSS issue on wiki.maemo.org with techstaff. - Done
    • juiceme to create a wording draft for the referendum (to be counterchecked by council members). - See
    • Everybody to make up their own minds about referendum and give feedback.
    • Peterleinchen to announce resignation of DocScrutinizer*/joerg_rw from council. Done
  • -- new items:
    • Next weeks tasks: referendum, karma check, voting for Code of Conduct, sub pages on m.o for e.V., abandoned link/announcement ticker
Categories: council
hildonfound

Nokia Corporation (“Nokia”) and Hildon Foundation (“Hildon”) have announced an agreement regarding assigning Nokia’s Maemo trademarks, domain names and trademark applications to Hildon. The agreement includes the Maemo community website, www.maemo.org.

Nokia has been the owner of the features of the Maemo brand that have been used in connection with mobile devices and software distributed by Nokia, as well as supporting the maintenance of the Maemo Website for the Maemo community. Nokia has transferred the Maemo brand features to Hildon, who will continue to support the Maemo community.

Hildon shall assume the full responsibility and liability for the maintenance and support of all the activity that is and will be on-going on the Maemo Website. For clarity, Hildon is not responsible for customer support for Nokia mobile devices using Maemo, such as N900 and/or N9. Following the acquisition of substantially all of Nokia’s Devices & Services business by Microsoft in April 2014, Microsoft is now responsible for the support of Nokia branded mobile devices. Local contact details can be found at www.nokia.com/global/wayfinder.

Categories: News
admin

A little randomness for Hacker News

2014-10-22 22:00 UTC  by  Unknown author
0
0
Firefox for Mobile Firefox for Mobile A little randomness for Hacker News - http://limpet.net/mbrubec... October 22 from Matt Brubeck - Comment - Like
peterleinchen

2014-10-14 Meeting Minutes

2014-10-18 18:35 UTC  by  peterleinchen
0
0

Meeting held 2014-10-14 on FreeNode, channel #maemo-meeting (logs)

Attending: Gido Griese (Win7Mac), Paul Healey (sixwheeledbeast),
Jussi Ohenoja (juiceme), Philippe Coval (RzR), Peter Leinchen (peterleinchen)

Partial: (xes), Ruediger Schiller (chem|st)

Absent: Niel Nielsen (nieldk), Joerg Reisenweber (DocScrutinizer05)

Summary of topics (ordered by discussion):

  • Swear filter on TMO (smartwatch)
  • DocScrutinizer/joerg_rw stepped down from Council!
  • Current Council members
  • Transition to Maemo e.V., referendum
  • Code of Conduct
  • Karma calculation

Topic (Swear filter on TMO (smartwatch)):

  • A lengthy discussion about the forum swear filter and its possibilities to be improved.
    At least to enable the upcoming topic 'smartwatch'.
  • Chemist stepped in and explained the difficulties and possibilities of this add-on module.
  • At the end the module is now set to filter out only full words and will allow the word 'smartwatch'.

Topic (DocScrutinizer/joerg_rw stepped down from Council!):

  • Joerg kept quiet and did not see the need to announce his resignation on official channel to the community .
  • The council decided unanimously to do so for him on community mailing list.

Topic (Current Council members):

  • After the resignation of Niel and Joerg the current council now consist of three persons:
    Jussi Ohenoja (juiceme),
    Philippe Coval (RzR),
    Peter Leinchen (peterleinchen).

Topics (Referendum, Karma, Code of Conduct):

  • Short discussion about upcoming referendum, the karma system and Code of Conduct.
  • These topics were shifted to be discussed in next week's meeting.

Action Items:
  • -- old items:
    • Check if karma calculation/evaluation is fixed. - Karma calculation should work, only wiki entries (according to Doc) not considered. To be cross-checked ...
    • NielDK to prepare a draft for letter to Jolla. - Obsolete
    • Sixwheeledbeast to clarify the CSS issue on wiki.maemo.org with techstaff. - Done
    • juiceme to create a wording draft for the referendum (to be counterchecked by council members). - See
    • Everybody to make up their own minds about referendum and give feedback.
  • -- new items:
    • Peterleinchen to announce resignation of DocScrutinizer*/joerg_rw from council.
    • Next weeks tasks: referendum, karma check, voting for Code of Conduct, sub pages on m.o for e.V.
Categories: council
Jussi Ohenoja

2014-10-07 Meeting Minutes

2014-10-11 11:28 UTC  by  Jussi Ohenoja
0
0

Meeting held 2014-10-07 on FreeNode, channel #maemo-meeting (logs)

Attending: Jussi Ohenoja (juiceme), Philippe Coval (RzR)

Partial: Gido Griese (Win7Mac), Ruediger Schiller (chem|st), (Sicelo900v6)

Absent: Peter Leinchen (peterleinchen), Joerg Reisenweber (DocScrutinizer05), Niel Nielsen (nieldk)

Summary of topics (ordered by discussion):

  • Discussion about resigned councilors and their behaviour

(Topic Discussion about resigned councilors and their behaviour):

  • Nieldk and DocScrutinizer have resigned from the Maemo Council. There was a lengthy discussion on the legitimate way to announce this.
  • As the resignation was done by announcement on TMO and on the Council mailing list, it was decided that a formal resignation notice should be posted to the Maemo Community mailing list by the former councillors.
  • Juiceme and RzR decided to consult peterleinchen on this and write a public letter to Nieldk and DocScrutinizer.

Action Items:
  • -- old items:
    • Check if karma calculation/evaluation is fixed. - Karma calculation should work, only wiki entries (according to Doc) not considered. To be cross-checked ...
    • NielDK to prepare a draft for letter to Jolla. - Obsolete
    • Sixwheeledbeast to clarify the CSS issue on wiki.maemo.org with techstaff. - Done
    • juiceme to create a wording draft for the referendum (to be counterchecked by council members). - See
    • Everybody to make up their own minds about referendum and give feedback.
    • Juiceme to send mail to DocScrutinizer/joerg_rw asking on behalf of council for a statement about his councilor status. - Done
    • Peterleinchen to check CSS bug and inform techstaff. - Solved.
  • -- new items:
    • N/A
Categories: council
peterleinchen

2014-09-30 Meeting Minutes

2014-10-08 22:29 UTC  by  peterleinchen
0
0

Meeting held 2014-09-30 on FreeNode, channel #maemo-meeting (logs)

Attending: Jussi Ohenoja (juiceme), Philippe Coval (rZr), Niel Nielsen (nieldk), Peter Leinchen (peterleinchen)

Partial: Gido Griese (Win7Mac), Paul Healey (sixwheeledbeast)

Absent: Joerg Reisenweber (DocScrutinizer05)

Summary of topics (ordered by discussion):

  • DocScrutinizer/joerg_rw stepped down from Council?
  • Transition to Maemo e.V., referendum
  • Open points, karma

Topic (DocScrutinizer/joerg_rw stepped down from Council?):

  • A longer discussion about whether DocScrutinizer/joerg_rw stepped down from council, or not?
    At least he said so on TMO a few times, but did not yet announce something to Council or on mailing list. Also he did not yet answer to a mail sent by juiceme (in private). Neither did he appear for the last 4 weeks meetings.
    Therefore the Council sees him fully absent. And will try to get an official statement from him once more.

Topic (Transition to Maemo e.V., referendum):

  • Juiceme's post request-for-comments on TMO about the relationship of the Council <-> the e.V. started to get some user comments.
    This discussion should continue on TMO and be the basis for the referendum text.
  • Juiceme asked chem|st about creation of web pages (sub pages on maemo.org) for the e.V.: techstaff should be asked for arrangement and giving rights to board members (i.e. juiceme, nieldk).

Topic (Open points, karma):

  • Short discussion abut open points. Especially the karma system.
  • Karma recalculation is okay, only wiki edits (according to Doc) should not work correctly.
  • Another point is/was the CSS bug on https://wiki.maemo.org.

Action Items:
  • -- old items:
  • Check if karma calculation/evaluation is fixed. - Karma calculation should work, only wiki entries (according to Doc) not considered. To be cross-checked ...
  • NielDK to prepare a draft for letter to Jolla. - Obsolete
  • Sixwheeledbeast to clarify the CSS issue on wiki.maemo.org with techstaff. - Done
  • juiceme to create a wording draft for the referendum (to be counterchecked by council members). - See
  • Everybody to make up their own minds about referendum and give feedback.
  • -- new items:
  • Juiceme to send mail to DocScrutinizer/joerg_rw asking on behalf of council for a statement about his councilor status.
  • Peterleinchen to check CSS bug and inform techstaff.
Categories: council