Comments (4)
So you have to edit the client.js file (for me it is here: /usr/local/lib/node_modules/homebridge-dafang/node_modules/mqtt/lib/client.js). Find the Section:
var defaultConnectOptions = {
keepalive: 60,
reschedulePings: true,
protocolId: 'MQTT',
protocolVersion: 4,
reconnectPeriod: 1000,
connectTimeout: 30 * 1000,
clean: true,
resubscribe: true
}
And add the authentication stuff like this:
var defaultConnectOptions = {
host: 'ip.to.your.mqtt.server',
port: 1883,
username: 'XXX',
password: 'XXX',
keepalive: 60,
reschedulePings: true,
protocolId: 'MQTT',
protocolVersion: 4,
reconnectPeriod: 1000,
connectTimeout: 30 * 1000,
clean: true,
resubscribe: true
}
Hope this helps!
Best
se_dony
from homebridge-dafang.
Hi thanks for your help.
Meanwhile I have sorted it in kind of different way.
It seems the bistro I was using was at fault as. After doing clean install of raspian/homebridge everything works ok.
Well, kind of.
I came across another issue. When I was testing the setup everything was working OK, however after moving it to 'main' homebridge - I am not longer able to add camera. Homebridge does not see it no matter what I try.
Dafang plugin works good. I can control the camera (turn night vision on/off, take picture record video - motion sensor works too), there is just no way to add camera.
It does not work via homebridge-camera-ffmpeg either.
from homebridge-dafang.
Same issue here. There's nowhere in the homebridge-dafang configuration for adding the username/password for the mosquitto server. This should presumably be in the "mqtt:" section of the plugin configuration. I tried adding it to client.js as sedony23 suggested, but that didn't work. I switched to homebridge-dafang-mqtt-republish in conjunction with homebridge-camera-ffmpeg, and that is working perfectly. So it's not a problem with my MQTT server.
from homebridge-dafang.
The easiest solution is to leave "allow_anonymous true" in the mosquitto config, and also create a password file, so that both authenticated and anonymous connections are handled.
from homebridge-dafang.
Related Issues (20)
- [BUG] - ffmpeg exited with code 1 HOT 15
- Usage without Dafang Hack? (RTSP BETA)
- No second camera controls HOT 1
- mqtt commands
- Update to reflect changes in EliasKotlyar / Xiaomi-Dafang-Hacks HOT 5
- [BUG] - ERROR: FFmpeg exited with code 1 HOT 10
- mqtt broker HOT 1
- Dafang HOT 1
- [BUG] - Motion Détection don't work HOT 11
- Record video
- [BUG] - plugin incorrectly registered HOT 2
- [BUG] - multiple build errors on installation HOT 1
- [BUG] I cannot get a live video in the Home app HOT 1
- Is it possible to reduce the video size? HOT 1
- Two richmotionsensors showing in home app HOT 16
- Two way audio HOT 2
- [BUG] - Plugin does not respect videoConfig parameters HOT 2
- [BUG] - Cant start homebridge after adding plugin HOT 2
- [BUG] - Warning during in homebridge log: Current Ambient Light Level': characteristic was supplied illegal value: number 805765 exceeded maximum of 100000 HOT 1
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-dafang.