Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ bash <(wget -qO- https://raw.githubusercontent.com/jac459/meta/Release/update.sh
## C - How to install meta if You are a Raspberry/Linux Black Belt
- The meta can be installed like any node.js program by taking the files and typing "npm install".
- The meta NEEDS MQTT to run. NODE-RED is highly advised.
- MQTT is expected to not have any authentication.
- By default, MQTT is expected to not have any authentication. You can connect to a local MQTT host with authentication by setting the username and password in settings.js (uncomment the specific lines).
- Meta-core driver expect node-red, mqtt and meta to by run by pm2. Not by services. This is not a big deal if you don't plan to use it.
- The meta expect 2 folders: library (for all drivers) and active (for activated drivers).
- You can configure the name, port of the meta in order to run multiple instances of the meta (have different names and port for the neeo). This is very useful if you want to run a new version of the meta without taking risk on your previous version.
Expand Down
7 changes: 6 additions & 1 deletion meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,12 @@ if (process.argv.length>2) {

getConfig().then(() => {
networkDiscovery();
mqttClient = mqtt.connect('mqtt://' + settings.mqtt, {clientId:settings.mqttClientId}); // Always connect to the local mqtt broker
var options = {
clientId: settings.mqttClientId,
username: settings.mqttUsername,
password: settings.mqttPassword
}
mqttClient = mqtt.connect('mqtt://' + settings.mqtt, options); // Always connect to the local mqtt broker
mqttClient.setMaxListeners(0); //CAREFULL OF MEMORY LEAKS HERE.
mqttClient.on('connect', () => {
metaLog({type:LOG_TYPE.WARNING, content:"Connection to MQTT Broker Successful."});
Expand Down
2 changes: 2 additions & 0 deletions settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var settings =
'runtimeName' : '.meta',
'defaultPort' : '4016',
'mqttClientId' : 'meta',
// 'mqttUsername' : 'username',
// 'mqttPassword' : 'password',
'activeLibrary' : './active'
}

Expand Down