diff --git a/os/routers/glmain/config.yaml b/os/routers/glmain/config.yaml index 034ae4b..3a744a1 100644 --- a/os/routers/glmain/config.yaml +++ b/os/routers/glmain/config.yaml @@ -66,16 +66,30 @@ iot: apl: - name: 'hp-print' mac: '48:9E:BD:CB:07:E3' + - name: 'gm-eddie' + mac: '20:DF:B9:71:55:9C' + justMac: true - name: 'myq-garage' mac: 'CC:6A:10:8B:7D:D3' + - name: 'pod-korie' + mac: '04:99:B9:86:2D:AE' + justMac: true + - name: 'pod-livingroom' + mac: '04:99:B9:88:ED:3B' + justMac: true - name: 'appletv-livingroom' mac: '48:E1:5C:5B:CB:A3' - name: 'samsuntv-livingroom' mac: 'F0:70:4F:54:F3:F0' - name: 'leviot-humid1' mac: '3C:E9:0E:62:14:D8' + justMac: true - name: 'leviot-humid2' mac: '1C:9D:C2:39:61:F8' + justMac: true + - name: 'amzn-bedroom' + mac: 'D8:BE:65:F2:ED:18' + justMac: true router: - name: 'gl-basement' mac: '94:83:C4:31:D5:CE' diff --git a/os/routers/glmain/gen-mappings.py b/os/routers/glmain/gen-mappings.py index 70de256..b21a27f 100755 --- a/os/routers/glmain/gen-mappings.py +++ b/os/routers/glmain/gen-mappings.py @@ -41,20 +41,21 @@ with DNSMASQ_CONF.open('w') as dfp, SUMMARY.open('w') as sfp, ETHERS.open('w') a ip_prefix = ip_prefix_map[sub_domain] sfp.write(f'\n{cap1_and_join(sub_domain)}:') efp.write(f'#{cap1_and_join(sub_domain)}\n') - for ip_suffix, dvc in enumerate(configs, start=1): + ip_suffix = 0 + for dvc in configs: + ip_suffix += 1 mac = dvc['mac'] name = dvc['name'] sfp.write(f'\n {cap1_and_join(name)}:') ip = f"{ip_prefix}{ip_suffix}" host = f"{name}.{sub_domain}.{root_domain}" - sfp.write(f'\n ip: "{ip}"') + if not dvc.get('justMac', False): + sfp.write(f'\n ip: "{ip}"') sfp.write(f'\n host: "{host}"') - # dfp.write(f"dhcp-host={mac},{cap1_and_join(sub_domain, name)},{ip},infinite\n") - # dfp.write(f"address=/{host}/{ip}\n") - efp.write(f'{mac} {ip}\n') - efp.write(f'{mac} {host}\n') - if domain := dvc.get('domain'): - dfp.write(f"address=/{domain}/{ip}\n") - dfp.write(f"address=/.{domain}/{ip}\n") - sfp.write(f'\n domain: "{domain}"') - # efp.write(f'{mac} {domain}\n') \ No newline at end of file + if not dvc.get('justMac', False): + efp.write(f'{mac} {ip}\n') + if domain := dvc.get('domain'): + dfp.write(f"address=/{domain}/{ip}\n") + dfp.write(f"address=/.{domain}/{ip}\n") + sfp.write(f'\n domain: "{domain}"') + efp.write(f'{mac} {host}\n') \ No newline at end of file diff --git a/os/routers/glmain/output/etc/ethers b/os/routers/glmain/output/etc/ethers index 12eec24..c80a4ee 100644 --- a/os/routers/glmain/output/etc/ethers +++ b/os/routers/glmain/output/etc/ethers @@ -60,16 +60,18 @@ C8:2B:96:1D:DA:B4 shelly-laundry-light.iot.internal #Apl 48:9E:BD:CB:07:E3 10.0.15.1 48:9E:BD:CB:07:E3 hp-print.apl.internal -CC:6A:10:8B:7D:D3 10.0.15.2 +20:DF:B9:71:55:9C gm-eddie.apl.internal +CC:6A:10:8B:7D:D3 10.0.15.3 CC:6A:10:8B:7D:D3 myq-garage.apl.internal -48:E1:5C:5B:CB:A3 10.0.15.3 +04:99:B9:86:2D:AE pod-korie.apl.internal +04:99:B9:88:ED:3B pod-livingroom.apl.internal +48:E1:5C:5B:CB:A3 10.0.15.6 48:E1:5C:5B:CB:A3 appletv-livingroom.apl.internal -F0:70:4F:54:F3:F0 10.0.15.4 +F0:70:4F:54:F3:F0 10.0.15.7 F0:70:4F:54:F3:F0 samsuntv-livingroom.apl.internal -3C:E9:0E:62:14:D8 10.0.15.5 3C:E9:0E:62:14:D8 leviot-humid1.apl.internal -1C:9D:C2:39:61:F8 10.0.15.6 1C:9D:C2:39:61:F8 leviot-humid2.apl.internal +D8:BE:65:F2:ED:18 amzn-bedroom.apl.internal #Router 94:83:C4:31:D5:CE 10.0.16.1 94:83:C4:31:D5:CE gl-basement.router.internal diff --git a/os/routers/glmain/output/summary.yaml b/os/routers/glmain/output/summary.yaml index 6aad57f..95c3df0 100644 --- a/os/routers/glmain/output/summary.yaml +++ b/os/routers/glmain/output/summary.yaml @@ -93,21 +93,27 @@ Apl: Hp-print: ip: "10.0.15.1" host: "hp-print.apl.internal" + Gm-eddie: + host: "gm-eddie.apl.internal" Myq-garage: - ip: "10.0.15.2" - host: "myq-garage.apl.internal" - Appletv-livingroom: ip: "10.0.15.3" + host: "myq-garage.apl.internal" + Pod-korie: + host: "pod-korie.apl.internal" + Pod-livingroom: + host: "pod-livingroom.apl.internal" + Appletv-livingroom: + ip: "10.0.15.6" host: "appletv-livingroom.apl.internal" Samsuntv-livingroom: - ip: "10.0.15.4" + ip: "10.0.15.7" host: "samsuntv-livingroom.apl.internal" Leviot-humid1: - ip: "10.0.15.5" host: "leviot-humid1.apl.internal" Leviot-humid2: - ip: "10.0.15.6" host: "leviot-humid2.apl.internal" + Amzn-bedroom: + host: "amzn-bedroom.apl.internal" Router: Gl-basement: ip: "10.0.16.1"