Comments (2)
Ok, I made it as follows (@danimtb maybe you want to include this instructions in README.md):
Requirements:
To have installed Home Assistant following this guide: https://www.home-assistant.io/docs/installation/virtualenv/
1. Create the folder /srv/homeassistant/dasshio to store the files:
/srv/homeassistant/dasshiodasshio.py
/srv/homeassistant/dasshiodata/config.json
/srv/homeassistant/dasshiodata/options.json
2. In options.json define the url, headers, body and domain of your Home Assistant integration:
{
"server": "http://localhost:8123",
"timeout": 30,
"buttons": [
{
"name": "Duracell",
"address": "xx:xx:xx:xx:xx:xx",
"url": "http://localhost:8123/api/services/switch/toggle",
"headers": "{\"x-ha-access\": \"ha_password\"}",
"body": "{\"entity_id\":\"switch.socket_power\"}",
"domain": "switch"
}]
}
3. To run dasshio as a service, create the file: /lib/systemd/system/dasshio.service
[Unit]
Description=dasshio - Amazon Dash Buttons
After=network.target,home-assistant\@homeassistant.service
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/srv/homeassistant/bin/python3 /srv/homeassistant/dasshio/dasshio.py
[Install]
WantedBy=multi-user.target
4. Manually start/stop the service:
sudo systemctl start dasshio
sudo systemctl status dasshio
sudo systemctl stop dasshio
5. Automatically start the service on boot
sudo systemctl enable dasshio
from dasshio.
I think the pip install step is missing at the top. Anyway, thanks a lot for writing up the steps you folowed here.
I will try to incorporate them in the readme. However, if you want to contribute those steps to the readme yourself, they will be more than welcomed! =)
Thanks
from dasshio.
Related Issues (20)
- README.md grammar error
- Errors Log, config HOT 4
- help to understand error in logs HOT 2
- Manual installation HOT 1
- 400 Bad Request from Homeassistant API HOT 1
- Some scripts work - others don't - here's how to fix it HOT 2
- support for 'dash wand'? HOT 1
- How to get dasshio to connect to HA IP address HOT 5
- Where to put the config file ? HOT 2
- Problem with config HOT 7
- Service started but not responding to Dash buttons HOT 5
- README.md regarding Quick Setup
- ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /addons/03d23610_dasshio/changelog
- Expections since ~ beginning of May
- Dash button stopped working HOT 16
- Amazon Dash button Not working updating Home Assistant 0.102.2 HOT 5
- Format for button connection to wifi HOT 7
- Prevent New Dash Button from Being Bricked HOT 1
- Nmap Device Tracker conflict HOT 1
- Older Dash Buttons HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dasshio.