How To: ESP Easy – Install and configure the Nerdy PanelMeter plugin

In the article Build your own retro SmartHome display via analog displays, is explained how to assemble your own Retro SmartHome display.

But unfortunately even the best hardware is nothing without the right software.

So that you can control the analog displays and the associated LED’s comfortably, you can use the following ESPEasy-Plugin.

This enables you to control up to 16 analog displays including LEDs and to display values adapted to the scales.

How this works and what you have to consider is described in the following article.

This article also contains the currently available and future planned features of the plugin as well as the changelog.

Hints for our lovely english readers: Basically, many of the articles on Nerdiy.de are translations from the original german articles. Therefore, it may happen here and there that some illustrations are not available in english and that some translations are weird/strange/full of mistakes or generally totaly wrong. So if you find some obvious (or also not obvious) mistakes don't hesitate to leave us a hint about that in the comment section. 
Also please don't get confused, that instead of a "dot" often a "comma" is used as decimal separator. 🙂


Safety instructions

I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance. https://www.nerdiy.de/en/sicherheitshinweise/

Affiliate links / advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and shop via this link, Nerdiy.de receives a commission from the online shop or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support Nerdiy.de in being able to offer further useful projects in the future. 🙂


Requirements

Helpful articles:
Before you start with this article you should have assembled the PanelMeter display and programmed it with the ESPEasy firmware – including the Nerdiys PanelMeter plugin. You can find information on this in the following article.
Build your own retro SmartHome display using analog displays
Flash ESPEasy firmware and configure WLAN access data
ESPEasy – execute commands and actions

Tools required:
-no-

Required material:
In the following list you will find all the tools you need to implement this article.


Download the plugin data from the Nerdiy Git

Like all ESP-Easy plugins – offered here on Nerdiy.de – you can also find this plugin in Git at: https://github.com/Nerdiyde/Nerdiys_ESPEasy

In addition to the actual plug-in files, it also contains the other files of the ESPEasy framework. So the whole thing can be downloaded and programmed directly on the controller. The plugins are already configured correctly for this.

How you can download files from a Git repository is described in the article GitHub – How do I copy files from a Git repository to my computer.


Activate plugin compilation

