在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ebaauw/homebridge-ws开源软件地址:https://github.com/ebaauw/homebridge-ws开源编程语言:JavaScript 100.0%开源软件介绍:Homebridge WSHomebridge plugin for virtual weather stationCopyright © 2018-2022 Erik Baauw. All rights reserved. This Homebridge plugin exposes one or more virtual weather stations to Apple's HomeKit. The weather is obtained from OpenWeatherMap. Each weather station is exposed as a separate accessory, mimicking an Eve Degree, with separate services for Temperature, Humidity, and Air Pressure. In addition, Homebridge WS provides a Leak Sensor service, to receive HomeKit notifications for rain or snow. The Leak Sensor service contains a full weather report, including observation time, conditions, clouds, rain, snow, wind, min/max temperature, UV index, visibility, sunrise, and sunset. The Temperature, Humidity, and Leak sensors are supported Apple's Home app and by Siri. You need another HomeKit app, like Eve, for the Air Pressure sensor and the full weather report In Eve, you also get history for Temperature, Humidity and Air Pressure. Optionally, Homebridge WS exposes a second Forecast accessory per location, with a Leak Sensor service per hourly or daily forecast. There are many other weather station plugins out there. I created this one for fun and for testing plugin designs. In particular, this plugin is the launching plugin for homebridge-lib. PrerequisitesYou need to obtain an API key from OpenWeatherMap. The free tier of the Current weather and forecasts collection will do just fine. You need a server to run Homebridge. This can be anything running Node.js: from a Raspberry Pi, a NAS system, or an always-on PC running Linux, macOS, or Windows. See the Homebridge Wiki for details. I run Homebridge WS on a Raspberry Pi 3B+. To interact with HomeKit, you need Siri or a HomeKit app on an iPhone, Apple Watch, iPad, iPod Touch, or Apple TV (4th generation or later).
I recommend to use the latest released versions of iOS, watchOS, and tvOS. InstallationTo install Homebridge WS:
ConfigurationIn Homebridge's "platforms": [
{
"platform": "WS",
"name": "Weather",
"apikey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"locations": ["Amsterdam"]
}
] To expose weather forecasts, set Note that OpenWeatherMap's One Call API returns the current conditions and forecasts in a single API call, so enabling forecasts won't increase the number of outgoing API calls. The rate at which OpenWeatherMap is called can be changed using the Heartrate characteristic in the Leak Sensor service on the main accessory. TroubleshootingCheck DependenciesIf you run into Homebridge startup issues, please double-check what versions of Node.js and of Homebridge have been installed. Homebridge WS has been developed and tested using the latest LTS version of Node.js and the latest version of Homebridge. Other versions might or might not work - I simply don't have the bandwidth to test these. Run Homebridge WS SoloIf you run into Homebridge startup issues, please run a separate instance of Homebridge with only Homebridge WS (and Homebridge Config UI X) enabled in Debug Log FileHomebridge WS outputs an info message for each HomeKit characteristic value it sets and for each HomeKit characteristic value change notification it receives.
When Homebridge is started with To capture these messages into a log file do the following:
Getting HelpIf you have a question, please post a message to the #ws channel of the Homebridge community on Discord. If you encounter a problem, please open an issue on GitHub.
Please attach a copy of CaveatsHomebridge WS is a hobby project of mine, provided as-is, with no warranty whatsoever. I've been running it successfully at my home for years, but your mileage might vary. The HomeKit terminology needs some getting used to.
An accessory more or less corresponds to a physical device, accessible from your iOS device over WiFi or Bluetooth.
A bridge (like Homebridge) is an accessory that provides access to other, bridged, accessories.
An accessory might provide multiple services.
Each service corresponds to a virtual device (like a lightbulb, switch, motion sensor, ..., but also: a programmable switch button, accessory information, battery status).
Siri interacts with services, not with accessories.
A service contains one or more characteristics.
A characteristic is like a service attribute, which might be read or written by HomeKit apps.
You might want to checkout Apple's HomeKit Accessory Simulator, which is distributed as an additional tool for |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论