Spotnik2hmi

Uit Projectgroep .540
Ga naar: navigatie, zoeken

Copy/paste/vertaald van frans naar engels, nog zonder korrectie , er staan nog wat onbegrijpelijke vertalingen in...

voorbeeld: Nous avions (wij hebben) in het engels: we airplanes...avions is ook vliegtuigen...

ik zal de tijd nemen om alles te korrigeren

Het project en installatie

Hmi001.png

Hamradio RRF Network Software for Nextion and Spotnik

Hmi002.jpeg

HISTORICAL

The project was born on an idea of ​​Dimitri F5SWB, Toufik F0DEI came to help Dimitri by proposing the first scripts to communicate with the Nextion screen. The project was to add an Nextion screen to the distribution of the Spotnik distributed by F5NLG. I joined the group to give a hand to finalize the project. A great experience of a collaborative work, which after 2 weeks already offered 90% of the final features.

Spotnik2hmi is used to manage an Nextion type screen on a Spotnik (RRF network analog hotspot). For more information visit: https://f5nlg.wordpress.com/category/hotspot/

ENJOY;)

THE TEAM

Hmi003.jpeg

THE WIRING

Raspberry Pi Wiring:

Hmi004.jpeg

Orange Pi Zero cabling:

Hmi005.jpeg

There is 2 pin with 5V for you to choose the one you want to use

On USB port:

Hmi006.jpeg

On SVXCARD card:

Hmi007.jpeg

SOFTWARE INSTALLATION

This documentation considers that you are leaving from the installation of an image of Spotnik 1.9 available on the F5NLG website and functional on Raspberry or Orange Pi.

Download the install.sh file

ask hans for the link...it is still in beta version.

Make it executable with the command:

chmod +x install.sh 

type:

 ./install.sh 

It remains only to be guided, to choose, use the arrows and the spacebar to select then the enter key to validate.

First part installation of the script: Choose SPOTNIK2HMI with the space bar and validate by pressing the tab key to select Ok then the Enter key. The installation of the script will be done.

Restart the ./install.sh and this time choose NEXTION

The Nextion choice allows programming the Nextion screen directly from the script, the loading takes about 10min. The simple protocol used for file transfer can lead to transmission interruptions. You can also choose to put the .tft file directly into an SD card and put it on the screen reader. It is absolutely necessary to know the port on which is connected the screen and the type of screen (see on the back of this one)

Once everything is done, reboot the system by typing:

reboot 

INSTALLATION SOFTWARE INTERFACE

Hmi008.png


Hmi009.png


Hmi010.png


FAQ It does not work.

Read carefully, the lines that follow are made for you, understand that with only three words, it will be difficult for us to help you. During the installation, I have information that tells me that I do not have enough space available.

Check that you have extended the image: type raspi-config -> choice 7 advanced option -> 1 expand Filesystem. Use an appropriate SD card. My screen is still on the first boot page.

Check in the file /etc/rc.local (startup file) that the launch of the script is there. Start the script by hand to see if the communication is operational.

sudo python /opt/spotnik/spotnik2hmi/spotnik2hmi.py (choix du com) (vitesse) 

How can I check which error is causing the spotnik2hmi script to crash?

You have to run the script manually in ssh from a console. Enter the command

sudo python /opt/spotnik/spotnik2hmi/spotnik2hmi.py (choix du com) (vitesse) 

You will have all the controls in monitoring. I enter the information through the ssh menu but they do not appear in the Nextion or they are different.

The information displayed on the Nextion is taken from what is entered in the GUI web interface of the spotnik 1.9 distribution. The script crashes or does not work when I change my living room (tec / fon):

Check that the dashboards are functional:

   RRF: http://rrf.f5nlg.ovh
   TEC: https: // IP address of the hotspot or on http://rrf.f5nlg.ovh:82
   FON: http://fon.f1tzo.com:81 

What is the loading time of the file on the Nextion screen?

If we use the menu the loading time is about 10min depending on the type of screen.The interest of this installation is that it is simple and that it allows you to validate that the screen communicates well with your system. To save time, it is possible to copy the .tft file to a micro SD card and insert it on the card reader. The installation will start automatically. The .tft files are in the directory / opt / spotnik / spotnik2hmi / nextion / after installation. You can also find them on Github or the project is hosted there (directory nextion). My screen does not react or the commands are not taken into account?

There may be a scripting problem, rebooting your installation. The simple way is to look at the time on the page, the script updates it, if it is not in phase, it is that the script is stopped. I'm on a Raspberry Pi 3B or B + and I can not program the screen despite all the wiring is good.

The bluetooth takes over the link and prevents the use of the port.It must turn off the bluetooth. Here is the command:

sudo echo "dtoverlay=pi3-disable-bt" >> /boot/config.txt<br 

followed by

sudo reboot 

I am on Orange Pi Zero, the screen has been programmed, but it remains on the start page

