This article assumes you already have a Synpse enabled device running. If not, please read article How to install Synpse Home Assistant is leading opensource project to build smart homes and more. So it is not a coincidence we will cover how to deploy it first :)
You can find quite a few examples in our public Github repository
Overall you can deploy anything to Synpse as long as you have a working Docker image.
###Create an application
Create an application using UI and wait for it to be deployed:
Home assistant deployment as a yaml file looks like this:
This example uses amd64 image. If you are using arm64 device and OS, you will need to
change image to docker.io/homeassistant/raspberrypi4-homeassistant:stable
Example bellow will run this on all available devices, but you can also run it on a specific device. See Scheduling. In addition, we map container port 8123 to host port 9999
name: homeassistant
description: Home assistant
scheduling:
# Schedule on all available devices
type: AllDevices
spec:
containers:
- name: homeassistant
image: docker.io/homeassistant/home-assistant:stable
ports:
- 9999:8123
volumes:
- /usr/homeassistant:/config
- /etc/localtime:/etc/localtime
Go into Allocations page to see the status of your application:
Once the application is running, you can access it using Synpse CLI or just a browser if a device is in your local network: http://<your_device_ip>:9999, where <your_device_ip> can be found in Devices page.
If you want to access a device from your local machine from anywhere in the world, you can use Synpse CLI.
Access application via CLI
To access the application via CLI, first you will need CLI to be installed on your device.
- Press
CLIin the top left corner of the Synpse cloud and choose appropriate platform. - Install
Synpse CLIon your device.
- Create
Access Keyfor CLI usage and configure CLI to use it
once you are done, you can access your application using Synpse CLI:
$ synpse ps
NAME NAMESPACE SCHEDULING VERSION DESCRIPTION CREATED
homeassistant default alldevices 3 Homeassistant 1 day ago
$ synpse device ps
NAME STATUS IP OS LABELS LAST SEEN CREATED
admiring-matsumoto online 192.168.178.95 Fedora 17 seconds ago 1 day ago
# access application using synpse port forward
synpse device proxy admiring-matsumoto --port 10000:9999
forwarding port (local->remote) 10000 -> 9999
You should be able to access your application from your local machine using http://localhost:10000
###./wrap_up
In this short tutorial we have shown how to deploy Home Assistant and access it. The next steps for you could be looking into how to work with hardware devices and install various HA addons. If you have any questions or suggestions, feel free to start a new discussion in our forum.