Visual Crossing Weather

by willasm
5
4
3
2
1
Score: 35/100

Description

The Visual Crossing Weather plugin brings a new level of functionality for weather enthusiasts in Obsidian. It integrates weather data from up to five locations, offers customizable templates for seamless document insertion, and provides detailed, dynamic weather updates. Users can enjoy a sleek status bar display featuring alternating weather summaries for today and tomorrow, along with real-time alerts for severe weather conditions. A modal view presents comprehensive daily forecasts, while extensive macro support enables personalized formatting. With features like automatic weather updates and support for templating tools, this plugin is a robust solution for adding weather insights to your workflow.

Reviews

No reviews yet.

Stats

35
stars
7,256
downloads
2
forks
526
days
423
days
423
days
1
total PRs
1
open PRs
0
closed PRs
0
merged PRs
31
total issues
8
open issues
23
closed issues
55
commits

Latest Version

a year ago

Changelog

[1.1.5] 2025-03-12

  • Fixed: Statusbar not updating with cycling disabled
  • Fixed: Weather alert links for locations 2-5 not working

README file from

Github

Visual Crossing Weather

Table of Contents

Introduction

This is a replacement for my OpenWeather plugin. Open Weather has discontinued its version 2.5 API on which that plugin is based. They do have a 3.0 API, but that requires a credit card to subscribe to and a lot of people, myself included, are not willing to do that.

Quite a while ago a user requested a feature that was not available in the Open Weather API but mentioned it was available in the Visual Crossing API. After looking closer at the API I saw many advantages in switching to over to it. The only thing that had stopped me is it meant a complete re-wite of the plugin as the differences in the API's was far to great and having to maintain 2 plugins that did the same thing seemed pointless. Now that Open Weather has discontinued API 2.5 I am free to develop this new plugin.

This new plugin uses the Visual Crossing API.

You can get your free API key here. It is free and does not require a credit card.

Table of Contents

Features

  • Get weather data from 5 locations (OpenWeather plugin only had 1)
  • Display current weather in the statusbar
    • The statusbar text strings are customizable
    • The statusbar text can be customized using CSS
    • Has 2 statusbar template strings which can be displayed alternating every 30 seconds
    • Default has todays weather info for the first one, tomorrows weather for the second
    • Clicking on the weather data in the statusbar will open a modal with detailed info on todays weather
  • Insert current weather into your documents
    • Can be previewed before insertion when using the insert weather template modal
  • Eight customizable weather templates available (OpenWeather plugin only had 4)
  • Template support for automatic weather insertion into your new documents
  • DIV support for dynamic weather
  • 14 Day forecast data available from the API
  • Several thousand (currently around 4000) macro text replacements with more to come
  • Daily notes special macros can get the weather data for any of 14 future/past days
  • Includes all core elements of my OpenWeather plugin, auto replace templates, etc.
  • Templates are now named. The first line is used as the name in the menus and is not included in the output of the template
  • Many overall improvements to much of the code
  • Many new features planned for the future

Table of Contents

Template Macros

The text macros are used to represent a weather data object and will be expanded to display that particular weather data item at runtime. All macros are contained within 2 percent signs. For an example, %temp% represents the current temperature and will be replaced by eg. 24. %humidity% represents the current humidity and will be replaced with eg. 80%. For a detailed complete list of available macros in table form see Macros.md

Table of Contents

Daily Notes Template Macros

These special macros are specifically used in your daily notes template. They allow for the expansion of the macros weather data in any one of 14 future/past days. In order for this to work your daily notes file name must be in the format YYYY-MM-DD (This is the default in Obsidian). For a detailed complete list of available macros in table form see Macros.md

Table of Contents

The Current Weather Display Modal

Clicking on the weather information in the statusbar will display a modal with the current weather information. It can also be displayed from the command palette by entering View current weather information.

For example...

current weather

Table of Contents

The Statusbar Weather Display & Templates

Note: this feature is not available in the mobile version

The current Weather

The current weather is displayed in the statusbar. This is optional and can be disabled in the settings if you would like to remove it. The string itself is completely customizable and can be defined to display whatevever information you would like to see. There is also a second statusbar template string available. By default both strings are displayed in the statusbar, alternating every 30 seconds. This behavior can also be disabled in the settings if you wish. Disabling this would result in only the first string being displayed. The default strings display the current weather information for the first one and the second displays weather information for tommorow.

The default first string 🔸%address%: %dow2-today% %month3-today% %date1-today%🔸High: %tempmax-today%° Low: %tempmin-today%°🔸Currently: %conditions% Temperature: %temp%° Feels Like: %feelslike%°🔸 displays...

Statusbar1

