kf7eel / hbnet

HBNet is a fork of HBlink that includes a web GUI, APRS, SMS decoding, and other features.
https://hbnet.xyz
GNU General Public License v3.0
45 stars 23 forks source link

D-APRS Dashboard #15

Closed kf7eel closed 3 years ago

kf7eel commented 3 years ago

Similar to lastheard, but for APRS locations. Will also feature a bulletin board feature, usable via SMS.

kf7eel commented 3 years ago

Added initial commit with configurable HTML template.

picchiosat commented 3 years ago

Hi Eric, great idea, but how can I define an IP other than 127.0.0.1?

kf7eel commented 3 years ago

Yes, I have that fixed, just haven't committed yet.

picchiosat commented 3 years ago

yep

kf7eel commented 3 years ago

Just committed change

kf7eel commented 3 years ago

I'll do a write up about the bulletin board in a few days. It will display anything sent with the SMS command @BB.

@BB This is a test" would be displayed on the dashboard. BB must be uppercase, it is not being displayed here.

picchiosat commented 3 years ago

Fantastic ... it works great !!!

kf7eel commented 3 years ago

Fixed a few bugs and changed page layout. See last commit.

kf7eel commented 3 years ago

Heads up, new line required in dashboard_settings as of last commit. See example.

kf7eel commented 3 years ago

Yet again, additional settings in dashboard_settings after last commit.

picchiosat commented 3 years ago

I found that if the user is not registered in user_setting.txt the APRS data does not appear in the dashboard but is transmitted on aprs.fi.

kf7eel commented 3 years ago

I can confirm that aprslib is not parsing the packet correctly, causing it to not be uploaded. May be an issue with lat/lon format. Will look at it this week.

IW5EDX commented 3 years ago

hi Eric, after many tests the only 2 bugs found are: the sending of emails as posted with the logs on "test email" issues. and the inability to transit with aprs beacons by users not registered via text messages on the software. thanks again for all this wonderful project. See you soon. 73 'Andrea IW5EDX.

kf7eel commented 3 years ago

I think the email error is happening due to something between the python smtp library and your email provider. Who is your email provider?

Any radio should be able to send a position, not just DMR IDs in the user_settings.txt file, what conditions are causing this to occur and do you have any logs from this?

IW5EDX commented 3 years ago

Hi eric, the mail provider is gmail.com

practically if a user not registered and therefore not present in the user_setting.txt file sends a position, the log it generates is the following:

INFO 2021-03-05 18:26:10,969 Data block from IW5EDX. DMR ID: 2225846INFO 2021-03-05 18:26:10,969 b'0001000000277e277e244750'
INFO 2021-03-05 18:26:11,332 18:26:11 - 03/05/21 INFO 2021-03-05 18:26:11,332 Block #: -2 INFO 2021-03-05 18:26:11,332 Data block from IW5EDX. DMR ID: 2225846INFO 2021-03-05 18:26:11,332 b'2c2c2c412a36370d0a000000' INFO 2021-03-05 18:30:43,671 18:30:43 - 03/05/21
INFO 2021-03-05 18:30:44,084 18:30:44 - 03/05/21 INFO 2021-03-05 18:30:44,085 Block #: -3 INFO 2021-03-05 18:30:44,085 Data block from IW5EDX. DMR ID: 2225846 INFO 2021-03-05 18:30:44,085 b'524d432c3031353835372e30'
INFO 2021-03-05 18:30:44,448 18:30:44 - 03/05/21 INFO 2021-03-05 18:30:44,448 Block #: -4
INFO 2021-03-05 18:30:44,448 Data block from IW5EDX. DMR ID: 2225846I NFO 2021-03-05 18:30:44,448 b'000000000000000077e67b49' INFO 2021-03-05 18:35:36,530 18:35:36 - 03/05/21
INFO 2021-03-05 18:35:36,943 18:35:36 - 03/05/21 INFO 2021-03-05 18:35:36,944 Block #: -5 INFO 2021-03-05 18:35:36,944 Data block from IW5EDX. DMR ID: 2225846 INFO 2021-03-05 18:35:36,944 b'524d432c3031353835372e30'
INFO 2021-03-05 18:35:37,306 18:35:37 - 03/05/21 INFO 2021-03-05 18:35:37,307 Block #: -6 INFO 2021-03-05 18:35:37,307 Data block from IW5EDX. DMR ID: 2225846 INFO 2021-03-05 18:35:37,307 b'000000000000000077e67b49'

