mesh management stuff

This commit is contained in:
2018-09-01 16:56:45 +02:00
parent 3c882436bd
commit a06b3aee40
10 changed files with 109 additions and 12 deletions

View File

@@ -1,10 +1,10 @@
{
"stationMode": 0,
"stationMode": 1,
"channel": 11,
"meshPort": 5555,
"meshSSID": "WibblyWobbly",
"meshPassword": "th3r31sn0sp00n",
"stationSSID": "MyAP",
"stationPassword": "myApPassword",
"hostname": "mesh-node"
"meshSSID": "whateverYouLike",
"meshPassword": "somethingSneaky",
"stationSSID": "tErAx1d",
"stationPassword": "ramalamadingdong",
"hostname": "dbuggy"
}

10
data/example.config.json Normal file
View File

@@ -0,0 +1,10 @@
{
"stationMode": 0,
"channel": 11,
"meshPort": 5555,
"meshSSID": "WibblyWobbly",
"meshPassword": "th3r31sn0sp00n",
"stationSSID": "MyAP",
"stationPassword": "myApPassword",
"hostname": "mesh-node"
}

View File

@@ -1,10 +1,24 @@
// mesh topology:
const exampleMesh = [{
"nodeId": 757307929, "subs": [
{ "nodeId": 2138241514, "subs": [] },
{ "nodeId": 757307466, "subs": [] }
]
}, {
"nodeId": 757308244, "subs": [
{ "nodeId": 3154639577, "subs": [] }
]
}, {
"nodeId": 3954439712, "subs": []
}];
$(() => {
// load config
$.get("/config.json", (data) => {
$('.js-config').val(JSON.stringify(data, null, 4));
});
// add handlers
$('.js-restart').click(()=>{
$('.js-restart').click(() => {
$.post('/restart');
alert('restarting...');
});