The default second string 🔸%address%: %dow2-in1day% %month3-in1day% %date1-in1day%🔸High: %tempmax-in1day%° Low: %tempmin-in1day%° 🔸 Clouds: %cloudcover-in1day% Probabilty of precipitation: %precipprob-in1day% (%preciptype-in1day%)🔸 displays...

Statusbar2

The statusbar cycling...

Statusbar1

Weather Alerts

If a weather alert is active it will be displayed in the statusbar in red. Only one alert is displayed at a time with your primary location taking the highest precedence, then your additional locations in the order that they are entered in the settings. Mouse over the statusbars weather alert to see a description of the alert. Click the statusbars weather alert text to open in your default browser the web page associated with the alert.

Example of a weather alert...

Weather Alert

Customizing the statusbar

You can customize the way the weather information is displayed in the statusbar using CSS. To do so create a css file in your vaults .obsidian/snippets folder Eg. vcWeather.css and add the following text...

.statusbar-vc {
  background-color: var(--status-bar-background);
  color: var(--color-base-100);
  font-size: small;
  font-weight: 500;
}

.statusbar-alert-vc {
  background-color: var(--color-red);
  color: var(--color-yellow);
  border-radius: 10px;
  font-size: small;
  font-weight: 600;
}

Note that the .obsidian folder is a hidden folder so you may need to enable show hidden files in your file manager. The snippets folder may need to be created if it does not already exist in your vault.

Then enable the CSS snippet in Obsidians settings under appearance/CSS snippets (at the bottom).

The example CSS text above is the default settings. Feel free to customize it to your preferences. .statusbar-vc is the class name for the weather information in the statusbar. .statusbar-alert-vc is the class name used for weather alerts displayed in the status bar.

For more information, see Obsidian CSS variables and CSS variables for the Status bar

For more detailed information on the statusbar templates see Statusbar Templates.md

Table of Contents

The Weather Templates

The weather templates are used to insert weather information into your documents

Note: The first line of these templates is the text string used in the command palette and and insert template modal. This first line is not inserted with the rest of the template. You should use short meaningful descriptions on the first line when defining your own templates.

There are 8 available templates that can be inserted into your documents. These are completely customizable and can be used to display the weather in any format you wish to see. These templates can be inserted either from the command palette or from the insert weather template modal. The insert weather template modal can be displayed either from the command pallete or by selecting the thermometer icon in Obsidians ribbon bar.

Command palette...

commandPalette

Insert weather template modal...

templatePicker

For a screenshots and a much more detailed overview of the weather templates see Weather Templates.md

Table of Contents

Obsidian Templates Support

Insertion of the weather templates can be automated by using Obsidian or Templater plugin templates. Simply add the following to your templates.

  • %weather1% - Inserts weather template One
  • %weather2% - Inserts weather template Two
  • %weather3% - Inserts weather template Three
  • %weather4% - Inserts weather template Four
  • %weather5% - Inserts weather template Five
  • %weather6% - Inserts weather template Six
  • %weather7% - Inserts weather template Seven
  • %weather8% - Inserts weather template Eight

The strings above will autmatically be replaced with the templates data when a new file is created with the template or when you insert the macros into an existing document. Note that the Templater plugin is not required to expand the weather string templates, that is handled by this plugin itself. Remember to exclude your templates folder in the plugins settings. If you do not exclude the folder the weather templates will be expanded in your template file which you do not want to happen.

Table of Contents

Plugin Commands

All these commands are available from the command palette
  • Visual Crossing Weather: Insert 'template title' Template - Inserts the named weather template into the current document.
    • Each of the 8 templates will appear here, but only when the template is actually defined
    • The title of the template is taken from the first line of the template See Weather Templates.md for more info
  • Visual Crossing Weather: Insert template from Picker with Preview - Displays a modal allowing you see a preveiw of the selected template before insertion
    • Visual Crossing Weather: View current weather information - Displays a modal with the current weather information
  • Visual Crossing Weather: Replace template strings - This will replace all occurences of the weather template strings, %weather1% to %weather8% with the corresponding defined weather templates data. This should normally not be required as the plugin should automatically do this for you. This command is available in case you wish to do the replacements in an excluded folder.

Table of Contents

Settings

Visual Crossing API authentification Key

Enter your Visual Crossing API Key here (Required)

Go here to get your Visual Crossing API key or use this direct link to the sign up page for your free API key

Primary location

You must add at least your primary location here, the additional locations are optional

Additional locations 1 to 4

If you wish to get weather information for any additional locations you may define them here (optional)

Units of measurement

Select from the dropdown United States, Metric, United Kingdom, or Base

Note: Base returns temperatures in degrees Kelvin, not very useful in this application

Language

Select from the dropdown list your prefered language