the radio and the bridge are the same with which everything works fine with a registered user, simply changing the user on the radio, and not being registered, the result of the logs is this. And there is no trace on the dashboard, nor on aprs.fi See you soon. 73 'Andrea.

IW5EDX commented 3 years ago

Here is the log of the email following the first one that is forwarded correctly:

Received SMS from I5NOD, DMR ID: 2225049: morenocl@tin.it E-ciao
INFO 2021-02-28 22:08:41,656 Email to: morenocl@tin.it
INFO 2021-02-28 22:08:41,656 Message: ciao
INFO 2021-02-28 22:08:41,656 Failed to send email.
INFO 2021-02-28 22:08:41,656 getaddrinfo() argument 1 must be string or None INFO 2021-02-28 22:08:41,658 [<FrameSummary file /SERVER-HB-LINK-MDM033/HBlink3/gps_data.py, line 254 in process_sms>, <FrameSummary file /SERVER-HB-LINK-MDM033/HBlink3/gps_data.py, line 185 in send_email>, <FrameSummary file /usr/lib/python3.7/smtplib.py, line 1031 in init>, <FrameSummary file /usr/lib/python3.7/smtplib.py, line 251 in init>, <FrameSummary file /usr/lib/python3.7/smtplib.py, line 336 in connect>, <FrameSummary file /usr/lib/python3.7/smtplib.py, line 1037 in _get_socket>, <FrameSummary file /usr/lib/python3.7/socket.py, line 707 in create_connection>, <FrameSummary file /usr/lib/python3.7/socket.py, line 748 in getaddrinfo>]

IW5EDX commented 3 years ago

Hi Eric, doing this last update, the rss-FEED button on the "dashboard home" page is no longer functional. In addition, the aprs beacons are no longer displayed on the "dashboard home" page. 73 'Andrea IW5EDX.

kf7eel commented 3 years ago

What does the gps_data.py log show for a location? Let's also look at your bulletin board file.

IW5EDX commented 3 years ago

Hi Eric, This the log of gps_data.py for aprs beacon:

