Notifications
Clear all

10/18/2023 Map Stopped Working?
Visit this post for the fix

[Sticky] Configuration Editor Introduction

6 Posts
4 Users
0 Reactions
2,051 Views
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 558
Topic starter  

Live Sectional v3.1 has a lot of settings that can be adjusted to suit the needs of the builder. These settings are stored in a file on the Raspberry Pi (RPI) called config.py. This file can be edited manually using a text editor, but the names can be cryptic and there are no explanations for each setting stored in config.py. Because of this Configuration Editor was setup. This allows the builder to easily adjust the behavior of the map. 

The utility is divided into 3 major areas;

  • Banner area, which displays the IP address and current system time at time of loading web page of the RPI.
  • Main area with 5 separate settings groups.
    • Basic Settings - as the name suggests, this includes basic settings.
    • Sectional Map Settings - Includes the necessary settings to setup the sectional map's LED behavior.
    • LED Color Settings - Allows the builder to change the colors used to represent various conditions.
    • Legend Settings - If the builder will be using a legend, then this section will determine its behavior.
    • LCD and OLED Display Settings - If the builder will be using a display, then this section will determine its behavior.
  • Control Buttons, located in a sticky table that will remain at the bottom of the screen visible at all times. This area allows the user to save settings and to control the map.

Let's discuss the Main area in more detail. 
To access the settings, click on the section needed. This will expand the page showing the available settings. Each setting has a name, setting, and description of its purpose.

Read the name and description and then decide what the setting should be. It's important to note that it is possible to make conflicting choices which may render the operation sporadic and possibly cause the script to stop running. If this happens, please post the error message so we can mitigate the issue in future releases.

Most of the settings are obvious so a discussion on each setting is unnecessary. But let's look at each section and amplify a few of the settings in each.

Basic Settings
Auto Run on Boot - This setting is best set to 'No' to begin with. This allows for easier testing and changing of settings. Once the map is operating as desired, change this to 'Yes'. That way if power is interrupted, it will reboot and automatically startup the map.

Age of Metar - This setting is passed to the FAA when an update of weather is requested and limits how old the data returned can be. For various reasons a metar may not be updated in a timely fashion and the data returned may be hours old. So by setting this you will ensure the data returned won't be any older than the setting. If there is no metar available within this timeframe, no data for that airport will be returned and the LED will be set to the color specified by 'No Weather' or 'nowx'.

Use On/Off Timer - Version 3.1 added a new feature that allows for the map to turn off the LED's and displays if used. Presumably this would be used at night so as to cut down the light while sleeping. However, and timeframe can be set. Select 'Yes' to turn on this feature, then enter the desired 'Time Off' and 'Time On' times. Use 24 hour time here. So 10 pm would be entered as '22:00'. If the script is already running, you'll need to shutdown then restart the map so the new setting can be read.

Display Used - Should be set to 'No' if the builder will not be using either an LCD or OLED display. If it is set to 'Yes' and no display is connected, an error message will be given. If a display is used, the builder must denote what type of display will be used. Either LCD or OLED. Strictly speaking both types can be used, but the results are less than satisfying. So its suggested to use one type of display.

Sectional Map Settings
Blink LEDs for High Winds - This will instruct the software to blink an airports LED between the flight category color and black if winds are reported above what the user has set in 'Basic Settings/Set Wind Speed'. The effect for high winds on a clear day would be Green then Black, then repeat.

Flash LEDs for Lightning -  If thunderstorms are reported in the area, the map can simulate lightning flashes if this is set to 'Yes'. The effect on a IFR day would be Red then 2 quick flashes of Yellow, then back to Red.

Similar behavior is achieved for the other reported weather type settings if they are set to 'Yes'. For full functionality, select 'Yes' for all of these.

Turn On Home Airport Feature - If the builder would like to single out a specific airport as a home airport, this must be set to 'Yes'. By doing so, the pin number of the LED must be entered in the next setting. After that a decision on the behavior of the home airport must be made. It can either be brighter than the other airports, or the builder can designate a special color that will flash periodically to make this airport stand out. This color setting is available in the next section.

RGB or GRB LEDs Used - There are various types of addressable LED's. The two most popular and the ones tested are models WS2811 LED String and WS2812 strip. Google each to see the difference. The WS2811 uses GRB color notation while WS2812 uses RGB. For example if the user wanted to display Green, RGB notation would be (0,255,0) but GRB notation would be (255,0,0). To allow for flexibility on which model of LED is used, this setting was added. If you find that the colors seem completely wrong, then try switching this setting.

