Hello,
I am sure I am doing something wrong but I can't figure it out. First off some background. I have been running the Pi Gateway for a few years now but I haven't been keeping up with upgrades. If memory serves, I was running something before Ver 8.1 but I don't remember exactly. Everything was working fine with the gateway and the Moteino's were dutifully reporting.
Recently the gateway (running on a Raspi ver. 2...) quit working. So it was obviously time to upgrade. I bought a new Raspi ver 3.1 installed Buster and the latest gateway ver. 9.1
Now funny things are happening. First, from the terminal inside the gateway, here is what I see:
16:17:11.379 : /dev/ttyUSB0>:#[16][8] A0:57.83 [RX_RSSI:-38] - ACK sent. Pinging node 8 - ACK...nothing
16:17:01.415 : /dev/ttyUSB0>:#[15][54] A0:72.51 A1:75.99 [RX_RSSI:-51] - ACK sent.
16:16:14.763 : /dev/ttyUSB0>:#[14][57] A0:0.00 [RX_RSSI:-56] - ACK sent.
16:16:06.137 : /dev/ttyUSB0>:#[13][10] F:67.43 [RX_RSSI:-40] - ACK sent. Pinging node 10 - ACK...nothing
16:16:04.729 : /dev/ttyUSB0>:#[12][10] START [RX_RSSI:-31] - ACK sent.
Every time a node reports, it creates a new node with the number in the first set of square brackets after the # sign.
In other words, the bottom line it created a node number 12. Then from the line above that it created a node number 13, etc. Even though the second set of brackets is the actual node number (hope I am making sense here...)
I am also quite confused as to how to add my custom metrics into the new version. I have looked at the examples and can't seem to figure it out.
I am guessing that my old version was installed in 2105
Here is a snippet from my old metrics.js file:
//MyTempNode metrics
// Each Analog channel is designated as "Ax" Ex: channel 0 = "A0"
A0 : { name:'A0', regexp:/A0\:(-?\d+\.\d+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 } }},
A1 : { name:'A1', regexp:/A1\:(-?\d+\.\d+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 } }},
A2 : { name:'A2', regexp:/A2\:(-?\d+\.\d+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 } }},
A3 : { name:'A3', regexp:/A3\:(-?\d+\.\d+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 } }},
A4 : { name:'A4', regexp:/A4\:(-?\d+\.\d+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 } }},
A5 : { name:'A5', regexp:/A5\:(-?\d+\.\d+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 } }},
A6 : { name:'A6', regexp:/A6\:(-?\d+\.\d+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 } }},
A7 : { name:'A7', regexp:/A7\:(-?\d+\.\d+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 } }},
==============
I tried adding this as a separate file placed into the /home/pi/gateway/_Lowpowerlab folder. That didn't work.
Next I tried making a new file based on the watermeter file and the weathermote file. Here is what I did in that file:
exports.metrics = {
//My temperatures
A0 : { name:'A0', regexp:/A0\:([\d\.]+)/i, value:'', unit:'Deg.', graph:1, graphOptions : { legendLbl:'Degrees', lines: { lineWidth:1 }, colors:['#09c'], tickDecimals: 1} },
A1 : { name:'A1', regexp:/A1\:([\d\.]+)/i, value:'', unit:'Deg.', graph:1, graphOptions : { legendLbl:'Degrees', lines: { lineWidth:1 }, colors:['#09c'], tickDecimals: 1} },
A2 : { name:'A2', regexp:/A2\:([\d\.]+)/i, value:'', unit:'Deg.', graph:1, graphOptions : { legendLbl:'Degrees', lines: { lineWidth:1 }, colors:['#09c'], tickDecimals: 1} },
A3 : { name:'A3', regexp:/A3\:([\d\.]+)/i, value:'', unit:'Deg.', graph:1, graphOptions : { legendLbl:'Degrees', lines: { lineWidth:1 }, colors:['#09c'], tickDecimals: 1} },
A4 : { name:'A4', regexp:/A4\:([\d\.]+)/i, value:'', unit:'Deg.', graph:1, graphOptions : { legendLbl:'Degrees', lines: { lineWidth:1 }, colors:['#09c'], tickDecimals: 1} },
}
exports.events = {
}
exports.motes = {
WeatherMote: {
label : 'Weather Sensor',
icon : 'icon_weather.png',
settings: { lowVoltageValue: '' }, //blank will make it inherit from global settings.json lowVoltageValue, a specific value overrides the general setting, user can always choose his own setting in the UI
},
}
================
Any help would be greatly appreciated.
-- Mike