Skip to main content

A Powerline segment for showing the PWS station data

Project description

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"]
    }
}

In this example, the segment is configured two times to show different data from different weather stations. A label is added to every station to be able to distinguish the data:

{
	"function": "powerline_pws.pws",
	"args": {
	  "pws_url": "<URL_TO_PWS_1>",
	  "label": "🏝️",
	  "parameters": ["outTemp", "UV", "outHumidity"]
	}
},
{
	"function": "powerline_pws.pws",
	"args": {
	  "pws_url": "<URL_TO_PWS_2>",
	  "label": "🏠",
	  "parameters": ["inTemp", "outTemp", "barometer", "outHumidity"]
	}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powerline_pws-1.1.1.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powerline_pws-1.1.1-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file powerline_pws-1.1.1.tar.gz.

File metadata

  • Download URL: powerline_pws-1.1.1.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for powerline_pws-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6b69f30fc0d751bbf830be548c4c20295955d9541daced16781c107a25267d53
MD5 8ba1b52ce431f983a9cff9592b6722f2
BLAKE2b-256 e7261f5d6244aa39b6ebc56101750a2f8bfb7199d80f663966c6e4d8bd73b963

See more details on using hashes here.

Provenance

The following attestation bundles were made for powerline_pws-1.1.1.tar.gz:

Publisher: python-publish.yml on boosterl/powerline-pws

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file powerline_pws-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: powerline_pws-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for powerline_pws-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f533259171d90b0c8f1855ed52b841236e7da79fc7e9e67899ed35145f04b08f
MD5 3a7c2eaf3040b4cf713349b4fa990add
BLAKE2b-256 4a1c8b092f546f6f83d6ea77f9bd47c81c8ae044c036076a88aaab1908e916ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for powerline_pws-1.1.1-py3-none-any.whl:

Publisher: python-publish.yml on boosterl/powerline-pws

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page