Skip to content

Commit 11db6cc

Browse files
committed
Remove mac obfuscation - Change p1 legacy
1 parent 8201275 commit 11db6cc

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

scripts/pre-commit.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env bash
2-
grep -r --include="*.xml" '<mac_address>' userdata/* | grep -v '01234567' && echo "COMMIT REJECTED, found a mac-address, modify domain_objects and modules and set mac-address to 01234567....! (last 4 digits can remain)" && exit 1
32
grep -r --include="*.xml" '<short_id>' userdata/* | grep -v 'abcdefgh' && echo "COMMIT REJECTED, found a real short_id, modify domain_objects and set short_id to abcdefgh!" && exit 1
43
grep -r --include="*.xml" '<wifi_ip>' userdata/* | grep -v '_ip></wifi' | grep -v '127.0.0.' && echo "COMMIT REJECTED, found a WIFI ip address, modify domain_objects and set wifi_ip to 127.0.0.1!" && exit 1
54
grep -r --include="*.xml" 'lan_ip>' userdata/* | grep -v '_ip></lan' | grep -v '127.0.0.' && echo "COMMIT REJECTED, found a LAN ip address, modify domain_objects and set lan_ip to 127.0.0.1!" && exit 1
@@ -9,6 +8,5 @@ grep -r --include="*.xml" '<longitude>' userdata/* | grep -v '4.49' && echo "COM
98
grep -r --include="*.xml" '<latitude>' userdata/* | grep -v '52.21' && echo "COMMIT REJECTED, found your hometown, modify domain_objects and set latitude to 52.21 (that is: Plugwise HQ)!" && exit 1
109
grep -r --include="*.xml" '<city>' userdata/* | grep -v 'Sassenheim' && echo "COMMIT REJECTED, found your hometown, modify domain_objects and set city to Sassenheim (that is: Plugwise HQ)!" && exit 1
1110
grep -r --include="*.xml" '<postal_code>' userdata/* | grep -v '2171' && echo "COMMIT REJECTED, found your hometown, modify domain_objects and set postal_code to 2171 (that is: Plugwise HQ)!" && exit 1
12-
grep -r --include="*.xml" '<mac>' userdata/* | grep -v '01:23:45:67:' && echo "COMMIT REJECTED, found a mac-address, modify system_status and set mac-address to 01:23:45:67:..:..! (last 4 digits can remain)" && exit 1
1311
# No problems found
1412
exit 0

userdata/README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,22 @@ Don't commit test-data in `tests` that shouldn't be available to 'the internet'.
4848
To prevent this we've included a pre-commit hook that checks and validates that no private information is there (but do double-check yourselves!)
4949
See 'pre-commit.sh' for details
5050

51-
### Manual renumbering mac-addresses
51+
### Excerpt:
52+
53+
- [ ] modify `domain_objects` and set `short_id` to `abcdefgh`
54+
- [ ] modify `domain_objects` and set `wifi_ip` to `127.0.0.2`
55+
- [ ] modify `domain_objects` and set `lan_ip` to `127.0.0.1`
56+
- [ ] modify `domain_objects` and set all `ip_addresses` to `127.0.0.3`
57+
- [ ] modify `domain_objects` and set `hostname` to `smile000000`
58+
- [ ] modify `domain_objects` and set `longitude` to `4.49`
59+
- [ ] modify `domain_objects` and set `latitude` to `52.21`
60+
- [ ] modify `domain_objects` and set `city` to `Sassenheim`
61+
- [ ] modify `domain_objects` and set `postal_code` to `2171`
62+
63+
### Obfuscating mac-addresses
64+
65+
We used to obfuscate them as they weren't used within our module nor HomeAssistant.
66+
With 0.16.4 this was changed as such we recommend leaving them in, if you do wish to obfuscate
5267

5368
Prefix:
5469

@@ -62,15 +77,3 @@ Postfix:
6277
- 0101 = Controller Zigbee Mac Address
6378
- 0Axx = Nodes Zigbee mac addresses
6479

65-
### Excerpt:
66-
67-
- [ ] modify `domain_objects` and `modules` and set all occurrences of `mac-address` to `01234567????` (i.e. leave the last 4 digits as they are)
68-
- [ ] modify `domain_objects` and set `short_id` to `abcdefgh`
69-
- [ ] modify `domain_objects` and set `wifi_ip` to `127.0.0.2`
70-
- [ ] modify `domain_objects` and set `lan_ip` to `127.0.0.1`
71-
- [ ] modify `domain_objects` and set all `ip_addresses` to `127.0.0.3`
72-
- [ ] modify `domain_objects` and set `hostname` to `smile000000`
73-
- [ ] modify `domain_objects` and set `longitude` to `4.49`
74-
- [ ] modify `domain_objects` and set `latitude` to `52.21`
75-
- [ ] modify `domain_objects` and set `city` to `Sassenheim`
76-
- [ ] modify `domain_objects` and set `postal_code` to `2171`

userdata/smile_p1_v2/system_status_xml.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<hostname>smile000000</hostname>
1919
<type>LAN (cable)</type>
2020
<ip_address>127.0.0.1</ip_address>
21-
<mac_address>0123456789AB</mac_address>
21+
<mac_address>012345670001</mac_address>
2222
</network>
2323
</status>
2424

userdata/smile_p1_v2_2/system_status_xml.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
<hostname>smile000000</hostname>
1919
<type>LAN (cable)</type>
2020
<ip_address>127.0.0.1</ip_address>
21-
<mac_address>0123456789AB</mac_address>
21+
<mac_address>012345670001</mac_address>
2222
</network>
2323
</status>

0 commit comments

Comments
 (0)