This is a HACS Custom Component that queries ARCGIS US Government Protected Area Data with your current GPS coordinates set in Home Assistant and will post back a response with details.
This sensor should provide information on almost any protected land in the United States including federal, state, county, and regional lands. This can be useful when finding dispersed camping to quickly understand what land and jurisdiction you are within.
An Internet connection is required for this integration to work.
Only available for public lands in the United States.
This integration pairs nicely with Geolocator by SmartyVan which provides geocoded address and timezone services.
Use your judgement when deciding where to setup a dispersed camp. I am not responsible for the accuracy of the data or whether you run into problems at your chosen location. Refer to the applicable government website for rules and regulations on dispersed camping for your chosen location.
With that out of the way, let's get started...
This integration is not yet available in the HACS default store. Meanwhile, it will be added as a custom repository.
- Click "Open HACS Repository" button above and install Public Lands
- Restart Home Assistant
- Navigate to Settings > Devices & Services
- Click Add Integration at the bottom
- Search for Public Lands
- Download the source code of the latest release.
- Unzip the source code download.
- Copy public_lands from the custom_components directory you just downloaded to your Home Assistant custom_components directory:
config/custom_components/public_lands/
- Restart Home Assistant.
Upon restart, it will automatically create the sensors and button. No configuration needed. No data will be found in those sensors until it is triggered. Please see the following section for details on that.
###Trigger Methods
This is simple. If you want to know your USPL status immediately based on Home Assistant's current coordinate, press the button.
Here's an example automation that will refresh USPL data when the zone.home is updated. It will update at 10 minute intervals when the GPS coordinates are changing.
alias: "USPL: Update via Button"
description: "Presses the Refresh USPL button when zone.home changes, throttled to once every 10 minutes."
trigger:
- platform: state
entity_id: zone.home
condition:
- condition: template
value_template: >
{{ (as_timestamp(now()) - as_timestamp(this.last_triggered | default(0))) > 600 }}
action:
- service: button.press
target:
entity_id: button.refresh_uspl
mode: single
If you use a binary sensor to track when RV is moving / not moving, I suggest triggering a button press when transitioning from moving to not moving state. This will capture the GPS coordinates at the time the vehicle stops and not the last update interval. This is relevant when stopping to validate the jurisdiction of a campsite.
The following sensors will be created upon installation.
Sensor | Description |
---|---|
Unit Name | This is the high level known name "Yosemite National Park" or "Alabama Hills National Scenic Area." |
Designation | Wilderness Area, National Park etc. |
Management Name | National Park Service, Bureau of Land Management etc. |
Management Type | State, Federal, Regional etc. |
Public Access | Open to the public, Restricted (permit needed), Closed Access (military base). |
API Status | 'On' if last refresh was successful. 'Off' if last refresh failed. |
Last Successful Refresh | Timestamp of last referesh |
These sensors will not populate with data unless the USPL Refresh Button is pressed. You may see 'unknown' after Home Assistant starts until the next button press.
In the event there's no connectivity, the sensors will retain their old values. API status will be set to 'off'. Once the condition clears, API status will be set to 'on' and all sensors will refresh.
The integration will create one button
Button | Description |
---|---|
Refresh USPL | Pressing this button will call for the API with Home Assistant's current coordinates. |
The button can be exposed to the UI for manual trigger or via automations previously mentioned.
If you want to hide USPL sensors when they're unavailable (such as no Internet connectivity), use the API status and conditional visability in your dashboard.
If you want to hide USPL sensors when on private land, hide when 'Unit Name' is 'Non-Protected Area'.
Public Land
Non-Public Land
- Connectivity - Internet is required at the time of the button press.
- Polling - The integration does not automatically poll. It leaves this task to the user to configure either manually or via automation.
- Frequency - Please limit your automated refresh period to no less than 10 minutes while in motion.
- GPS Accuracy - The GPS coordinateds are limited to four decimal points (-118.1222,36.5597). This limits the accuracy to 15 meters.
- Data Accuracy - The API data is refreshed annually in June by USGS (United States Geological Survey).
Thanks to Smarty Van for Geolocator which served as a starting point for this integration.
Open issues, suggest improvements, or contribute pull requests directly here on GitHub.
This project is licensed under the MIT License. For more details, see the LICENSE file.