Skip to content

Commit 0a1e6b3

Browse files
authored
Merge pull request #27 from home-assistant/dev
Release 0.19
2 parents 19dfdb0 + f178dde commit 0a1e6b3

22 files changed

+319
-208
lines changed

API.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ On success
2626

2727
- GET `/supervisor/info`
2828

29+
The addons from `addons` are only installed one.
30+
2931
```json
3032
{
3133
"version": "INSTALL_VERSION",
@@ -35,9 +37,9 @@ On success
3537
{
3638
"name": "xy bla",
3739
"slug": "xy",
38-
"version": "LAST_VERSION",
39-
"installed": "none|INSTALL_VERSION",
40-
"dedicated": "bool",
40+
"version": "INSTALL_VERSION",
41+
"last_version": "VERSION_FOR_UPDATE",
42+
"detached": "bool",
4143
"description": "description"
4244
}
4345
],
@@ -47,6 +49,34 @@ On success
4749
}
4850
```
4951

52+
- GET `/supervisor/addons`
53+
54+
Get all available addons
55+
56+
```json
57+
{
58+
"addons": [
59+
{
60+
"name": "xy bla",
61+
"slug": "xy",
62+
"repository": "12345678|null",
63+
"version": "LAST_VERSION",
64+
"installed": "none|INSTALL_VERSION",
65+
"detached": "bool",
66+
"description": "description"
67+
}
68+
],
69+
"repositories": [
70+
{
71+
"slug": "12345678",
72+
"name": "Repitory Name",
73+
"url": "WEBSITE",
74+
"maintainer": "BLA BLU <fla@dld.ch>"
75+
}
76+
]
77+
}
78+
```
79+
5080
- POST `/supervisor/update`
5181
Optional:
5282
```json

README.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ First private cloud solution for home automation.
33

44
It is a docker image (supervisor) they manage HomeAssistant docker and give a interface to control itself over UI. It have a own eco system with addons to extend the functionality in a easy way.
55

6+
![](misc/hassio.png?raw=true)
7+
68
[HassIO-Addons](https://github.com/home-assistant/hassio-addons) | [HassIO-Build](https://github.com/home-assistant/hassio-build)
79

810
**HassIO is at the moment on development and not ready to use productive!**
911

1012
## Feature in progress
1113
- Backup/Restore
12-
- MQTT addon
1314
- DHCP-Server addon
1415

1516
# HomeAssistant
@@ -23,34 +24,7 @@ http:
2324
ssl_key: /ssl/privkey.pem
2425
```
2526
26-
# Hardware Image
27-
The image is based on ResinOS and Yocto Linux. It comes with the HassIO supervisor pre-installed. This includes support to update the supervisor over the air. After flashing your host OS will not require any more maintenance! The image does not include Home Assistant, instead it will downloaded when the image boots up for the first time.
28-
29-
Download can be found here: https://drive.google.com/drive/folders/0B2o1Uz6l1wVNbFJnb2gwNXJja28?usp=sharing
30-
31-
After extracting the archive, flash it to a drive using [Etcher](https://etcher.io/).
32-
33-
## History
34-
- **0.1**: First techpreview with dumy supervisor (ResinOS 2.0.0-RC5)
35-
- **0.2**: Fix some bugs and update it to HassIO 0.2
36-
- **0.3**: Update HostControl and feature for HassIO 0.3 (ResinOS 2.0.0 / need reflash)
37-
- **0.4**: Update HostControl and bring resinos OTA (resinhub) back (ResinOS 2.0.0-rev3)
38-
39-
## Configuring the image
40-
You can configure the WiFi network that the image should connect to after flashing using [`resin-device-toolbox`](https://resinos.io/docs/raspberrypi3/gettingstarted/#install-resin-device-toolbox).
41-
42-
## Developer access to ResinOS host
43-
Create an `authorized_keys` file in the boot partition of your SD card with your public key. After a boot it, you can acces your device as root over ssh on port 22222.
44-
45-
## Troubleshooting
46-
47-
Read logoutput from supervisor:
48-
```bash
49-
journalctl -f -u resin-supervisor.service
50-
docker logs homeassistant
51-
```
52-
5327
## Install on a own System
5428
55-
We have a installer to install HassIO on own linux device without our hardware image:
56-
https://github.com/home-assistant/hassio-build/tree/master/install
29+
- Generic Linux installation: https://github.com/home-assistant/hassio-build/tree/master/install
30+
- Hardware Images: https://github.com/home-assistant/hassio-build/blob/master/meta-hassio/

hassio/addons/__init__.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Init file for HassIO addons."""
22
import asyncio
33
import logging
4-
import os
54
import shutil
65

76
from .data import AddonsData
@@ -51,7 +50,7 @@ async def prepare(self, arch):
5150
self.config, self.loop, self.dock, self, addon)
5251
await self.dockers[addon].attach()
5352

54-
async def add_custom_repository(self, url):
53+
async def add_git_repository(self, url):
5554
"""Add a new custom repository."""
5655
if url in self.config.addons_repositories:
5756
_LOGGER.warning("Repository already exists %s", url)
@@ -67,7 +66,7 @@ async def add_custom_repository(self, url):
6766
self.repositories.append(repo)
6867
return True
6968

70-
def drop_custom_repository(self, url):
69+
def drop_git_repository(self, url):
7170
"""Remove a custom repository."""
7271
for repo in self.repositories:
7372
if repo.url == url:
@@ -91,7 +90,7 @@ async def reload(self):
9190
self.merge_update_config()
9291

9392
# remove stalled addons
94-
for addon in self.list_removed:
93+
for addon in self.list_detached:
9594
_LOGGER.warning("Dedicated addon '%s' found!", addon)
9695

9796
async def auto_boot(self, start_type):
@@ -113,10 +112,10 @@ async def install(self, addon, version=None):
113112
_LOGGER.error("Addon %s is already installed", addon)
114113
return False
115114

116-
if not os.path.isdir(self.path_data(addon)):
115+
if not self.path_data(addon).is_dir():
117116
_LOGGER.info("Create Home-Assistant addon data folder %s",
118117
self.path_data(addon))
119-
os.mkdir(self.path_data(addon))
118+
self.path_data(addon).mkdir()
120119

121120
addon_docker = DockerAddon(
122121
self.config, self.loop, self.dock, self, addon)
@@ -142,10 +141,10 @@ async def uninstall(self, addon):
142141
if not await self.dockers[addon].remove():
143142
return False
144143

145-
if os.path.isdir(self.path_data(addon)):
144+
if self.path_data(addon).is_dir():
146145
_LOGGER.info("Remove Home-Assistant addon data folder %s",
147146
self.path_data(addon))
148-
shutil.rmtree(self.path_data(addon))
147+
shutil.rmtree(str(self.path_data(addon)))
149148

150149
self.dockers.pop(addon)
151150
self.set_addon_uninstall(addon)

0 commit comments

Comments
 (0)