Jump to content

[PLUGIN] LCD_Manager


Recommended Posts

On 8/20/2023 at 9:18 AM, SimonF said:

 

Not at present within the plugin.

 

But you can run these to turn off the screen 1 = on 0 = off so you could run as a user script on a schedule.

 

root@QNAP:~# echo -e "M^\x1" > /dev/ttyS1
root@QNAP:~# echo -e "M^\x0" > /dev/ttyS1

 

Hey is there a newer version of this code to turn off the screen?

 

I've got a usb crystalfontz off ebay. not getting anything with the quoted code.

My device is on: /dev/ttyUSB1

1861073739_Screenshot2024-03-04at20_39_15.thumb.png.aec9daca40770cbea770260d91cde5fe.png

Edited by dopeytree
Link to comment
  • 2 weeks later...

@SimonF

So I have my QNAP TVS-871 and running the plugin and seems to work. My question is this: Is there a way to completely customize the screen? Like I want to enable it during boot and have it say something like loading Loading Unraid..., then once loaded change to Array Stooped, then once Array is started say Array Loading. then once loaded say Array Loaded. then wait 10 seconds and show IP address then after 10 mins turn screen off, if button is pressed (the 2 buttons on qnap) the turn display on and show x if button is pressed again show y, if pressed again show z ect...

 

I am thinking something along the lines of user scripts to control the screen once loaded if possible??

 

Is this even possible?

 

Also Thanks form getting this far. It was annoying to see the screen never update to anything until now.

 

Note: That on the setting page in unraid you have the "Online Manual" link still back to the APC UPS Manual. maybe update to bring you to this thread?

 

I changed line 66 of the 'LCDSettings.page' to this

<span style="float:right;margin-right:10px"><a href="https://forums.unraid.net/topic/136952-plugin-lcd_manager/" target="_blank" title="_(UNRAID Forums: [PLUGIN] LCD_MANAGER)_"><i class="fa fa-file-text-o"></i> <u>_(Unraid Plugin Forum)_</u></a></span>


 

and now looks like this:

image.png.f62c9d2398e45444f2effb7450a31c24.png

 

 

I also updated the ICON to be more inline with UNRAID Icons (Attached if you want to use)

image.png.fd9d69895e1929279ea1b19d2824a9fd.png

lcd.png.bff7379a6c4227329ecac4445612afbb.png

 

Edited by almulder
Link to comment
  • 3 months later...
1 hour ago, rweredhead said:

Any way to add just about system stuff like name, ip address, etc?

 

Also would it be possible to add a field for custom pixel size? mine is 22x2 so it adds blocks and gets weird.

Not currently, I still need to create an Unraid client.

 

For panel size. If you edit LCDSettings.page with find the LCD Screen dimensions and change the 20x2 to 22x2. This will allow you chane the setting. It will remain persistance but after reboot the code will revert so if you make in the gui it will revert unless you apply the change again but the config file will remain with the new Value post boot.

 

root@computenode:~# cd /usr/local/emhttp/plugins/lcd_manager/
root@computenode:/usr/local/emhttp/plugins/lcd_manager# ls
LCDSettings.page*  client.php*  event/  images/  include/  makepkg.sh*  scripts/
root@computenode:/usr/local/emhttp/plugins/lcd_manager# nano LCDSettings.page 
root@computenode:/usr/local/emhttp/plugins/lcd_manager# cat LCDSettings.page | grep -a4 x2
<!--
<input type="hidden" name="#include" value="/plugins/<?=$sName?>/include/update.apcupsd.php">
PORT=13666
HOST="127.0.0.1"
SIZE="20x2"
DEV="/dev/serial/by-id/usb-Crystalfontz_Crystalfontz_CFA631-USB_LCD_CF041151-if00-port0"
DRIVER="CFontzPacket"
ENABLED=1
DASH=0
--
  </select>

_(LCD Screen dimensions)_:
: <select name="SIZE" size="1" >
  <?=mk_option($cfg["SIZE"], "22x2", "22x2");?>
  <?=mk_option($cfg["SIZE"], "16x2", "16x2");?>
  </select>

