Skip to main content

A Powerline segment for showing the PWS station data

Reason this release was yanked:

Regression in gradient calculation crashes segment on startup

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.0.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.0-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: powerline_pws-1.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e36c797e4c7804b2b2ba0cf414c0d72ed629b4d67001cee8ec693204337ac7a4
MD5 48e541bdd123a140fa5573dff4242a85
BLAKE2b-256 cd1334f5e1b8f31934fd696bc389efb4d01e978eee17892d5b1eaa21e79a1be0

See more details on using hashes here.

Provenance

The following attestation bundles were made for powerline_pws-1.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: powerline_pws-1.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 526fee79ca3383c7cb5c2ad26017d846fa98857df3694761c51cfae280ac1060
MD5 3d6d79d23b4195f5f9716dd1d9d1f9fc
BLAKE2b-256 a48466be88b7127a05f1717345a447cf391db7afab0757cf2d33689ad563d8a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for powerline_pws-1.1.0-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