Everything is working fine, of course I'm not able to do this on emoncms server because it's shared and dedicated to admin, and I understand and totally agree. So on emoncms server I tried custom decoder and then adding number of variable located in my frame. In this example there are 5
Unfortunatly I can't set the type 0 (byte) on variable type so I can't use custom decoder (even if the type 0 exists in the code) I can just select integer or unsigned long.
I 've done modification on my own emoncms server adding option 0 in file node_view.php
Original was :
out += "<select class='variable-datatype-selector' style='width:130px'><option value=1>Integer</option><option value=2>Unsigned long</option></select>";
I changed as follow :
out += "<select class='variable-datatype-selector' style='width:130px'><option value=0>byte</option><option value=1>Integer</option><option value=2>Unsigned long</option></select>";
Just tested and it's working fine, by the way adding option for unit such as dB and % would be fine
Is there any plan to be able to update this file on emoncms server and distrib ?
Node custom decoder byte data
Submitted by Charly86 on Sat, 26/07/2014 - 22:52Hello,
I'm using emoncms server and also a private server and I send my data from custom node/gateway each time I receive data to both server.
On my private server I was able to modify the file node_view.php to add my custom node as follow :
lowpowernodeTLB: {
name: 'Low Power Node Temp+Lux+Bat',
updateinterval: 60,
variables: [
{name: 'Command', type: 0 },
{name: 'Temperature', type: 1, scale: 0.1, units: '°C' },
{name: 'Luminosity', type: 1, scale: 0.1, units: 'Lux' },
{name: 'Battery Voltage', type: 1, scale:0.001, units: 'V'},
{name: 'RSSI', type: 0, units: 'db' }
]
},
Everything is working fine, of course I'm not able to do this on emoncms server because it's shared and dedicated to admin, and I understand and totally agree. So on emoncms server I tried custom decoder and then adding number of variable located in my frame. In this example there are 5
command : 1 byte
Temperature : 2 bytes (integer)
Luminosity : 2 bytes (integer)
Battery voltage : 2 bytes (integer)
RSSI : 1 bytes
Unfortunatly I can't set the type 0 (byte) on variable type so I can't use custom decoder (even if the type 0 exists in the code) I can just select integer or unsigned long.
I 've done modification on my own emoncms server adding option 0 in file node_view.php
Original was :
out += "<select class='variable-datatype-selector' style='width:130px'><option value=1>Integer</option><option value=2>Unsigned long</option></select>";
I changed as follow :
out += "<select class='variable-datatype-selector' style='width:130px'><option value=0>byte</option><option value=1>Integer</option><option value=2>Unsigned long</option></select>";
Just tested and it's working fine, by the way adding option for unit such as dB and % would be fine
Is there any plan to be able to update this file on emoncms server and distrib ?
Thanks for your help.