Author Topic: Request for UM: Rolling LCD-display  (Read 509 times)

Offline riro

  • Donor
  • I know how to MSure
  • *****
  • Posts: 281
  • Karma: +3/-0
    • Home Automation
Request for UM: Rolling LCD-display
« on: May 27, 2009, 08:13:04 »
Did fire up my new LCD yesterday and looked in to the existing example-UMs for LCD's...

In DisplayingTemperatures.cs there is a comment "Display the temperatures four at a time, with a delay of 2 seconds between", but when I look in to the code I can't see the delay...
Since I have 14 points of measure I would like a UM that works a little like LCDExample.cs but with some modifications...

I have it set up to roll through all devices with a 4 second interval, done this by setting the read-schedule with different startingpoints.

Today it shows
1. Date + Time
2. Blank
3. Device name
4. Current temp

What I would like is that it first shows:
1. Date + Time
2. Current Device : Temp  (Like DisplayingTemperatures.cs does so you can rename the devices)
3. Last Device : Temp
4. Second Last Device : Temp

And then on the next read, line 2 becomes 3 and line 3 becomes 4.

Why? When I want to know the outside temp I need to wait up to 56 seconds today... Well, not me since I have 4 devices outside so I "only" have to wait 20 seconds to get some clue of the temperature... :-)


Even better would be to take a few devices and show the max/min temp from that group (almost the same as in TemperaturNuReporter.cs that reports the lowest temp from a group)...
In that case you could would have:
1. Date + Time
2. Group 1 Name : Max / Min
2. Group 2 Name : Max / Min
2. Group 3 Name : Max / Min

Offline Per

  • Administrator
  • MSure hero
  • *****
  • Posts: 2640
  • Karma: +15/-0
  • Author of MSure
    • My Blog
  • MSure version: Development version
Re: Request for UM: Rolling LCD-display
« Reply #1 on: May 27, 2009, 09:37:22 »
That comment might be a left-over...  :o

As for the other things...no impossible wishes and I'll gladly help you with it - after the release of 0.8.3.
Manual | Happy with MSure? | Please respect the license | Current TODO
IRC: #MSure on DalNet
No questions via unsolicited mail or PMs, please!

Offline riro

  • Donor
  • I know how to MSure
  • *****
  • Posts: 281
  • Karma: +3/-0
    • Home Automation
Re: Request for UM: Rolling LCD-display
« Reply #2 on: May 29, 2009, 10:28:27 »
Did a quick and probably ugly hack...

Added some variables
Code: [Select]
namespace Com.Pmalmberg.MSure.Modules.UserModules
{
class LCDExample : UserModule
{
    string line1;
    string line2;
    string line3;

And then a few changes in the code.
Code: [Select]
public override void Event( OWTemperatureContainer temperature )
{
      // Rotate information
line3 = line2;
line2 = line1;
line1 = temperature.Label + "  " + temperature.Temperature.ToString("f2") + "                    " ;

// Display some info from the temperature container on the display
LCDCommand lcdCmd = new LCDCommand( temperature.NetworkName, "LcdDisplay", "not used" );
lcdCmd.DisplayCenter(0, DateTime.Now.ToString( "yyyy-MM-dd HH:mm" ) );
lcdCmd.DisplayCenter( 1, line1 );
lcdCmd.DisplayCenter( 2, line2 );
lcdCmd.DisplayCenter( 3, line3 );
Send( lcdCmd );
}

At "work" ;-) right now so I cant see the display but it should work. (Compiles just fine)

Offline rscholer

  • MSure fan
  • *
  • Posts: 53
  • Karma: +0/-0
Re: Request for UM: Rolling LCD-display
« Reply #3 on: February 07, 2010, 00:35:58 »
Thanks for sharing your "hack", just what I was looking for  :)

Offline ballesteros

  • Donor
  • Lost soul
  • *****
  • Posts: 10
  • Karma: +0/-0
    • Friberg-Net
Re: Request for UM: Rolling LCD-display
« Reply #4 on: March 12, 2010, 20:52:52 »
Skulle du möjligen kunna lägga upp filen i sin helhet ???
Är ganska borta på UM:s.
Jag har fått displayen att funka med både DisplayingTemperatures.cs och LCDExample.cs men har också fler sensorer jag vill ska rulla på displayen