Learn R Programming

PurpleAir (version 1.1.0)

find_local_pam: find purple area monitors on a local network

Description

All IP addresses within the network are pinged to possibly return a purple air monitor sensor ID.

Usage

find_local_pam(network_prefix = "192.168.1", timeout = 1)

Value

a list of purple air monitor IP addresses named according to their Sensor IDs

Arguments

network_prefix

character string; base IPv4 prefix (first three octets) used to generate IP addresses

timeout

numeric; number of seconds to wait for each ping

Details

If the mirai package is available, this function will ensure that at least version 1.1.0 of the purrr package is installed to scan the network in parallel, according to mirai::daemons() set by the user. This reduces the time it takes, but does not use a progress bar.

Examples

Run this code
if (FALSE) {
mirai::daemons(12)
find_local_pam()
mirai::daemons(0)
}

Run the code above in your browser using DataLab