INFO 2021-03-11 18:49:28,292 GPRMC location
INFO 2021-03-11 18:49:28,293 Latitude: 4348.9600N Longitude: 01041.1700E Direction: 121.0 Speed: 0.0 INFO 2021-03-11 18:49:28,305 I5NOD-9>APHBL3,TCPIP*:@174928h4348.96N/01041.17E[121/000/HBLink3_CORE_IT_MULTI_NET GPS Decode - DMR ID: 2225049
INFO 2021-03-11 18:49:28,305 User comment: HBLink3_CORE_IT_MULTI_NET GPS Decode - DMR ID: 2225049 INFO 2021-03-11 18:49:28,305 User SSID: 9
INFO 2021-03-11 18:49:28,305 User icon: /[ INFO 2021-03-11 18:49:28,306 Attempting connection to 10.0.0.10:14580
INFO 2021-03-11 18:49:28,307 Connected to ('10.0.0.10', 14580)
INFO 2021-03-11 18:49:28,322 Sending login information
INFO 2021-03-11 18:49:28,322 Login successful INFO 2021-03-11 18:49:28,322 Packet sent to APRS-IS. INFO 2021-03-11 18:49:28,336 User location saved for dashboard

the log seems to be right ... but then the transit doesn't show up in dash. Pressing the rss-feed button instead, this error appears:

an integer is required (got type str)

archive files in /tmp.... should be deleted?

73' Andrea IW5EDX.

IW5EDX commented 3 years ago

if it can be used to see the web page it is public at this address:

http://46.226.178.85:8092/

IW5EDX commented 3 years ago

Hi Eric, we did further tests, deleting the 2 files: /tmp/gps_data_user_bb.txt / tmp / gps_data_user_loc.txt the result in dashboard home is the following: rss-feed button bullettin e bullettin- board ok 👌 the aprs beacons of the users present in the "user_settings.txt" file pass to the aprs-is server successfully, but this beacon is not saved in the "/ tmp / gps_data_user_loc.txt" file and therefore is not displayed in the "Last Known Location" section on the dashboatd home web page. The beacons of users that are not present in the "user_settings.txt" file are not displayed on the dashboard home page and also do not even go to the aprs-is server, the log of these last users is as follows:

INFO 2021-03-11 23:36:23,139 23:36:23 - 03/11/21
INFO 2021-03-11 23:36:23,502 23:36:23 - 03/11/21
INFO 2021-03-11 23:36:23,502 Block #: -1
INFO 2021-03-11 23:36:23,502 Data block from IW5EDX. DMR ID: 2225846 INFO 2021-03-11 23:36:23,502 b'0001000000277e277e244750'
INFO 2021-03-11 23:36:23,915 23:36:23 - 03/11/21
INFO 2021-03-11 23:36:23,915 Block #: -2
INFO 2021-03-11 23:36:23,916 Data block from IW5EDX. DMR ID: 2225846 INFO 2021-03-11 23:36:23,916 b'0000000000000000a99b2fcc'
INFO 2021-03-11 23:37:26,856 23:37:26 - 03/11/21
INFO 2021-03-11 23:37:27,218 23:37:27 - 03/11/21
INFO 2021-03-11 23:37:27,219 Block #: -3
INFO 2021-03-11 23:37:27,219 Data block from IW5EDX. DMR ID: 2225846 INFO 2021-03-11 23:37:27,219 b'0001000000277e277e244750'
INFO 2021-03-11 23:37:27,581 23:37:27 - 03/11/21
INFO 2021-03-11 23:37:27,582 Block #: -4
INFO 2021-03-11 23:37:27,582 Data block from IW5EDX. DMR ID: 2225846 INFO 2021-03-11 23:37:27,582 b'2c2c2c412a36370d0a000000'
INFO 2021-03-11 23:38:00,037 23:38:00 - 03/11/21
INFO 2021-03-11 23:38:00,400 23:38:00 - 03/11/21
INFO 2021-03-11 23:38:00,400 Block #: -5
INFO 2021-03-11 23:38:00,400 Data block from IW5EDX. DMR ID: 2225846 INFO 2021-03-11 23:38:00,400 b'0001000000277e277e244750'
INFO 2021-03-11 23:38:00,813 23:38:00 - 03/11/21
INFO 2021-03-11 23:38:00,814 Block #: -6
INFO 2021-03-11 23:38:00,814 Data block from IW5EDX. DMR ID: 222584 6INFO 2021-03-11 23:38:00,814 b'0000000000000000a99b2fcc'
INFO 2021-03-11 23:38:33,998 23:38:33 - 03/11/21
INFO 2021-03-11 23:38:34,361 23:38:34 - 03/11/21
INFO 2021-03-11 23:38:34,361 Block #: -7 INFO 2021-03-11 23:38:34,362 Data block from IW5EDX. DMR ID: 2225846 INFO 2021-03-11 23:38:34,362 b'0001000000277e277e244750' INFO 2021-03-11 23:38:34,775 23:38:34 - 03/11/21 INFO 2021-03-11 23:38:34,775 Block #: -8

we await your control. 73 'Andrea IW5EDX.

kf7eel commented 3 years ago

Fixed a missing line of code that prevented writing user locations to the dashboard. Still working on the user_settings issue.

kf7eel commented 3 years ago

There have been 2 reports of this issue. I'll add code to add all DMR IDs seen to user_settings.txt. This will make other functions of this application better, in addition to hopefully solving this bug. I'll be making a code change here soon.

IW5EDX commented 3 years ago

Hi Eric, after many tests and trials, with today's latest update, I believe that finally all the problems mentioned on this Issues have been solved !!!! As for the passage of unregistered users, we found that your sw is perfect! The problem is in the configuration of the radio anytone 878, in fact by configuring the correct callsign in the anonymous field under the "analog aprs" menu everything works perfectly in this way:

1) unregistered user: the aprs passes on the aprs-is server and the transit is also present in the dashboard / map.

2) registered user (present in the users_setting.txt file): the aprs passes on the aprs-is server and the transit is also present in the dashboard / map. In this case it is obviously possible to access all the functions of the dashboard.

I would say that we could also close this issues .... as everything works in its entirety !!!

Now we are going to do some tests to find the problem about sending emails .... Issues "Test-email".

Thanks again Eric, for the wonderful project and the immense work !!! See you soon. 73 'Andrea IW5EDX. 👍😉👍