-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Node Information Exchange #1043
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more. @@ Coverage Diff @@
## master #1043 +/- ##
=======================================
Coverage 79.71% 79.72%
=======================================
Files 53 53
Lines 4536 4538 +2
=======================================
+ Hits 3616 3618 +2
Misses 920 920 see 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Nice! $RANDOM will not be available in the upcoming LibreMesh releases. Consider using libremesh.mk as, for example, here:
Fill the maintainer field |
@ilario this new packages are being developed on top of OpenWrt development branch which includes $RANDOM and are not retro-compatible with currently stable stuff anyway. OpenWrt developers are in the process to publish a new release which have $RANDOM just now (they have already published a few RC). So don't worry about this for this new packages ;) |
Ok, just be aware that this package will not work until when we will make a release based on OpenWrt 23, which is not going to be soon (seems). |
This pull request adds node information exchange using shared state. This information will be used in the UI an is going to be compared with the reference state to display alerts when a node has changed or gone.
This module has been tested using two tplinks wdr3500 with the following output
root@LiMe-462895:~#echo | shared-state reqsync node_info
{"LiMe-da4eaa":{"bleachTTL":30,"data":{"coordinates":{"long":"-64.19291","lat":"-31.43393"}, "board":"tplink,tl-wdr3500-v1","device":"Router","macs":["14:cc:20:da:4e:af","14:cc:20:da:4e:ac", "14:cc:20:da:4e:ab", "00:00:00:00:00:00", "14:cc:20:da:4e:aa"], "hostname":"LiMe-da4eaa", "ipv4":"10.13.78.170","uptime":37.829999999999998, "ipv6":"fd0d:fe46:8ce8::aa4e:da00","firmware_version":"nodeinfo"}, "author":"LiMe-da4eaa"},"LiMe-462895":{"bleachTTL":30,"data":{"ipv6":"fd0d:fe46:8ce8::9528:4600","board":"tplink,tl-wdr3500-v1","device":"Router","macs":["a0:f3:c1:46:28:96","a0:f3:c1:46:28:97","a0:f3:c1:46:28:9a","00:00:00:00:00:00","a0:f3:c1:46:28:95"],"hostname":"LiMe-462895","firmware_version":"nodeinfo","coordinates":{"long":"FIXME","lat":"FIXME"}, "uptime":38.789999999999999,"ipv4":"10.13.40.149"},"author":"LiMe-462895"}}
root@LiMe-462895:~# ubus -S call shared-state getFromSharedState '{"data_type": "node_info"}'
{"LiMe-462895":{"coordinates":{"long":"FIXME","lat":"FIXME"},"board":"tplink,tl-wdr3500-v1","device":"Router","macs":["a0:f3:c1:46:28:96","a0:f3:c1:46:28:97","a0:f3:c1:46:28:9a","00:00:00:00:00:00","a0:f3:c1:46:28:95"],"hostname":"LiMe-462895","ipv4":"10.13.40.149","uptime":38.790000,"ipv6":"fd0d:fe46:8ce8::9528:4600","firmware_version":"nodeinfo"},"LiMe-da4eaa":{"coordinates":{"long":"-64.19291","lat":"-31.43393"},"board":"tplink,tl-wdr3500-v1","device":"Router","uptime":37.830000,"hostname":"LiMe-da4eaa","firmware_version":"nodeinfo","ipv6":"fd0d:fe46:8ce8::aa4e:da00","macs":["14:cc:20:da:4e:af","14:cc:20:da:4e:ac","14:cc:20:da:4e:ab","00:00:00:00:00:00","14:cc:20:da:4e:aa"],"ipv4":"10.13.78.170"}}