srcfl / srcful-gateway

Srcful energy gateway to connect your solar inverter and mine src-token
https://srcful.io
MIT License
5 stars 2 forks source link

ethernet online endpoint #191

Closed h0bb3 closed 3 months ago

h0bb3 commented 4 months ago

To support the helium wallet we need an endpoint that reports true or false depending on network.

EthernetOnline - Characteristic
UUID: e5866bd6-0288-4476-98ca-ef7da6b4d289

Data Type: ASCII String

Example Value: "true" or "false"

maybe expand the network/address endpoint to include status for both network interface eth0 and wlan0?

h0bb3 commented 3 months ago

Now we get a json from api/network/address like

{
  "ip": "192.168.0.69",
  "port": 80,
  "eth0_mac": "D8:3A:DD:AD:95:30",
  "wlan0_mac": "D8:3A:DD:AD:95:31",
  "interfaces": {
    "eth0": "192.168.0.69",
    "wlan0": "192.168.0.70",
    "supervisor0": "10.114.104.1"
  }
}

This can be used to find interfaces that start with en/eth for ethernet, wl for wlan. if you have an ip in ethernet this is of course regarded as online.