在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ebaauw/homebridge-p1开源软件地址:https://github.com/ebaauw/homebridge-p1开源编程语言:JavaScript 100.0%开源软件介绍:Homebridge P1Homebridge plugin for DSMR end-consumer (P1) interfaceCopyright © 2018-2022 Erik Baauw. All rights reserved. This Homebridge plugin exposes a smart meter to Apple's HomeKit, using the end-consumer (P1) interface of the Dutch Smart Meter Requirements (DSMR). It provides insight from HomeKit into your actual and historic energy consumption. The smart meter sends a push notification ("telegram" in DSMR speak), every second, updating the electricity consumption almost in real time. Older versions of DSMR might send notifications less frequently. Gas consumption is updated once every five minutes. Homebridge P1 maintains the historic consumption. Depending on the smart meter capabilities, Homebridge P1 exposes up to three HomeKit accessories:
Each accessory exposes a service with In case of 3-phase electricity, the accessory contains a service per phase showing Power, Current, and Voltage. PrerequisitesYou need a smart meter that provides a P1 port that complies to DSMR (currently DSMR 5.0, DSMR 4.2, and DSMR 2.2+ are tested). You need a cable to connect the smart meter's P1 port to a USB port. I got mine here, but you could also make one yourself, as described here. The cable is quite short (~1m) but you can extend it using a regular USB extension cable (female-A to A). 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 P1 on a Raspberry Pi 3B+. Note that Homebridge P1 uses the The user running Homebridge needs privileges to list the serial port devices and to open the serial port device for the P1 cable.
Under Raspbian, user 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. As HomeKit uses Bonjour to discover Homebridge, the server running Homebridge must be on the same subnet as your iDevices running HomeKit. For remote access and for HomeKit automations, you need to setup an Apple TV (4th generation or later), HomePod, or iPad as home hub. InstallationTo install Homebridge P1:
ConfigurationHomebridge P1 should detect the USB serial cable automatically. In case it doesn't or when you have multiple USB serial devices, you can specify the serialport in config.json: "platforms": [
{
"platform": "P1",
"serialport": "/dev/ttyUSB0"
}
] If Homebridge P1 doesn't receive any data and you have a meter with an older DSMR version, you might need to specify: "platforms": [
{
"platform": "P1",
"serialport": "/dev/ttyUSB0",
"dsmr22": true
}
] If Homebridge P1 receives data too late (i.e. after the Homebridge server has started) no accessories will be exposed to HomeKit.
In this case, set CaveatsHomebridge P1 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 Exposing the smart meter to HomeKit is a bit of a hack, lacking proper HomeKit support for smart meters. Also, Eve lacks proper support for gas consumption. The following limitations apply:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论