UV

UV

Device Compatibility

Overview

The UV driver reports values for:

  • UV Index scale used in the United States conforms with international guidelines for UVI reporting established by the World Health Organization. From UV Index Scale
  • UV Risk scale established by World Health Organization. From UV Index Scale

Available ZeroMQ Ports

  • Base port: 20029
  • Keep-alive port: 20030
  • Error port: 20031
  • Data Update port: 20032
Base Port

This port accepts 2 configurations for communicating with the UV driver.

  • delay_between_updates - controls the output speed of messages from the Data Update port.

  • timeout_after_last_ping - stops sending messages from the Data Update port if nothing has been sent to the Keep-alive port after the specified amount of seconds.

message DriverConfig {
// Delay between updates in seconds
float delay_between_updates = 1;
// Timeout after last ping
float timeout_after_last_ping = 2;
View the defined message here.

Keep-alive Port

This driver needs keep-alive messages in order to send data to your application. It's recommended to send an empty string "" because the contents of a keep-alive message are never read.

Error Port

Applications can subscribe to this port to receive driver related errors.

Data Update Port

Applications can subscribe to this port for UV data. The output will be a serialized message of type UV with the following information.

message UV{
// UV index.
float uv_index = 1;

// Risk of harm from unprotected sun exposure, for the average adult.
// According to the OMS table. https://www.epa.gov/sunsafety/uv-index-scale-0
string oms_risk = 2;
}
View the defined message here.