Comments (11)
config.js is only used for defining the platform and the MQTT broker!
Accessories can be added (and removed) at runtime.
Take a look at README and Wiki
from homebridge-mqtt.
plase example file config.json please send me
from homebridge-mqtt.
As in README explained:
{
"bridge": {
"name": "homebridge",
"username": "CC:22:3D:E3:CE:31",
"port": 51826,
"pin": "031-45-154"
},
"platforms": [
{
"platform":"mqtt",
"name":"mqtt",
"url":"mqtt://your_broker_ip",
"username":"your_name",
"password":"your_password"
}
],
"accessories": []
}
Create a file config.json
in your homebridge dir on a Raspberry e.g. home/pi/.homebridge
and paste the def above.
from homebridge-mqtt.
HOW TO WRITE ?
topic: homebridge/to/add
payload: {"name": "flex_lamp", "service": "Switch"}
from homebridge-mqtt.
Hmmm! To use homebridge-mqtt you should have knowledge about MQTT, MQTT-broker. Google is your friend e.g.:
http://www.hivemq.com/blog/mqtt-essentials-part-1-introducing-mqtt
from homebridge-mqtt.
you have example accessory ?
from homebridge-mqtt.
you have a ready-made accessory, such as lamp control ?
from homebridge-mqtt.
Sorry, I tried my best describing the API and the examples in the wiki.
Maybe some other user can help you.
from homebridge-mqtt.
{
"bridge": {
"name": "homebridge",
"username": "CC:22:3D:E3:CE:31",
"port": 51826,
"pin": "031-45-154"
},
"platforms": [
{
"platform":"mqtt",
"name":"mqtt",
"url":"mqtt://your_broker_ip",
"username":"your_name",
"password":"your_password"
}
],
"accessories": [
topic: homebridge/to/add
payload: {"name": "Lampa", "service": "Switch"}
]
}
from homebridge-mqtt.
I write the code correctly
from homebridge-mqtt.
No you need to send accessories through mqtt not the config file. Read about mqtt and json.
from homebridge-mqtt.
Related Issues (20)
- Temperature limit 100.0° ? HOT 9
- Implementing Television HOT 7
- how to read AccessoryInformation
- I don't understand where topic/payload go in homebridge config.json HOT 2
- MQTT broker not starting HOT 2
- pulling sensors from adafruit.io to homekit through homebridge and mqtt HOT 7
- mqtt Broker in the Internet
- error on adding new accessories HOT 12
- Missing Protocol on URL
- Television Service HOT 3
- Problem with Hoobs V4 HOT 1
- Restart Causes Old MQTT Commands to Execute
- homebridge/from/set missing service_type HOT 13
- Tasmota - Home bridge
- to/get Empty Responses? HOT 1
- Controlling dummy switches
- color lights not supported HOT 1
- 如何通过mqtt 使用 Lightbulb 创建一个 有亮度 和冷暖色的灯泡
- Topic: homebridge/to/add does not work for characteristics HOT 1
- How to install on Hassio / Home Assistant? HOT 3
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 homebridge-mqtt.