If you program ESPEasy on your ESP using the ArduinoIDE or recompile the code completely, it is important that you activate the PanelMeter plugin beforehand. To do this, switch to the tab of the plugin and remove the comment (the two “//”) before the “#define USES_P209”. This means that the plugin or the code it contains is included in the next compilation and is available to you as a selection in the plugin manager. You can find more information about this in the article ESPEasy – Compile firmware, flash and configure WLAN access data in the section Activate required plugins.

View of the code with marking of the relevant point to activate the plugin code.


Configure the plugin

To configure the PanelMeter plug-in accordingly, you have to switch to the web configuration menu of the ESPEasy firmware installed on the PanelMeter. Simply enter the IP address of the PanelMeter connected to your WLAN.

How you connect your programmed PanelMeter with your WLAN with the ESPEasy firmware is described in the article ESPEasy – Flash firmware and configure WLAN access data. How to find out the associated IP address is described in the article Displaying / finding out the IP address of the devices in the network.

Once you have logged into the configuration menu of your PanelMeter, you switch to the “Devices” tab and click on one of the 12 “Edit” buttons.
Now a menu opens with which you can configure a new device.
Open the selection options of the dropdown menu and selects the device “Display – Nerdiys-PanelMeter”. If you cannot find this entry at this point, check again whether you activated the plugin before the programming process and thus compiled it. You can find tips on this in the article ESPEasy – Flash firmware and configure WLAN access data.
In the menu that opens you can set all the important settings for your PanelMeter.
You should give the field “Name” a unique name for this device. With the field “1st GPIO” you can then specify the GPIO to which you have connected the WS2812B LEDs. Under “Number of connected PanelMeter” you indicate how many analog displays are available in your PanelMeter. Finally, you can set the I2C address of your PanelMeter under “PCA9685 I2C address”. Once you have configured everything, click on “Sumbit” so that the settings are applied.

The LEDs of the PanelMeter backlight should then all light up white. If they don’t, check again that you have entered the correct GPIO and the correct number of analog displays.

The analog displays should all be exactly in the middle after the transfer. If they don’t, check again that you have entered the correct I2C address and number of panel meters.


Available commands

The “PanelMeter” plugin offers you two commands with which you can configure the displays. You can do this in the usual way for ESP-Easy. How to do this is described in detail in the article ESPEasy – Execute commands and actions.

The first command is used to set the analog displays and optionally to configure the respective LED color. The second allows you to configure the LED color regardless of the setting of the analog displays.

Command: pmset
Setting of analog displays and LED colors.

The “pmset” command takes seven parameters, the last three of which are optional.
1. Parameter: “selected PanelMeter”:
With the help of this parameter you choose which analog display you want to set. The count starts at one. If you enter a zero, all analog displays are set with the selected settings. Range of values: 0 to 16.
2nd parameter: “lower limit”:
For this parameter you have to enter the lower limit of the scale on the analog display. This value is required to scale the value to be displayed accordingly. Range of values: -10000 to 10000.
3rd parameter: “upper limit”:
For this parameter you have to specify the upper limit of the scale on the analog display. This value is required to scale the value to be displayed accordingly. Range of values: -10000 to 10000.
4. Parameter: “current value”:
This is the value to be displayed. It is scaled according to the “lower limit” and “upper limit”. Range of values: -10000 to 10000.
5th parameter: “LED color red”:
Red color value of the LED to be set. Range of values: 0 to 255.
6. Parameter: “LED color green”:
Green color value of the LED to be set. Range of values: 0 to 255.
7. Parameter: “LED color blue”:
Blue color value of the LED to be set. Range of values: 0 to 255.

pmset,
{selected PanelMeter 0-16(zero=all)},
{rangeMin -10000-10000},
{rangeMax -10000-10000},
{actualValue -10000-10000},
{led color red 0-255},
{led color green 0-255},
{led color blue 0-255},

Examples:
– You want e.g. set an analog (temperature) display to 20 ° C, whose value range goes from -10 ° C to + 40 ° C: pmset, 1, -10,40,20
– The LED of the same display should also be set to blue: pmset, 1, -10,40,20,0,0,255

Command: pmled
Setting the LED colors.

The “pmled” command takes four parameters.
1. Parameter: “selected LED”:
With the help of this parameter you choose which LED should be set. The count starts at one. If you enter a zero, all available LEDs are set with the selected settings. Range of values: 0 to 16.
2nd parameter: “LED color red”:
Red color value of the LED to be set. Range of values: 0 to 255.
3rd parameter: “LED color green”:
Green color value of the LED to be set. Range of values: 0 to 255.
4th parameter: “LED color blue”:
Blue color value of the LED to be set. Range of values: 0 to 255.

pmled,
{ {led color red 0-255},
{led color green 0-255},
{led color blue 0-255},

Example:
– To switch on the fourth LED with the color green, the following command is sufficient: pmled, 4,0,255,0


Example NodeCode to supply the PanelMeter with data

Of course, you still need a “backend” to feed your PanelMeter with data. Various SmartHome systems are very suitable for this. This can be implemented very easily with NodeRed, for example. You can find tips on this in the article NodeRed – Nerdiys-PanelMeter with weather data.


Available features

  • Automatic scaling and display of values on individual and all analog displays.
  • Setting the LED colors of individual and all LEDs.

Planned features

  • Link to openWeatherMap account to display climate data directly.
  • Possibility to use the analog displays as minutes and hours.

Changelog

v0.1:

  • project created

I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂

Fab

P.S. Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂

Buy Me a Coffee at ko-fi.com

Leave a Reply

Your email address will not be published. Required fields are marked *