generated from home-assistant/addons-example
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
3,157 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file added
BIN
+121 KB
.vs/bepacom-HA-Addons/FileContentIndex/3898a8f5-4bbb-4c7a-aae9-16773d119136.vsidx
Binary file not shown.
Binary file removed
BIN
-196 KB
.vs/bepacom-HA-Addons/FileContentIndex/4fc24fcc-7951-4e31-a832-5d82a5fffc44.vsidx
Binary file not shown.
Binary file added
BIN
+2.23 KB
.vs/bepacom-HA-Addons/FileContentIndex/5497d121-7d70-436d-ba54-d012e8efced2.vsidx
Binary file not shown.
Binary file added
BIN
+196 KB
.vs/bepacom-HA-Addons/FileContentIndex/59eada58-5d1f-49e3-83d2-4130cd34a737.vsidx
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"CurrentProjectSetting": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"ExpandedNodes": [ | ||
"", | ||
"\\rootfs", | ||
"\\rootfs\\etc", | ||
"\\rootfs\\etc\\nginx", | ||
"\\rootfs\\usr", | ||
"\\rootfs\\usr\\bin", | ||
"\\translations" | ||
], | ||
"SelectedNode": "\\rootfs\\usr\\bin\\webAPI.py", | ||
"PreviewInSolutionExplorer": false | ||
} |
Binary file added
BIN
+88.3 KB
...rface_dev/.vs/bacnetinterface/FileContentIndex/3bd273a1-1e97-47ff-9c1b-dd386dda58e1.vsidx
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,246 @@ | ||
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog --> | ||
|
||
|
||
# 1.1.3 | ||
15/9/2023 | ||
|
||
- Fixed Float value not getting handled correctly when parsing JSON. | ||
- Removed legacy Home Assistant discovery. | ||
- ⬆️ Bumped base-python image to version v11.0.5. | ||
- ⬆️ Bumped BACpypes3 to version 0.0.79. | ||
|
||
|
||
# 1.1.2 | ||
9/8/2023 | ||
|
||
- Fixed getting rejection PDU stopping subscribing process. | ||
- ⬆️ Bumped base-python image to version v11.0.4. | ||
- ⬆️ Bumped FastAPI to version 0.101.0. | ||
- ⬆️ Bumped Uvicorn to version 0.23.2. | ||
|
||
|
||
# 1.1.1 | ||
7/8/2023 | ||
- Subscriptions no longer indefinite as some devices don't support it. | ||
- Subscriptions can be deleted through the UI. | ||
- Subscriptions get renewed automatically. | ||
|
||
|
||
# 1.1.0 | ||
|
||
7/8/2023 | ||
- NGINX now waits until the API is available before starting. | ||
- Copied CoV method of legacy version. This will stop the system from being overwhelmed and hanging. | ||
- NGINX using templates to dynamically add own IP. | ||
|
||
|
||
# 1.0.6 | ||
|
||
10/7/2023 | ||
- Configuration options are now dropdown menu's, reducing configuration page clutter. | ||
- Fixed segmentation issue, segmentation now gets passed down to requests. | ||
- Removed the "fall back" functionality where the add-on reads every object of the object list seperately. | ||
- Punched a hole in NGINX to allow the device's own IP to communicate with the API. | ||
|
||
|
||
# 1.0.5 | ||
|
||
10/7/2023 | ||
- segmentation-not-supported error while reading objectlist solved. | ||
- Allowing more internal Home Assistant IP's. | ||
|
||
|
||
# 1.0.4 | ||
|
||
10/7/2023 | ||
- Base image to hassio-addons/addon-base-python image. | ||
- Library versions are more closely guarded now. | ||
- Added segmentation option back in. | ||
- Trying to log abort PDU's. Issue with Priva devices not supporting segmentation. | ||
- Reading objectList last to get most info from the device without getting an error. | ||
|
||
|
||
# 1.0.3 | ||
|
||
29/6/2023 | ||
- EDE files give out correct data through API now. | ||
- Increased sleeping time during startup to give the add-on enough chance to catch all BACnet data. | ||
|
||
|
||
# 1.0.2 | ||
|
||
28/6/2023 | ||
- Fixed an issue where empty websockets would remain in memory. | ||
- CoV is now indefinite, because of lack of lifetime. Siemens PXC4 doesn't work with lifetime = 0. | ||
- Removed excessive logging. | ||
|
||
|
||
# 1.0.1 | ||
|
||
20/6/2023 | ||
- Updated web UI main page to make navigation a little easier. | ||
- Unsubscribing now gets done when the add-on closes. | ||
- All errors now really should be caught instead of dumping tracelogs. | ||
- Updated translations. | ||
- EDE files show up on the web UI now once uploaded. | ||
|
||
|
||
# 1.0.0 | ||
|
||
16/06/2023 | ||
- Rewrote the backbones of the program. Now using BACpypes3 instead of BACpypes. | ||
- Removed certain configuration options that have no effect. | ||
- New API points! | ||
- Subscription page on the web UI now functions like the EDE page where you can add or remove subscriptions easily. | ||
- CIDR notation gets discovered when using "auto" as ip address setting. | ||
- Can configure the rate at which all objects get updated. | ||
- Catching more errors so the logs don't get spammed with trace logs. | ||
- This update _may_ break a thing or two. Please make an Issue on GitHub to get it solved. | ||
|
||
|
||
## 0.2.1 | ||
|
||
01/06/2023 | ||
- Rounding of long float values. It's now rounding at the first decimal. | ||
- LAN IP detection still works automatically, and only shuts down if it's automatic in config. If it's not auto, you can manually write an IP and not shut down. | ||
- Add-on uses image from GitHub now, decreasing install time. | ||
- fixed presentvalue not doing anything for EDE files | ||
|
||
|
||
## 0.2.0 | ||
|
||
01/06/2023 | ||
- Added commissioning API points! | ||
- Now it's possible to load EDE files in the add-on. | ||
- This allows the integration generate placeholder entities in Home Assistant until the real device gets connected to the network. | ||
- EDE files that have been loaded can be deleted. | ||
- A restart of the add-on will remove the EDE files from the add-on. | ||
- Web UI pages allow easy adding and removing. | ||
|
||
|
||
## 0.1.6 | ||
|
||
30/05/2023 | ||
- Bumped Alpine base image to 3.18. | ||
- Python version is now 3.11. | ||
- Packages on GitHub renamed to bacnet-interface instead of null. | ||
|
||
|
||
## 0.1.5 | ||
|
||
11/05/2023 | ||
- Updated web UI page to include Redoc API documentation. | ||
- Viewing API documentation works now. | ||
- API documentation now uses ingress. | ||
- Made loglevel a mandatory configuration. | ||
|
||
|
||
## 0.1.4 | ||
|
||
09/05/2023 | ||
- Updated configuration to include Write Request Priority. | ||
- Updated DOCS to reflect the change. | ||
- We appreciate the feedback!! | ||
|
||
|
||
## 0.1.3 | ||
|
||
12/4/2023 | ||
- Readme updated to include integration. | ||
- NGINX now blocks everything from outside. | ||
- Trying to automatically get the ethernet adapter from the host device. | ||
- FastAPI to include lifetime now instead of on_startup(). | ||
|
||
|
||
## 0.1.2 | ||
|
||
16/02/2023 | ||
- Dutch translations added. | ||
- Log level can be adjusted. Defaults to WARNING now. | ||
- Read request every 60 seconds asking for values that can change, instead of asking for static values. This reduces network traffic. | ||
- WebUI has tooltips now. Buttons or fields should explain what they do. | ||
|
||
|
||
## 0.1.1 | ||
|
||
15/02/2023 | ||
- Bumped up FastAPI to version 0.92.0 for security reasons. | ||
- Restructured S6-overlay processes. One shots for initialisations, longruns for actual processes. | ||
- Discovery enabled for if it's possible to discovery integration in the future. | ||
- Added automatic ethernet adapter detection. Won't work in every case, but it'll help a lot of people out. | ||
- BACnet subscriptions now have a lifetime instead of none. Increases compatability. | ||
- BACnet subscriptions last maximum time and get resubscribed every 60 seconds along with a read request. | ||
- Websockets can handle multiple clients now. | ||
- Configuration of the add-on has been simplified. | ||
- Added some API tests internally. | ||
- API has an endpoint that let's you subscribe now. | ||
- Flask no longer included, FastAPI handles everything now, along with uvicorn. | ||
- WebUI gets updated over websocket. This means values are the same as in the API. | ||
- WebUI can write now as well. | ||
- WebUI has gotten a makeover in general. | ||
- WebUI Subscription page can actually subscribe now. | ||
- This add-on runs on Raspberry Pi 3 as it would on an Intel NUC. This means Raspberry Pi is supported. | ||
|
||
|
||
# 0.1.0 | ||
|
||
10/1/2022 | ||
- API now has more datatypes | ||
- objectIdentifier, statusFlags became list. | ||
- notificationClass added as object as well as a property to access through API. | ||
- Multi State stateText and numberOfStates have been added. | ||
- Attempting to get min and max presentValue's from objects now. | ||
- Altered webUI page to be a little functional. It has 3 buttons you can press to call a service like I Am or Who Is. | ||
- Formatting of code now uses Black and Isort. | ||
- Removed unused packages from Dockerfile: 'nmap' and 'iproute2'. | ||
- Added a read all command, so all devices can be read again on command. | ||
- Bumped version to '0.1.0' as the add-on ready to be used. | ||
|
||
|
||
## 0.0.5 | ||
|
||
02/01/2023 | ||
- Added write functionality through API | ||
- Added multiple API points. You can find them through going to /docs | ||
- Who Is and I Am can be received and sent through host network. This is possible through Home Assistant Supervised | ||
- Add-on is now matching requirements for this project. Error handling etc. will be improved later, as will code optimisations. | ||
|
||
|
||
## 0.0.4 | ||
|
||
21/12/2022 | ||
- Zeroconf removed, not functional for add-on. If this was a core add-on, would be using DHCP. | ||
- FastAPI running on a separate thread | ||
- Created BACnetIOHandler class to serve as BACnet application | ||
- BACnet devices will automatically be subscribed to | ||
- FastAPI program converts the BACnet dictionary it gets from BACnetIOHandler to a bite sized dictionary containing only the essentials for Home Assistant | ||
- API can do get request on /apiv1/json | ||
- Can connect to websocket on ws://ip:port/ws | ||
- Websocket will automatically push updates on Change Of Value | ||
- Changed icon to Bepacom logo | ||
|
||
|
||
## 0.0.3 | ||
|
||
07/11/2022 | ||
- Added FastAPI to function as API in the future | ||
- Changed webserver to Uvicorn | ||
- Changed program to split into multiple files | ||
- BACnet device can be detected | ||
- WebUI can be loaded, it's just an example page now | ||
- API and web UI are split into different paths, /apiv1/ and /webapp/ | ||
- Zeroconf added, unsure if functioning | ||
|
||
|
||
## 0.0.2 | ||
|
||
31/10/2022 | ||
- WhoIsIAmProgram Running | ||
- Nginx set up to work correctly with Flask webserver | ||
- Flask and BACpypes happily working together <3 | ||
|
||
|
||
## 0.0.1 | ||
|
||
21/10/2022 | ||
- Getting started... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Bepacom EcoPanel BACnet/IP interface | ||
|
||
This add-on is created by Bepacom B.V. for their EcoPanel. | ||
|
||
The goal is to add BACnet functionality to Home Assistant so these devices can be displayed on the dashboard. | ||
|
||
This add-on works on Home Assistant OS as well as Home Assistant Supervised. | ||
|
||
|
||
## Installation | ||
|
||
1. Click the Home Assistant My button below to open the add-on on your Home | ||
Assistant instance. | ||
|
||
[![Open this add-on in your Home Assistant instance.][addon-badge]][addon] | ||
|
||
1. Click the "Install" button to install the add-on. | ||
1. Start the "Bepacom EcoPanel BACnet/IP Interface" add-on. | ||
1. Check the logs of the "Bepacom EcoPanel BACnet/IP Interface" add-on to see if everything went | ||
well. | ||
1. Now your Home Assistant host is a virtual BACnet/IP device! | ||
|
||
|
||
## API Points | ||
|
||
You'll be able to find all API points in the Web UI. All outside access to the API and Web UI is blocked. | ||
Only through Home Assistant the API can be accessed. | ||
This means the integration is allowed to communicate while the rest is not. | ||
|
||
### API V1 | ||
|
||
**Device Identifiers** get written as "device:number", so if a device has an identifier of 100, the notation for API will be "device:100". | ||
|
||
**Object Identifiers** apply the same notation. The object name will be camelCase. An example notation for an AnalogInput 1 would be "analogInput:1". | ||
|
||
**Property Identifiers** also apply camelCase logic. An object identifier will be written as "objectIdentifier". | ||
Fortunately, you only need to write the value for writing properties. | ||
|
||
#### GET | ||
|
||
- /apiv1/json - Return a full list of all device data. | ||
- /apiv1/command/whois - Make the add-on do a Who Is request. | ||
- /apiv1/command/iam - Make the add-on do an I Am request. | ||
- /apiv1/command/readall - Make the add-on read everything. | ||
- /apiv1/commission/ede - Read uploaded EDE files. | ||
- /apiv1/{deviceid} - Retrieve all data from a specific device. | ||
- /apiv1/{deviceid}/{objectid} - Retrieve all data from an object from a specific device. | ||
- /apiv1/{deviceid}/{objectid}/{propertyid} - Retrieve a property value from an object in a specific device. | ||
|
||
#### POST | ||
|
||
- /apiv1/commission/ede - Post EDE files | ||
- /apiv1/{deviceid}/{objectid} - Write data to be written to a BACnet object | ||
- /apiv1/subscribe/{deviceid}/{objectid} - Upload an EDE file | ||
|
||
#### DELETE | ||
|
||
- /apiv1/commission/ede - Remove an EDE file with the corresponding device identifier | ||
- /apiv1/subscribe/{deviceid}/{objectid} - Remove a CoV subscription | ||
|
||
|
||
## Configuration | ||
|
||
**Note**: _Remember to restart the add-on when the configuration is changed._ | ||
|
||
Example add-on configuration: | ||
|
||
```yaml | ||
objectName: EcoPanel | ||
address: 0.0.0.0/24 | ||
objectIdentifier: 420 | ||
defaultPriority: 15 | ||
loglevel: INFO | ||
vendorID: 15 | ||
updateInterval: 60 | ||
``` | ||
### Option: `objectName` | ||
The Object Name that this device will get. This will be seen by other devices on the BACnet network. | ||
|
||
### Option: `address` | ||
The address of the BACnet/IP interface. | ||
Best is to write the IP of the Ethernet port connected to the BACnet network. Include /24 as not all BACnet devices can be detected without. | ||
|
||
### Option: `objectIdentifier` | ||
The Object Identifier that this device will get. This will be seen by other devices on the BACnet network. **Make sure it's unique in your network!** | ||
|
||
### Option: `defaultPriority` | ||
The priority your write requests get. Low number means high priority. High number means low priority. Recommended to keep at 15 or 16 unless you know what a higher priority can do to your BACnet devices. | ||
|
||
### Option: `loglevel` | ||
The verbosity of the logs in the add-on. Usually WARNING is sufficient. | ||
|
||
### Option: `vendorID` | ||
Identifier of the vendor of the interface. As we don't have an official identifier, put anything you want in here. | ||
|
||
### Option: `updateInterval` | ||
The time after which the interface will try to read all object properties of each detected device again. | ||
|
||
|
||
## Credits | ||
|
||
**Bepacom B.V. Raalte** | ||
|
||
|
||
[![Open this add-on in your Home Assistant instance.][bepacom-badge]][bepacom] | ||
|
||
|
||
[addon-badge]: https://my.home-assistant.io/badges/supervisor_addon.svg | ||
[addon]: https://my.home-assistant.io/redirect/supervisor_addon/?addon=13b6b180_bacnetinterface&repository_url=https%3A%2F%2Fgithub.com%2FGravySeal%2Fbepacom-repo | ||
[bepacom-badge]: https://www.bepacom.nl/wp-content/uploads/2018/09/logo-bepacom-besturingstechniek.jpg | ||
[bepacom]: https://www.bepacom.nl/ |
Oops, something went wrong.