Skip to content

boosterl/powerline-pws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Powerline PWS

A Powerline segment for showing weather data from your PWS (Personal Weather Station).

Installation

Using pip

pip install powerline-pws

Note: since PEP 668 installing pip-packages system-wide isn't supported by default anymore. This behaviour can be overwritten using the --break-system-packages. Do this at your own risk.

Configuration

The PWS segment is currently only compatible with the Cumulus Realtime Format format. When your station is using WeeWX for example, this excellent extension can be used for outputting weather data in the CRT-format.

The segment also uses some extra highlight groups. These highlight groups can be easily defined in for example .config/powerline/colorschemes/default.json:

{
    "groups": {
        "pws":                    { "fg": "gray8", "bg": "gray0", "attrs": [] },
        "pws_uv_gradient":        { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] },
        "pws_temp_gradient":      { "fg": "blue_red", "bg": "gray0", "attrs": [] }
    }
}

After this you can activate the segment by adding it to your segment configuration, for example in .config/powerline/themes/tmux/default.json:

{
    "function": "powerline_pws.pws",
    "args": {
      "pws_url": "<URL_TO_YOUR_PWS>"
    }
}

The minimum configuration needs a url to your PWS. This will only show the outdoor temperature. You can define which measurements to show using the parameters-parameter:

{
    "function": "powerline_pws.pws",
    "args": {
      "pws_url": "<URL_TO_YOUR_PWS>",
      "parameters": ["dayRain", "outTemp", "barometer", "outHumidity"]
    }
}