Available languages - Arabic, Bulgarian, Chinese, Czech, Danish, Dutch, English, Farsi, Finnish, French, German, Greek Modern, Hebrew, Hungarian, Italian, Japanese, Korean, Polish, Portuguese, Russian, Serbian, Slovakian, Spanish, Swedish, Turkish, Ukrainian, Vietnamese

Note: This only changes the text returned by the API. You will need to change the default templates text to your desired language.

Exclude template folder

You must add your templates folder here. Not doing so would result in all defined weather templates in that folder being replaced with weather data. There is an optional second exclude folder which could be useful for your scripts folder or a secondary templates folder location.

Update frequency

Time interval for updating the current weather information that is displayed in the statusbar and DIV's (10, 15, 20, 30 or 60 minutes). How often the weather data is actually updated is dependent on the weather stations near your location. I Recommend setting this to 10 to 30 minutes. The weather stations near you are not likely to update in a shorter time than that.

Show weather in the statusbar

Toggles the weather display in the statusbar on or off

Cycle statusbar display

Toggles cycling the statusbar weather display between the 2 statusbar templates on or off. The templates are alternated every 30 seconds

Show weather alerts in the statusbar

Toggles the weather alerts display in the statusbar on or off

Primary statusbar template

This template will always be displayed in the statusbar when enabled

Secondary statusbar template

This template will only be displayed when statubar cycling is enabled. Each template will be displayed every 30 seconds

Weather templates

These are the 8 weather templates used to insert weather data into your documents

Note: The first line is used in the command palette menu and insert template modal to identify the template by name

This line is not inserted into your document, see the default templates for examples

For a much more detailed overview of the templates see Weather Templates.md

Table of Contents

Dynamic Weather Using DIV's

You can insert the following DIV's inside your documents to provide dynamic weather which is updated at the frequency set in the settings Update Frequency setting. The weather_historical_3 is the weather information recorded at the time the document is created and the weather_current_4 is dynamic current weather information.

<div class="weather_historical_3">%weather3%</div>
<div class="weather_current_4"></div>

For example this is what I use in my daily template...

dynamic weather

You can use the following class's to insert the corresponding weather templates

  • "weather_current_1" Inserts dynamic weather template One
  • "weather_current_2" Inserts dynamic weather template Two
  • "weather_current_3" Inserts dynamic weather template Three
  • "weather_current_4" Inserts dynamic weather template Four
  • "weather_current_5" Inserts dynamic weather template Five
  • "weather_current_6" Inserts dynamic weather template Six
  • "weather_current_7" Inserts dynamic weather template Seven
  • "weather_current_8" Inserts dynamic weather template Eight

and...

  • "weather_historical_1" Inserts static weather template One
  • "weather_historical_2" Inserts static weather template Two
  • "weather_historical_3" Inserts static weather template Three
  • "weather_historical_4" Inserts static weather template Four
  • "weather_historical_5" Inserts static weather template Five
  • "weather_historical_6" Inserts static weather template Six
  • "weather_historical_7" Inserts static weather template Seven
  • "weather_historical_8" Inserts static weather template Eight

Note: I will be adding an example vault explaing how to accomplish this very soon

It is a very involved process which can not be summarized in this short document

