FHEM Forum

FHEM => English Corner => Thema gestartet von: djrm am 24 Juli 2014, 21:03:53

Titel: Sending values to LCD
Beitrag von: djrm am 24 Juli 2014, 21:03:53
Greetings everyone.
I still quite new to configuring fhem and have what is probably a simpe question to anser please.
I have an LCD device on a 1wore bus which I can write text to like this:
set LCD_Driver line20.0 "hello"
I also have a device which I can display a reading from like this:
{ my @a = split(" ", Value("SolarCharger"));; $a[2] }
I cannot see how to combine these to put the value onto the display.
Whenever I do I see the text of the command on the display, i.e. it is not evaluated but just copied.
Please help me.
Kind regards, David.
Titel: Antw:Sending values to LCD
Beitrag von: bugster_de am 12 September 2014, 09:31:13
Hi,

not sure, if this question is still open.
Would be great, if you could paste the full code line, that is not working correctly.

I would assume, that this should work:

set LCD_Driver line 20.0 { my @a = split( " ", ReadingsVal( "SolarCharger", "state", "default");; if( @a >= 3 ) { return( $a[2] ) } else { return( "default" );; } }

Titel: Antw:Sending values to LCD
Beitrag von: djrm am 12 April 2021, 21:20:58
Thank for the reply, my system has been down for a good while but I'm bringing it back up now so I'll be able to use my display again shortly. Kind regards, David.