X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/358356cb3b7e8202c3284503f772fbab7ed66323..d53d22dfe29d299c3482f85d148df12e4bcfef9b:/blog/archive/2016/03/index.html diff --git a/blog/archive/2016/03/index.html b/blog/archive/2016/03/index.html index 75d9441722..f27fb43773 100644 --- a/blog/archive/2016/03/index.html +++ b/blog/archive/2016/03/index.html @@ -21,6 +21,190 @@

Entries from March 2016.

+
+
+ Full battery stats collector is now available in Debian +
+
+ 23rd March 2016 +
+
+

Since this morning, the battery-stats package in Debian include an +extended collector that will collect the complete battery history for +later processing and graphing. The original collector store the +battery level as percentage of last full level, while the new +collector also record battery vendor, model, serial number, design +full level, last full level and current battery level. This make it +possible to predict the lifetime of the battery as well as visualise +the energy flow when the battery is charging or discharging.

+ +

The new tools are available in /usr/share/battery-stats/ +in the version 0.5.1 package in unstable. Get the new battery level graph +and lifetime prediction by running: + +

+/usr/share/battery-stats/battery-stats-graph /var/log/battery-stats.csv
+

+ +

Or select the 'Battery Level Graph' from your application menu.

+ +

The flow in/out of the battery can be seen by running (no menu +entry yet):

+ +

+/usr/share/battery-stats/battery-stats-graph-flow
+

+ +

I'm not quite happy with the way the data is visualised, at least +when there are few data points. The graphs look a bit better with a +few years of data.

+ +

A while back one important feature I use in the battery stats +collector broke in Debian. The scripts in +/usr/lib/pm-utils/power.d/ were no longer executed. I +suspect it happened when Jessie started using systemd, but I do not +know. The issue is reported as +bug #818649 against +pm-utils. I managed to work around it by adding an udev rule to call +the collector script every time the power connector is connected and +disconnected. With this fix in place it was finally time to make a +new release of the package, and get it into Debian.

+ +

If you are interested in how your laptop battery is doing, please +check out the +battery-stats +in Debian unstable, or rebuild it on Jessie to get it working on +Debian stable. :) The upstream source is available from +github. +As always, patches are very welcome.

+ +
+
+ + + Tags: debian, english. + + +
+
+
+ +
+
+ UsingQR - "Electronic" paper invoices using JSON and QR codes +
+
+ 19th March 2016 +
+
+

Back in 2013 I proposed +a +way to make paper and PDF invoices easier to process electronically by +adding a QR code with the key information about the invoice. I +suggested using vCard field definition, to get some standard format +for name and address, but any format would work. I did not do +anything about the proposal, but hoped someone one day would make +something like it. It would make it possible to efficiently send +machine readable invoices directly between seller and buyer.

+ +

This was the background when I came across a proposal and +specification from the web based accounting and invoicing supplier +Visma in Sweden called +UsingQR. Their PDF invoices contain +a QR code with the key information of the invoice in JSON format. +This is the typical content of a QR code following the UsingQR +specification (based on a real world example, some numbers replaced to +get a more bogus entry). I've reformatted the JSON to make it easier +to read. Normally this is all on one long line:

+ +

+{
+ "vh":500.00,
+ "vm":0,
+ "vl":0,
+ "uqr":1,
+ "tp":1,
+ "nme":"Din Leverandør",
+ "cc":"NO",
+ "cid":"997912345 MVA",
+ "iref":"12300001",
+ "idt":"20151022",
+ "ddt":"20151105",
+ "due":2500.0000,
+ "cur":"NOK",
+ "pt":"BBAN",
+ "acc":"17202612345",
+ "bc":"BIENNOK1",
+ "adr":"0313 OSLO"
+}
+

+ +

The interpretation of the fields can be found in the +format +specification (revision 2 from june 2014). The format seem to +have most of the information needed to handle accounting and payment +of invoices, at least the fields I have needed so far here in +Norway.

+ +

Unfortunately, the site and document do not mention anything about +the patent, trademark and copyright status of the format and the +specification. Because of this, I asked the people behind it back in +November to clarify. Ann-Christine Savlid (ann-christine.savlid (at) +visma.com) replied that Visma had not applied for patent or trademark +protection for this format, and that there were no copyright based +usage limitations for the format. I urged her to make sure this was +explicitly written on the web pages and in the specification, but +unfortunately this has not happened yet. So I guess if there is +submarine patents, hidden trademarks or a will to sue for copyright +infringements, those starting to use the UsingQR format might be at +risk, but if this happen there is some legal defense in the fact that +the people behind the format claimed it was safe to do so. At least +with patents, there is always +a +chance of getting sued...