_(LCD Device Path)_:
: <input type="text" name="DEV" value="<?=$cfg["DEV"];?>"/>
root@computenode:/usr/local/emhttp/plugins/lcd_manager# 

Link to comment
On 6/28/2024 at 11:40 PM, SimonF said:

Not currently, I still need to create an Unraid client.

 

For panel size. If you edit LCDSettings.page with find the LCD Screen dimensions and change the 20x2 to 22x2. This will allow you chane the setting. It will remain persistance but after reboot the code will revert so if you make in the gui it will revert unless you apply the change again but the config file will remain with the new Value post boot.

 

root@computenode:~# cd /usr/local/emhttp/plugins/lcd_manager/
root@computenode:/usr/local/emhttp/plugins/lcd_manager# ls
LCDSettings.page*  client.php*  event/  images/  include/  makepkg.sh*  scripts/
root@computenode:/usr/local/emhttp/plugins/lcd_manager# nano LCDSettings.page 
root@computenode:/usr/local/emhttp/plugins/lcd_manager# cat LCDSettings.page | grep -a4 x2
<!--
<input type="hidden" name="#include" value="/plugins/<?=$sName?>/include/update.apcupsd.php">
PORT=13666
HOST="127.0.0.1"
SIZE="20x2"
DEV="/dev/serial/by-id/usb-Crystalfontz_Crystalfontz_CFA631-USB_LCD_CF041151-if00-port0"
DRIVER="CFontzPacket"
ENABLED=1
DASH=0
--
  </select>

_(LCD Screen dimensions)_:
: <select name="SIZE" size="1" >
  <?=mk_option($cfg["SIZE"], "22x2", "22x2");?>
  <?=mk_option($cfg["SIZE"], "16x2", "16x2");?>
  </select>

_(LCD Device Path)_:
: <input type="text" name="DEV" value="<?=$cfg["DEV"];?>"/>
root@computenode:/usr/local/emhttp/plugins/lcd_manager# 

Thanks for the direction, How would i edit that file? Nano page doesnt offer the fields to modify and the cat page isnt editable.

Link to comment
9 hours ago, rweredhead said:

Thanks for the direction, How would i edit that file? Nano page doesnt offer the fields to modify and the cat page isnt editable.

You should be able to nano the .page file.

nano /usr/local/emhttp/plugins/lcd_manager/LCDSettings.page 

Link to comment
  • 3 weeks later...

Hi. Works fine with a CrystalFontz 633 (with USB module), But have to change the settings for a 633 after boot (should be default in the original LCDd) and lower speed to 19200 (again, default in the original LCDd). Could we have an option to do it via the GUI plugin? Or tell me where to make those settings permanent?

Other solution is install from scratch but I like the idea of having control from the gui.

Thanks

DSCN1463.JPG

Edited by hamsterdan
Typo
Link to comment
8 hours ago, hamsterdan said:

Hi. Works fine with a CrystalFontz 633 (with USB module), But have to change the settings for a 633 after boot (should be default in the original LCDd) and lower speed to 19200 (again, default in the original LCDd). Could we have an option to do it via the GUI plugin? Or tell me where to make those settings permanent?

Other solution is install from scratch but I like the idea of having control from the gui.

Thanks

DSCN1463.JPG

Code is in the setup, just not an option on the GUI at present. You may be able to change in the config file the driver to CFontz633. But of you change in the gui it would revert back.

            case "CFontz633":
                $config_text .= "[{$lcdproc_config['driver']}]\n";
                $config_text .= "Device={$realport}\n";
                $config_text .= "Size={$lcdproc_config['size']}\n";
                $config_text .= "Contrast=350\n";
                $config_text .= "Brightness=1000\n";
                $config_text .= "OffBrightness=50\n";
                $config_text .= "Speed=19200\n";
                $config_text .= "NewFirmware=yes\n";
                $config_text .= "Reboot=yes\n";
                break;

 

