i know of three generic protocols that you will see in weewx drivers and uploaders:
- http(s)
- udp broadcast
- mqtt
as for the payload encoding, there are at least:
- json
- name/value pairs (e.g., uri encodings or just plain text)
if you use json you should consider:
- how to handle grouping of observations (sensor_map can probably take care of this)
- how to handle partial packets (one observation per message vs many observations in a message vs 'all' observations in a message)
- dealing with None/NULL
there are many other proprietary protocols and message encodings (some openly published, many reverse-engineered).
when i wrote the weewx-interceptor i imagined that i could write a single driver that would work with any weather station that sends data via tcp/ip. it turns out that while that might be possible, there are huge variations in protocols (not to mention firmware bugs) that make it difficult to do that generically. the lacrosse gw1000 is a case in point - totally different from any other tcp/ip device. the os lw30x are another example - they use http like many others, but their encoding is different. and the acurite hardware is yet another fine example - it started using proprietary encodings with http GET, then added 'standard' wu encodings, then changed the proprietary encodings to sorta look like wu encodings.
you will probably have to say "this is the way to encode data using json, and this is the way to use the http/https/mqtt/udp protocol. if your sensor emits data in this way, then this weewx driver can receive it"
but hopefully you can design that so simply that anyone would be foolish to not use your design
m