Sometimes, an end-user finds it necessary to put the purple air sensor behind something that does port forwarding and port translation across a network address translator (NAT), with the weewx-running computer located outside of the NAT. In this case, the NAT device may translate a request to (made up global address) "1.2.3.4 port 1000" to local device (made up local address for Purple Air device ) "192.168.1.101 port 80" because that same NAT device may already be sending port 80 requests to another machine inside the NAT, or the end user may believe it's unwise to open up port 80 on port forwarding NAT for any reason. To handle this case, having weewx-purpleair being able to specify the port number, so the request goes to "http://1.2.3.4:1000/json" is very handy. These changes add this capability.
Sometimes, an end-user finds it necessary to put the purple air sensor behind something that does port forwarding and port translation across a network address translator (NAT), with the weewx-running computer located outside of the NAT. In this case, the NAT device may translate a request to (made up global address) "1.2.3.4 port 1000" to local device (made up local address for Purple Air device ) "192.168.1.101 port 80" because that same NAT device may already be sending port 80 requests to another machine inside the NAT, or the end user may believe it's unwise to open up port 80 on port forwarding NAT for any reason. To handle this case, having weewx-purpleair being able to specify the port number, so the request goes to "http://1.2.3.4:1000/json" is very handy. These changes add this capability.