caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
10.9k stars 384 forks source link

APRS plugin gives always error: APRS-IS msg is too short #1105

Closed aendes closed 2 months ago

aendes commented 2 months ago

Hello,

i try to use the APRS Notification Plugin Version v1.7.5 in DockerContainer.

I always get the error: WARNING socket_login: APRS-IS msg is too short - needs to have at least two lines Which seems to be a timing issue from the sourcecode of file: In case you receive too many "Rx: APRS-IS msg is too short - needs to have at least two lines" error messages, you might want to increase this value to a larger time span Per previous experience, do not use values lower than 0.5 (seconds) /apprise/plugins/NotifyAprs.py: request_rate_per_sec = 0.8

I am not sure where to edit this file in the Docker Container to adjust the settings? Would it be possible to give this as a parameter to the container? @joergschultzelutter: Maybe you could give some advice?

Thanks for your help

Andreas DO9ABE

joergschultzelutter commented 2 months ago

Hi Andreas

To my knowledge, the value in question is not configurable. For all previous tests, the 0.5 seconds setting was usually plenty of time for receiving the response from the socket server - but I decided to give the setting some additional leeway and add 0.3 secs on top.

You might be connected to a slow(er) APRS-IS server where those 0.8 secs are not enough. For a future-secure solution, I see two options:

@caronc : what is your preferred option?

Thank you!

Joerg / DF1JSL / AE0YP

caronc commented 2 months ago

I am okay with being able to add to the throttle, but not take away from it (so setting it explicityly wouldn't be ideal). But perhaps a ?bo=2 (like back-off), or ?delay=2 which would add 2.0 seconds to the 0.8 as an example. ?throttle= may be misleading (that you're actually changing the under-the-hood parameter which shouldn't be the case).

I pushed a PR just playing with options

joergschultzelutter commented 2 months ago

Thank you Chris; both options ?bo=2 and ?delay=2 sound good to me. There is no need to go for float values which would probably even overcomplicate things.

?throttle= is indeed a little bit misleading.

caronc commented 2 months ago

Merge delay=, It's a float (as i already started it that way), but integers work fine too. I updated the wiki too. Closing this off; it will be part of next release.