+ +

I also asked if they planned to maintain the format in an +independent standard organization to give others more confidence that +they would participate in the standardization process on equal terms +with Visma, but they had no immediate plans for this. Their plan was +to work with banks to try to get more users of the format, and +evaluate the way forward if the format proved to be popular. I hope +they conclude that using an open standard organisation like +IETF is the correct place to +maintain such specification.

+ +

Update 2016-03-20: Via Twitter I became aware of +some comments +about this blog post that had several useful links and references to +similar systems. In the Czech republic, the Czech Banking Association +standard #26, with short name SPAYD, uses QR codes with payment +information. More information is available from the Wikipedia page on +Short +Payment Descriptor. And in Germany, there is a system named +BezahlCode, +(specification +v1.8 2013-12-05 available as PDF), which uses QR codes with +URL-like formatting using "bank:" as the URI schema/protocol to +provide the payment information. There is also the +ZUGFeRD +file format that perhaps could be transfered using QR codes, but I am +not sure if it is done already. Last, in Bolivia there are reports +that tax information since november 2014 need to be printed in QR +format on invoices. I have not been able to track down a +specification for this format, because of my limited language skill +sets.

+ +
+
+ + + Tags: english, standard. + + +
+
+
+
Making battery measurements a little easier in Debian @@ -100,7 +284,23 @@ I would love some help to improve the system further.

  • February (2)
  • -
  • March (1)
  • +
  • March (3)
  • + +
  • April (8)
  • + +
  • May (8)
  • + +
  • June (2)
  • + +
  • July (2)
  • + +
  • August (5)
  • + +
  • September (2)
  • + +
  • October (3)
  • + +
  • November (8)
  • @@ -333,41 +533,41 @@ I would love some help to improve the system further.

  • bitcoin (9)
  • -
  • bootsystem (15)
  • +
  • bootsystem (16)
  • bsa (2)
  • chrpath (2)
  • -
  • debian (121)
  • +
  • debian (141)
  • -
  • debian edu (154)
  • +
  • debian edu (158)
  • digistan (10)
  • -
  • dld (15)
  • +
  • dld (16)
  • -
  • docbook (20)
  • +
  • docbook (23)
  • drivstoffpriser (4)
  • -
  • english (303)
  • +
  • english (333)
  • fiksgatami (23)
  • fildeling (12)
  • -
  • freeculture (25)
  • +
  • freeculture (29)
  • freedombox (9)
  • -
  • frikanalen (16)
  • +
  • frikanalen (18)
  • h264 (20)
  • intervju (42)
  • -
  • isenkram (11)
  • +
  • isenkram (13)
  • kart (19)
  • @@ -381,21 +581,21 @@ I would love some help to improve the system further.

  • mesh network (8)
  • -
  • multimedia (37)
  • +
  • multimedia (39)
  • -
  • nice free software (7)
  • +
  • nice free software (8)
  • -
  • norsk (273)
  • +
  • norsk (283)
  • -
  • nuug (177)
  • +
  • nuug (182)
  • -
  • offentlig innsyn (22)
  • +
  • offentlig innsyn (26)
  • open311 (2)
  • -
  • opphavsrett (58)
  • +
  • opphavsrett (62)
  • -
  • personvern (92)
  • +
  • personvern (95)
  • raid (1)
  • @@ -405,27 +605,27 @@ I would love some help to improve the system further.

  • rfid (3)
  • -
  • robot (9)
  • +
  • robot (10)
  • rss (1)
  • -
  • ruter (4)
  • +
  • ruter (5)
  • scraperwiki (2)
  • -
  • sikkerhet (45)
  • +
  • sikkerhet (52)
  • sitesummary (4)
  • -
  • skepsis (4)
  • +
  • skepsis (5)
  • -
  • standard (48)
  • +
  • standard (49)
  • -
  • stavekontroll (3)
  • +
  • stavekontroll (5)
  • stortinget (10)
  • -
  • surveillance (36)
  • +
  • surveillance (43)
  • sysadmin (2)
  • @@ -433,7 +633,7 @@ I would love some help to improve the system further.

  • valg (8)
  • -
  • video (55)
  • +
  • video (59)
  • vitenskap (4)