Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

voter.html does not colorize the "voted" client #230

Open
Mason10198 opened this issue Jul 23, 2024 · 12 comments · Fixed by #248
Open

voter.html does not colorize the "voted" client #230

Mason10198 opened this issue Jul 23, 2024 · 12 comments · Fixed by #248
Assignees
Labels
bug Something isn't working

Comments

@Mason10198
Copy link

Hopefully a small and easy-to-fix issue - the voter.html does not correctly change the color of the currently "voted" (selected) RX source client. The HTML element that should be green looks like:

<div class="progress-bar progress-bar-striped bg-primary" style="width: 90.14999999999999%">229</div>

Screenshot:

image

Version: Allmon v3 (1.2.1)

@Mason10198 Mason10198 added the bug Something isn't working label Jul 23, 2024
@jxmx
Copy link
Member

jxmx commented Jul 28, 2024

This seems to imply that your voter system is not actually marking the node entry in Asterisk as "voted". @tsawyer are you seeing a problem with any of your voter systems not displaying a green bar for the voted-in feed? I don't have a voter system to test with.

@jxmx
Copy link
Member

jxmx commented Aug 30, 2024

So there appears to be a bug in chan_voter.so that when the winner of a vote is the voter marked as master in voter.conf, then when the status of the voter is polled via AMI the master node is never explicitly marked as "Voted".

Here's a working example. Note "Voted: PLEASANTS":

DEBUG: (asl_allmon.ami_conn) response >> Response: Success  Node: 49371  Voted: PLEASANTS  Client: EOC_VHF Master ActiveMaster  IP: 10.0.1.22:667  RSSI: 255  Client: PLEASANTS  IP: 162.218.152.148:667  RSSI: 255  Client: PIER_VHF  IP: 192.5.222.2:43411  RSSI: 0  Client: EOC_MIX Mix  IP: 10.0.1.23:667  RSSI: 0

Here's an example where EOC_VHF, which is marked as the master, the Voted: attribute is not present:

DEBUG: (asl_allmon.ami_conn) response >> Response: Success  Node: 49371  Client: EOC_VHF Master ActiveMaster  IP: 10.0.1.22:667  RSSI: 0  Client: PLEASANTS  IP: 162.218.152.148:667  RSSI: 0  Client: PIER_VHF  IP: 192.5.222.2:43411  RSSI: 0  Client: EOC_MIX Mix  IP: 10.0.1.23:667  RSSI: 0

The only real possibility without changes to `chan_voter' is to assume that the highest RSSI in any situation where there's a non-zero RSSI is the "voter". I'm not sure if that's a reasonable assumption though. @tsawyer may have an idea?

@jxmx jxmx self-assigned this Aug 30, 2024
@jxmx
Copy link
Member

jxmx commented Aug 30, 2024

@W6HBR
Copy link

W6HBR commented Aug 31, 2024

@jxmx I'm not so sure about your data captures. I did some captures and the only time I don't see the "voted" status is when the receivers are unkeyed. I do see some with "voted" where RSSI is 0, but that seems to always be the last packet before unkeying.

The log below shows "voted" status for both the Pleasants and EOC receivers. I'll do a longer test with a few more keyups, but I want to wait until late night hours so I'm not kerchunking on any listeners.

voter_capture.txt

@jxmx
Copy link
Member

jxmx commented Aug 31, 2024

where are you capturing that output? That is different output then I see on the AMI connection.

@W6HBR
Copy link

W6HBR commented Aug 31, 2024

I created a DotNet util that talks to AMI. It's formatted from my util.

@jxmx
Copy link
Member

jxmx commented Aug 31, 2024

Are you adding the commas?

@W6HBR
Copy link

W6HBR commented Aug 31, 2024

yes, I'm just doing a replace on the embeded \r\n.

@jxmx
Copy link
Member

jxmx commented Aug 31, 2024

I wonder if there's some interesting difference in how python is unpacking the bytes

@W6HBR
Copy link

W6HBR commented Sep 3, 2024

@jxmx Attached is a log capture from our net tonight. This looks to include the voted parameter for all the key ups. I can even see where the voted value switched between receivers during the same transmission (which is normal, especially when someone is moving).
Log-20240902-net-voters.csv

Note that this log is in my CSV format. If needed, I can do another log in the raw format., I'm thinking this issue lies in the python side of things.

@W6HBR
Copy link

W6HBR commented Sep 4, 2024

@Mason10198 This problem seems to only affect the master/activemaster voters due to a mismatch between what is reported as the client name and the voted name. In your case, client = "Client1 Master ActiveMaster" and voted = "Client1".

If you want to do a test if this resolves the issue on your system, you can do a quick edit to the file /usr/lib/python3/dist-packages/asl_allmon/ami_parser/init.py

Remove the semi-colon from line 219. You'll need to restart Allmon3 with: sudo systemctl restart allmon3
This will remove the Master ActiveMaster from the Client1 description, but will be a test to see if this resolves your issue.

image

@tsawyer
Copy link
Member

tsawyer commented Sep 13, 2024

This issue still exists for my "mix" setup. While the receiving station is not "voted" in the true sense, it still should turn green as it did in Allmon2.

Screenshot 2024-09-13 at 8 29 17 AM

@tsawyer tsawyer reopened this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants