I'm having difficulty getting this started. I'm a 6 year user of raspberry pi's, but node.js and npm are entirely new to me. I have a fresh install of raspbian buster on a new rip 4. Influx and grafana are set up and running as services and start at bootup. I'm using node version 12.6.1 and npm version 6.13.7. I have only one MakerAPI setup specifically for this purpose, and it points to my raspberry pi. I have installed hubitat-maker-to-influxdb and pm2. I can't get pm2 to run from the command line at all. I can't get hubitat-maker-to-influxdb by running the suggested:
sudo node hubitat-maker-to-influxdb
I can, however, get hubitat-maker-to-influxdb to run by running:
sudo node ~/node_modules/hubitat-maker-to-influxdb/app.js
or cd'ing to that directory and running:
sudo node app.js.
I created ~/.hubitat-maker-to-influxdb/config.json with the contents:
{
"local_config" : {
"local_url": "http://192.168.42.46"
"hostname": "192.168.42.46",
"base_port": 8567,
"influxdb_port": 8086,
"influxdb_host": "127.0.0.1",
"influxdb_db_name": "hubitatMaker",
},
"hubs" : {
"homeTester": {
"url": "http://192.168.42.9/apps/api/65",
"token": "6f9d3b52-c586-47a3-8bff-3cc2c1ee7d22",
"influxdb_db_name": "HubitatTester"
},
"home": {
"url": "http://192.168.42.9/apps/api/65",
"token": "6f9d3b52-c586-47a3-8bff-3cc2c1ee7d22",
"locationName": "Home",
"locationId": "0",
"hubId": "0"
}
}
}
But when I load the program, it responds only by echoing what I assume to be a default config file:
pi@raspberrypi:~ $ sudo node ~/node_modules/hubitat-maker-to-influxdb/app.js
Config: {
local_config: {
hostname: '0.0.0.0',
base_port: 8567,
influxdb_port: 8086,
influxdb_host: '127.0.0.1',
influxdb_db_name: 'hubitatMaker',
local_url: 'http://192.168.7.94',
poll_interval: 1800
},
hubs: {}
}
pi@raspberrypi:~ $
and nothing gets pushed to influxdb. Where have I gone wrong?
Editing to mention that I also have nodered, mosquito, and zigbee2MQTT running on the same RPi, if it makes any difference.