LED Color Settings
Using a color picker the builder can set whatever color is desired. However, for metar color designation, there are specific colors that are accepted. For instance VFR should be Green, MVFR should be Blue, IFR Red and so on. The pre-selected colors will suffice, but the builder is free to change them to whatever color is desired.

Home Airport Changing Colors - This is the one setting in this section that needs further discussion. This is only used if the builder has decided to designate a Home Airport and has also selected 'Changing Colors'. This is an array of 6 different colors in RGB format that will be displayed on the home airport pin on every other cycle. The user can pick the 6 different colors and put them in this array. The structure of the array must remain the same, i.e. [(55,55,55), (200,200,200), (50,50,50), (150,150,150), (25,25,25), (0,0,0)]. The structure shown must be maintained, only the numbers can be altered. Remember that RGB notation is Red, Green, Blue and there are plenty of web sites that will generate such a code if necessary. Here's an example of such a utility; https://www.w3schools.com/colors/colors_picker.asp . Play with this to see if it creates the visual effect desired.

Legend Settings
If a legend is to be used, then these settings need to be adjusted to achieve the desired results. There are 4 major legend arrangements available.

  • No Legend
  • Flight Category Legend - only displays the Flight Category colors. i.e. VFR, MVFR, IFR, LIFR, NOWX. 
  • Flight Category with High Winds and Lightning - This provides the added benefit of knowing that the software is running properly since the high wind led and lightning led will flash. If these were to stop flashing than an error has occurred for some reason and the map needs to be restarted.
  • Flight Category with High Winds and Lighting along with Reported weather. This would require 12 LED's to be used in the legend and may be a bit unwieldy but is vary doable. As an alternative the legend could simply have a written description of the reported weather and not use an LED.

Once a decision has been made on what type of legend will be used, the pin numbers associated with the LED's of the legend must be filled out next to the appropriate Legend item. If there are legend items not used, just put a 0 or any number as a place holder. They will be ignored, just don't leave them blank.

Another important note; when a decision has been made on the type of legend, the 'airports' file must be adjusted with 'LGND' associated with the same pin number filled in here in the settings. So for example, if the basic Flight Category Legend is to be used, and the LED pins are 0, 1, 2, 3, 4 then in the 'airports' file, the builder must match each pin number with 'LGND'. (0 - LGND, 1 - LGND, 2 - LGND, 3 - LGND, 4 - LGND, 5 - KPHX, 6 - KSEZ etc.) This can be done by using the Airport Editor.

LCD and OLED Display Settings
If the builder has decided to incorporate either an LCD or OLED display to the build then this section must be adjusted. It is recommended to choose one or the other display, but not both. While technically they both can be run, the result will be kludge.

The LCD display used and tested is a 16x2 LCD wired in 4 bit arrangement. This page will provide a great tutorial for wiring one up. Be sure to follow the instructions for wiring it in 4-bit mode as the software was written assuming this wiring scheme. 8-bit mode and I2C is NOT supported. The brightness of the LCD display is not software controlled like the OLED display is, so the use of a potentiometer is suggested.

The OLED display has a crisper and cleaner look and is preferable over the LCD in most cases. The software has been written to support the use of a single OLED display or multiple displays up to a total of 8. The display used and tested is a 0.96″ I2C IIC Serial 128X64 OLED Display Module using the SSD1306 chip. They are plentiful and quite inexpensive. One note; the glass on the bottom corners of these displays are unsupported and can crack. If this happens it will render the OLED inoperable. A small dot of UltraViolet activated glue under each corner will make it far more robust. This page does a good job of detailing use of an OLED. The builder will be interested in the wiring and not the software installation since the image already has been setup with the proper software.

If more than one OLED display is to be used, then it will be necessary to add a TCA9548A I2C Multiplexer. A multiplexer will allow one connection from the RPI to be properly distributed to multiple OLED displays. The multiplexer can accommodate up to 8 OLED displays. This page will cover many of the details about using a multiplexer. Again, the software is already included with the image so need to be concerned about installing software.

When building, its highly suggested that a single OLED be used first to ensure the wiring is correct and display functions properly before adding the Multiplexer and multiple OLEDs. Building multiple OLEDs on a breadboard along side of the multiplexer is relatively easy but does require some soldering. 

The specific settings in this section are obvious however there are few to discuss.