root@computenode:~# cat /boot/config/plugins/lcd_manager/lcd_manager.cfg 
HOST="127.0.0.1"
PORT="13666"
SIZE="22x2"
DASH="0"
DEV="/dev/ttyUSB0"
ENABLED="enabled"
DRIVER="CFontzPacket"
LCDPROC="no"
LCDPROCOPTS="N  C M"
root@computenode:~# 

Link to comment

Hello everyone,

 

I have a QNAP TS-453A, the plugin was working but now it stopped. I dont know if it was an unraid update or a reboot.

 

If I try the command echo "E" > /dev/ttyS0 to S3 I receive always an input/output error.

 

Do you have any suggestion?

Link to comment
  • 3 weeks later...

Hi!  I installed this plugin on a new QNAP running unraid 6.12.11.  It works great, however the plugin doesn't survive a reload.  The plugin shows up under the 'Plugin File Install Errors' after a reboot, but I don't know where to find the log file.  Any suggestions?

 

Cheers!

 

plugin-error.thumb.png.be3660f618f2f89253f0f72aac399147.png

Edited by ritti
Link to comment
2 hours ago, ritti said:

Hi!  I installed this plugin on a new QNAP running unraid 6.12.11.  It works great, however the plugin doesn't survive a reload.  The plugin shows up under the 'Plugin File Install Errors' after a reboot, but I don't know where to find the log file.  Any suggestions?

 

Cheers!

 

plugin-error.thumb.png.be3660f618f2f89253f0f72aac399147.png

Check the system log. Do you run any services providing access to internet that may not have started yet, i.e pihole or a vm firewall?

Link to comment
2 hours ago, SimonF said:

Check the system log. Do you run any services providing access to internet that may not have started yet, i.e pihole or a vm firewall?

This is occurring on a new install with no arrays or other services.  So, nothing that should block internet access, however the logs show a network failure event.

 

Aug 13 11:16:16 NAS01 root: Executing hook script: post_plugin_checks
Aug 13 11:16:16 NAS01 root: plugin: installing: lcd_manager.plg
Aug 13 11:16:16 NAS01 root: Executing hook script: pre_plugin_checks
Aug 13 11:16:16 NAS01 root: plugin: creating: /boot/config/plugins/lcd_manager/packages/lcdproc.txz - downloading from URL https://raw.githubusercontent.com/SimonFair/unraid-lcd/master/lcdproc.txz
Aug 13 11:16:21 NAS01 root: plugin: downloading: lcdproc.txz ...#015plugin: lcdproc.txz download failure: Network failure
Aug 13 11:16:21 NAS01 root: Executing hook script: post_plugin_checks

 

I can add a user script during array startup to install the plugin.  How would I then apply the locally stored lcd_manager settings via cli?

Link to comment
22 minutes ago, ritti said:

This is occurring on a new install with no arrays or other services.  So, nothing that should block internet access, however the logs show a network failure event.

 

Aug 13 11:16:16 NAS01 root: Executing hook script: post_plugin_checks
Aug 13 11:16:16 NAS01 root: plugin: installing: lcd_manager.plg
Aug 13 11:16:16 NAS01 root: Executing hook script: pre_plugin_checks
Aug 13 11:16:16 NAS01 root: plugin: creating: /boot/config/plugins/lcd_manager/packages/lcdproc.txz - downloading from URL https://raw.githubusercontent.com/SimonFair/unraid-lcd/master/lcdproc.txz
Aug 13 11:16:21 NAS01 root: plugin: downloading: lcdproc.txz ...#015plugin: lcdproc.txz download failure: Network failure
Aug 13 11:16:21 NAS01 root: Executing hook script: post_plugin_checks

 

I can add a user script during array startup to install the plugin.  How would I then apply the locally stored lcd_manager settings via cli?

The plugin uses events to start processes so will not be simple to use user scripts. Can you see when system gets the network setup. Post syslig if you want.

Link to comment

Simon, I resolved the problem by enabled spanning-tree portfast on my Cisco switch.  Prior to enabling portfast, spanning-tree was blocking network access for ~ 50 sec as a loop prevention mechanism.  Thanks for the help with this!

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...