HowTo: ESP Easy – Install and configure NerdiysPanelMeter plugin

In the article Build your own retro SmartHome display using analog displays How to assemble your own retro SmartHome display was explained.

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

So that you can easily control the analog displays and the associated LEDs, you can use the following ESP Easy plugin.

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

How this works and what you need to pay attention to 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.


Safety instructions

I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/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 make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂 


Requirements

Helpful articles:
Before you start 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 about this in the following article.
Build your own retro SmartHome display using analog displays
ESPEasy – flash firmware and configure WLAN access data
ESPEasy – Execute commands and actions

Required tool:
-no-

Required material:

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


Download plugin data from 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 plugin files, it also contains the other files of the ESPEasy framework. This means that everything can be downloaded and programmed directly onto the controller. The plugins are already configured correctly.

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


Enable plugin compilation

If you program ESPEasy on your ESP by using the Arduino IDE or compiling the code from scratch, it is important that you activate the PanelMeter plugin beforehand. To do this, go to the plugin tab and remove the comment (the two “//”) in front of the “#define USES_P209”. This means that the plugin or the code it contains will be included in the next compilation and will be available to you as a selection in the plugin manager. You can also find further information about this in the article ESPEasy – compile, flash firmware and configure WLAN access data in the section Activate required plugins.

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


Configure plugin

In order to configure the PanelMeter plugin accordingly, you have to go 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 to connect your PanelMeter programmed with the ESPEasy firmware to your WLAN can be found in the article ESPEasy – flash firmware and configure WLAN access data described. How you can find out the associated IP address is in the article Display/find out the IP address of the devices in the network described.

Once you have logged in to the configuration menu of your PanelMeter, switch to the “Devices” tab and click on one of the 12 “Edit” buttons.
A menu will now open that you can use to configure a new device.
Opens the selection options in the drop-down menu and selects the device “Display – Nerdiys-PanelMeter”. If you cannot find this entry here, 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 now opens you can set all the important settings for your PanelMeter.
You should enter a unique name for this device in the “Name” field. You can then use the “1st GPIO” field to specify the GPIO to which you connected the WS2812B LEDs. Under “Number of connected PanelMeter” you specify 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 whether you have specified the correct GPIO and the correct number of analogue displays.

The analog displays should all be exactly in the middle after the takeover. If they don't do this, check again whether you have specified the correct I2C address and number of PanelMeters.


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 detailed in the article ESPEasy – Execute commands and actions described.

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

Command: pmset
Setting analog displays and LED colors.

The “pmset” command requires seven parameters, the last three of which are optional.
1. Parameter: “selected PanelMeter”:
You use this parameter to choose which analog display you want to set. The counting starts at one. If you enter a zero, all analogue displays will be set with the selected settings. Value range: 0 to 16.
2nd parameter: “lower limit”:
For this parameter you have to specify the lower limit of the scale on the analog display. This value is required to scale the value to be displayed accordingly. Value range: -10000 to 10000.
3. 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. Value range: -10000 to 10000.
4. Parameter: “current value”:
This is the value that should be displayed. It is scaled according to the specification of the “lower limit” and “upper limit”. Value range: -10000 to 10000.
5. Parameter: “LED color red”:
Red color value of the LED to be set. Value range: 0 to 255.
6. Parameter: “LED color green”:
Green color value of the LED to be set. Value range: 0 to 255.
7. Parameter: “LED color blue”:
Blue color value of the LED to be set. Value range: 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:
– For example, you want to set an analog (temperature) display to 20°C, the value range of which is 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 requires four parameters.
1. Parameter: “selected LED”:
You use this parameter to choose which LED should be set. The counting starts at one. If you enter a zero, all available LEDs will be set with the selected settings. Value range: 0 to 16.
2. Parameter: “LED color red”:
Red color value of the LED to be set. Value range: 0 to 255.
3. Parameter: “LED color green”:
Green color value of the LED to be set. Value range: 0 to 255.
4. Parameter: “LED color blue”:
Blue color value of the LED to be set. Value range: 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 – Supply Nerdiys-PanelMeter with weather data.


Available features

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

Planned features

  • Link to openWeatherMap account to display climate data directly.
  • Possibility of using the analogue displays as minute and hour displays.

changelog

v0.1:

  • project created

Have fun with the project

I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂

PS 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 think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂

Buy Me a Coffee at ko-fi.com       

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.