Table of Contents

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Advanced Copy
2 years ago by leschuster
An Obsidian plugin to copy Markdown and transform it into HTML, Anki, or any custom format. Create custom profiles with versatile templates tailored to your workflow.
Auto Template Trigger
3 years ago by Numeroflip
An obsidian.md plugin, to automatically trigger a template on new file creation
Battery Indicator
2 years ago by Kacper Darowski
Brings a battery indicator to Obsidian's status bar
Blueprint
3 months ago by François Vaux
Repeatable templates plugin for Obsidian
Buttons
5 years ago by Sam Morrison
Buttons in Obsidian
Character Sheets
10 months ago by Grayvox
Create character sheets for your very own traumatized little guys with Obsidian.
CJK Count
a year ago by Louie Kurenai
Codeblock Template
3 years ago by Super10
A template plugin that allows for the reuse of content within Code Blocks!一个可以把Code Block的内容重复利用模板插件!
Custom Comments
8 months ago by Jack Chronicle
Adds a method to create custom methods to enclose comments
Daily Named Folder
5 years ago by Nemo Andrea
Like daily note, but nested in a daily folder and some more improvements
Daily Notes Automater
a year ago by David Pedrero
Default Template
4 months ago by raeperd
obsidian plugin to set default template for new notes
Emoji selector
7 months ago by summer
Insert custom emojis with quick search, auto-suggestions, and customizable templates.
From Template
4 years ago by mo-seph
Simple plugin to create Notes from a template, and fill in fields defined there
Frontmatter generator
3 years ago by Hananoshika Yomaru
A plugin for Obsidian that generates frontmatter for notes
Fuzzy Note Creator
2 years ago by HaloGamer33
An Obisidan plugin for quickly creating notes with the help of a fuzzy finder. Now with templates!
Get Info
4 years ago by Chetachi
A small menu that is tucked inside your status bar and shows helpful information for your chosen file 📄.
Grandfather
5 years ago by Danny Hernandez
A simple Obsidian plugin to display the time and date on the status bar
Handlebars Dynamic Templating
3 months ago by Hide_D
Handlebars dynamic templating. Define template files and use them dynamically via hb blocks. Template recursion is also possible.
Hotkeys for templates
5 years ago by Vinzent
Hârn Weather Generator
a year ago by Marc André Ueberall
Weather generator for the HârnMaster: Roleplaying in the World of Kèthîra rule system as an Obsidian.md plugin
Idle Monitor
a year ago by alberto98fx
A plugin to improve your productivity
Last Modified Timestamp in Status Bar
3 years ago by Yustynn
Liquid Templates
5 years ago by Diomede Tripicchio
Define your templates with LiquidJS tags support
LongtimeDiary
2 months ago by sawamaru
Show past Daily notes on the same day in previous years.
Macros
a year ago by James Clifford Spratt
Advanced nutrition tracker for Obsidian
Meld Build
3 years ago by meld-cp
Write and execute (sandboxed) JavaScript to render templates, query DataView and create dynamic notes.
Micro templates
3 years ago by epszaw
Flexible embedded micro templates powered by javascript functions
Note Auto Creator
4 years ago by Simon T. Clement
An Obsidian plugin for automatically creating notes when linking to non-existing notes
Note From Form
a year ago by Sergei Kosivchenko
Obsidian plugin that adds support to define input form and generate notes based on it
Note to RED
a year ago by Yeban
一键将 Obsidian 笔记转换为小红书图片进行导出
Notes dater
3 years ago by Paul Treanor
Adds created_on and updated_on dates of the active note to status bar
Obsidian Dynamic Embed
4 years ago by Ivaylo Dimitrov Dabravin
Old Note Admonitor
3 years ago by tadashi-aikawa
OpenWeather
3 years ago by willasm
Obsidian plugin for OpenWeather API
Pug Templates
2 years ago by Nicholas Wilcox
An Obsidian plugin that enables the usage of Pug templates.
Reading progress desktop
5 months ago by qian-shen
Obsidian 阅读进度条插件。
Reading Time
6 years ago by avr
Remaining reading time
7 months ago by ununnamed
Shows the remaining reading time in status bar
Ruled template
3 years ago by YPetremann
An obsidian plugin that check rules to select which template to use.
Search Templates Library
3 years ago by Pentchaff
Obsidian plugin that allows to store searches templates for later use, and displays search results both in the search view and graph view.
Show Current File Path
5 years ago by Ravi Mashru
Obsidian plugin to show the file path of the current file in the status bar
Simple Vault Importer
10 months ago by WebInspectInc
Smart Export
2 months ago by Iván Sotillo
Plugin that follows wikilinks to a configurable depth, joining the notes into a single export.
Smart Templates
2 years ago by 🌴 Brian Petro
Smart Templates is an AI powered templates for generating structured content in Obsidian. Works with Local Models, Anthropic Claude, Gemini, OpenAI and more.
SolidTime Integration
a year ago by proniclabs
Obsidian SolidTime Integration Plugin
Status Bar Clock
3 months ago by Marty Ballard
Status Bar Clock for Obsidian
Status Bar Organizer
2 years ago by Kacper Darowski
Arrange and hide status bar elements.
Status Bar Pomodoro Timer
5 years ago by kzhovn
A status bar pomodoro timer plugin for Obsidian.
Status Bar Quote
4 years ago by Jinu
Obsidian plugin - You can pin your favorite quote.
Template by Note Name
a year ago by Jacob Learned
A simple Obsidian plugin to automatically template notes based on their title
Template Filename
a year ago by Callum Alpass
Obsidian plugin for creating notes with templatable filenames
Templated daily notes
2 years ago by digitorum
Allow to create templayted daily note in specific folder
Templater
6 years ago by SilentVoid
A template plugin for obsidian
Templify
2 years ago by Boninall
A releases repo for custom editable template in Obsidian.
Tenki
3 years ago by HiroMike
Varinote
a year ago by Giorgos Sarigiannidis
A plugin for Obsidian that allows you to add variables in Templates and set their values during the Note creation.
Weather Fetcher
4 years ago by fyears
Weather Widget
3 months ago by mr-asa
Weather widget for display in notes, Canvas, and a separate tab.
Weekly Goal Tracker
a year ago by George Gorman
Workona To Obsidian
3 years ago by Holmes555
Plug-in for Obsidian.md which will import Workona json file
YouTube Template
2 years ago by sundevista
📺 A plugin that would help you to fetch YouTube videos data into your vault.