It is likely that the problem is related to the fact that the GUI is not launched. If in doubt, enter the following commands:

cd /opt/spotnik/gui make restart 

I run the script by hand and I receive an error

Hmi011.png

When you start the script the port and speed are variables that must be specified. the port can be ttyS0 (Orange Pi) or ttyAMA0 (Raspberry Pi) or ttyUSB0 (USB / serial adapter). An example in the image above for launching on Raspberry wiring on GPIO.

How to update my spotnik2hmi script and my screen?

Just go to the directory of the script / opt / spotnik / spotnik2hmi / and start the command

git pull 

However it will be necessary to update the program of the screen if it has evolved. To do this restart the installation procedure and choose only the part nextion. This will overwrite the old automatic version when loading into it. I see a latency before the code appears on the screen.

The script will read the page of the Dashboard to extract the call sign, your quality of Internet connection and the processing time explains this latency

Operating Manual

The necessary equipment:

An Nextion screen that can be connected directly to the GPIO or USB port through a connection. A dedicated page will soon be available to explain the connections of the installation. The project started on a 3.5 "screen. Other screens will soon be available, it remains a big work of graphic adaptation for the different format and for the smaller screen of 2.4 "a remodeling of the interface.

Presentation of the HMI interface ( H uman M achine I nterface)

The Boot Page:


Hmiboot.jpg


It starts when powered on or during a restart. It's the script that makes it disappear. If it does not disappear, it means that your script is not correctly set.

The Traffic page:

Hmi000.png

This is the first page at the start of the system, on the top you will find your call sign, here (987) FK8ABC V, the lounge on which you are connected and the station heard, here (999) FR8HM V. We find everything in down the last 2 stations heard. Green LED network reception, LED red local reception To access the menu simply press the screen on your callsign.

The Menu page:

This menu page will allow you to access different functions: The #RRF #FON #TEC buttons allow you to change the SALON. The change will be made as soon as it is supported and you will switch to the traffic page.

  1. ECHOLINK will allow you to go to Echolink so far, there are problems connecting to integrate this function. It will not be available immediately.
  1. Weather will send you directly to the weather page and send the DTMF code for the bulletin broadcast. Description later in the article.

Dashboard will show you the last 12 stations heard

WIFI Allows you to enter directly on the screen your wifi access and password

Screen Icon Will show you the system page.

Icon I will show you the system information

The parrot launches the parrot option, so far, it is not validated on the different RRF show.

The echolink page:

This is just a preview, but it is not available on the current version. The Echolink button will be dimmed and inactive.

The Meteo page:

This page displays the weather data, resulting from the information you filled in the Spotnik GUI, configuration tab. He will automatically search for the name of the corresponding city to display it and the associated weather data. The icon at the bottom right allows to choose between 4 wallpapers, I'll let you discover 😉

The dashboard:

You will see on this page, the 12 stations heard by the Hotspot on the network. A tap on the screen will return you to the traffic page.

The info page:

On this page you will find Hotspot info with the frequency (frequency rx of the web page Spotnik 1.9) and especially the IP address. This can be useful if you want to connect in ssh or web on the Hotspot. We find the use of the SD card and the temperature of the processor. By pressing the QRcode you will have additional information. By pressing the screen you will return to the menu page.

The wifi page:

When viewing this page, it will search for the current codes and display them. By clicking on the pencils on the side you will have access to a keyboard to write your new wifi access point and password.

Here is the preview of the typing keyboard.

Below a small video of operation:

It is important to emphasize that the seizure system behaves exactly like the web interface and writes in the same place in the system configuration. The change will be immediate after the passage of a confirmation page.

The system page:

On this system page you will be able to perform software restart operations with the Restart button , complete reboot with the reboot button , and total shutdown with the stop button. Followed by a confirmation page.

The Home button brings you back to the menu page.

You can adjust the backlight level of the display with the linear potentiometer .

The ON / OFF button allows you to set the time of the screen saver followed by its activation. Just select the time and it will be activated. The backlight will turn off, a simple press will reactivate it.

Conclusion: Some Oms will now receive the necessary files, to do the different tests. We will then communicate in an article the complete tutorial to realize the installation. If you have a 3.5 "screen and want to be part of the Betas Tester make contact.

I wanted to thank the Team: F0DEI for Python + Nextion code support F5SWB who realized all the graphic part of the Nextion.

Thanks also to F5NLG for the work done on the RRF.

This collaborative project shows the power of group work, finalization of the project in less than 3 weeks, it is a pity that it is not more common among OMs. There are often photos or images of achievements without a complete description of the project.

As for me, I am neither an electronics engineer nor a programmer ... other Oms are much more competent than me, and yet .... I would like this experience to give ideas to other working groups.

All the codes will be made available, as soon as the tests are validated. Nextion files will be available in .tft until finalization of all screen formats.

Previewing the installation interface: