This describes an interface between DomotiGa (the mysql database) and LCD4Linux, it was posted by David, on this forum

I have a small backlit monochrome graphic Pico LCD display module of 256x64 bit resolution and have now got it to display DomotiGa sensor data using the MySQL plugin of Lcd4linux, I had been wondering how to achieve this for some time but found this was a very easy way to get some results.

The method is described on the lcd4linux wiki site here I have added some device widgets into my lcd4linux.conf file like this:

Widget MySQLupdated {
    class 'Text'
    expression MySQL::query('SELECT lastseen FROM devices WHERE id=57')
    width 20
    align 'L'
    update minute
The id number is found on the devices page of the Domotiga gui, that and more information is visible in the devices database.

Widget MySQLinside {
    class 'Text'
    expression MySQL::query('SELECT value FROM devices WHERE id=57') .' ' . MySQL::query('SELECT label FROM devices WHERE id=57')
    width 20
    align 'R'
    prefix 'Inside:'
    update minute

Of course you must choose your own device with the id= where clause.
The widgets are used by the layout definition like this:

    Row1 {
   Col1  'MySQLupdated'
    Row2 {
   Col1  'MySQLinside'

This has run all day now on my arm system without problems.

Here is an image of the output, including a little DomotiGa image:

Next task is to integrate a notify feature somehow, I'm looking at using the lcd4linux fifo feature for this but to do that will need some code modification to DomotiGa. I'll try and make a line to show the last phone caller in a similar way too. The PipcoLCD Graphic display module has some buttons by the side of it, I may use them for something too. That is why the xwindow image has some simulated buttons on it.


    Updated by: rdnzl, Updated over 5 years ago
    Access count: 64411 since 2011-11-13

    Attached Files

    capture.png (2.55 KB) rdnzl, 11/13/2011 01:34 PM

    lcd4linux.png (304 Bytes) rdnzl, 11/13/2011 01:34 PM

    Also available in: PDF HTML TXT