Today I saw a post on another related website that I thought was a great idea, but poorly implemented, I also had a number of "issues" with it. The first being that the files are not available if you are not a member of the group. Second it was stated that it was a "Nextion Driver test" when actually it tests both Nextion Driver related fields and the regular ones sent by MMDVMHost. Another issue I had is he only wrote his file for 3.5 inch basic screens. And lastly it has errors, even after all of the digging he did through the documentation, he missed some text fields.
So, I thought about it and said, I can do that. I'll make a .hmi file really quick that does ALL the following:
- Is available to download by pi-star forum users.
- able to openly view, study, modify and build upon. (not in a .tft format where you can purposely keep your code hidden (booo.... insert closed source code rant here))
- works for any Nextion screen model, orientation and series (basic, enhanced or intelligent), simply set the device and orientation after you load it in the editor.
- has ALL the correct fields for MMDVMHost and the Nextion Driver 1.17 (as of 10/15/2019)
- has no hidden text caching, timers, or complex display manipulation, so what is sent to the Nextion is EXACTLY what is displayed (serial errors might be included).
- is small and compact, so it flashes very fast, no fancy graphics, just plain black and white text.
In the upper right corner you will see MMDVM status value: XX. This is a simple way to identify which field was just updated. It might be difficult to catch it get updated, if a number of messages were sent rapidly, it will always overwrite and display the most recent value that was sent.
On some pages you will see a "Nextion Driver Only:" section. Below that are fields that only the Nextion Driver will write to (MMDVMHost doesn't use them), so if you don't have the Nextion Driver installed they will always remain blank. msg, msg1, and msg2 are used for responses from touch commands and advanced processes, I am including them (since I said I wanted to make sure I included ALL the fields correctly), but with the limited amount of screen space I am just going to leave those out, if you want examples of how those work there are plenty of .HMI files on PD0DIB's github you can view for examples.
On the DMR page you will see two columns those are grouped together because the left column is for TS1, and the right column is for TS2. You might not see all the characters due to the limited display space available, that DOES NOT mean they were NOT sent.
I got the listing of the text fields from parsing the most current source code (both MMDVMHost and NextionDriver), NOT the documentation, that is why on certain pages things are not in numerical order, it is because that is the way it is written in the code, I mimicked the order they are sent and used the same structure from top to bottom.
Instructions on how to use:
Code: Select all
Download, and unzip load the .hmi file in the Nextion Editor v.58 set the device type set the orientation compile and create the .tft file load the .tft file onto a SD card, or upload it onto the Nextion using a serial adapter enjoy, learn and be creative
This way you can physically watch what was just sent to your screen, no hidden smoke and mirrors magic. You can take that .hmi file and rearrange the text fields to your liking and insert a picture in the background and build your own .hmi and then show it off to the world. Or if you see that a .hmi file you want to use is missing certain text fields, you can add the missing ones to it. Do whatever you want, just don't rely on the people that won't SHARE their work by only making the .tft file available to download, and don't be one of those people who won't SHARE either.
I don't want this thread to become a "I can't get it to work" tech support section, so if you have troubles please by all means make a seperate thread in the Nextion area of the forum and I'm sure I'll respond to it or at least Toshen will if he beats me too it. I'll be more than happy to help. If you find mistakes in my documentation, then by all means speak up and point them out. I compiled all this data on the fly tonight, I'm sure I accidently skipped over something. If you'd like to discuss things or have questions, they by all means ASK.
I'm curious as to how many times this will be downloaded (my guess is probably less than 250 times).
(if you do plan on using this .hmi to build your own screen, you can just delete the n0 field and any zXX text fields, I just renamed them that so they wouldn't conflict with txx fields and be overwritten and so I could set what text I wanted them to display all the time.) Leave the S0 touch hotspot intact but clear out the code in it (n0.val=MMDVM.status.val)
I hope you find this useful and as interesting as I do.
Good luck, and have fun.
Code: Select all
Page names ----------------------------- -.- . --... ..-. -. ... ----------------------------- 1 : page MMDVM 2 : page DStar 3 : page DMR 4 : page YSF 5 : page P25 6 : page NXDN 7 : page POCSAG MMDVM Status values ----------------------------- -.- . --... ..-. -. ... ----------------------------- 0 : bkcmd (nextion command to stop all success/failure messages over the serial port) 11 : IDLE 12 : CW Ident 13 : ERROR text 14 : ERROR 15 : LOCKOUT 16 : IPaddress 17 : ID/Call (t0 and if layout >2 t4,and t5 are sent also) 19 : END 20 : RX Frequency 21 : TX Frequency 22 : Temperature 23 : Location 24 : Nextion Driver extra info update (t3, t20, t21, t22, cpuload, t23) 41 : D-Star listening 42 : type/my1/my2 45 : your 46 : reflector 47 : RSSI 48 : ber 61 : DMR listening1 62 : ID1 63 : TA1 64 : Call end1 65 : TG1 66 : RSSI1 67 : ber1 68 : User data TS1 (t18,19,20,21,22) 69 : DMR listening2 70 : ID2 71 : TA2 72 : Call end2 73 : TG2 74 : RSSI2 75 : ber2 76 : No longer used? 77 : No longer used? 78 : User data TS2 (t13,14,15,16,17) 81 : YSF listening 82 : src 83 : dest 84 : origin 85 : RSSI 86 : ber 101 : P25 listening 102 : source 103 : dest 104 : RSSI 105 : ber 121 : NXDN listening 122 : source 123 : dest 124 : RSSI 125 : ber 132 : RIC 133 : message text 134 : waiting Fields ----------------------------- -.- . --... ..-. -. ... ----------------------------- MMDVM t0 : owner call & ID / errortext LOCKOUT t1 : status / ERROR t2 : date & time screenLayout >2 : t3 : ip address t4 : owner call t5 : owner ID t30 : RXfrequency t32 : TXfrequency t20 : CPU Temperature in C. ( Can be changed to F in mmdmvhost config setting: [NEXTION] Section, Setting=DisplayTempInFahrenheit=1) t31 : location Nextion Driver only: t21 : CPU frequency (Nextion Driver only) t22 : CPU loadavg 1 min (Nextion Driver only) cpuload : CPU loadavg 1 min (Nextion Driver only) t23 : Disk free % (Nextion Driver only) DStar t0 : type my1 my2 t1 : your t2 : reflector t3 : rssi t4 : ber DMR t0 : src1 id / call / TA t1 : dst t2 : src2 id / call / TA t3 : dst t4 : rssi1 t5 : rssi2 t6 : ber1 t7 : ber2 screenLayout >2 : t8 : talkgroup name TS2 t9 : talkgroup name TS1 t10: No longer used? t11: No longer used? t12: No longer used? t13: CSV lookup data TS2 t14: CSV lookup data TS2 t15: CSV lookup data TS2 t16: CSV lookup data TS2 t17: CSV lookup data TS2 t18: CSV lookup data TS1 t19: CSV lookup data TS1 t20: CSV lookup data TS1 t21: CSV lookup data TS1 t22: CSV lookup data TS1 YSF t0 : type,source t1 : dst t2 : src t3 : rssi t4 : ber P25 t0 : type,source t1 : dst t2 : rssi t3 : ber NXDN t0 : type,source t1 : dst t2 : rssi t3 : ber POCSAG t0 : waiting / RIC t1 : message ----------------------------- -.- . --... ..-. -. ... -----------------------------