Number of Airports to Display - This is the number of airports to display wind speed and direction for. This can be as high as the number of airports in the map, but typically a number of 5 to 10 airports is desirable otherwise it will take very long to cycle through all of them.

Display Only Above kts - This is a nice feature that will only display those airports whose winds are above that specified in 'Basic Settings' and will match the LED's that will blink for high winds.

OLED Invert Display - This will cause the OLED display to show black text on a white background. This offers a different look if desired. This feature can be used to alternate the display between invert and non-invert if desired.

OLED Welcome Message - If a welcome message is desired, the text is to be entered here and must include the quotes on either side. The length of the message is truly unlimited, however the longer the message the longer it will take to scroll through it. A message of up to 6-8 words is best. This is a great feature for businesses to welcome their customers. The message is repeated each time the FAA weather is updated.

As you can see there are many settings that can be played with. The builder is encouraged to try different things to find what works best. As a reminder, there are some settings that can conflict with each other so pay attention.

Save and Map Control Buttons
The bottom of the screen contains a number of buttons that allow the user to save and control the map.

  • 'Save Airports' - Any changes made must be stored in the 'airports' file by clicking this button. No changes are saved until this button is pressed.
  • 'Shutoff Map' - As the name suggests, if the map is running this button will turn it off. It does not reboot or power down the RPI.
  • 'Edit Settings' - This will take the user to the configuration editor. Be sure to click 'Save Airports' first to save any changes made.
  • 'Reboot Map' - This button will cause the RPI to go through the reboot process. This is a good option if things are not working as expected.
  • 'Startup Map' - This will run the Live Sectional map and turn on the LED and displays if used. 
  • 'Help' - Brings the user to this help page.
  • 'Shutdown RPI' - This will shutdown the raspberry pi safely.
  • 'DL config.py' - This will download the 'config.py' file from the RPI to the local computer. Good for backup, or editing outside of this editor.
confedit2

   
Quote
 Juls
(@juls)
Active Member
Joined: 5 years ago
Posts: 5
 

I just used the GUI for the first time. I downloaded the "livesectionalv3_final_release.img" version today.

1) My gui doesn't have the 'DL config.py' as a button on the display.

2) how to get back to the main page from Edit Airports config page once I am done editing the airports?

 

Thanks!


   
ReplyQuote
 Bill
(@liveadmin)
Member Admin Registered
Joined: 5 years ago
Posts: 0
 
Posted by: @juls

I just used the GUI for the first time. I downloaded the "livesectionalv3_final_release.img" version today.

1) My gui doesn't have the 'DL config.py' as a button on the display.

2) how to get back to the main page from Edit Airports config page once I am done editing the airports?

 

Thanks!

Hi @juls

1. The DL Config.py button is coming out in V3.0.1 due out at the end of this week.  It also includes the ability to DL your airport file.

Both of these options are just for archival purposes and don't directly relate to setting up your LiveSectional.

2. To go back to the main page click on the "Edit Settings" button at the bottom.

 

Does this help?

 

Thanks,

Bill


   
ReplyQuote
 Juls
(@juls)
Active Member
Joined: 5 years ago
Posts: 5
 

Thanks, I’ll check it soon. I’ve started doing my wiring for Basic setup and going at it slow since I don’t know what I’m doing. 😀 


   
ReplyQuote
 Juls
(@juls)
Active Member
Joined: 5 years ago
Posts: 5
 

Yes, that worked using the Edit settings! Thanks!


   
ReplyQuote
(@rileyjc)
New Member
Joined: 2 months ago
Posts: 2
 

So, I have been messing around with this for quite a while now and I can not get it to work.  Currently I have it set up on a bread board with just the level shifter wired exactly how the how it shows on the site.  The LED strand will only blink and each LED changes between blue, red, green and pink constantly.  Currently it is on a RPI zero 2W.  I have tried a zero w, 3B and 4B all with freshly flashed cards.  I have changed the level shifter.  I have even purchased another string of lights.  As far as the settings go I have everything switched off, no transition, no blink for lightning, high winds, etc.  I have it as basic as I can get it but I can't get it to function correctly and I am sure there is something I am just overlooking.  If I turn the map off and try to select all on, all off, individual LED's I only get a spinning wheel on my browser.  If I select the LED test script they cycle through all the colors.  Currently at my selected airports the weather is VFR with one not reporting and one LIFR yet the LED's are still cycling through green, blue, red and pink. What am I missing?


   
ReplyQuote
Share: