Compare commits
571 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34ebe9601a | ||
|
|
fa299198fc | ||
|
|
6d81b0a856 | ||
|
|
dd095da97b | ||
|
|
1b6ce203b7 | ||
|
|
2850be4e48 | ||
|
|
7eca31de84 | ||
|
|
a64f960cc7 | ||
|
|
ce3a47a7e6 | ||
|
|
8395e1dc77 | ||
|
|
39a4761415 | ||
|
|
867ab9d6c2 | ||
|
|
5e03e3d3c2 | ||
|
|
adb5050621 | ||
|
|
026cd25c8c | ||
|
|
06ec97b42a | ||
|
|
b420a0e6f4 | ||
|
|
7cd52d5689 | ||
|
|
ad78ff3082 | ||
|
|
fe7be81f1e | ||
|
|
7674fc2ad0 | ||
|
|
d50181c347 | ||
|
|
8ca771fa5a | ||
|
|
7d557b2679 | ||
|
|
2f0c912388 | ||
|
|
57e6d0fbe3 | ||
|
|
e7c25fafda | ||
|
|
2a4772fe25 | ||
|
|
f1f7408208 | ||
|
|
feb8e5007b | ||
|
|
c4af1ee74f | ||
|
|
992e1b6121 | ||
|
|
9cc7529934 | ||
|
|
ef8715be6d | ||
|
|
e232b875fa | ||
|
|
f18171fecc | ||
|
|
a3c7a09211 | ||
|
|
a6f3bc3f71 | ||
|
|
44bcd386d1 | ||
|
|
01547f9a52 | ||
|
|
940d38af5c | ||
|
|
4e451c51e1 | ||
|
|
43def1c311 | ||
|
|
2978116207 | ||
|
|
a055465ce0 | ||
|
|
998b986604 | ||
|
|
7799431405 | ||
|
|
508c14a671 | ||
|
|
4a7ef87269 | ||
|
|
3a4fc707b0 | ||
|
|
5d2e320b07 | ||
|
|
d12613b91a | ||
|
|
e6a02f34ab | ||
|
|
0b2ffbfd77 | ||
|
|
cab6c54ed9 | ||
|
|
313024f273 | ||
|
|
91fc078c5e | ||
|
|
5b9d44a3e9 | ||
|
|
ed523bda24 | ||
|
|
e3a1a242d2 | ||
|
|
ddfade65d8 | ||
|
|
0ef8390df0 | ||
|
|
f43fe5f864 | ||
|
|
f9ddd7533a | ||
|
|
f9f18bc106 | ||
|
|
280dd8605b | ||
|
|
41324cf590 | ||
|
|
64132d5ce3 | ||
|
|
0e75732022 | ||
|
|
6975714922 | ||
|
|
7f3e0e6089 | ||
|
|
6ff5518738 | ||
|
|
be29daee77 | ||
|
|
a90ed40aee | ||
|
|
32ba6c31f0 | ||
|
|
caf00f99e3 | ||
|
|
aaa318e511 | ||
|
|
648cac0b06 | ||
|
|
a5d1a2c0ee | ||
|
|
55f1b4b129 | ||
|
|
b805363c60 | ||
|
|
846b166ae9 | ||
|
|
4e039c2cc9 | ||
|
|
e5556fe80b | ||
|
|
c5aa65a780 | ||
|
|
30cf1435da | ||
|
|
fca46a3f54 | ||
|
|
0dca85d67b | ||
|
|
d9a5a21fe0 | ||
|
|
68eaa7d39b | ||
|
|
3231d0747e | ||
|
|
2617956b38 | ||
|
|
07614226b3 | ||
|
|
cddb170f24 | ||
|
|
ba7915ca7c | ||
|
|
ee12db4f51 | ||
|
|
f01fbfca53 | ||
|
|
fab637cf60 | ||
|
|
b2e144efcf | ||
|
|
10308ce738 | ||
|
|
70f5b0f912 | ||
|
|
d724a90085 | ||
|
|
1ab529785a | ||
|
|
3a81e62bbe | ||
|
|
4882916b5c | ||
|
|
1f7e43256a | ||
|
|
a0d3632fd7 | ||
|
|
b25564a89f | ||
|
|
191d9fa562 | ||
|
|
e009b4e54e | ||
|
|
811625b706 | ||
|
|
15fa452c7c | ||
|
|
e725c01597 | ||
|
|
35b884713c | ||
|
|
d5fc9f6fc6 | ||
|
|
19c8396b1c | ||
|
|
f4622a068b | ||
|
|
9922862299 | ||
|
|
e7fc504975 | ||
|
|
6cdb943763 | ||
|
|
3e937a4e5d | ||
|
|
fcd3e3ca25 | ||
|
|
772004c0a2 | ||
|
|
c3e5ce344c | ||
|
|
b11b1d5e37 | ||
|
|
b5d34990df | ||
|
|
a287d310ac | ||
|
|
afe6190c46 | ||
|
|
2125945728 | ||
|
|
fb60127cf7 | ||
|
|
a07c55889f | ||
|
|
a675f56f9c | ||
|
|
0590ec375d | ||
|
|
48bd352619 | ||
|
|
40016f314e | ||
|
|
b9234f6f64 | ||
|
|
beafcd300b | ||
|
|
a92524eaf8 | ||
|
|
a60dd8a60a | ||
|
|
53296ccf42 | ||
|
|
42a627e32e | ||
|
|
c38034c69b | ||
|
|
0ec1a8ece3 | ||
|
|
45275c271e | ||
|
|
116761b46e | ||
|
|
a2c13fd0da | ||
|
|
b727f84c72 | ||
|
|
3706625760 | ||
|
|
0e1d2211ec | ||
|
|
785bec0269 | ||
|
|
2a4a199ae6 | ||
|
|
b6b9db5431 | ||
|
|
55bdd4437a | ||
|
|
3948fff184 | ||
|
|
c4b099b752 | ||
|
|
5cfcc015f4 | ||
|
|
724768afc4 | ||
|
|
efc20f1da9 | ||
|
|
b071344871 | ||
|
|
e0e98f0ec1 | ||
|
|
53d34852f1 | ||
|
|
c26073b2a3 | ||
|
|
b12a632618 | ||
|
|
420be1b943 | ||
|
|
142d280805 | ||
|
|
196b79e4c8 | ||
|
|
2ef1700cfe | ||
|
|
cbbb52d32a | ||
|
|
6bded12ec5 | ||
|
|
5ae56f265e | ||
|
|
705b3e34d1 | ||
|
|
fcb4ccb462 | ||
|
|
e0cd14e904 | ||
|
|
bb6e8838b4 | ||
|
|
5325f8f845 | ||
|
|
113b8bf820 | ||
|
|
7e41168606 | ||
|
|
0af2378d05 | ||
|
|
7f4498c062 | ||
|
|
6e9e988ff0 | ||
|
|
1f03013c98 | ||
|
|
6690e809fb | ||
|
|
b41dd862b6 | ||
|
|
04c269d982 | ||
|
|
f8a86058a1 | ||
|
|
47dda366e3 | ||
|
|
0700d22d43 | ||
|
|
bf633f20c4 | ||
|
|
297681bcff | ||
|
|
68906b54a6 | ||
|
|
0c1d666afd | ||
|
|
18a38e4104 | ||
|
|
ef0041caa6 | ||
|
|
1ce51f6c85 | ||
|
|
c23b2a477e | ||
|
|
0dd77dbaa8 | ||
|
|
29524c2123 | ||
|
|
e2fb5e2673 | ||
|
|
751a0edca7 | ||
|
|
a8e62e086c | ||
|
|
35eb69bebb | ||
|
|
5c7c0699b2 | ||
|
|
460482a6dc | ||
|
|
28db4873a0 | ||
|
|
98de734761 | ||
|
|
b742c8f3c6 | ||
|
|
4cfd274e52 | ||
|
|
4f7bd0436a | ||
|
|
7e31a60000 | ||
|
|
793bc877fc | ||
|
|
5ab6de21dc | ||
|
|
7c5a5bcf65 | ||
|
|
2e203d7713 | ||
|
|
db5e242ad8 | ||
|
|
5be921a342 | ||
|
|
ddd24b20aa | ||
|
|
7c1ee20e7b | ||
|
|
5f0adc0f10 | ||
|
|
244f78ad1a | ||
|
|
9066af8dc7 | ||
|
|
5cfb58c2e6 | ||
|
|
fb8d9e51a6 | ||
|
|
77ce5d8e90 | ||
|
|
8c69f9a738 | ||
|
|
dd87d70876 | ||
|
|
52992f09ee | ||
|
|
e8a56d5fc7 | ||
|
|
6aa02d54c8 | ||
|
|
9dbf9137c7 | ||
|
|
c0a9a01b41 | ||
|
|
7b203b196f | ||
|
|
a72f02a779 | ||
|
|
50c06e2cfe | ||
|
|
e4d4753181 | ||
|
|
04daf551fb | ||
|
|
4b51f0f235 | ||
|
|
5e4ccca663 | ||
|
|
6b0ec39759 | ||
|
|
1f7d845a32 | ||
|
|
6de5b719f3 | ||
|
|
f6d2bef285 | ||
|
|
c444a108a5 | ||
|
|
90859ee6b8 | ||
|
|
78dd856a97 | ||
|
|
9897ccc563 | ||
|
|
701e5904c5 | ||
|
|
54ea17d345 | ||
|
|
327fed6f08 | ||
|
|
8fe1a1edf2 | ||
|
|
6fd8dc0432 | ||
|
|
f586336ae3 | ||
|
|
1527ee7d45 | ||
|
|
c543b38829 | ||
|
|
6d12d7120c | ||
|
|
c1d4ba772e | ||
|
|
a03d4113e7 | ||
|
|
8751b6325d | ||
|
|
ff02dd43a9 | ||
|
|
b772fb6323 | ||
|
|
586c0cba25 | ||
|
|
18bc6753db | ||
|
|
b79e6112b1 | ||
|
|
f5acfce578 | ||
|
|
4b902e2544 | ||
|
|
2e4e4328f2 | ||
|
|
03089e92cb | ||
|
|
86939d4890 | ||
|
|
d7d25083dc | ||
|
|
92e8beadc0 | ||
|
|
217247b28e | ||
|
|
4828f5a727 | ||
|
|
062a3634a9 | ||
|
|
376cd0cf90 | ||
|
|
2a20893a58 | ||
|
|
f3dba112de | ||
|
|
b037d6bb64 | ||
|
|
6f7eacddff | ||
|
|
4185411315 | ||
|
|
2a1b5a5f6d | ||
|
|
246a4f96fe | ||
|
|
c7d235b367 | ||
|
|
c5c8fbc2a0 | ||
|
|
8adf591c4e | ||
|
|
aa893f7ede | ||
|
|
f8b1725e94 | ||
|
|
ae7e3d11d5 | ||
|
|
73b20a0766 | ||
|
|
d8cf961258 | ||
|
|
bccd19812d | ||
|
|
6954ff5432 | ||
|
|
6200f31b83 | ||
|
|
5408b3c2a9 | ||
|
|
bd0b3ebb26 | ||
|
|
895a9bc6b1 | ||
|
|
ff935fc920 | ||
|
|
3833421e5f | ||
|
|
ebdc357a47 | ||
|
|
7da617e8c2 | ||
|
|
0b86761d2c | ||
|
|
d697f7e37f | ||
|
|
db859e3ff5 | ||
|
|
94d22957bd | ||
|
|
1ebaf443cc | ||
|
|
a336f711b0 | ||
|
|
e6d3b47d4f | ||
|
|
eb479f8216 | ||
|
|
38cba4e8da | ||
|
|
bc6d45ecf2 | ||
|
|
097131d7fb | ||
|
|
2107ca50e4 | ||
|
|
178f603937 | ||
|
|
21687368c6 | ||
|
|
6054e900e6 | ||
|
|
3da5275624 | ||
|
|
3fda2cfe7a | ||
|
|
2bb651f95c | ||
|
|
e2442a26ee | ||
|
|
cbd2ab4a7a | ||
|
|
76f8e2c343 | ||
|
|
ab101c8622 | ||
|
|
f425abb52d | ||
|
|
dc5bfff655 | ||
|
|
eb59245118 | ||
|
|
d18fd27a24 | ||
|
|
6f09f523e4 | ||
|
|
e78d59c31a | ||
|
|
e7f3217d7b | ||
|
|
ab534ce60a | ||
|
|
933246eae8 | ||
|
|
5c38d1cf3e | ||
|
|
580085f717 | ||
|
|
9831d4aa78 | ||
|
|
a3561d5c58 | ||
|
|
2a524cd0ac | ||
|
|
254e010594 | ||
|
|
24025d6785 | ||
|
|
4c92e592d6 | ||
|
|
f192ddae81 | ||
|
|
1cd2446365 | ||
|
|
6d26102b8e | ||
|
|
8e9da8f255 | ||
|
|
72bdb6e363 | ||
|
|
6df942f488 | ||
|
|
1e323ac3b9 | ||
|
|
05bdbaf1f5 | ||
|
|
6cca25788e | ||
|
|
e929f87ea9 | ||
|
|
21a4102553 | ||
|
|
768645fc0a | ||
|
|
c670549dea | ||
|
|
147b2ca33e | ||
|
|
c645b82ed3 | ||
|
|
26bb8a0fea | ||
|
|
507ed13770 | ||
|
|
a0f53a0c52 | ||
|
|
13bbc81b7f | ||
|
|
7412ba2697 | ||
|
|
dce7b7e64b | ||
|
|
7627d6c369 | ||
|
|
9fc9adea1c | ||
|
|
46df07fe40 | ||
|
|
0aeb5555e7 | ||
|
|
181fe3c909 | ||
|
|
867d6a4ef8 | ||
|
|
d52216a73e | ||
|
|
d70b41a454 | ||
|
|
332c366561 | ||
|
|
b572ad97f8 | ||
|
|
aa307f8690 | ||
|
|
19223312b5 | ||
|
|
74bc5aa7a0 | ||
|
|
e66e8a96ff | ||
|
|
ce95360a64 | ||
|
|
7802aeaab1 | ||
|
|
37ce3566bf | ||
|
|
606bac100a | ||
|
|
be569d1802 | ||
|
|
3e21105b2d | ||
|
|
9946827431 | ||
|
|
90d03ca77f | ||
|
|
7727b17122 | ||
|
|
fbc4c8c502 | ||
|
|
5d6a4ea0a4 | ||
|
|
91ce486bde | ||
|
|
523139749e | ||
|
|
5b9f3b7aed | ||
|
|
af76243761 | ||
|
|
605dc4901c | ||
|
|
54fb950513 | ||
|
|
ff84278edf | ||
|
|
f15cf5d75e | ||
|
|
33070af111 | ||
|
|
53573184f3 | ||
|
|
decc4788a7 | ||
|
|
f9597c786e | ||
|
|
af8f5a7c24 | ||
|
|
a830a52863 | ||
|
|
037bac24de | ||
|
|
837c3cf802 | ||
|
|
75956c087c | ||
|
|
88528b4099 | ||
|
|
6176d34e84 | ||
|
|
f2dda26bbb | ||
|
|
402ecf67d7 | ||
|
|
a83a6c1c53 | ||
|
|
5beb13894c | ||
|
|
c3fa618ab2 | ||
|
|
7713ae8566 | ||
|
|
7ae860ec72 | ||
|
|
376008a735 | ||
|
|
feed10184b | ||
|
|
59ca29f6a8 | ||
|
|
644a3fa40b | ||
|
|
a2c1c8fc61 | ||
|
|
b823f029ea | ||
|
|
fd907deec1 | ||
|
|
c1b56e25ad | ||
|
|
5491088cec | ||
|
|
04271accc1 | ||
|
|
a332e38b97 | ||
|
|
17bd85ebd0 | ||
|
|
4207216770 | ||
|
|
02491e074b | ||
|
|
e79a0585f0 | ||
|
|
859220d33f | ||
|
|
5d47105951 | ||
|
|
e71f937856 | ||
|
|
d730aac33b | ||
|
|
e121ec75d8 | ||
|
|
6479fd6a63 | ||
|
|
603f2925ce | ||
|
|
1284f3f848 | ||
|
|
620e355a27 | ||
|
|
47ddf57547 | ||
|
|
fcbfe4d96f | ||
|
|
d789d6ff3b | ||
|
|
b4f18de030 | ||
|
|
00d5d215cd | ||
|
|
8de5a58a6b | ||
|
|
012794e682 | ||
|
|
38eb2d8c19 | ||
|
|
d95137adbc | ||
|
|
cde3f80fca | ||
|
|
cdc012743f | ||
|
|
23c90315a5 | ||
|
|
8d938f111c | ||
|
|
cff6c02d57 | ||
|
|
0c92f7401c | ||
|
|
195a0d4e77 | ||
|
|
43f50e0e0a | ||
|
|
f2f20afd9c | ||
|
|
f22cfbb223 | ||
|
|
803c5116bd | ||
|
|
a542fbc931 | ||
|
|
85a70016fa | ||
|
|
778daf8645 | ||
|
|
efa99f970c | ||
|
|
953f2d4110 | ||
|
|
c3c0ca0a1b | ||
|
|
dc83853d2e | ||
|
|
f5123e9aa1 | ||
|
|
2da69dd451 | ||
|
|
2858123c1b | ||
|
|
9d4488f8df | ||
|
|
f78c8e3582 | ||
|
|
431d6714b5 | ||
|
|
550a3c1a0b | ||
|
|
b6f5e72638 | ||
|
|
958ff37d7d | ||
|
|
1ea9da22c7 | ||
|
|
0c93c52e3d | ||
|
|
41784511e9 | ||
|
|
a78fdc0b59 | ||
|
|
cc032fdf29 | ||
|
|
f696e0b59b | ||
|
|
f67f12a188 | ||
|
|
719ed56e21 | ||
|
|
cc72d0e0b3 | ||
|
|
ab175ec9ec | ||
|
|
398407350c | ||
|
|
5e33a15e85 | ||
|
|
7f51534e91 | ||
|
|
0f5af6b274 | ||
|
|
7886ce668e | ||
|
|
0f4848c872 | ||
|
|
6911d203ca | ||
|
|
e96b5bbf1b | ||
|
|
8457db50f6 | ||
|
|
279c5f8321 | ||
|
|
889b9153fa | ||
|
|
0de1d0bb6f | ||
|
|
bf13965a9e | ||
|
|
7b52efd332 | ||
|
|
c936f605d6 | ||
|
|
9d0ceb9ca8 | ||
|
|
b33273e3cc | ||
|
|
d9b45d037b | ||
|
|
8c75a9530e | ||
|
|
73d00f786a | ||
|
|
ab016fff93 | ||
|
|
a215aa7766 | ||
|
|
d747c84a14 | ||
|
|
26634f96b0 | ||
|
|
97669cf4ad | ||
|
|
e12980db11 | ||
|
|
732639814b | ||
|
|
c07c2e66d6 | ||
|
|
9b70802450 | ||
|
|
30d73c3a6e | ||
|
|
bd905c3595 | ||
|
|
1a2e70b1fb | ||
|
|
d6da7b2715 | ||
|
|
059a430f9a | ||
|
|
8ade50c2a6 | ||
|
|
5b94d8ff61 | ||
|
|
232b9c279d | ||
|
|
9b6a6af6ec | ||
|
|
9671e1eba3 | ||
|
|
78e531a7e9 | ||
|
|
478d63505d | ||
|
|
d8dfaaa730 | ||
|
|
f311b70b37 | ||
|
|
52bc2b14c9 | ||
|
|
2ddfc16d6a | ||
|
|
51ab4a7f07 | ||
|
|
e90a30bfde | ||
|
|
a63e6962d3 | ||
|
|
951ccf7de5 | ||
|
|
001e3376df | ||
|
|
9e4bf93f0a | ||
|
|
e5ac823f69 | ||
|
|
73fd228e2f | ||
|
|
fdac8f88af | ||
|
|
9c8552869c | ||
|
|
be75b013c0 | ||
|
|
79274e490d | ||
|
|
47293eebe4 | ||
|
|
90b62638ed | ||
|
|
78e766156d | ||
|
|
916b5550d9 | ||
|
|
48016240f9 | ||
|
|
518b408205 | ||
|
|
73a0359597 | ||
|
|
bbe82f9cdc | ||
|
|
4786735d4c | ||
|
|
227eb7b6ff | ||
|
|
00edd94033 | ||
|
|
ccd818e1ab | ||
|
|
f6066fbbf3 | ||
|
|
9c09740a41 | ||
|
|
eff00f1fe0 | ||
|
|
f484f3eb0e | ||
|
|
517a40b0a6 | ||
|
|
75f3c8c592 | ||
|
|
6d0c722c98 | ||
|
|
d63516fd49 | ||
|
|
c114b777c7 | ||
|
|
a06729b535 | ||
|
|
0ea21991ea | ||
|
|
1994f16b82 | ||
|
|
f6df84bf9a | ||
|
|
6d3d4adc7e | ||
|
|
27cb5dd833 | ||
|
|
7e6ac860fd | ||
|
|
70ed0b538a | ||
|
|
0a317450f6 | ||
|
|
a6751c787c | ||
|
|
aed56b0b56 | ||
|
|
550b216ba6 | ||
|
|
aef78962fb | ||
|
|
8ee713b616 |
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
custom: ["https://paypal.me/gskjold"]
|
||||
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report a bug
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Hardware information:**
|
||||
- Country: [e.g. Norway]
|
||||
- Meter: [e.g. Aidon]
|
||||
- Encryption enabled [yes/no]
|
||||
- AMS reader: [e.g. Pow-U, ESP32 etc]
|
||||
- M-bus adapter (if applicable):
|
||||
|
||||
**Relevant firmware information:**
|
||||
- Version: [e.g. 2.1.0]
|
||||
- MQTT: [yes/no]
|
||||
- HAN GPIO: [e.g. GPIO5]
|
||||
- HAN baud and parity: [e.g. 2400 8E1]
|
||||
- Temperature sensors [e.g. 3xDS18B20]
|
||||
- ENTSO-E API enabled: [yes/no]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Meter configuration
|
||||
url: https://github.com/gskjold/AmsToMqttBridge/wiki/Known-hardware-configurations
|
||||
about: Please check your meter configuration here first.
|
||||
- name: Frequently asked questions
|
||||
url: https://github.com/gskjold/AmsToMqttBridge/wiki/FAQ
|
||||
about: Please check frequently asked questions first.
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
26
.github/ISSUE_TEMPLATE/support.md
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: Support
|
||||
about: Request support
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe your problem**
|
||||
A clear and concise description of what the problem is.
|
||||
|
||||
**Hardware information:**
|
||||
- Country: [e.g. Norway]
|
||||
- Meter: [e.g. Aidon]
|
||||
- Encryption enabled [yes/no]
|
||||
- AMS reader: [e.g. Pow-U, ESP32 etc]
|
||||
- M-bus adapter (if applicable):
|
||||
|
||||
**Relevant firmware information:**
|
||||
- Version: [e.g. 2.1.0]
|
||||
- MQTT: [yes/no]
|
||||
- HAN GPIO: [e.g. GPIO5]
|
||||
- HAN baud and parity: [e.g. 2400 8E1]
|
||||
- Temperature sensors [e.g. 3xDS18B20]
|
||||
- ENTSO-E API enabled: [yes/no]
|
||||
10
.github/workflows/build.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
- web/**
|
||||
- platformio.ini
|
||||
branches:
|
||||
- master
|
||||
- '*'
|
||||
tags:
|
||||
- '*'
|
||||
- '!v*.*.*'
|
||||
@@ -32,16 +32,14 @@ jobs:
|
||||
with:
|
||||
path: ~/.pio/libdeps
|
||||
key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }}
|
||||
- name: Set up Python 3.7
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -U platformio
|
||||
- name: Configure build targets
|
||||
run: echo "[platformio]\ndefault_envs = hw1esp12e, esp12e, esp32" > platformio-user.ini
|
||||
pip install -U platformio css_html_js_minify
|
||||
- name: PlatformIO lib install
|
||||
run: pio lib install
|
||||
- name: PlatformIO run
|
||||
|
||||
71
.github/workflows/release.yml
vendored
@@ -14,11 +14,15 @@ jobs:
|
||||
steps:
|
||||
- name: Check out code from repo
|
||||
uses: actions/checkout@v1
|
||||
- name: Get release version from tag
|
||||
- name: Get release version for filenames
|
||||
id: release_tag
|
||||
env:
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:11})
|
||||
- name: Get release version for code
|
||||
env:
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
run: echo "GITHUB_TAG=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV
|
||||
- name: Cache Python dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
@@ -29,18 +33,20 @@ jobs:
|
||||
with:
|
||||
path: ~/.pio/libdeps
|
||||
key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }}
|
||||
- name: Set up Python 3.7
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -U platformio
|
||||
pip install -U platformio css_html_js_minify
|
||||
- name: PlatformIO lib install
|
||||
run: pio lib install
|
||||
- name: PlatformIO run
|
||||
run: pio run
|
||||
- name: Create zip files
|
||||
run: /bin/sh scripts/mkzip.sh
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1.0.0
|
||||
@@ -51,35 +57,46 @@ jobs:
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload hw1esp12e binary to release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
|
||||
- name: Upload esp8266 zip to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: .pio/build/hw1esp12e/firmware.bin
|
||||
asset_name: ams2mqtt-hw1esp12e-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload esp12e binary to release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
asset_path: esp8266.zip
|
||||
asset_name: ams2mqtt-esp8266-${{ steps.release_tag.outputs.tag }}.zip
|
||||
asset_content_type: application/zip
|
||||
- name: Upload esp32 zip to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: .pio/build/esp12e/firmware.bin
|
||||
asset_name: ams2mqtt-esp12e-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload d1mini binary to release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
asset_path: esp32.zip
|
||||
asset_name: ams2mqtt-esp32-${{ steps.release_tag.outputs.tag }}.zip
|
||||
asset_content_type: application/zip
|
||||
- name: Upload esp32s2 zip to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: .pio/build/d1mini/firmware.bin
|
||||
asset_name: ams2mqtt-d1mini-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_path: esp32s2.zip
|
||||
asset_name: ams2mqtt-esp32s2-${{ steps.release_tag.outputs.tag }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload esp8266 binary to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: .pio/build/esp8266/firmware.bin
|
||||
asset_name: ams2mqtt-esp8266-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload esp32 binary to release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
@@ -87,21 +104,21 @@ jobs:
|
||||
asset_path: .pio/build/esp32/firmware.bin
|
||||
asset_name: ams2mqtt-esp32-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload lolind32 binary to release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
- name: Upload esp32solo binary to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: .pio/build/lolind32/firmware.bin
|
||||
asset_name: ams2mqtt-lolind32-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_path: .pio/build/esp32solo/firmware.bin
|
||||
asset_name: ams2mqtt-esp32solo-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload featheresp32 binary to release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
- name: Upload esp32s2 binary to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: .pio/build/featheresp32/firmware.bin
|
||||
asset_name: ams2mqtt-featheresp32-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_path: .pio/build/esp32s2/firmware.bin
|
||||
asset_name: ams2mqtt-esp32s2-${{ steps.release_tag.outputs.tag }}.bin
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
5
.gitignore
vendored
@@ -10,3 +10,8 @@ platformio-user.ini
|
||||
/src/version.h
|
||||
/src/web/root
|
||||
/src/AmsToMqttBridge.ino.cpp
|
||||
/test
|
||||
/web/test.html
|
||||
/sdkconfig
|
||||
/.tmp
|
||||
/*.zip
|
||||
|
||||
617
LICENSE
Normal file
@@ -0,0 +1,617 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
31
README.md
@@ -1,31 +1,12 @@
|
||||
# AMS <-> MQTT Bridge
|
||||
Orignally designed and coded by [@roarfred](https://github.com/roarfred), see the original repo at [roarfred/AmsToMqttBridge](https://github.com/roarfred/AmsToMqttBridge)
|
||||
# AMS MQTT Bridge
|
||||
This code is designed to decode data from electric smart meters installed in many countries in Europe these days. The data is presented in a graphical web interface and can also send the data to a MQTT broker which makes it suitable for home automation project. Originally it was only designed to work with Norwegian meters, but has since been adapter to read any IEC-62056-7-5 or IEC-62056-21 compliant meters.
|
||||
|
||||
This repository contains the code and schematics necessary to build a device to receive and convert data from AMS electrical meters installed in Norway. The code can be used on both ESP8266 and ESP32, both as custom build devices or built from readily available development modules. It reads data from the HAN port of the meter and sends this to a configured MQTT bus.
|
||||
Later development have added Energy usage graph for both day and month, as well as future energy price (Prices only available for ESP32). The code can run on any ESP8266 or ESP32 hardware which you can read more about in the [WiKi](https://github.com/gskjold/AmsToMqttBridge/wiki). If you don't have the knowledge to set up a ESP device yourself, have a look at the shop at [amsleser.no](https://amsleser.no/).
|
||||
|
||||
There is also a web interface available on runtime, showing meter data in real time.
|
||||
|
||||
<img src="webui.jpg" width="480">
|
||||
|
||||
## Release binaries
|
||||
|
||||
In the [Release section](https://github.com/gskjold/AmsToMqttBridge/releases) of this repository, you will find precompiled binaries for some common boards.
|
||||
|
||||
- _hw1esp12e_ :: First version custom hardware with ESP 12E of 12F chip
|
||||
- _esp12e_ :: General ESP8266 board with 12E or 12F chip
|
||||
- _d1mini_ :: Wemos D1 mini
|
||||
- _esp32_ :: General ESP32 board
|
||||
- _lolind32_ :: Wemos D32
|
||||
- _featheresp32_ :: Adafruit ESP32 feather
|
||||
|
||||
### Flashing binaries with [esptool.py](https://github.com/espressif/esptool)
|
||||
|
||||
Linux:
|
||||
```esptool.py --port /dev/ttyUSB0 write_flash 0x0 binary-file.bin```
|
||||
|
||||
Windows:
|
||||
```esptool.py --port COM1 write_flash 0x0 binary-file.bin```
|
||||
<img src="webui.png">
|
||||
|
||||
Go to the [WiKi](https://github.com/gskjold/AmsToMqttBridge/wiki) for information on how to get your own device! And find the latest prebuilt firmware file at the [release section](https://github.com/gskjold/AmsToMqttBridge/releases).
|
||||
|
||||
## Building this project with PlatformIO
|
||||
To build this project, you need [PlatformIO](https://platformio.org/) installed.
|
||||
@@ -36,4 +17,4 @@ It is recommended to use Visual Studio Code with the PlatformIO plugin for devel
|
||||
|
||||
[PlatformIO vscode plugin](https://platformio.org/install/ide?install=vscode)
|
||||
|
||||
Copy the ```platformio-user.ini-example``` to ```platformio-user.ini``` and customize to your preference. The code will adapt to the platform and board set in your profile. If you are using the original board design by [@roarfred](https://github.com/roarfred) use build flag -D HW_ROARFRED=1
|
||||
For development purposes, copy the ```platformio-user.ini-example``` to ```platformio-user.ini``` and customize to your preference. The code will adapt to the platform and board set in your profile.
|
||||
|
||||
BIN
doc/Blue_Book_Edition_13-Excerpt.pdf
Normal file
32
doc/Denmark/Kamstrup_encrypted_OBIS.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
1.1.1.8.0.255 - Active+ Energy
|
||||
1.1.2.8.0.255 - Active- Energy
|
||||
1.1.3.8.0.255 - Reactive+ Energy
|
||||
1.1.4.8.0.255 - Reactive- Energy
|
||||
1.1.0.0.1.255 - Meter number 1
|
||||
1.1.1.7.0.255 - Active+ Instantaneous value
|
||||
1.1.2.7.0.255 - Active- Instantaneous value
|
||||
1.1.3.7.0.255 - Reactive+ Instantaneous value
|
||||
1.1.4.7.0.255 - Reactive- Instantaneous value
|
||||
0.1.1.0.0.255 - Current date/time
|
||||
1.1.32.7.0.255 - L1 Voltage Instantaneous value
|
||||
1.1.52.7.0.255 - L2 Voltage Instantaneous value
|
||||
1.1.72.7.0.255 - L3 Voltage Instantaneous value
|
||||
1.1.31.7.0.255 - L1 Current Instantaneous value
|
||||
1.1.51.7.0.255 - L2 Current Instantaneous value
|
||||
1.1.71.7.0.255 - L3 Current Instantaneous value
|
||||
1.1.21.7.0.255 - L1 Active+ Instantaneous value
|
||||
1.1.41.7.0.255 - L2 Active+ Instantaneous value
|
||||
1.1.61.7.0.255 - L3 Active+ Instantaneous value
|
||||
1.1.33.7.0.255 - L1 (cos.phi) (PF) Instantaneous value
|
||||
1.1.53.7.0.255 - L2 (cos.phi) (PF) Instantaneous value
|
||||
1.1.73.7.0.255 - L3 (cos.phi) (PF) Instantaneous value
|
||||
1.1.13.7.0.255 - Avegage (cos.phi) (PF) Inst. value
|
||||
1.1.22.7.0.255 - L1 Active- Instantaneous value
|
||||
1.1.42.7.0.255 - L2 Active- Instantaneous value
|
||||
1.1.62.7.0.255 - L3 Active- Instantaneous value
|
||||
1.1.22.8.0.255 - L1 Active- Energy
|
||||
1.1.42.8.0.255 - L2 Active- Energy
|
||||
1.1.62.8.0.255 - L3 Active- Energy
|
||||
1.1.21.8.0.255 - L1 Active+ Energy
|
||||
1.1.41.8.0.255 - L2 Active+ Energy
|
||||
1.1.61.8.0.255 - L3 Active+ Energy
|
||||
112
doc/Denmark/Kamstrup_encrypted_data.xml
Normal file
@@ -0,0 +1,112 @@
|
||||
<GatewayRequest>
|
||||
<NetworkId Value="231" />
|
||||
<PhysicalDeviceAddress Value="" />
|
||||
<DataNotification>
|
||||
<LongInvokeIdAndPriority Value="40000000" />
|
||||
<DateTime Value="" />
|
||||
<NotificationBody>
|
||||
<DataValue>
|
||||
<Structure Qty="41" >
|
||||
<String Value="Kamstrup_V0001" />
|
||||
<!--1.1.1.8.0.255-->
|
||||
<OctetString Value="0101010800FF" />
|
||||
<UInt32 Value="001194CA" />
|
||||
<!--1.1.2.8.0.255-->
|
||||
<OctetString Value="0101020800FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<!--1.1.3.8.0.255-->
|
||||
<OctetString Value="0101030800FF" />
|
||||
<UInt32 Value="0000127E" />
|
||||
<!--1.1.4.8.0.255-->
|
||||
<OctetString Value="0101040800FF" />
|
||||
<UInt32 Value="0009550E" />
|
||||
<!--1.1.0.0.1.255-->
|
||||
<OctetString Value="0101000001FF" />
|
||||
<UInt32 Value="0144ADE1" />
|
||||
<!--1.1.1.7.0.255-->
|
||||
<OctetString Value="0101010700FF" />
|
||||
<UInt32 Value="00000531" />
|
||||
<!--1.1.2.7.0.255-->
|
||||
<OctetString Value="0101020700FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<!--1.1.3.7.0.255-->
|
||||
<OctetString Value="0101030700FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<!--1.1.4.7.0.255-->
|
||||
<OctetString Value="0101040700FF" />
|
||||
<UInt32 Value="00000054" />
|
||||
<!--0.1.1.0.0.255-->
|
||||
<OctetString Value="0001010000FF" />
|
||||
<!--2020-05-12 10:24:50-->
|
||||
<OctetString Value="07E4050C020A1832FF800080" />
|
||||
<!--1.1.32.7.0.255-->
|
||||
<OctetString Value="0101200700FF" />
|
||||
<UInt16 Value="00E4" />
|
||||
<!--1.1.52.7.0.255-->
|
||||
<OctetString Value="0101340700FF" />
|
||||
<UInt16 Value="00E5" />
|
||||
<!--1.1.72.7.0.255-->
|
||||
<OctetString Value="0101480700FF" />
|
||||
<UInt16 Value="00E3" />
|
||||
<!--1.1.31.7.0.255-->
|
||||
<OctetString Value="01011F0700FF" />
|
||||
<UInt32 Value="0000004B" />
|
||||
<!--1.1.51.7.0.255-->
|
||||
<OctetString Value="0101330700FF" />
|
||||
<UInt32 Value="00000070" />
|
||||
<!--1.1.71.7.0.255-->
|
||||
<OctetString Value="0101470700FF" />
|
||||
<UInt32 Value="000001E4" />
|
||||
<!--1.1.21.7.0.255-->
|
||||
<OctetString Value="0101150700FF" />
|
||||
<UInt32 Value="00000070" />
|
||||
<!--1.1.41.7.0.255-->
|
||||
<OctetString Value="0101290700FF" />
|
||||
<UInt32 Value="000000B5" />
|
||||
<!--1.1.61.7.0.255-->
|
||||
<OctetString Value="01013D0700FF" />
|
||||
<UInt32 Value="0000040C" />
|
||||
<!--1.1.33.7.0.255-->
|
||||
<OctetString Value="0101210700FF" />
|
||||
<UInt16 Value="004D" />
|
||||
<!--1.1.53.7.0.255-->
|
||||
<OctetString Value="0101350700FF" />
|
||||
<UInt16 Value="004E" />
|
||||
<!--1.1.73.7.0.255-->
|
||||
<OctetString Value="0101490700FF" />
|
||||
<UInt16 Value="0062" />
|
||||
<!--1.1.13.7.0.255-->
|
||||
<OctetString Value="01010D0700FF" />
|
||||
<UInt16 Value="0063" />
|
||||
<!--1.1.22.7.0.255-->
|
||||
<OctetString Value="0101160700FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<!--1.1.42.7.0.255-->
|
||||
<OctetString Value="01012A0700FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<!--1.1.62.7.0.255-->
|
||||
<OctetString Value="01013E0700FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<!--1.1.22.8.0.255-->
|
||||
<OctetString Value="0101160800FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<!--1.1.42.8.0.255-->
|
||||
<OctetString Value="01012A0800FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<!--1.1.62.8.0.255-->
|
||||
<OctetString Value="01013E0800FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<!--1.1.21.8.0.255-->
|
||||
<OctetString Value="0101150800FF" />
|
||||
<UInt32 Value="000A8F97" />
|
||||
<!--1.1.41.8.0.255-->
|
||||
<OctetString Value="0101290800FF" />
|
||||
<UInt32 Value="0004C152" />
|
||||
<!--1.1.61.8.0.255-->
|
||||
<OctetString Value="01013D0800FF" />
|
||||
<UInt32 Value="000243DF" />
|
||||
</Structure>
|
||||
</DataValue>
|
||||
</NotificationBody>
|
||||
</DataNotification>
|
||||
</GatewayRequest>
|
||||
BIN
doc/Encrypted payload.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
BIN
doc/Germany/Anleitung_M-Bus_Protokoll_V1.0.pdf
Normal file
BIN
doc/Green_Book_Edition_9-Excerpt.pdf
Normal file
BIN
doc/M-Bus_DOC48.PDF
Normal file
BIN
doc/Netherlands/Slimme_meter_15_a727fce1f1.pdf
Normal file
BIN
doc/Norway/Aidon-HAN-Interface-Description-v11A-ID-34331.pdf
Normal file
18
doc/Norway/Aidon_OBIS.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
1.1.0.2.129.255 - List version identifier
|
||||
0.0.96.1.0.255 - Meter ID
|
||||
0.0.96.1.7.255 - Meter Model
|
||||
1.0.1.7.0.255 - Active+ Instantaneous value
|
||||
1.0.2.7.0.255 - Active- Instantaneous value
|
||||
1.0.3.7.0.255 - Reactive+ Instantaneous value
|
||||
1.0.4.7.0.255 - Reactive- Instantaneous value
|
||||
1.0.31.7.0.255 - L1 Current Instantaneous value
|
||||
1.0.51.7.0.255 - L2 Current Instantaneous value
|
||||
1.0.71.7.0.255 - L3 Current Instantaneous value
|
||||
1.0.32.7.0.255 - L1 Voltage Instantaneous value
|
||||
1.0.52.7.0.255 - L2 Voltage Instantaneous value
|
||||
1.0.72.7.0.255 - L3 Voltage Instantaneous value
|
||||
0.0.1.0.0.255 - Current date/time
|
||||
1.0.1.8.0.255 - Active+ Energy
|
||||
1.0.2.8.0.255 - Active- Energy
|
||||
1.0.3.8.0.255 - Reactive+ Energy
|
||||
1.0.4.8.0.255 - Reactive- Energy
|
||||
119
doc/Norway/Aidon_data.xml
Normal file
@@ -0,0 +1,119 @@
|
||||
<GatewayRequest>
|
||||
<NetworkId Value="231" />
|
||||
<PhysicalDeviceAddress Value="" />
|
||||
<DataNotification>
|
||||
<LongInvokeIdAndPriority Value="40000000" />
|
||||
<DateTime Value="" />
|
||||
<NotificationBody>
|
||||
<DataValue>
|
||||
<Array Qty="0D" >
|
||||
<Structure Qty="02" >
|
||||
<!--1.1.0.2.129.255-->
|
||||
<OctetString Value="0101000281FF" />
|
||||
<String Value="AIDON_V0001" />
|
||||
</Structure>
|
||||
<Structure Qty="02" >
|
||||
<!--0.0.96.1.0.255-->
|
||||
<OctetString Value="0000600100FF" />
|
||||
<String Value="0000000000000000" />
|
||||
</Structure>
|
||||
<Structure Qty="02" >
|
||||
<!--0.0.96.1.7.255-->
|
||||
<OctetString Value="0000600107FF" />
|
||||
<String Value="6534" />
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.1.7.0.255-->
|
||||
<OctetString Value="0100010700FF" />
|
||||
<UInt32 Value="00000339" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="00" />
|
||||
<Enum Value="1B" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.2.7.0.255-->
|
||||
<OctetString Value="0100020700FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="00" />
|
||||
<Enum Value="1B" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.3.7.0.255-->
|
||||
<OctetString Value="0100030700FF" />
|
||||
<UInt32 Value="00000000" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="00" />
|
||||
<Enum Value="1D" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.4.7.0.255-->
|
||||
<OctetString Value="0100040700FF" />
|
||||
<UInt32 Value="00000251" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="00" />
|
||||
<Enum Value="1D" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.31.7.0.255-->
|
||||
<OctetString Value="01001F0700FF" />
|
||||
<Int16 Value="0012" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="FF" />
|
||||
<Enum Value="21" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.51.7.0.255-->
|
||||
<OctetString Value="0100330700FF" />
|
||||
<Int16 Value="0003" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="FF" />
|
||||
<Enum Value="21" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.71.7.0.255-->
|
||||
<OctetString Value="0100470700FF" />
|
||||
<Int16 Value="0016" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="FF" />
|
||||
<Enum Value="21" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.32.7.0.255-->
|
||||
<OctetString Value="0100200700FF" />
|
||||
<UInt16 Value="08FE" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="FF" />
|
||||
<Enum Value="23" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.52.7.0.255-->
|
||||
<OctetString Value="0100340700FF" />
|
||||
<UInt16 Value="08F8" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="FF" />
|
||||
<Enum Value="23" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
<Structure Qty="03" >
|
||||
<!--1.0.72.7.0.255-->
|
||||
<OctetString Value="0100480700FF" />
|
||||
<UInt16 Value="08F7" />
|
||||
<Structure Qty="02" >
|
||||
<Int8 Value="FF" />
|
||||
<Enum Value="23" />
|
||||
</Structure>
|
||||
</Structure>
|
||||
</Array>
|
||||
</DataValue>
|
||||
</NotificationBody>
|
||||
</DataNotification>
|
||||
</GatewayRequest>
|
||||
BIN
doc/Norway/Kaifa.png
Normal file
|
After Width: | Height: | Size: 442 KiB |
BIN
doc/Sweden/Aidon-RJ12.pdf
Normal file
BIN
doc/Switzerland/RWB_SmartMeter_Bedienungsanleitung.pdf
Normal file
BIN
doc/omnipower.technical.description.pdf
Normal file
30
frames/Aidon-Sweden.raw
Normal file
@@ -0,0 +1,30 @@
|
||||
7E A2 43 41 08 83 13 85 EB E6 E7 00 0F 40 00 00 00 00
|
||||
01 1B
|
||||
02 02 09 06 00 00 01 00 00 FF 09 0C 07 E5 0C 0A 05 10 39 00 FF 80 00 FF
|
||||
02 03 09 06 01 00 01 07 00 FF 06 00 00 07 E5 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 02 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 03 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1D
|
||||
02 03 09 06 01 00 04 07 00 FF 06 00 00 02 48 02 02 0F 00 16 1D
|
||||
02 03 09 06 01 00 1F 07 00 FF 10 00 09 02 02 0F FF 16 21
|
||||
02 03 09 06 01 00 33 07 00 FF 10 00 25 02 02 0F FF 16 21
|
||||
02 03 09 06 01 00 47 07 00 FF 10 00 2E 02 02 0F FF 16 21
|
||||
02 03 09 06 01 00 20 07 00 FF 12 08 E3 02 02 0F FF 16 23
|
||||
02 03 09 06 01 00 34 07 00 FF 12 08 D8 02 02 0F FF 16 23
|
||||
02 03 09 06 01 00 48 07 00 FF 12 08 DF 02 02 0F FF 16 23
|
||||
02 03 09 06 01 00 15 07 00 FF 06 00 00 00 D5 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 16 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 17 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1D
|
||||
02 03 09 06 01 00 18 07 00 FF 06 00 00 00 36 02 02 0F 00 16 1D
|
||||
02 03 09 06 01 00 29 07 00 FF 06 00 00 03 0C 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 2A 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 2B 07 00 FF 06 00 00 01 21 02 02 0F 00 16 1D
|
||||
02 03 09 06 01 00 2C 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1D
|
||||
02 03 09 06 01 00 3D 07 00 FF 06 00 00 03 F9 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 3E 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 3F 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1D
|
||||
02 03 09 06 01 00 40 07 00 FF 06 00 00 00 E9 02 02 0F 00 16 1D
|
||||
02 03 09 06 01 00 01 08 00 FF 06 03 C2 5A 64 02 02 0F 00 16 1E
|
||||
02 03 09 06 01 00 02 08 00 FF 06 00 00 00 00 02 02 0F 00 16 1E
|
||||
02 03 09 06 01 00 03 08 00 FF 06 00 04 5D 06 02 02 0F 00 16 20
|
||||
02 03 09 06 01 00 04 08 00 FF 06 00 B4 9D 89 02 02 0F 00 16 20
|
||||
1C 90 7E
|
||||
33
frames/Aidon-TN-3p.raw
Normal file
@@ -0,0 +1,33 @@
|
||||
T FF FF DA SA SA C HC HC LD LS LQ AT AI AI AI AI AD
|
||||
7E A0 2A 41 08 83 13 04 13 E6 E7 00 0F 40 00 00 00 00 01 01 02 03 09 06 01 00 01 07 00 FF 06 00 00 08 64 02 02 0F 00 16 1B E1
|
||||
7E A1 1E 41 08 83 13 EE EE E6 E7 00 0F 40 00 00 00 00 01 0D 02 02 09 06 01 01 00 02 81 FF 0A 0B 41 49 44 4F 4E 5F 56 30 30 30 31 02 02 09 06 00 00 60 01 00 FF 0A 10 37 33 35 39 39 39 32 38 39 30 34 39 37 39 39 37 02 02 09 06 00 00 60 01 07 FF 0A 04 36 35 33 34 02 03 09 06 01 00 01 07 00 FF 06 00 00 08 6C 02 02 0F 00 16 1B 02 03 09 06 01 00 02 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1B 02 03 09 06 01 00 03 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1D 02 03 09 06 01 00 04 07 00 FF 06 00 00 02 09 02 02 0F 00 16 1D 02 03 09 06 01 00 1F 07 00 FF 10 00 41 02 02 0F FF 16 21 02 03 09 06 01 00 33 07 00 FF 10 00 13 02 02 0F FF 16 21 02 03 09 06 01 00 47 07 00 FF 10 00 0E 02 02 0F FF 16 21 02 03 09 06 01 00 20 07 00 FF 12 08 F2 02 02 0F FF 16 23 02 03 09 06 01 00 34 07 00 FF 12 08 D1 02 02 0F FF 16 23 02 03 09 06 01 00 48 07 00 FF 12 08 E8 02 02 0F FF 16 23 8B
|
||||
7E A1 8A 41 08 83 13 EB FD E6 E7 00 0F 40 00 00 00 00 01 12 02 02 09 06 01 01 00 02 81 FF 0A 0B 41 49 44 4F 4E 5F 56 30 30 30 31 02 02 09 06 00 00 60 01 00 FF 0A 10 37 33 35 39 39 39 32 38 39 30 34 39 37 39 39 37 02 02 09 06 00 00 60 01 07 FF 0A 04 36 35 33 34 02 03 09 06 01 00 01 07 00 FF 06 00 00 03 9A 02 02 0F 00 16 1B 02 03 09 06 01 00 02 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1B 02 03 09 06 01 00 03 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1D 02 03 09 06 01 00 04 07 00 FF 06 00 00 02 0E 02 02 0F 00 16 1D 02 03 09 06 01 00 1F 07 00 FF 10 00 11 02 02 0F FF 16 21 02 03 09 06 01 00 33 07 00 FF 10 00 10 02 02 0F FF 16 21 02 03 09 06 01 00 47 07 00 FF 10 00 0E 02 02 0F FF 16 21 02 03 09 06 01 00 20 07 00 FF 12 08 F4 02 02 0F FF 16 23 02 03 09 06 01 00 34 07 00 FF 12 08 CD 02 02 0F FF 16 23 02 03 09 06 01 00 48 07 00 FF 12 08 DC 02 02 0F FF 16 23 02 02 09 06 00 00 01 00 00 FF 09 0C 07 E5 03 18 03 08 00 00 FF 00 00 00 02 03 09 06 01 00 01 08 00 FF 06 00 47 F0 34 02 02 0F 01 16 1E 02 03 09 06 01 00 02 08 00 FF 06 00 00 00 00 02 02 0F 01 16 1E 02 03 09 06 01 00 03 08 00 FF 06 00 00 21 9E 02 02 0F 01 16 20 02 03 09 06 01 00 04 08 00 FF 06 00 08 E0 21 02 02 0F 01 16 20 57
|
||||
|
||||
7E A1 8A 41 08 83 13 EB FD E6 E7 00
|
||||
0F
|
||||
40 00 00 00 00
|
||||
01 12
|
||||
02 02 09 06 01 01 00 02 81 FF 0A 0B 41 49 44 4F 4E 5F 56 30 30 30 31
|
||||
02 02 09 06 00 00 60 01 00 FF 0A 10 37 33 35 39 39 39 32 38 39 30 34 39 37 39 39 37
|
||||
02 02 09 06 00 00 60 01 07 FF 0A 04 36 35 33 34
|
||||
02 03 09 06 01 00 01 07 00 FF 06 00 00 09 6D 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 02 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1B
|
||||
02 03 09 06 01 00 03 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1D
|
||||
02 03 09 06 01 00 04 07 00 FF 06 00 00 02 5B 02 02 0F 00 16 1D
|
||||
|
||||
Object with three values Value Object with two values
|
||||
| Obis code | | Scaling
|
||||
| | | | | Unit
|
||||
02 03 09 06 01 00 1F 07 00 FF 10 00 11 02 02 0F FF 16 21
|
||||
02 03 09 06 01 00 33 07 00 FF 10 00 03 02 02 0F FF 16 21
|
||||
02 03 09 06 01 00 47 07 00 FF 10 00 5A 02 02 0F FF 16 21
|
||||
02 03 09 06 01 00 20 07 00 FF 12 09 04 02 02 0F FF 16 23
|
||||
02 03 09 06 01 00 34 07 00 FF 12 09 02 02 02 0F FF 16 23
|
||||
02 03 09 06 01 00 48 07 00 FF 12 08 EC 02 02 0F FF 16 23
|
||||
02 02 09 06 00 00 01 00 00 FF 09 0C 07 E5 0A 1F 00 14 00 00 FF 00 00 00
|
||||
02 03 09 06 01 00 01 08 00 FF 06 00 56 9F 52 02 02 0F 01 16 1E
|
||||
02 03 09 06 01 00 02 08 00 FF 06 00 00 00 00 02 02 0F 01 16 1E
|
||||
02 03 09 06 01 00 03 08 00 FF 06 00 00 22 D0 02 02 0F 01 16 20
|
||||
02 03 09 06 01 00 04 08 00 FF 06 00 0A F5 EC 02 02 0F 01 16 20
|
||||
51 D7
|
||||
7E
|
||||
34
frames/Kaifa-TN-3p.raw
Normal file
@@ -0,0 +1,34 @@
|
||||
T FF FF DA SA SA C HC HC LD LS LQ AT AI AI AI AI AD
|
||||
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E5 03 17 02 13 1A 3A FF 80 00 00
|
||||
02 01 // Frame type and size
|
||||
06 00 00 0B F3 // Active power
|
||||
5B 05 7E // CRC and end tag
|
||||
|
||||
T FF FF DA SA SA C HC HC LD LS LQ AT AI AI AI AI AD
|
||||
7E A0 78 01 02 01 10 C4 98 E6 E7 00 0F 40 00 00 00 09 0C 07 E5 03 17 02 13 1B 00 FF 80 00 00
|
||||
02 0D // Frame type and size
|
||||
09 07 4B 46 4D 5F 30 30 31 // List version
|
||||
09 10 XX XX XX XX XX XX XX XX XX XX 35 33 34 34 39 33 // Meter ID
|
||||
09 07 4D 41 33 30 34 48 34 // Meter type
|
||||
06 00 00 0C 21 // Active import
|
||||
06 00 00 00 00 // Active export
|
||||
06 00 00 00 00 // Reactive import
|
||||
06 00 00 01 9F // Reactive export
|
||||
06 00 00 0B F3 // I1
|
||||
06 00 00 05 0B // I2
|
||||
06 00 00 25 11 // I3
|
||||
06 00 00 09 44 // U1
|
||||
06 00 00 09 49 // U2
|
||||
06 00 00 09 39 // U3
|
||||
C9 95 7E // CRC and end tag
|
||||
|
||||
|
||||
7E A0 9A 01 02 01 10 AA A5 E6 E7 00 0F 40 00 00 00 09 0C 07 E5 03 17 02 13 00 0A FF 80 00 00
|
||||
02 12 09 07 4B 46 4D 5F 30 30 31
|
||||
09 10 XX XX XX XX XX XX XX XX XX XX 35 33 34 34 39 33
|
||||
09 07 4D 41 33 30 34 48 34
|
||||
06 00 00 09 99
|
||||
06 00 00 00 00 06 00 00 00 00 06 00 00 01 67 06 00 00 03 BF 06 00 00 05 05
|
||||
06 00 00 24 34 06 00 00 09 45 06 00 00 09 4F 06 00 00 09 3B
|
||||
09 0C 07 E5 03 17 02 13 00 0A FF 80 00 00 06 01 34 3B 5D 06 00 00 00 00 06 00 00 09 36 06 00 3C 7A 98 DA 15 7E
|
||||
7E A0 79 01 02 01 10 80 93 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 14 FF 80 00 00 02 0D 09 07 4B 46 4D 5F 30 30 31 09 10 36 39 37 30 36 33 31 34 30 31 37 35 33 39 38 35 09 08 4D 41 33 30 34 48 33 45 06 00 00 04 0C 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 C1 06 00 00 0C 9E 06 00 00 0D 7E 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 66 87 96 7E
|
||||
51
frames/Kamstrup-1p.raw
Normal file
@@ -0,0 +1,51 @@
|
||||
7E A0 BA 2B 21 13 ED AA E6 E7 00 0F 00 00 00 00
|
||||
0C 07 E6 02 05 06 0D 00 0A FF 80 00 00
|
||||
02 19
|
||||
0A 0E 4B 61 6D 73 74 72 75 70 5F 56 30 30 30 31
|
||||
09 06 01 01 00 00 05 FF 0A 10 35 37 30 36 35 36 37 32 37 31 35 33 33 32 30 37
|
||||
09 06 01 01 60 01 01 FF 0A 12 36 38 36 31 31 31 31 42 4E 32 34 32 31 30 31 30 34 30
|
||||
09 06 01 01 01 07 00 FF 06 00 00 02 68
|
||||
09 06 01 01 02 07 00 FF 06 00 00 00 00
|
||||
09 06 01 01 03 07 00 FF 06 00 00 00 53
|
||||
09 06 01 01 04 07 00 FF 06 00 00 00 00
|
||||
09 06 01 01 1F 07 00 FF 06 00 00 01 22
|
||||
00 00 00 00
|
||||
09 06 01 01 20 07 00 FF 12 00 E2
|
||||
00 00 00 00
|
||||
05 D8 7E
|
||||
|
||||
7E A0 BA 2B 21 13 ED AA E6 E7 00 0F 00 00 00 00
|
||||
0C 07 E6 02 05 06 0D 00 14 FF 80 00 00
|
||||
02 19
|
||||
0A 0E 4B 61 6D 73 74 72 75 70 5F 56 30 30 30 31
|
||||
09 06 01 01 00 00 05 FF 0A 10 35 37 30 36 35 36 37 32 37 31 35 33 33 32 30 37
|
||||
09 06 01 01 60 01 01 FF 0A 12 36 38 36 31 31 31 31 42 4E 32 34 32 31 30 31 30 34 30
|
||||
09 06 01 01 01 07 00 FF 06 00 00 02 68
|
||||
09 06 01 01 02 07 00 FF 06 00 00 00 00
|
||||
09 06 01 01 03 07 00 FF 06 00 00 00 53
|
||||
09 06 01 01 04 07 00 FF 06 00 00 00 00
|
||||
09 06 01 01 1F 07 00 FF 06 00 00 01 23
|
||||
00 00 00 00
|
||||
09 06 01 01 20 07 00 FF 12 00 E1
|
||||
00 00 00 00
|
||||
8E 5E 7E
|
||||
|
||||
7E A1 04 2B 21 13 77 6E E6 E7 00 0F 00 00 00 00
|
||||
0C 07 E6 02 05 06 0D 00 19 FF 80 00 00
|
||||
02 23 0A 0E 4B 61 6D 73 74 72 75 70 5F 56 30 30 30 31
|
||||
09 06 01 01 00 00 05 FF 0A 10 35 37 30 36 35 36 37 32 37 31 35 33 33 32 30 37
|
||||
09 06 01 01 60 01 01 FF 0A 12 36 38 36 31 31 31 31 42 4E 32 34 32 31 30 31 30 34 30
|
||||
09 06 01 01 01 07 00 FF 06 00 00 02 6B
|
||||
09 06 01 01 02 07 00 FF 06 00 00 00 00
|
||||
09 06 01 01 03 07 00 FF 06 00 00 00 54
|
||||
09 06 01 01 04 07 00 FF 06 00 00 00 00
|
||||
09 06 01 01 1F 07 00 FF 06 00 00 01 25
|
||||
00 00 00 00
|
||||
09 06 01 01 20 07 00 FF 12 00 E1
|
||||
00 00 00 00
|
||||
09 06 00 01 01 00 00 FF 09 0C 07 E6 02 05 06 0D 00 19 FF 80 00 00
|
||||
09 06 01 01 01 08 00 FF 06 00 12 CF 93
|
||||
09 06 01 01 02 08 00 FF 06 00 00 00 00
|
||||
09 06 01 01 03 08 00 FF 06 00 00 8C CE
|
||||
09 06 01 01 04 08 00 FF 06 00 05 E5 04
|
||||
7F E9 7E
|
||||
23
frames/Kamstrup-Sweden.raw
Normal file
@@ -0,0 +1,23 @@
|
||||
7E A1 2C 2B 21 13 FC 04 E6 E7 00 0F 00 00 00 00
|
||||
0C 07 E6 02 12 05 16 00 23 FF 80 00 00
|
||||
02 23
|
||||
0A 0E 4B 61 6D 73 74 72 75 70 5F 56 30 30 30 31
|
||||
09 06 01 01 00 00 05 FF 0A 10 35 37 30 36 35 36 37 33 33 31 33 32 33 35 32 36
|
||||
09 06 01 01 60 01 01 FF 0A 12 36 38 34 31 31 33 31 42 4E 32 34 35 31 30 31 30 39 32
|
||||
09 06 01 01 01 07 00 FF 06 00 00 08 DD
|
||||
09 06 01 01 02 07 00 FF 06 00 00 00 00
|
||||
09 06 01 01 03 07 00 FF 06 00 00 00 00
|
||||
09 06 01 01 04 07 00 FF 06 00 00 01 90
|
||||
09 06 01 01 1F 07 00 FF 06 00 00 01 1F
|
||||
09 06 01 01 33 07 00 FF 06 00 00 02 57
|
||||
09 06 01 01 47 07 00 FF 06 00 00 00 6A
|
||||
09 06 01 01 20 07 00 FF 12 00 F1
|
||||
09 06 01 01 34 07 00 FF 12 00 F0
|
||||
09 06 01 01 48 07 00 FF 12 00 F3
|
||||
09 06 00 01 01 00 00 FF 09 0C 07 E6 02 12 05 16 00 23 FF 80 00 00
|
||||
09 06 01 01 01 08 00 FF 06 01 E8 7F 4E
|
||||
09 06 01 01 02 08 00 FF 06 00 00 00 00
|
||||
09 06 01 01 03 08 00 FF 06 00 58 71 8B
|
||||
09 06 01 01 04 08 00 FF 06 00 10 60 23
|
||||
B8 1C
|
||||
7E
|
||||
51
frames/Kamstup-Encrypted.raw
Normal file
@@ -0,0 +1,51 @@
|
||||
# After decode:
|
||||
7E
|
||||
A1 E9 // Frame type and size
|
||||
41 03 13 C6 37 E6 E7 00
|
||||
DB // Encrypted
|
||||
08 4B 41 4D 45 01 AC 4D 6E // System title
|
||||
82 // Prefix for 2-byte length
|
||||
01 D0 // Length 464
|
||||
30 // Security tag 0011 0000, 0=Compression off, 0=Unicast, 1=Encryption, 1=Authentication, 0000= Security Suite ID
|
||||
00 00 A3 2F // Frame counter
|
||||
|
||||
// Decrypted frame below
|
||||
0F 00 00 00 00
|
||||
0C 07 E4 05 0C 02 0A 19 00 FF 80 00 80 // Package timestamp
|
||||
|
||||
02 41
|
||||
0A 0E 4B 61 6D 73 74 72 75 70 5F 56 30 30 30 31 - List ID
|
||||
09 06 01 01 01 08 00 FF 06 00 11 94 CA - Active+ Energy
|
||||
09 06 01 01 02 08 00 FF 06 00 00 00 00 - Active- Energy
|
||||
09 06 01 01 03 08 00 FF 06 00 00 12 7E - Reactive+ Energy
|
||||
09 06 01 01 04 08 00 FF 06 00 09 55 0E - Reactive- Energy
|
||||
09 06 01 01 00 00 01 FF 06 01 44 AD E1 - Electricity ID?
|
||||
09 06 01 01 01 07 00 FF 06 00 00 05 CC - Active+ Instantaneous value
|
||||
09 06 01 01 02 07 00 FF 06 00 00 00 00 - Active- Instantaneous value
|
||||
09 06 01 01 03 07 00 FF 06 00 00 00 00 - Reactive+ Instantaneous value
|
||||
09 06 01 01 04 07 00 FF 06 00 00 00 17 - Reactive- Instantaneous value
|
||||
09 06 00 01 01 00 00 FF 09 0C 07 E4 05 0C 02 0A 19 00 FF 80 00 80 - Current date/time
|
||||
09 06 01 01 20 07 00 FF 12 00 E5 - L1 Voltage Instantaneous value
|
||||
09 06 01 01 34 07 00 FF 12 00 E5 - L2 Voltage Instantaneous value
|
||||
09 06 01 01 48 07 00 FF 12 00 E3 - L3 Voltage Instantaneous value
|
||||
09 06 01 01 1F 07 00 FF 06 00 00 00 4B - L1 Current Instantaneous value
|
||||
09 06 01 01 33 07 00 FF 06 00 00 00 AA - L2 Current Instantaneous value
|
||||
09 06 01 01 47 07 00 FF 06 00 00 01 E4 - L3 Current Instantaneous value
|
||||
09 06 01 01 15 07 00 FF 06 00 00 00 71 - L1 Active+ Instantaneous value
|
||||
09 06 01 01 29 07 00 FF 06 00 00 01 54 - L2 Active+ Instantaneous value
|
||||
09 06 01 01 3D 07 00 FF 06 00 00 04 07 - L3 Active+ Instantaneous value
|
||||
09 06 01 01 21 07 00 FF 12 00 4D - L1 (cos.phi) (PF) Instantaneous value
|
||||
09 06 01 01 35 07 00 FF 12 00 5F - L2 (cos.phi) (PF) Instantaneous value
|
||||
09 06 01 01 49 07 00 FF 12 00 62 - L3 (cos.phi) (PF) Instantaneous value
|
||||
09 06 01 01 0D 07 00 FF 12 00 63 - Avegage (cos.phi) (PF) Inst. value
|
||||
09 06 01 01 16 07 00 FF 06 00 00 00 00 - L1 Active- Instantaneous value
|
||||
09 06 01 01 2A 07 00 FF 06 00 00 00 00 - L2 Active- Instantaneous value
|
||||
09 06 01 01 3E 07 00 FF 06 00 00 00 00 - L3 Active- Instantaneous value
|
||||
09 06 01 01 16 08 00 FF 06 00 00 00 00 - L1 Active- Energy
|
||||
09 06 01 01 2A 08 00 FF 06 00 00 00 00 - L2 Active- Energy
|
||||
09 06 01 01 3E 08 00 FF 06 00 00 00 00 - L3 Active- Energy
|
||||
09 06 01 01 15 08 00 FF 06 00 0A 8F 97 - L1 Active+ Energy
|
||||
09 06 01 01 29 08 00 FF 06 00 04 C1 53 - L2 Active+ Energy
|
||||
09 06 01 01 3D 08 00 FF 06 00 02 43 E0 - L3 Active+ Energy
|
||||
|
||||
5B C3 CD 5E 79 18 18 DA 9F 97 85 FF 5A 84 7E
|
||||
18
frames/Kamstup-TN-3p.raw
Normal file
@@ -0,0 +1,18 @@
|
||||
7E A0 E2 2B 21 13 23 9A E6 E7 00 0F 00 00 00 00
|
||||
0C 07 E5 0B 11 03 0B 32 00 FF 80 00 00
|
||||
|
||||
02 19
|
||||
0A 0E 4B 61 6D 73 74 72 75 70 5F 56 30 30 30 31 - List ID
|
||||
09 06 01 01 00 00 05 FF 0A 10 XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX - Meter ID
|
||||
09 06 01 01 60 01 01 FF 0A 12 36 38 34 31 31 33 31 42 4E 32 34 33 31 30 31 30 34 30 - Meter model
|
||||
09 06 01 01 01 07 00 FF 06 00 00 05 E6 - Active+
|
||||
09 06 01 01 02 07 00 FF 06 00 00 00 00 - Active-
|
||||
09 06 01 01 03 07 00 FF 06 00 00 00 00 - Reactive+
|
||||
09 06 01 01 04 07 00 FF 06 00 00 01 92 - Reactive-
|
||||
09 06 01 01 1F 07 00 FF 06 00 00 00 A1 - L1 current
|
||||
09 06 01 01 33 07 00 FF 06 00 00 00 C1 - L2 current
|
||||
09 06 01 01 47 07 00 FF 06 00 00 01 8E - L3 current
|
||||
09 06 01 01 20 07 00 FF 12 00 EB - L1 voltage
|
||||
09 06 01 01 34 07 00 FF 12 00 EC - L2 voltage
|
||||
09 06 01 01 48 07 00 FF 12 00 EC - L3 voltage
|
||||
EF 5F 7E
|
||||
45
frames/austria.raw
Normal file
@@ -0,0 +1,45 @@
|
||||
// HDLC header
|
||||
68
|
||||
01 01 // Format (0x00) and total length (257)
|
||||
|
||||
68 // Start
|
||||
53 // Control field
|
||||
FF // Address (Broadcast address)
|
||||
|
||||
// LLC
|
||||
00 // Control information field
|
||||
01 // Source SAP
|
||||
67 // Destination SAP
|
||||
|
||||
DB // Encrypted
|
||||
08 53 41 47 59 05 E6 D9 FD // System title
|
||||
81 // Prefix for 1-byte length
|
||||
F8 // Length (248), starting from 0xDB and including end byte
|
||||
20 // Security tag 0010 0000, 0=Compression off, 0=Unicast, 1=Encryption, 0=No auth, 0000= Security Suite ID
|
||||
00 72 00 76 // Frame counter
|
||||
|
||||
|
||||
68 01 01 68
|
||||
53 FF 10 01 67
|
||||
DB
|
||||
08 53 41 47 59 05 E6 D9 FD
|
||||
81 F8
|
||||
20
|
||||
00 01 A0 E0
|
||||
0F 80 3E 37 71
|
||||
0C 07 E5 0C 1B 01 0E 00 2D 00 FF C4 02 // Frame timestamp
|
||||
02 23 // 35 items
|
||||
09 0C 07 E5 0C 1B 01 0E 00 2D 00 FF C4 02 // Meter timestamp
|
||||
09 06 01 00 01 08 00 FF 06 00 43 3D 0A 02 02 0F 00 16 1E
|
||||
09 06 01 00 02 08 00 FF 06 00 00 01 03 02 02 0F 00 16 1E
|
||||
09 06 01 00 01 07 00 FF 06 00 00 01 FE 02 02 0F 00 16 1B
|
||||
09 06 01 00 02 07 00 FF 06 00 00 00 00 02 02 0F 00 16 1B
|
||||
09 06 01 00 20 07 00 FF 12 09 34 02 02 0F FF 16 23
|
||||
09 06 01 00 34 07 00 FF 12 09 34 02 02 0F FF 16 23
|
||||
09 06 01 00 48 07 00 FF 12 09 2D 02 02 0F FF 16 23
|
||||
09 06 01 00 1F 07 00 FF 12 00 63 02 02 0F FE 16 21
|
||||
09 06 01 00 33 07 00 FF 12 00 3F 02 02 0F FE 16 21
|
||||
09 06 01 00 47 07 00 FF 12 00 54 02 02 0F FE 16 21
|
||||
09 06 01 00 0D 07 00 FF 10 03 CF 02 02 0F FD 16 FF // Power factor
|
||||
09 0C 31 37 38 32 31 30 30 31 35 31 36 35 // Meter ID
|
||||
01 67
|
||||
32
frames/decoding.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
T = Tag
|
||||
FF = Frame format (4 bit type, 1 bit segmentation, 11 bit frame length)
|
||||
DA = Destination Address (1-4 bytes, LSB=1 terminates)
|
||||
SA = Source address (1-4 bytes, LSB=1 terminates)
|
||||
C = Control (1 byte)
|
||||
HC = HCS (2 bytes)
|
||||
|
||||
LD = LLC Destination
|
||||
LS = LLC Remote
|
||||
LQ = LLC Quality
|
||||
|
||||
AT = Tag (0x0F = unencrypted, 0xDB = encrypted) Not really documented that well...
|
||||
AI = Invoke ID and priority (4 bytes)
|
||||
AD = Date and time
|
||||
AS = System title
|
||||
CT = Cipher frame tag ? Undocumented
|
||||
CL = Lenght of Cipher frame. Length of payload will be this number - 5 (control and counter in start) - 12 (GCM tag appended after payload)
|
||||
CC = Security control
|
||||
CO = Invocation counter
|
||||
|
||||
Security control bits
|
||||
01234567
|
||||
00110000 (0x30)
|
||||
0 = read acces
|
||||
1 = write access
|
||||
2 = Authenticated req
|
||||
3 = Encrypted req
|
||||
4 = Digitally signed req
|
||||
5 = Authenticated res
|
||||
6 = Encrypted res
|
||||
7 = Digitally signed res
|
||||
|
||||
79
frames/lng.raw
Normal file
@@ -0,0 +1,79 @@
|
||||
7E // Flag
|
||||
A08B
|
||||
CEFF03
|
||||
13
|
||||
EEE1
|
||||
E6E700
|
||||
E0 // GBT (Green book 9.4.6.13)
|
||||
40 // Block control 0100 0000, last block=no, streaming=yes, remainig=window
|
||||
0001 // Block sequence
|
||||
0000 // Block sequence ack
|
||||
77 // How many bytes in this block
|
||||
|
||||
0F 00000DB7 // APDU tag, Invoke ID and priority
|
||||
|
||||
0C07E604020607220FFF800000 // Date and time
|
||||
0205 // Structure with 5 items
|
||||
0105 // Array with 5 items
|
||||
020412002809060008190900FF0F02120000 // Structure with 4 items, uint16, OBIS, int8, uint16 (0-8:25.9.0;2)
|
||||
020412002809060008190900FF0F01120000 // Structure with 4 items, uint16, OBIS, int8, uint16 (0-8:25.9.0;1)
|
||||
020412000109060000600101FF0F02120000 // Structure with 4 items, uint16, OBIS, int8, uint16 (96.1.1 - Meter model)
|
||||
020412000309060100010700FF0F02120000 // Structure with 4 items, uint16, OBIS, int8, uint16 (1.7.0 Active import)
|
||||
020412000309060100020700FF0F02120000 // Structure with 4 items, uint16, OBIS, int8, uint16 (2.7.0 Active export)
|
||||
09060008190900 // OBIS 0-8:25.9.0 Object list push settings consumer information 1
|
||||
ABA6
|
||||
7E
|
||||
|
||||
|
||||
|
||||
7E
|
||||
A024
|
||||
CEFF03
|
||||
13
|
||||
D661
|
||||
E0 // GBT
|
||||
C0 // Block control 0100 0000, last block=yes, streaming=yes, remainig=window
|
||||
0002 // Block sequence
|
||||
0000 // Block sequence ack
|
||||
13 // How many bytes in this block
|
||||
|
||||
FF // Last byte of OBIS in previous block
|
||||
0906363031313039 // Device ID
|
||||
0600000028 // Accumulated import
|
||||
0600000000 // Accumulated export
|
||||
8BA4
|
||||
7E
|
||||
|
||||
|
||||
|
||||
|
||||
7E A1 23 CE FF 03 13 21 55 E6 E7 00
|
||||
|
||||
0F 00 00 08 E2
|
||||
0C 07 E5 07 13 01 0C 1A 0A FF 80 00 00
|
||||
|
||||
02 0B // 11
|
||||
01 0B // 11
|
||||
02 04 12 00 28 09 06 00 08 19 09 00 FF 0F 02 12 00 00
|
||||
02 04 12 00 28 09 06 00 08 19 09 00 FF 0F 01 12 00 00
|
||||
02 04 12 00 01 09 06 00 00 60 01 00 FF 0F 02 12 00 00
|
||||
02 04 12 00 03 09 06 01 00 01 07 00 FF 0F 02 12 00 00
|
||||
02 04 12 00 03 09 06 01 00 02 07 00 FF 0F 02 12 00 00
|
||||
02 04 12 00 03 09 06 01 01 01 08 00 FF 0F 02 12 00 00
|
||||
02 04 12 00 03 09 06 01 01 02 08 00 FF 0F 02 12 00 00
|
||||
02 04 12 00 03 09 06 01 01 05 08 00 FF 0F 02 12 00 00
|
||||
02 04 12 00 03 09 06 01 01 06 08 00 FF 0F 02 12 00 00
|
||||
02 04 12 00 03 09 06 01 01 07 08 00 FF 0F 02 12 00 00
|
||||
02 04 12 00 03 09 06 01 01 08 08 00 FF 0F 02 12 00 00
|
||||
09 06 00 08 19 09 00 FF
|
||||
09 08 34 33 30 39 34 33 35 31
|
||||
06 00 00 00 0B
|
||||
06 00 00 00 00
|
||||
06 00 00 00 10
|
||||
06 00 00 00 04
|
||||
06 00 00 00 00
|
||||
06 00 00 00 08
|
||||
06 00 00 00 00
|
||||
06 00 00 00 01
|
||||
7C 8B
|
||||
7E
|
||||
@@ -1,37 +1 @@
|
||||
# Hardware options
|
||||
|
||||
There are currently two possible hardware options for this project, both in need of external power supply. A self powered board is under development by a member of the community and is currently being tested.
|
||||
|
||||
## Hardware v1 by [@roarfred](https://github.com/roarfred)
|
||||
Composed from a ESP12E (or F) chip, this ESP8266 based board is designed specifically for this project with an on board M-bus chip.
|
||||
|
||||
Building this project will require some skills in ordering and assembling electronic circuits as well as programming. No detailed instructions are available.
|
||||
|
||||

|
||||
|
||||
*The completed board mounted in a [3D printed enclosure](/Enclosure)*
|
||||
|
||||
## Assembly of readily available modules
|
||||
You can also use a ESP based development board and combine this with a M-Bus module. Here are a few boards that have been tested, each one has a dedicated firmware file in the releases section.
|
||||
|
||||
### ESP8266 based boards
|
||||
|
||||
[Wemos D1 mini](https://docs.wemos.cc/en/latest/d1/d1_mini.html)
|
||||
- M-Bus connected to GPIO5 (D1)
|
||||
- Jump GPIO4 (D2) to GND to force AP mode during boot
|
||||
|
||||
### ESP32 based boards
|
||||
|
||||
[Wemos D32](https://docs.wemos.cc/en/latest/d32/d32.html)
|
||||
- M-Bus connected to GPIO21
|
||||
- Jump GPIO4 to GND to force AP mode during boot
|
||||
|
||||
[Adafruit HUZZAH32](https://www.adafruit.com/product/3405)
|
||||
- M-Bus connected to GPIO16
|
||||
|
||||
|
||||
Combine one of above board with an M-Bus module. Connect 3.3v and GND together between the boards and connect the TX pin from the M-Bus board to the dedicated M-Bus pin on the ESP board.
|
||||
|
||||
[TSS721 M-BUS module board](https://www.aliexpress.com/item/TSS721/32751482255.html)
|
||||
|
||||

|
||||
[See Hardware page in Wiki](https://github.com/gskjold/AmsToMqttBridge/wiki)
|
||||
|
||||
BIN
hardware/img/pow-k-kamstrup.jpg
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
hardware/img/pow-u-universal.jpg
Normal file
|
After Width: | Height: | Size: 91 KiB |
3
hardware/v1/kicad/HAN_ESP_TSS721-rescue.dcm
Normal file
@@ -0,0 +1,3 @@
|
||||
EESchema-DOCLIB Version 2.0
|
||||
#
|
||||
#End Doc Library
|
||||
356
hardware/v1/kicad/HAN_ESP_TSS721-rescue.lib
Normal file
@@ -0,0 +1,356 @@
|
||||
EESchema-LIBRARY Version 2.4
|
||||
#encoding utf-8
|
||||
#
|
||||
# BSS84-transistors
|
||||
#
|
||||
DEF BSS84-transistors Q 0 0 Y N 1 F N
|
||||
F0 "Q" 200 75 50 H V L CNN
|
||||
F1 "BSS84-transistors" 200 0 50 H V L CNN
|
||||
F2 "TO_SOT_Packages_SMD:SOT-23" 200 -75 50 H I L CIN
|
||||
F3 "" 0 0 50 H I L CNN
|
||||
$FPLIST
|
||||
SOT?23*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
C 65 0 111 0 1 10 N
|
||||
C 100 -70 11 0 1 0 F
|
||||
C 100 70 11 0 1 0 F
|
||||
P 2 0 1 0 0 0 10 0 N
|
||||
P 2 0 1 0 30 -70 100 -70 N
|
||||
P 2 0 1 10 30 -50 30 -90 N
|
||||
P 2 0 1 0 30 0 100 0 N
|
||||
P 2 0 1 10 30 20 30 -20 N
|
||||
P 2 0 1 0 30 70 100 70 N
|
||||
P 2 0 1 10 30 90 30 50 N
|
||||
P 2 0 1 0 100 -70 100 -100 N
|
||||
P 2 0 1 0 100 -70 100 0 N
|
||||
P 2 0 1 0 100 100 100 70 N
|
||||
P 3 0 1 10 10 75 10 -75 10 -75 N
|
||||
P 4 0 1 0 90 0 50 -15 50 15 90 0 F
|
||||
P 4 0 1 0 100 -70 130 -70 130 70 100 70 N
|
||||
P 4 0 1 0 110 -20 115 -15 145 -15 150 -10 N
|
||||
P 4 0 1 0 130 -15 115 10 145 10 130 -15 N
|
||||
X G 1 -200 0 200 R 50 50 1 1 I
|
||||
X S 2 100 -200 100 U 50 50 1 1 P
|
||||
X D 3 100 200 100 D 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# CP-device
|
||||
#
|
||||
DEF CP-device C 0 10 N Y 1 F N
|
||||
F0 "C" 25 100 50 H V L CNN
|
||||
F1 "CP-device" 25 -100 50 H V L CNN
|
||||
F2 "" 38 -150 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
CP_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -90 20 -90 40 0 1 0 N
|
||||
S -90 20 90 20 0 1 0 N
|
||||
S 90 -20 -90 -40 0 1 0 F
|
||||
S 90 40 -90 40 0 1 0 N
|
||||
S 90 40 90 20 0 1 0 N
|
||||
P 2 0 1 0 -70 90 -30 90 N
|
||||
P 2 0 1 0 -50 110 -50 70 N
|
||||
X ~ 1 0 150 110 D 50 50 1 1 P
|
||||
X ~ 2 0 -150 110 U 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# CP_Small-device
|
||||
#
|
||||
DEF CP_Small-device C 0 10 N N 1 F N
|
||||
F0 "C" 10 70 50 H V L CNN
|
||||
F1 "CP_Small-device" 10 -80 50 H V L CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
CP_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -60 -12 60 -27 0 1 0 F
|
||||
S -60 27 60 12 0 1 0 N
|
||||
P 2 0 1 0 -50 60 -30 60 N
|
||||
P 2 0 1 0 -40 50 -40 70 N
|
||||
X ~ 1 0 100 73 D 50 50 1 1 P
|
||||
X ~ 2 0 -100 73 U 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# C_Small-device
|
||||
#
|
||||
DEF C_Small-device C 0 10 N N 1 F N
|
||||
F0 "C" 10 70 50 H V L CNN
|
||||
F1 "C_Small-device" 10 -80 50 H V L CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
C_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
P 2 0 1 13 -60 -20 60 -20 N
|
||||
P 2 0 1 12 -60 20 60 20 N
|
||||
X ~ 1 0 100 80 D 50 50 1 1 P
|
||||
X ~ 2 0 -100 80 U 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# DS18B20-maxim
|
||||
#
|
||||
DEF DS18B20-maxim U 0 40 Y Y 1 F N
|
||||
F0 "U" -150 250 50 H V C CNN
|
||||
F1 "DS18B20-maxim" 0 -250 50 H V C CNN
|
||||
F2 "" -150 250 50 H I C CNN
|
||||
F3 "" -150 250 50 H I C CNN
|
||||
$FPLIST
|
||||
TO-92_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -200 200 200 -200 0 1 0 N
|
||||
X GND 1 -300 -100 100 R 50 50 1 1 W
|
||||
X DQ 2 -300 0 100 R 50 50 1 1 B
|
||||
X VDD 3 -300 100 100 R 50 50 1 1 W
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# ESP-12E-ESP8266
|
||||
#
|
||||
DEF ESP-12E-ESP8266 U 0 40 Y Y 1 F N
|
||||
F0 "U" 0 -100 50 H V C CNN
|
||||
F1 "ESP-12E-ESP8266" 0 100 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
ESP-12E
|
||||
ESP-12E_SMD
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -600 -600 600 600 1 0 0 N
|
||||
X REST 1 -900 300 300 R 50 50 1 1 I
|
||||
X GPIO15 10 900 -300 300 L 50 50 1 1 B
|
||||
X GPIO2 11 900 -200 300 L 50 50 1 1 B
|
||||
X GPIO0 12 900 -100 300 L 50 50 1 1 B
|
||||
X GPIO4 13 900 0 300 L 50 50 1 1 B
|
||||
X GPIO5 14 900 100 300 L 50 50 1 1 B
|
||||
X RXD 15 900 200 300 L 50 50 1 1 I
|
||||
X TXD 16 900 300 300 L 50 50 1 1 O
|
||||
X CS0 17 -250 -900 300 U 50 50 1 1 B
|
||||
X MISO 18 -150 -900 300 U 50 50 1 1 B
|
||||
X GPIO9 19 -50 -900 300 U 50 50 1 1 B
|
||||
X ADC 2 -900 200 300 R 50 50 1 1 P
|
||||
X GPIO10 20 50 -900 300 U 50 50 1 1 B
|
||||
X MOSI 21 150 -900 300 U 50 50 1 1 B
|
||||
X SCLK 22 250 -900 300 U 50 50 1 1 B
|
||||
X CH_PD 3 -900 100 300 R 50 50 1 1 I
|
||||
X GPIO16 4 -900 0 300 R 50 50 1 1 B
|
||||
X GPIO14 5 -900 -100 300 R 50 50 1 1 B
|
||||
X GPIO12 6 -900 -200 300 R 50 50 1 1 B
|
||||
X GPIO13 7 -900 -300 300 R 50 50 1 1 B
|
||||
X VCC 8 -900 -400 300 R 50 50 1 1 W
|
||||
X GND 9 900 -400 300 L 50 50 1 1 W
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# FTDI_PROG_HDR-ESPProgHeader
|
||||
#
|
||||
DEF FTDI_PROG_HDR-ESPProgHeader J 0 40 Y N 1 F N
|
||||
F0 "J" 0 300 50 H V C CNN
|
||||
F1 "FTDI_PROG_HDR-ESPProgHeader" 0 -400 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
Connector*:*_??x*mm*
|
||||
Connector*:*1x??x*mm*
|
||||
Pin?Header?Straight?1X*
|
||||
Pin?Header?Angled?1X*
|
||||
Socket?Strip?Straight?1X*
|
||||
Socket?Strip?Angled?1X*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -50 -295 0 -305 1 1 6 N
|
||||
S -50 -195 0 -205 1 1 6 N
|
||||
S -50 -95 0 -105 1 1 6 N
|
||||
S -50 5 0 -5 1 1 6 N
|
||||
S -50 105 0 95 1 1 6 N
|
||||
S -50 205 0 195 1 1 6 N
|
||||
S -50 250 50 -350 1 1 10 f
|
||||
X Pin_1 1 -200 200 150 R 50 50 1 1 N
|
||||
X Pin_2 2 -200 100 150 R 50 50 1 1 P
|
||||
X Pin_3 3 -200 0 150 R 50 50 1 1 P
|
||||
X Pin_4 4 -200 -100 150 R 50 50 1 1 N
|
||||
X Pin_5 5 -200 -200 150 R 50 50 1 1 N
|
||||
X Pin_6 6 -200 -300 150 R 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Jumper-device
|
||||
#
|
||||
DEF Jumper-device JP 0 30 Y N 1 F N
|
||||
F0 "JP" 0 150 50 H V C CNN
|
||||
F1 "Jumper-device" 0 -80 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
DRAW
|
||||
A 0 -26 125 1426 373 0 1 0 N -98 50 99 50
|
||||
C -100 0 35 0 1 0 N
|
||||
C 100 0 35 0 1 0 N
|
||||
X 1 1 -300 0 165 R 50 50 0 1 P
|
||||
X 2 2 300 0 165 L 50 50 0 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# LM1117-3.3-regul
|
||||
#
|
||||
DEF LM1117-3.3-regul U 0 10 Y Y 1 F N
|
||||
F0 "U" -150 125 50 H V C CNN
|
||||
F1 "LM1117-3.3-regul" 0 125 50 H V L CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
SOT?223*
|
||||
TO?263*
|
||||
TO?252*
|
||||
TO?220*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -200 -200 200 75 0 1 10 f
|
||||
X GND 1 0 -300 100 U 50 50 1 1 W
|
||||
X VO 2 300 0 100 L 50 50 1 1 w
|
||||
X VI 3 -300 0 100 R 50 50 1 1 W
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# RJ45-conn
|
||||
#
|
||||
DEF RJ45-conn J 0 40 Y Y 1 F N
|
||||
F0 "J" 200 500 50 H V C CNN
|
||||
F1 "RJ45-conn" -150 500 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
DRAW
|
||||
S -400 -300 400 450 0 1 10 f
|
||||
P 3 0 1 0 -175 200 -175 250 -175 250 N
|
||||
P 3 0 1 0 -125 250 -125 200 -125 200 N
|
||||
P 3 0 1 0 -75 250 -75 200 -75 200 N
|
||||
P 3 0 1 0 -25 250 -25 200 -25 200 N
|
||||
P 3 0 1 0 25 250 25 200 25 200 N
|
||||
P 3 0 1 0 75 250 75 200 75 200 N
|
||||
P 3 0 1 0 125 200 125 250 125 250 N
|
||||
P 3 0 1 0 175 200 175 250 175 250 N
|
||||
P 14 0 1 0 -225 250 225 250 225 -150 125 -150 125 -200 75 -200 75 -250 -75 -250 -75 -200 -125 -200 -125 -150 -225 -150 -225 250 -225 250 N
|
||||
X ~ 1 -350 -450 150 U 50 50 1 1 P
|
||||
X ~ 2 -250 -450 150 U 50 50 1 1 P
|
||||
X ~ 3 -150 -450 150 U 50 50 1 1 P
|
||||
X ~ 4 -50 -450 150 U 50 50 1 1 P
|
||||
X ~ 5 50 -450 150 U 50 50 1 1 P
|
||||
X ~ 6 150 -450 150 U 50 50 1 1 P
|
||||
X ~ 7 250 -450 150 U 50 50 1 1 P
|
||||
X ~ 8 350 -450 150 U 50 50 1 1 P
|
||||
X SHIELD 9 550 350 150 L 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# R_Small-device
|
||||
#
|
||||
DEF R_Small-device R 0 10 N N 1 F N
|
||||
F0 "R" 30 20 50 H V L CNN
|
||||
F1 "R_Small-device" 30 -40 50 H V L CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
R_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -30 70 30 -70 0 1 8 N
|
||||
X ~ 1 0 100 30 D 50 50 1 1 P
|
||||
X ~ 2 0 -100 30 U 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# SW_Push-switches
|
||||
#
|
||||
DEF SW_Push-switches SW 0 40 N N 1 F N
|
||||
F0 "SW" 50 100 50 H V L CNN
|
||||
F1 "SW_Push-switches" 0 -60 50 H V C CNN
|
||||
F2 "" 0 200 50 H I C CNN
|
||||
F3 "" 0 200 50 H I C CNN
|
||||
DRAW
|
||||
C -80 0 20 0 1 0 N
|
||||
C 80 0 20 0 1 0 N
|
||||
P 2 0 1 0 0 50 0 120 N
|
||||
P 2 0 1 0 100 50 -100 50 N
|
||||
X 1 1 -200 0 100 R 50 50 0 1 P
|
||||
X 2 2 200 0 100 L 50 50 0 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# TSS721-tss721
|
||||
#
|
||||
DEF TSS721-tss721 U 0 40 Y Y 1 F N
|
||||
F0 "U" 200 850 50 H V L CNN
|
||||
F1 "TSS721-tss721" 200 750 50 H V L CNN
|
||||
F2 "" 0 -850 50 H V C CIN
|
||||
F3 "" -200 -800 50 H V C CNN
|
||||
$FPLIST
|
||||
SOIC*3.9x9.9mm*Pitch1.27mm*
|
||||
TSSOP*4.4x5mm*Pitch0.65mm*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -500 -700 500 700 0 1 10 f
|
||||
X BUSL2 1 -600 400 100 R 50 50 1 1 I
|
||||
X VS 10 -600 0 100 R 50 50 1 1 P
|
||||
X VDD 11 0 800 100 D 50 50 1 1 W
|
||||
X RX 12 600 500 100 L 50 50 1 1 I
|
||||
X RXI 13 600 400 100 L 50 50 1 1 I I
|
||||
X RIS 14 300 -800 100 U 50 50 1 1 I
|
||||
X GND 15 0 -800 100 U 50 50 1 1 W
|
||||
X BUSL1 16 -600 500 100 R 50 50 1 1 I
|
||||
X VB 2 -600 -150 100 R 50 50 1 1 P
|
||||
X STC 3 -600 -500 100 R 50 50 1 1 P
|
||||
X RIDD 4 200 -800 100 U 50 50 1 1 O
|
||||
X PF 5 -600 100 100 R 50 50 1 1 I
|
||||
X SC 6 400 -800 100 U 50 50 1 1 P
|
||||
X TXI 7 600 100 100 L 50 50 1 1 O I
|
||||
X TX 8 600 200 100 L 50 50 1 1 O
|
||||
X BAT 9 -100 800 100 D 50 50 1 1 I
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# USB_OTG-conn
|
||||
#
|
||||
DEF USB_OTG-conn J 0 40 Y Y 1 F N
|
||||
F0 "J" -200 450 50 H V L CNN
|
||||
F1 "USB_OTG-conn" -200 350 50 H V L CNN
|
||||
F2 "" 150 -50 50 H I C CNN
|
||||
F3 "" 150 -50 50 H I C CNN
|
||||
$FPLIST
|
||||
USB*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
C -150 85 25 0 1 10 F
|
||||
C -25 135 15 0 1 10 F
|
||||
S -200 -300 200 300 0 1 10 f
|
||||
S -5 -300 5 -270 0 1 0 N
|
||||
S 10 50 -20 20 0 1 10 F
|
||||
S 200 -205 170 -195 0 1 0 N
|
||||
S 200 -105 170 -95 0 1 0 N
|
||||
S 200 -5 170 5 0 1 0 N
|
||||
S 200 195 170 205 0 1 0 N
|
||||
P 2 0 1 10 -75 85 25 85 N
|
||||
P 4 0 1 10 -125 85 -100 85 -50 135 -25 135 N
|
||||
P 4 0 1 10 -100 85 -75 85 -50 35 0 35 N
|
||||
P 4 0 1 10 25 110 25 60 75 85 25 110 F
|
||||
P 5 0 1 0 -170 220 -70 220 -80 190 -160 190 -170 220 F
|
||||
P 9 0 1 0 -185 230 -185 220 -175 190 -175 180 -65 180 -65 190 -55 220 -55 230 -185 230 N
|
||||
X VBUS 1 300 200 100 L 50 50 1 1 W
|
||||
X D- 2 300 -100 100 L 50 50 1 1 P
|
||||
X D+ 3 300 0 100 L 50 50 1 1 P
|
||||
X ID 4 300 -200 100 L 50 50 1 1 P
|
||||
X GND 5 0 -400 100 U 50 50 1 1 W
|
||||
X Shield 6 -100 -400 100 U 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
#End Library
|
||||
@@ -1,2 +1,3 @@
|
||||
(sym_lib_table
|
||||
(lib (name HAN_ESP_TSS721-rescue)(type Legacy)(uri ${KIPRJMOD}/HAN_ESP_TSS721-rescue.lib)(options "")(descr ""))
|
||||
)
|
||||
|
||||
34
hardware/wemos_mbus_shield/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
## Wemos shield
|
||||
|
||||
Fits D1 mini and S2 mini.
|
||||
|
||||
<img src="img1.jpg"/>
|
||||
<img src="img2.jpg"/>
|
||||
|
||||
**WARNING** Not properly tested
|
||||
|
||||
**Resistors**
|
||||
- R1: 470 (for U1)
|
||||
- R2: 220 (for U1)
|
||||
- R3: 82k (for U1)
|
||||
- R4: 220 (for U1)
|
||||
- R5: 100k (for U1)
|
||||
- R6: 10k (for AP button)
|
||||
- R7: 4.7k (for DS18B20)
|
||||
- R8-R10: 1k (for RGB LED)
|
||||
|
||||
**Capacitors**
|
||||
- C1: 100n (for U1)
|
||||
- C2: 1u (for U1)
|
||||
- C3: 100n (for U1)
|
||||
|
||||
**Other components**
|
||||
- U1: TSS521 or TSS721
|
||||
- U2: DS18B20 (Digital temperature sensor)
|
||||
- D1: RGB LED
|
||||
- J1: RJ45
|
||||
- SW1: AP button (to D3 GPIO0)
|
||||
|
||||
**Jumper**
|
||||
- JP1 & JP4: Jump these to receive power (5V) via RJ45 on pin 7 (GND) and 8 (+5)
|
||||
- JP2 & JP3: Jump these to attach DS18B20 sensors via RJ45 on pin 4 (Data) and pin 5 (GND)
|
||||
BIN
hardware/wemos_mbus_shield/img1.jpg
Normal file
|
After Width: | Height: | Size: 237 KiB |
BIN
hardware/wemos_mbus_shield/img2.jpg
Normal file
|
After Width: | Height: | Size: 296 KiB |
3
hardware/wemos_mbus_shield/kicad/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
gerber
|
||||
rescue-backup
|
||||
*-bak
|
||||
326
hardware/wemos_mbus_shield/kicad/d1_mini_shield-cache.lib
Normal file
@@ -0,0 +1,326 @@
|
||||
EESchema-LIBRARY Version 2.4
|
||||
#encoding utf-8
|
||||
#
|
||||
# Connector_RJ45
|
||||
#
|
||||
DEF Connector_RJ45 J 0 40 Y Y 1 F N
|
||||
F0 "J" -200 550 50 H V R CNN
|
||||
F1 "Connector_RJ45" 100 550 50 H V L CNN
|
||||
F2 "" 0 25 50 V I C CNN
|
||||
F3 "" 0 25 50 V I C CNN
|
||||
ALIAS RJ31 RJ32 RJ33 RJ34 RJ35 RJ41 RJ45 RJ49 RJ61
|
||||
$FPLIST
|
||||
8P8C*
|
||||
RJ31*
|
||||
RJ32*
|
||||
RJ33*
|
||||
RJ34*
|
||||
RJ35*
|
||||
RJ41*
|
||||
RJ45*
|
||||
RJ49*
|
||||
RJ61*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S 300 500 -300 -400 0 1 10 f
|
||||
P 2 0 1 0 -200 175 -250 175 N
|
||||
P 2 0 1 0 -200 225 -250 225 N
|
||||
P 3 0 1 0 -250 -125 -200 -125 -200 -125 N
|
||||
P 3 0 1 0 -250 -75 -200 -75 -200 -75 N
|
||||
P 3 0 1 0 -250 -25 -200 -25 -200 -25 N
|
||||
P 3 0 1 0 -250 25 -200 25 -200 25 N
|
||||
P 3 0 1 0 -250 75 -200 75 -200 75 N
|
||||
P 3 0 1 0 -200 125 -250 125 -250 125 N
|
||||
P 14 0 1 0 -250 -175 -250 275 150 275 150 175 200 175 200 125 250 125 250 -25 200 -25 200 -75 150 -75 150 -175 -250 -175 -250 -175 N
|
||||
X ~ 1 400 -300 100 L 50 50 1 1 P
|
||||
X ~ 2 400 -200 100 L 50 50 1 1 P
|
||||
X ~ 3 400 -100 100 L 50 50 1 1 P
|
||||
X ~ 4 400 0 100 L 50 50 1 1 P
|
||||
X ~ 5 400 100 100 L 50 50 1 1 P
|
||||
X ~ 6 400 200 100 L 50 50 1 1 P
|
||||
X ~ 7 400 300 100 L 50 50 1 1 P
|
||||
X ~ 8 400 400 100 L 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Device_C
|
||||
#
|
||||
DEF Device_C C 0 10 N Y 1 F N
|
||||
F0 "C" 25 100 50 H V L CNN
|
||||
F1 "Device_C" 25 -100 50 H V L CNN
|
||||
F2 "" 38 -150 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
C_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
P 2 0 1 20 -80 -30 80 -30 N
|
||||
P 2 0 1 20 -80 30 80 30 N
|
||||
X ~ 1 0 150 110 D 50 50 1 1 P
|
||||
X ~ 2 0 -150 110 U 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Device_Jumper
|
||||
#
|
||||
DEF Device_Jumper JP 0 30 Y N 1 F N
|
||||
F0 "JP" 0 150 50 H V C CNN
|
||||
F1 "Device_Jumper" 0 -80 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
SolderJumper*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
A 0 -26 125 1426 373 0 1 0 N -98 50 99 50
|
||||
C -100 0 35 0 1 0 N
|
||||
C 100 0 35 0 1 0 N
|
||||
X 1 1 -300 0 165 R 50 50 0 1 P
|
||||
X 2 2 300 0 165 L 50 50 0 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Device_LED_RGB
|
||||
#
|
||||
DEF Device_LED_RGB D 0 0 Y N 1 F N
|
||||
F0 "D" 0 370 50 H V C CNN
|
||||
F1 "Device_LED_RGB" 0 -350 50 H V C CNN
|
||||
F2 "" 0 -50 50 H I C CNN
|
||||
F3 "" 0 -50 50 H I C CNN
|
||||
$FPLIST
|
||||
LED*
|
||||
LED_SMD:*
|
||||
LED_THT:*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
T 0 -75 -250 50 0 0 0 B Normal 0 C C
|
||||
T 0 -75 -50 50 0 0 0 G Normal 0 C C
|
||||
T 0 -75 150 50 0 0 0 R Normal 0 C C
|
||||
S 50 -50 50 50 0 1 0 N
|
||||
S 50 50 50 50 0 1 0 N
|
||||
S 50 150 50 250 0 1 0 N
|
||||
S 50 250 50 250 0 1 0 N
|
||||
S 110 330 -110 -300 0 1 10 f
|
||||
P 2 0 1 0 -50 -200 -100 -200 N
|
||||
P 2 0 1 0 -50 -200 50 -200 N
|
||||
P 2 0 1 0 -50 -150 -50 -250 N
|
||||
P 2 0 1 8 -50 -150 -50 -250 N
|
||||
P 2 0 1 0 -50 0 -100 0 N
|
||||
P 2 0 1 8 -50 50 -50 -50 N
|
||||
P 2 0 1 0 -50 200 -100 200 N
|
||||
P 2 0 1 0 -50 200 50 200 N
|
||||
P 2 0 1 8 -50 250 -50 150 N
|
||||
P 2 0 1 0 50 -200 100 -200 N
|
||||
P 2 0 1 0 50 0 -50 0 N
|
||||
P 2 0 1 0 50 0 100 0 N
|
||||
P 2 0 1 0 50 200 100 200 N
|
||||
P 3 0 1 0 -50 50 -50 -50 -50 -50 N
|
||||
P 3 0 1 0 -50 250 -50 150 -50 150 N
|
||||
P 4 0 1 8 50 -150 50 -250 -50 -200 50 -150 N
|
||||
P 4 0 1 8 50 50 50 -50 -50 0 50 50 N
|
||||
P 4 0 1 8 50 250 50 150 -50 200 50 250 N
|
||||
P 5 0 1 0 -40 -150 20 -90 -10 -90 20 -90 20 -120 N
|
||||
P 5 0 1 0 -40 50 20 110 -10 110 20 110 20 80 N
|
||||
P 5 0 1 0 -40 250 20 310 -10 310 20 310 20 280 N
|
||||
P 5 0 1 0 0 -150 60 -90 30 -90 60 -90 60 -120 N
|
||||
P 5 0 1 0 0 50 60 110 30 110 60 110 60 80 N
|
||||
P 5 0 1 0 0 250 60 310 30 310 60 310 60 280 N
|
||||
X RK 1 -200 200 100 R 50 50 1 1 P
|
||||
X GK 2 -200 0 100 R 50 50 1 1 P
|
||||
X BK 3 -200 -200 100 R 50 50 1 1 P
|
||||
X BA 4 200 -200 100 L 50 50 1 1 P
|
||||
X GA 5 200 0 100 L 50 50 1 1 P
|
||||
X RA 6 200 200 100 L 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Device_R
|
||||
#
|
||||
DEF Device_R R 0 0 N Y 1 F N
|
||||
F0 "R" 80 0 50 V V C CNN
|
||||
F1 "Device_R" 0 0 50 V V C CNN
|
||||
F2 "" -70 0 50 V I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
R_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -40 -100 40 100 0 1 10 N
|
||||
X ~ 1 0 150 50 D 50 50 1 1 P
|
||||
X ~ 2 0 -150 50 U 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Sensor_Temperature_DS18B20
|
||||
#
|
||||
DEF Sensor_Temperature_DS18B20 U 0 40 Y Y 1 F N
|
||||
F0 "U" -150 250 50 H V C CNN
|
||||
F1 "Sensor_Temperature_DS18B20" 250 250 50 H V C CNN
|
||||
F2 "Package_TO_SOT_THT:TO-92_Inline" -1000 -250 50 H I C CNN
|
||||
F3 "" -150 250 50 H I C CNN
|
||||
ALIAS DS1822 DS18B20 DS18S20 DS1821C
|
||||
$FPLIST
|
||||
TO*92*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
A -130 125 25 1 1799 0 1 10 N -105 125 -155 125
|
||||
C -130 -100 50 0 1 10 F
|
||||
S -200 200 200 -200 0 1 10 f
|
||||
S -105 -75 -155 0 0 1 10 F
|
||||
P 2 0 1 10 -155 25 -130 25 N
|
||||
P 2 0 1 10 -155 50 -130 50 N
|
||||
P 2 0 1 10 -155 75 -130 75 N
|
||||
P 2 0 1 10 -155 100 -130 100 N
|
||||
P 2 0 1 10 -155 125 -155 0 N
|
||||
P 2 0 1 10 -155 125 -130 125 N
|
||||
P 2 0 1 10 -105 125 -105 0 N
|
||||
X GND 1 0 -300 100 U 50 50 1 1 W
|
||||
X DQ 2 300 0 100 L 50 50 1 1 B
|
||||
X VDD 3 0 300 100 D 50 50 1 1 W
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Switch_SW_Push
|
||||
#
|
||||
DEF Switch_SW_Push SW 0 40 N N 1 F N
|
||||
F0 "SW" 50 100 50 H V L CNN
|
||||
F1 "Switch_SW_Push" 0 -60 50 H V C CNN
|
||||
F2 "" 0 200 50 H I C CNN
|
||||
F3 "" 0 200 50 H I C CNN
|
||||
DRAW
|
||||
C -80 0 20 0 1 0 N
|
||||
C 80 0 20 0 1 0 N
|
||||
P 2 0 1 0 0 50 0 120 N
|
||||
P 2 0 1 0 100 50 -100 50 N
|
||||
X 1 1 -200 0 100 R 50 50 0 1 P
|
||||
X 2 2 200 0 100 L 50 50 0 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# d1_mini_shield-rescue_CONN_01X08
|
||||
#
|
||||
DEF d1_mini_shield-rescue_CONN_01X08 P 0 40 Y N 1 F N
|
||||
F0 "P" 0 450 50 H V C CNN
|
||||
F1 "d1_mini_shield-rescue_CONN_01X08" 100 0 50 V V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
$FPLIST
|
||||
Pin_Header_Straight_1X08
|
||||
Pin_Header_Angled_1X08
|
||||
Socket_Strip_Straight_1X08
|
||||
Socket_Strip_Angled_1X08
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -50 -400 50 400 0 1 0 N
|
||||
S -50 -345 10 -355 0 1 0 N
|
||||
S -50 -245 10 -255 0 1 0 N
|
||||
S -50 -145 10 -155 0 1 0 N
|
||||
S -50 -45 10 -55 0 1 0 N
|
||||
S -50 55 10 45 0 1 0 N
|
||||
S -50 155 10 145 0 1 0 N
|
||||
S -50 255 10 245 0 1 0 N
|
||||
S -50 355 10 345 0 1 0 N
|
||||
X P1 1 -200 350 150 R 50 50 1 1 P
|
||||
X P2 2 -200 250 150 R 50 50 1 1 P
|
||||
X P3 3 -200 150 150 R 50 50 1 1 P
|
||||
X P4 4 -200 50 150 R 50 50 1 1 P
|
||||
X P5 5 -200 -50 150 R 50 50 1 1 P
|
||||
X P6 6 -200 -150 150 R 50 50 1 1 P
|
||||
X P7 7 -200 -250 150 R 50 50 1 1 P
|
||||
X P8 8 -200 -350 150 R 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# power_+3.3V
|
||||
#
|
||||
DEF power_+3.3V #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 -150 50 H I C CNN
|
||||
F1 "power_+3.3V" 0 140 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
ALIAS +3.3V
|
||||
DRAW
|
||||
P 2 0 1 0 -30 50 0 100 N
|
||||
P 2 0 1 0 0 0 0 100 N
|
||||
P 2 0 1 0 0 100 30 50 N
|
||||
X +3V3 1 0 0 0 U 50 50 1 1 W N
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# power_+3V3
|
||||
#
|
||||
DEF power_+3V3 #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 -150 50 H I C CNN
|
||||
F1 "power_+3V3" 0 140 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
DRAW
|
||||
P 2 0 1 0 -30 50 0 100 N
|
||||
P 2 0 1 0 0 0 0 100 N
|
||||
P 2 0 1 0 0 100 30 50 N
|
||||
X +3V3 1 0 0 0 U 50 50 1 1 W N
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# power_+5V
|
||||
#
|
||||
DEF power_+5V #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 -150 50 H I C CNN
|
||||
F1 "power_+5V" 0 140 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
DRAW
|
||||
P 2 0 1 0 -30 50 0 100 N
|
||||
P 2 0 1 0 0 0 0 100 N
|
||||
P 2 0 1 0 0 100 30 50 N
|
||||
X +5V 1 0 0 0 U 50 50 1 1 W N
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# power_GND
|
||||
#
|
||||
DEF power_GND #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 -250 50 H I C CNN
|
||||
F1 "power_GND" 0 -150 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
DRAW
|
||||
P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
|
||||
X GND 1 0 0 0 D 50 50 1 1 W N
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# tss721_TSS721
|
||||
#
|
||||
DEF tss721_TSS721 U 0 40 Y Y 1 F N
|
||||
F0 "U" 200 850 50 H V L CNN
|
||||
F1 "tss721_TSS721" 200 750 50 H V L CNN
|
||||
F2 "" 0 -850 50 H V C CIN
|
||||
F3 "" -200 -800 50 H V C CNN
|
||||
ALIAS TSS721A
|
||||
$FPLIST
|
||||
SOIC*3.9x9.9mm*Pitch1.27mm*
|
||||
TSSOP*4.4x5mm*Pitch0.65mm*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -500 -700 500 700 0 1 10 f
|
||||
X BUSL2 1 -600 400 100 R 50 50 1 1 I
|
||||
X VS 10 -600 0 100 R 50 50 1 1 P
|
||||
X VDD 11 0 800 100 D 50 50 1 1 W
|
||||
X RX 12 600 500 100 L 50 50 1 1 I
|
||||
X RXI 13 600 400 100 L 50 50 1 1 I I
|
||||
X RIS 14 300 -800 100 U 50 50 1 1 I
|
||||
X GND 15 0 -800 100 U 50 50 1 1 W
|
||||
X BUSL1 16 -600 500 100 R 50 50 1 1 I
|
||||
X VB 2 -600 -150 100 R 50 50 1 1 P
|
||||
X STC 3 -600 -500 100 R 50 50 1 1 P
|
||||
X RIDD 4 200 -800 100 U 50 50 1 1 O
|
||||
X PF 5 -600 100 100 R 50 50 1 1 I
|
||||
X SC 6 400 -800 100 U 50 50 1 1 P
|
||||
X TXI 7 600 100 100 L 50 50 1 1 O I
|
||||
X TX 8 600 200 100 L 50 50 1 1 O
|
||||
X BAT 9 -100 800 100 D 50 50 1 1 I
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
#End Library
|
||||
38
hardware/wemos_mbus_shield/kicad/d1_mini_shield-rescue.lib
Normal file
@@ -0,0 +1,38 @@
|
||||
EESchema-LIBRARY Version 2.4
|
||||
#encoding utf-8
|
||||
#
|
||||
# CONN_01X08
|
||||
#
|
||||
DEF CONN_01X08 P 0 40 Y N 1 F N
|
||||
F0 "P" 0 450 50 H V C CNN
|
||||
F1 "CONN_01X08" 100 0 50 V V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
$FPLIST
|
||||
Pin_Header_Straight_1X08
|
||||
Pin_Header_Angled_1X08
|
||||
Socket_Strip_Straight_1X08
|
||||
Socket_Strip_Angled_1X08
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -50 -400 50 400 0 1 0 N
|
||||
S -50 -345 10 -355 0 1 0 N
|
||||
S -50 -245 10 -255 0 1 0 N
|
||||
S -50 -145 10 -155 0 1 0 N
|
||||
S -50 -45 10 -55 0 1 0 N
|
||||
S -50 55 10 45 0 1 0 N
|
||||
S -50 155 10 145 0 1 0 N
|
||||
S -50 255 10 245 0 1 0 N
|
||||
S -50 355 10 345 0 1 0 N
|
||||
X P1 1 -200 350 150 R 50 50 1 1 P
|
||||
X P2 2 -200 250 150 R 50 50 1 1 P
|
||||
X P3 3 -200 150 150 R 50 50 1 1 P
|
||||
X P4 4 -200 50 150 R 50 50 1 1 P
|
||||
X P5 5 -200 -50 150 R 50 50 1 1 P
|
||||
X P6 6 -200 -150 150 R 50 50 1 1 P
|
||||
X P7 7 -200 -250 150 R 50 50 1 1 P
|
||||
X P8 8 -200 -350 150 R 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
#End Library
|
||||
1852
hardware/wemos_mbus_shield/kicad/d1_mini_shield.kicad_pcb
Normal file
482
hardware/wemos_mbus_shield/kicad/d1_mini_shield.net
Normal file
@@ -0,0 +1,482 @@
|
||||
(export (version D)
|
||||
(design
|
||||
(source /home/gunnar/src/AmsToMqttBridge/hardware/wemos_mbus_shield/kicad/d1_mini_shield.sch)
|
||||
(date "sø. 26. juni 2022 kl. 12.19 +0200")
|
||||
(tool "Eeschema 5.1.5+dfsg1-2build2")
|
||||
(sheet (number 1) (name /) (tstamps /)
|
||||
(title_block
|
||||
(title)
|
||||
(company)
|
||||
(rev)
|
||||
(date)
|
||||
(source d1_mini_shield.sch)
|
||||
(comment (number 1) (value ""))
|
||||
(comment (number 2) (value ""))
|
||||
(comment (number 3) (value ""))
|
||||
(comment (number 4) (value "")))))
|
||||
(components
|
||||
(comp (ref P1)
|
||||
(value CONN_01X08)
|
||||
(footprint D1_mini:D1_mini_Pin_Header)
|
||||
(libsource (lib d1_mini_shield-rescue) (part CONN_01X08) (description ""))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 5763EB78))
|
||||
(comp (ref P2)
|
||||
(value CONN_01X08)
|
||||
(footprint D1_mini:D1_mini_Pin_Header)
|
||||
(libsource (lib d1_mini_shield-rescue) (part CONN_01X08) (description ""))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 5763EBF2))
|
||||
(comp (ref U1)
|
||||
(value TSS721)
|
||||
(footprint Package_SO:SOIC-16_3.9x9.9mm_P1.27mm)
|
||||
(datasheet http://www.ti.com/lit/ds/symlink/tss721a.pdf)
|
||||
(libsource (lib tss721) (part TSS721) (description "TSS721A Meter Bus Transceiver, SOIC-16/TSSOP-16"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B826D2))
|
||||
(comp (ref J1)
|
||||
(value RJ45)
|
||||
(footprint Connector_RJ:RJ45_Amphenol_54602-x08_Horizontal)
|
||||
(datasheet ~)
|
||||
(libsource (lib Connector) (part RJ45) (description "RJ connector, 8P8C (8 positions 8 connected)"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B8AC34))
|
||||
(comp (ref R4)
|
||||
(value 220)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B8CAA8))
|
||||
(comp (ref R2)
|
||||
(value 220)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B8DB92))
|
||||
(comp (ref R3)
|
||||
(value 82k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B9F861))
|
||||
(comp (ref R1)
|
||||
(value 470)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B9FC37))
|
||||
(comp (ref C2)
|
||||
(value 1u)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62BA06BE))
|
||||
(comp (ref C1)
|
||||
(value 100n)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62BA09E7))
|
||||
(comp (ref R5)
|
||||
(value 100k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62BED413))
|
||||
(comp (ref C3)
|
||||
(value 100n)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62BED9ED))
|
||||
(comp (ref JP1)
|
||||
(value Jumper)
|
||||
(footprint Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part Jumper) (description "Jumper, normally closed"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C331C0))
|
||||
(comp (ref JP2)
|
||||
(value Jumper)
|
||||
(footprint Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part Jumper) (description "Jumper, normally closed"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C365CA))
|
||||
(comp (ref JP3)
|
||||
(value Jumper)
|
||||
(footprint Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part Jumper) (description "Jumper, normally closed"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C36C70))
|
||||
(comp (ref D1)
|
||||
(value LED_RGB)
|
||||
(footprint LED_SMD:LED_RGB_PLCC-6)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part LED_RGB) (description "RGB LED, 6 pin package"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C43A7B))
|
||||
(comp (ref R9)
|
||||
(value 1k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C495F7))
|
||||
(comp (ref R8)
|
||||
(value 1k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C4BDE9))
|
||||
(comp (ref R10)
|
||||
(value 1k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C4C336))
|
||||
(comp (ref U2)
|
||||
(value DS18B20)
|
||||
(footprint Package_TO_SOT_THT:TO-92_Inline)
|
||||
(datasheet http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf)
|
||||
(libsource (lib Sensor_Temperature) (part DS18B20) (description "Programmable Resolution 1-Wire Digital Thermometer TO-92"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C6296F))
|
||||
(comp (ref R7)
|
||||
(value 4k7)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C6405D))
|
||||
(comp (ref SW1)
|
||||
(value SW_Push)
|
||||
(footprint Button_Switch_SMD:SW_SPST_B3U-3000P)
|
||||
(datasheet ~)
|
||||
(libsource (lib Switch) (part SW_Push) (description "Push button switch, generic, two pins"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C73229))
|
||||
(comp (ref R6)
|
||||
(value 10k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C73CE8))
|
||||
(comp (ref JP4)
|
||||
(value Jumper)
|
||||
(footprint Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part Jumper) (description "Jumper, normally closed"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62D1E97A)))
|
||||
(libparts
|
||||
(libpart (lib Connector) (part 8P8C)
|
||||
(aliases
|
||||
(alias RJ31)
|
||||
(alias RJ32)
|
||||
(alias RJ33)
|
||||
(alias RJ34)
|
||||
(alias RJ35)
|
||||
(alias RJ41)
|
||||
(alias RJ45)
|
||||
(alias RJ49)
|
||||
(alias RJ61))
|
||||
(description "RJ connector, 8P8C (8 positions 8 connected), RJ31/RJ32/RJ33/RJ34/RJ35/RJ41/RJ45/RJ49/RJ61")
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp 8P8C*)
|
||||
(fp RJ31*)
|
||||
(fp RJ32*)
|
||||
(fp RJ33*)
|
||||
(fp RJ34*)
|
||||
(fp RJ35*)
|
||||
(fp RJ41*)
|
||||
(fp RJ45*)
|
||||
(fp RJ49*)
|
||||
(fp RJ61*))
|
||||
(fields
|
||||
(field (name Reference) J)
|
||||
(field (name Value) 8P8C))
|
||||
(pins
|
||||
(pin (num 1) (name ~) (type passive))
|
||||
(pin (num 2) (name ~) (type passive))
|
||||
(pin (num 3) (name ~) (type passive))
|
||||
(pin (num 4) (name ~) (type passive))
|
||||
(pin (num 5) (name ~) (type passive))
|
||||
(pin (num 6) (name ~) (type passive))
|
||||
(pin (num 7) (name ~) (type passive))
|
||||
(pin (num 8) (name ~) (type passive))))
|
||||
(libpart (lib Device) (part C)
|
||||
(description "Unpolarized capacitor")
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp C_*))
|
||||
(fields
|
||||
(field (name Reference) C)
|
||||
(field (name Value) C))
|
||||
(pins
|
||||
(pin (num 1) (name ~) (type passive))
|
||||
(pin (num 2) (name ~) (type passive))))
|
||||
(libpart (lib Device) (part Jumper)
|
||||
(description "Jumper, normally closed")
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp SolderJumper*))
|
||||
(fields
|
||||
(field (name Reference) JP)
|
||||
(field (name Value) Jumper))
|
||||
(pins
|
||||
(pin (num 1) (name 1) (type passive))
|
||||
(pin (num 2) (name 2) (type passive))))
|
||||
(libpart (lib Device) (part LED_RGB)
|
||||
(description "RGB LED, 6 pin package")
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp LED*)
|
||||
(fp LED_SMD:*)
|
||||
(fp LED_THT:*))
|
||||
(fields
|
||||
(field (name Reference) D)
|
||||
(field (name Value) LED_RGB))
|
||||
(pins
|
||||
(pin (num 1) (name RK) (type passive))
|
||||
(pin (num 2) (name GK) (type passive))
|
||||
(pin (num 3) (name BK) (type passive))
|
||||
(pin (num 4) (name BA) (type passive))
|
||||
(pin (num 5) (name GA) (type passive))
|
||||
(pin (num 6) (name RA) (type passive))))
|
||||
(libpart (lib Device) (part R)
|
||||
(description Resistor)
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp R_*))
|
||||
(fields
|
||||
(field (name Reference) R)
|
||||
(field (name Value) R))
|
||||
(pins
|
||||
(pin (num 1) (name ~) (type passive))
|
||||
(pin (num 2) (name ~) (type passive))))
|
||||
(libpart (lib Sensor_Temperature) (part MAX31820)
|
||||
(aliases
|
||||
(alias DS1822)
|
||||
(alias DS18B20)
|
||||
(alias DS18S20)
|
||||
(alias DS1821C))
|
||||
(description "1-Wire Ambient Temperature Sensor TO-92")
|
||||
(docs http://datasheets.maximintegrated.com/en/ds/MAX31820.pdf)
|
||||
(footprints
|
||||
(fp TO*92*))
|
||||
(fields
|
||||
(field (name Reference) U)
|
||||
(field (name Value) MAX31820)
|
||||
(field (name Footprint) Package_TO_SOT_THT:TO-92_Inline))
|
||||
(pins
|
||||
(pin (num 1) (name GND) (type power_in))
|
||||
(pin (num 2) (name DQ) (type BiDi))
|
||||
(pin (num 3) (name VDD) (type power_in))))
|
||||
(libpart (lib Switch) (part SW_Push)
|
||||
(description "Push button switch, generic, two pins")
|
||||
(docs ~)
|
||||
(fields
|
||||
(field (name Reference) SW)
|
||||
(field (name Value) SW_Push))
|
||||
(pins
|
||||
(pin (num 1) (name 1) (type passive))
|
||||
(pin (num 2) (name 2) (type passive))))
|
||||
(libpart (lib d1_mini_shield-rescue) (part CONN_01X08)
|
||||
(footprints
|
||||
(fp Pin_Header_Straight_1X08)
|
||||
(fp Pin_Header_Angled_1X08)
|
||||
(fp Socket_Strip_Straight_1X08)
|
||||
(fp Socket_Strip_Angled_1X08))
|
||||
(fields
|
||||
(field (name Reference) P)
|
||||
(field (name Value) CONN_01X08))
|
||||
(pins
|
||||
(pin (num 1) (name P1) (type passive))
|
||||
(pin (num 2) (name P2) (type passive))
|
||||
(pin (num 3) (name P3) (type passive))
|
||||
(pin (num 4) (name P4) (type passive))
|
||||
(pin (num 5) (name P5) (type passive))
|
||||
(pin (num 6) (name P6) (type passive))
|
||||
(pin (num 7) (name P7) (type passive))
|
||||
(pin (num 8) (name P8) (type passive))))
|
||||
(libpart (lib tss721) (part TSS721)
|
||||
(aliases
|
||||
(alias TSS721A))
|
||||
(description "TSS721A Meter Bus Transceiver, SOIC-16/TSSOP-16")
|
||||
(docs http://www.ti.com/lit/ds/symlink/tss721a.pdf)
|
||||
(footprints
|
||||
(fp SOIC*3.9x9.9mm*Pitch1.27mm*)
|
||||
(fp TSSOP*4.4x5mm*Pitch0.65mm*))
|
||||
(fields
|
||||
(field (name Reference) U)
|
||||
(field (name Value) TSS721))
|
||||
(pins
|
||||
(pin (num 1) (name BUSL2) (type input))
|
||||
(pin (num 2) (name VB) (type passive))
|
||||
(pin (num 3) (name STC) (type passive))
|
||||
(pin (num 4) (name RIDD) (type output))
|
||||
(pin (num 5) (name PF) (type input))
|
||||
(pin (num 6) (name SC) (type passive))
|
||||
(pin (num 7) (name TXI) (type output))
|
||||
(pin (num 8) (name TX) (type output))
|
||||
(pin (num 9) (name BAT) (type input))
|
||||
(pin (num 10) (name VS) (type passive))
|
||||
(pin (num 11) (name VDD) (type power_in))
|
||||
(pin (num 12) (name RX) (type input))
|
||||
(pin (num 13) (name RXI) (type input))
|
||||
(pin (num 14) (name RIS) (type input))
|
||||
(pin (num 15) (name GND) (type power_in))
|
||||
(pin (num 16) (name BUSL1) (type input)))))
|
||||
(libraries
|
||||
(library (logical Connector)
|
||||
(uri /usr/share/kicad/library/Connector.lib))
|
||||
(library (logical Device)
|
||||
(uri /usr/share/kicad/library/Device.lib))
|
||||
(library (logical Sensor_Temperature)
|
||||
(uri /usr/share/kicad/library/Sensor_Temperature.lib))
|
||||
(library (logical Switch)
|
||||
(uri /usr/share/kicad/library/Switch.lib))
|
||||
(library (logical d1_mini_shield-rescue)
|
||||
(uri /home/gunnar/src/AmsToMqttBridge/hardware/wemos_mbus_shield/kicad/d1_mini_shield-rescue.lib))
|
||||
(library (logical tss721)
|
||||
(uri /home/gunnar/src/AmsToMqttBridge/hardware/wemos_mbus_shield/kicad/tss721.lib)))
|
||||
(nets
|
||||
(net (code 1) (name TEMP)
|
||||
(node (ref R7) (pin 2))
|
||||
(node (ref U2) (pin 2))
|
||||
(node (ref P1) (pin 5))
|
||||
(node (ref JP3) (pin 2)))
|
||||
(net (code 2) (name +3V3)
|
||||
(node (ref R7) (pin 1))
|
||||
(node (ref U1) (pin 9))
|
||||
(node (ref P2) (pin 1))
|
||||
(node (ref R6) (pin 2))
|
||||
(node (ref D1) (pin 4))
|
||||
(node (ref D1) (pin 5))
|
||||
(node (ref D1) (pin 6))
|
||||
(node (ref U2) (pin 3)))
|
||||
(net (code 3) (name "Net-(D1-Pad1)")
|
||||
(node (ref R9) (pin 2))
|
||||
(node (ref D1) (pin 1)))
|
||||
(net (code 4) (name "Net-(D1-Pad2)")
|
||||
(node (ref D1) (pin 2))
|
||||
(node (ref R8) (pin 2)))
|
||||
(net (code 5) (name "Net-(D1-Pad3)")
|
||||
(node (ref D1) (pin 3))
|
||||
(node (ref R10) (pin 2)))
|
||||
(net (code 6) (name MBUS2)
|
||||
(node (ref J1) (pin 2))
|
||||
(node (ref R4) (pin 1)))
|
||||
(net (code 7) (name BTN_AP)
|
||||
(node (ref P1) (pin 4))
|
||||
(node (ref SW1) (pin 1))
|
||||
(node (ref R6) (pin 1)))
|
||||
(net (code 8) (name "Net-(R4-Pad2)")
|
||||
(node (ref U1) (pin 1))
|
||||
(node (ref R4) (pin 2)))
|
||||
(net (code 9) (name "Net-(R2-Pad2)")
|
||||
(node (ref R2) (pin 2))
|
||||
(node (ref U1) (pin 16)))
|
||||
(net (code 10) (name MBUS1)
|
||||
(node (ref J1) (pin 1))
|
||||
(node (ref R2) (pin 1)))
|
||||
(net (code 11) (name LED_R)
|
||||
(node (ref R9) (pin 1))
|
||||
(node (ref P2) (pin 4)))
|
||||
(net (code 12) (name "Net-(J1-Pad8)")
|
||||
(node (ref J1) (pin 8))
|
||||
(node (ref JP1) (pin 1)))
|
||||
(net (code 13) (name "Net-(J1-Pad5)")
|
||||
(node (ref J1) (pin 5))
|
||||
(node (ref JP2) (pin 1)))
|
||||
(net (code 14) (name "Net-(J1-Pad4)")
|
||||
(node (ref J1) (pin 4))
|
||||
(node (ref JP3) (pin 1)))
|
||||
(net (code 15) (name +5V)
|
||||
(node (ref P1) (pin 1))
|
||||
(node (ref JP1) (pin 2)))
|
||||
(net (code 16) (name "Net-(J1-Pad7)")
|
||||
(node (ref J1) (pin 7))
|
||||
(node (ref JP4) (pin 1)))
|
||||
(net (code 17) (name GND)
|
||||
(node (ref P1) (pin 2))
|
||||
(node (ref C3) (pin 2))
|
||||
(node (ref R3) (pin 1))
|
||||
(node (ref R1) (pin 1))
|
||||
(node (ref C2) (pin 1))
|
||||
(node (ref C1) (pin 1))
|
||||
(node (ref R5) (pin 2))
|
||||
(node (ref U1) (pin 15))
|
||||
(node (ref U2) (pin 1))
|
||||
(node (ref SW1) (pin 2))
|
||||
(node (ref JP4) (pin 2))
|
||||
(node (ref JP2) (pin 2)))
|
||||
(net (code 18) (name LED_G)
|
||||
(node (ref R8) (pin 1))
|
||||
(node (ref P2) (pin 5)))
|
||||
(net (code 19) (name "Net-(U1-Pad10)")
|
||||
(node (ref U1) (pin 10)))
|
||||
(net (code 20) (name "Net-(U1-Pad12)")
|
||||
(node (ref U1) (pin 12)))
|
||||
(net (code 21) (name "Net-(U1-Pad13)")
|
||||
(node (ref U1) (pin 13)))
|
||||
(net (code 22) (name "Net-(U1-Pad2)")
|
||||
(node (ref U1) (pin 2)))
|
||||
(net (code 23) (name "Net-(U1-Pad5)")
|
||||
(node (ref U1) (pin 5)))
|
||||
(net (code 24) (name "Net-(U1-Pad7)")
|
||||
(node (ref U1) (pin 7)))
|
||||
(net (code 25) (name "Net-(J1-Pad3)")
|
||||
(node (ref J1) (pin 3)))
|
||||
(net (code 26) (name "Net-(J1-Pad6)")
|
||||
(node (ref J1) (pin 6)))
|
||||
(net (code 27) (name /RST)
|
||||
(node (ref P2) (pin 8)))
|
||||
(net (code 28) (name /D4)
|
||||
(node (ref P1) (pin 3)))
|
||||
(net (code 29) (name /D1)
|
||||
(node (ref P1) (pin 6)))
|
||||
(net (code 30) (name /RX)
|
||||
(node (ref P1) (pin 7)))
|
||||
(net (code 31) (name /TX)
|
||||
(node (ref P1) (pin 8)))
|
||||
(net (code 32) (name /D8)
|
||||
(node (ref P2) (pin 2)))
|
||||
(net (code 33) (name /D0)
|
||||
(node (ref P2) (pin 6)))
|
||||
(net (code 34) (name /A0)
|
||||
(node (ref P2) (pin 7)))
|
||||
(net (code 35) (name "Net-(R3-Pad2)")
|
||||
(node (ref R3) (pin 2))
|
||||
(node (ref U1) (pin 4)))
|
||||
(net (code 36) (name HAN_TX)
|
||||
(node (ref R10) (pin 1))
|
||||
(node (ref U1) (pin 8))
|
||||
(node (ref P2) (pin 3)))
|
||||
(net (code 37) (name "Net-(C3-Pad1)")
|
||||
(node (ref U1) (pin 11))
|
||||
(node (ref C3) (pin 1))
|
||||
(node (ref R5) (pin 1)))
|
||||
(net (code 38) (name "Net-(R1-Pad2)")
|
||||
(node (ref R1) (pin 2))
|
||||
(node (ref U1) (pin 14)))
|
||||
(net (code 39) (name "Net-(C2-Pad2)")
|
||||
(node (ref C2) (pin 2))
|
||||
(node (ref U1) (pin 3)))
|
||||
(net (code 40) (name "Net-(C1-Pad2)")
|
||||
(node (ref U1) (pin 6))
|
||||
(node (ref C1) (pin 2)))))
|
||||
246
hardware/wemos_mbus_shield/kicad/d1_mini_shield.pro
Normal file
@@ -0,0 +1,246 @@
|
||||
update=sø. 26. juni 2022 kl. 11.55 +0200
|
||||
version=1
|
||||
last_client=kicad
|
||||
[general]
|
||||
version=1
|
||||
[cvpcb]
|
||||
version=1
|
||||
NetIExt=net
|
||||
[eeschema]
|
||||
version=1
|
||||
LibDir=
|
||||
[schematic_editor]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
PlotDirectoryName=
|
||||
SubpartIdSeparator=0
|
||||
SubpartFirstId=65
|
||||
NetFmtName=Pcbnew
|
||||
SpiceAjustPassiveValues=0
|
||||
LabSize=50
|
||||
ERC_TestSimilarLabels=1
|
||||
[pcbnew]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
LastNetListRead=d1_mini_shield.net
|
||||
CopperLayerCount=2
|
||||
BoardThickness=1.6
|
||||
AllowMicroVias=0
|
||||
AllowBlindVias=0
|
||||
RequireCourtyardDefinitions=0
|
||||
ProhibitOverlappingCourtyards=1
|
||||
MinTrackWidth=0.2
|
||||
MinViaDiameter=0.4
|
||||
MinViaDrill=0.3
|
||||
MinMicroViaDiameter=0.2
|
||||
MinMicroViaDrill=0.09999999999999999
|
||||
MinHoleToHole=0.25
|
||||
TrackWidth1=0.25
|
||||
TrackWidth2=0.5
|
||||
ViaDiameter1=0.6
|
||||
ViaDrill1=0.4
|
||||
dPairWidth1=0.2
|
||||
dPairGap1=0.25
|
||||
dPairViaGap1=0.25
|
||||
SilkLineWidth=0.15
|
||||
SilkTextSizeV=1
|
||||
SilkTextSizeH=1
|
||||
SilkTextSizeThickness=0.15
|
||||
SilkTextItalic=0
|
||||
SilkTextUpright=1
|
||||
CopperLineWidth=0.2
|
||||
CopperTextSizeV=1.5
|
||||
CopperTextSizeH=1.5
|
||||
CopperTextThickness=0.3
|
||||
CopperTextItalic=0
|
||||
CopperTextUpright=1
|
||||
EdgeCutLineWidth=0.15
|
||||
CourtyardLineWidth=0.05
|
||||
OthersLineWidth=0.15
|
||||
OthersTextSizeV=1
|
||||
OthersTextSizeH=1
|
||||
OthersTextSizeThickness=0.15
|
||||
OthersTextItalic=0
|
||||
OthersTextUpright=1
|
||||
SolderMaskClearance=0.2
|
||||
SolderMaskMinWidth=0
|
||||
SolderPasteClearance=0
|
||||
SolderPasteRatio=-0
|
||||
[pcbnew/Layer.F.Cu]
|
||||
Name=F.Cu
|
||||
Type=0
|
||||
Enabled=1
|
||||
[pcbnew/Layer.In1.Cu]
|
||||
Name=In1.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In2.Cu]
|
||||
Name=In2.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In3.Cu]
|
||||
Name=In3.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In4.Cu]
|
||||
Name=In4.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In5.Cu]
|
||||
Name=In5.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In6.Cu]
|
||||
Name=In6.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In7.Cu]
|
||||
Name=In7.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In8.Cu]
|
||||
Name=In8.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In9.Cu]
|
||||
Name=In9.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In10.Cu]
|
||||
Name=In10.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In11.Cu]
|
||||
Name=In11.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In12.Cu]
|
||||
Name=In12.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In13.Cu]
|
||||
Name=In13.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In14.Cu]
|
||||
Name=In14.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In15.Cu]
|
||||
Name=In15.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In16.Cu]
|
||||
Name=In16.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In17.Cu]
|
||||
Name=In17.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In18.Cu]
|
||||
Name=In18.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In19.Cu]
|
||||
Name=In19.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In20.Cu]
|
||||
Name=In20.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In21.Cu]
|
||||
Name=In21.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In22.Cu]
|
||||
Name=In22.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In23.Cu]
|
||||
Name=In23.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In24.Cu]
|
||||
Name=In24.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In25.Cu]
|
||||
Name=In25.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In26.Cu]
|
||||
Name=In26.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In27.Cu]
|
||||
Name=In27.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In28.Cu]
|
||||
Name=In28.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In29.Cu]
|
||||
Name=In29.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In30.Cu]
|
||||
Name=In30.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.B.Cu]
|
||||
Name=B.Cu
|
||||
Type=0
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.Adhes]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.Adhes]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.Paste]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.Paste]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.SilkS]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.SilkS]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.Mask]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.Mask]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Dwgs.User]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Cmts.User]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Eco1.User]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Eco2.User]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Edge.Cuts]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Margin]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.CrtYd]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.CrtYd]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.Fab]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.Fab]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Rescue]
|
||||
Enabled=0
|
||||
[pcbnew/Netclasses]
|
||||
[pcbnew/Netclasses/Default]
|
||||
Name=Default
|
||||
Clearance=0.2
|
||||
TrackWidth=0.25
|
||||
ViaDiameter=0.6
|
||||
ViaDrill=0.4
|
||||
uViaDiameter=0.3
|
||||
uViaDrill=0.1
|
||||
dPairWidth=0.2
|
||||
dPairGap=0.25
|
||||
dPairViaGap=0.25
|
||||
725
hardware/wemos_mbus_shield/kicad/d1_mini_shield.sch
Normal file
@@ -0,0 +1,725 @@
|
||||
EESchema Schematic File Version 4
|
||||
EELAYER 30 0
|
||||
EELAYER END
|
||||
$Descr A4 11693 8268
|
||||
encoding utf-8
|
||||
Sheet 1 1
|
||||
Title ""
|
||||
Date ""
|
||||
Rev ""
|
||||
Comp ""
|
||||
Comment1 ""
|
||||
Comment2 ""
|
||||
Comment3 ""
|
||||
Comment4 ""
|
||||
$EndDescr
|
||||
$Comp
|
||||
L d1_mini_shield-rescue:CONN_01X08 P1
|
||||
U 1 1 5763EB78
|
||||
P 8300 1850
|
||||
F 0 "P1" H 8300 2300 50 0000 C CNN
|
||||
F 1 "CONN_01X08" V 8400 1850 50 0000 C CNN
|
||||
F 2 "D1_mini:D1_mini_Pin_Header" H 8300 1850 50 0001 C CNN
|
||||
F 3 "" H 8300 1850 50 0000 C CNN
|
||||
1 8300 1850
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L d1_mini_shield-rescue:CONN_01X08 P2
|
||||
U 1 1 5763EBF2
|
||||
P 9400 1850
|
||||
F 0 "P2" H 9400 2300 50 0000 C CNN
|
||||
F 1 "CONN_01X08" V 9500 1850 50 0000 C CNN
|
||||
F 2 "D1_mini:D1_mini_Pin_Header" H 9400 1850 50 0001 C CNN
|
||||
F 3 "" H 9400 1850 50 0000 C CNN
|
||||
1 9400 1850
|
||||
-1 0 0 -1
|
||||
$EndComp
|
||||
Text Label 8100 1500 2 60 ~ 0
|
||||
+5V
|
||||
Text Label 8100 1600 2 60 ~ 0
|
||||
GND
|
||||
Text Label 8100 1700 2 60 ~ 0
|
||||
D4
|
||||
Text Label 8100 1800 2 60 ~ 0
|
||||
D3
|
||||
Text Label 8100 1900 2 60 ~ 0
|
||||
D2
|
||||
Text Label 8100 2000 2 60 ~ 0
|
||||
D1
|
||||
Text Label 8100 2100 2 60 ~ 0
|
||||
RX
|
||||
Text Label 8100 2200 2 60 ~ 0
|
||||
TX
|
||||
Text Label 9600 1500 0 60 ~ 0
|
||||
+3.3V
|
||||
Text Label 9600 1600 0 60 ~ 0
|
||||
D8
|
||||
Text Label 9600 1700 0 60 ~ 0
|
||||
D7
|
||||
Text Label 9600 1800 0 60 ~ 0
|
||||
D6
|
||||
Text Label 9600 1900 0 60 ~ 0
|
||||
D5
|
||||
Text Label 9600 2000 0 60 ~ 0
|
||||
D0
|
||||
Text Label 9600 2100 0 60 ~ 0
|
||||
A0
|
||||
Text Label 9600 2200 0 60 ~ 0
|
||||
RST
|
||||
Text Notes 8750 1750 2 60 ~ 0
|
||||
GPIO2
|
||||
Text Notes 8750 1850 2 60 ~ 0
|
||||
GPIO0
|
||||
Text Notes 8750 1950 2 60 ~ 0
|
||||
GPIO4
|
||||
Text Notes 8750 2050 2 60 ~ 0
|
||||
GPIO5
|
||||
Text Notes 8900 1650 0 60 ~ 0
|
||||
GPIO15
|
||||
Text Notes 8900 1750 0 60 ~ 0
|
||||
GPIO13
|
||||
Text Notes 8900 1850 0 60 ~ 0
|
||||
GPIO12
|
||||
Text Notes 8900 1950 0 60 ~ 0
|
||||
GPIO14
|
||||
Text Notes 8900 2050 0 60 ~ 0
|
||||
GPIO16
|
||||
Text Notes 7550 1050 0 60 ~ 0
|
||||
D1 Mini Shield
|
||||
$Comp
|
||||
L tss721:TSS721 U1
|
||||
U 1 1 62B826D2
|
||||
P 3650 5550
|
||||
F 0 "U1" H 3650 6621 50 0000 C CNN
|
||||
F 1 "TSS721" H 3650 6530 50 0000 C CNN
|
||||
F 2 "Package_SO:SOIC-16_3.9x9.9mm_P1.27mm" H 3650 4700 50 0001 C CIN
|
||||
F 3 "http://www.ti.com/lit/ds/symlink/tss721a.pdf" H 3650 6439 50 0000 C CNN
|
||||
1 3650 5550
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:+3.3V #PWR0101
|
||||
U 1 1 62B89C7B
|
||||
P 2850 4750
|
||||
F 0 "#PWR0101" H 2850 4600 50 0001 C CNN
|
||||
F 1 "+3.3V" V 2865 4878 50 0000 L CNN
|
||||
F 2 "" H 2850 4750 50 0001 C CNN
|
||||
F 3 "" H 2850 4750 50 0001 C CNN
|
||||
1 2850 4750
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Connector:RJ45 J1
|
||||
U 1 1 62B8AC34
|
||||
P 1950 1850
|
||||
F 0 "J1" H 2007 2517 50 0000 C CNN
|
||||
F 1 "RJ45" H 2007 2426 50 0000 C CNN
|
||||
F 2 "Connector_RJ:RJ45_Amphenol_54602-x08_Horizontal" V 1950 1875 50 0001 C CNN
|
||||
F 3 "~" V 1950 1875 50 0001 C CNN
|
||||
1 1950 1850
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R4
|
||||
U 1 1 62B8CAA8
|
||||
P 2750 5150
|
||||
F 0 "R4" V 2957 5150 50 0000 C CNN
|
||||
F 1 "220" V 2866 5150 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 2680 5150 50 0001 C CNN
|
||||
F 3 "~" H 2750 5150 50 0001 C CNN
|
||||
1 2750 5150
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R2
|
||||
U 1 1 62B8DB92
|
||||
P 2500 5050
|
||||
F 0 "R2" V 2707 5050 50 0000 C CNN
|
||||
F 1 "220" V 2616 5050 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 2430 5050 50 0001 C CNN
|
||||
F 3 "~" H 2500 5050 50 0001 C CNN
|
||||
1 2500 5050
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:GND #PWR0102
|
||||
U 1 1 62B9F029
|
||||
P 1850 6050
|
||||
F 0 "#PWR0102" H 1850 5800 50 0001 C CNN
|
||||
F 1 "GND" H 1855 5877 50 0000 C CNN
|
||||
F 2 "" H 1850 6050 50 0001 C CNN
|
||||
F 3 "" H 1850 6050 50 0001 C CNN
|
||||
1 1850 6050
|
||||
-1 0 0 1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R3
|
||||
U 1 1 62B9F861
|
||||
P 2500 6300
|
||||
F 0 "R3" H 2570 6346 50 0000 L CNN
|
||||
F 1 "82k" H 2570 6255 50 0000 L CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 2430 6300 50 0001 C CNN
|
||||
F 3 "~" H 2500 6300 50 0001 C CNN
|
||||
1 2500 6300
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R1
|
||||
U 1 1 62B9FC37
|
||||
P 2250 6300
|
||||
F 0 "R1" H 2320 6346 50 0000 L CNN
|
||||
F 1 "470" H 2320 6255 50 0000 L CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 2180 6300 50 0001 C CNN
|
||||
F 3 "~" H 2250 6300 50 0001 C CNN
|
||||
1 2250 6300
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:C C2
|
||||
U 1 1 62BA06BE
|
||||
P 2850 6050
|
||||
F 0 "C2" V 3102 6050 50 0000 C CNN
|
||||
F 1 "1u" V 3011 6050 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 2888 5900 50 0001 C CNN
|
||||
F 3 "~" H 2850 6050 50 0001 C CNN
|
||||
1 2850 6050
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:C C1
|
||||
U 1 1 62BA09E7
|
||||
P 1850 6300
|
||||
F 0 "C1" H 1965 6346 50 0000 L CNN
|
||||
F 1 "100n" H 1965 6255 50 0000 L CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 1888 6150 50 0001 C CNN
|
||||
F 3 "~" H 1850 6300 50 0001 C CNN
|
||||
1 1850 6300
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
1850 6050 1850 6150
|
||||
Wire Wire Line
|
||||
2250 6050 2250 6150
|
||||
Wire Wire Line
|
||||
2500 6050 2500 6150
|
||||
Connection ~ 1850 6050
|
||||
Connection ~ 2250 6050
|
||||
Wire Wire Line
|
||||
2250 6050 2500 6050
|
||||
Wire Wire Line
|
||||
1850 6050 2250 6050
|
||||
Connection ~ 2500 6050
|
||||
Wire Wire Line
|
||||
3850 6450 3850 6350
|
||||
Wire Wire Line
|
||||
2250 6450 2250 6550
|
||||
Wire Wire Line
|
||||
3950 6550 3950 6350
|
||||
Wire Wire Line
|
||||
1850 6450 1850 6650
|
||||
Wire Wire Line
|
||||
4050 6650 4050 6350
|
||||
Wire Wire Line
|
||||
3050 6050 3000 6050
|
||||
Wire Wire Line
|
||||
2500 6050 2700 6050
|
||||
Wire Wire Line
|
||||
2700 6050 2700 6350
|
||||
Wire Wire Line
|
||||
2700 6350 3650 6350
|
||||
Connection ~ 2700 6050
|
||||
Wire Wire Line
|
||||
3850 6450 2500 6450
|
||||
Wire Wire Line
|
||||
2250 6550 3950 6550
|
||||
Wire Wire Line
|
||||
4050 6650 1850 6650
|
||||
Text GLabel 4350 5350 2 50 Output ~ 0
|
||||
HAN_TX
|
||||
Wire Wire Line
|
||||
4350 5350 4300 5350
|
||||
Wire Wire Line
|
||||
2850 4750 3550 4750
|
||||
$Comp
|
||||
L Device:R R5
|
||||
U 1 1 62BED413
|
||||
P 4650 4550
|
||||
F 0 "R5" V 4857 4550 50 0000 C CNN
|
||||
F 1 "100k" V 4766 4550 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 4580 4550 50 0001 C CNN
|
||||
F 3 "~" H 4650 4550 50 0001 C CNN
|
||||
1 4650 4550
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:C C3
|
||||
U 1 1 62BED9ED
|
||||
P 4650 4900
|
||||
F 0 "C3" V 4902 4900 50 0000 C CNN
|
||||
F 1 "100n" V 4811 4900 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 4688 4750 50 0001 C CNN
|
||||
F 3 "~" H 4650 4900 50 0001 C CNN
|
||||
1 4650 4900
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:GND #PWR0103
|
||||
U 1 1 62BF4151
|
||||
P 4800 5050
|
||||
F 0 "#PWR0103" H 4800 4800 50 0001 C CNN
|
||||
F 1 "GND" H 4805 4877 50 0000 C CNN
|
||||
F 2 "" H 4800 5050 50 0001 C CNN
|
||||
F 3 "" H 4800 5050 50 0001 C CNN
|
||||
1 4800 5050
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
4800 4550 4800 4900
|
||||
Wire Wire Line
|
||||
4800 4900 4800 5050
|
||||
Connection ~ 4800 4900
|
||||
Wire Wire Line
|
||||
4500 4900 4500 4550
|
||||
Wire Wire Line
|
||||
4500 4550 3650 4550
|
||||
Wire Wire Line
|
||||
3650 4550 3650 4750
|
||||
Connection ~ 4500 4550
|
||||
Wire Notes Line
|
||||
1500 4050 5050 4050
|
||||
Wire Notes Line
|
||||
5050 4050 5050 6850
|
||||
Wire Notes Line
|
||||
5050 6850 1500 6850
|
||||
Wire Notes Line
|
||||
1500 6850 1500 4050
|
||||
Wire Notes Line
|
||||
7550 950 10200 950
|
||||
Wire Notes Line
|
||||
10200 950 10200 2750
|
||||
Wire Notes Line
|
||||
10200 2750 7550 2750
|
||||
Wire Notes Line
|
||||
7550 2750 7550 950
|
||||
Text GLabel 9800 1700 2 50 Input ~ 0
|
||||
HAN_TX
|
||||
Wire Wire Line
|
||||
9800 1700 9600 1700
|
||||
$Comp
|
||||
L power:+3V3 #PWR0104
|
||||
U 1 1 62C0EBC2
|
||||
P 9850 1500
|
||||
F 0 "#PWR0104" H 9850 1350 50 0001 C CNN
|
||||
F 1 "+3V3" V 9865 1628 50 0000 L CNN
|
||||
F 2 "" H 9850 1500 50 0001 C CNN
|
||||
F 3 "" H 9850 1500 50 0001 C CNN
|
||||
1 9850 1500
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
9850 1500 9600 1500
|
||||
Text GLabel 9800 1800 2 50 Output ~ 0
|
||||
LED_R
|
||||
Text GLabel 9800 1900 2 50 Output ~ 0
|
||||
LED_G
|
||||
Wire Wire Line
|
||||
9800 1800 9600 1800
|
||||
Wire Wire Line
|
||||
9800 1900 9600 1900
|
||||
$Comp
|
||||
L power:GND #PWR0105
|
||||
U 1 1 62C13452
|
||||
P 7850 1600
|
||||
F 0 "#PWR0105" H 7850 1350 50 0001 C CNN
|
||||
F 1 "GND" V 7855 1472 50 0000 R CNN
|
||||
F 2 "" H 7850 1600 50 0001 C CNN
|
||||
F 3 "" H 7850 1600 50 0001 C CNN
|
||||
1 7850 1600
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
8100 1600 7850 1600
|
||||
Text GLabel 7950 1800 0 50 Input ~ 0
|
||||
BTN_AP
|
||||
Wire Wire Line
|
||||
8100 1800 7950 1800
|
||||
Text GLabel 7950 1900 0 50 Input ~ 0
|
||||
TEMP
|
||||
Wire Wire Line
|
||||
8100 1900 7950 1900
|
||||
Wire Wire Line
|
||||
3050 5150 2900 5150
|
||||
Wire Wire Line
|
||||
3050 5050 2650 5050
|
||||
Text GLabel 2200 5050 0 50 Input ~ 0
|
||||
MBUS1
|
||||
Text GLabel 2200 5150 0 50 Input ~ 0
|
||||
MBUS2
|
||||
Wire Wire Line
|
||||
2350 5050 2200 5050
|
||||
Wire Wire Line
|
||||
2600 5150 2200 5150
|
||||
Text GLabel 2500 2150 2 50 Output ~ 0
|
||||
MBUS1
|
||||
Text GLabel 2500 2050 2 50 Output ~ 0
|
||||
MBUS2
|
||||
Wire Wire Line
|
||||
2500 2050 2350 2050
|
||||
Wire Wire Line
|
||||
2350 2150 2500 2150
|
||||
$Comp
|
||||
L Device:Jumper JP1
|
||||
U 1 1 62C331C0
|
||||
P 3300 1250
|
||||
F 0 "JP1" H 3300 1514 50 0000 C CNN
|
||||
F 1 "Jumper" H 3300 1423 50 0000 C CNN
|
||||
F 2 "Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm" H 3300 1250 50 0001 C CNN
|
||||
F 3 "~" H 3300 1250 50 0001 C CNN
|
||||
1 3300 1250
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:Jumper JP2
|
||||
U 1 1 62C365CA
|
||||
P 3300 1850
|
||||
F 0 "JP2" H 3300 2114 50 0000 C CNN
|
||||
F 1 "Jumper" H 3300 2023 50 0000 C CNN
|
||||
F 2 "Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm" H 3300 1850 50 0001 C CNN
|
||||
F 3 "~" H 3300 1850 50 0001 C CNN
|
||||
1 3300 1850
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:Jumper JP3
|
||||
U 1 1 62C36C70
|
||||
P 3300 2200
|
||||
F 0 "JP3" H 3300 2464 50 0000 C CNN
|
||||
F 1 "Jumper" H 3300 2373 50 0000 C CNN
|
||||
F 2 "Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm" H 3300 2200 50 0001 C CNN
|
||||
F 3 "~" H 3300 2200 50 0001 C CNN
|
||||
1 3300 2200
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
3000 1850 2900 1850
|
||||
Wire Wire Line
|
||||
2900 1850 2900 1750
|
||||
Wire Wire Line
|
||||
2350 1750 2900 1750
|
||||
Wire Wire Line
|
||||
2350 1850 2850 1850
|
||||
Wire Wire Line
|
||||
2850 1850 2850 2200
|
||||
Wire Wire Line
|
||||
2850 2200 3000 2200
|
||||
$Comp
|
||||
L power:GND #PWR0107
|
||||
U 1 1 62C3D94F
|
||||
P 3750 1850
|
||||
F 0 "#PWR0107" H 3750 1600 50 0001 C CNN
|
||||
F 1 "GND" V 3755 1722 50 0000 R CNN
|
||||
F 2 "" H 3750 1850 50 0001 C CNN
|
||||
F 3 "" H 3750 1850 50 0001 C CNN
|
||||
1 3750 1850
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
Text GLabel 3750 2200 2 50 Output ~ 0
|
||||
TEMP
|
||||
Wire Wire Line
|
||||
3750 1850 3600 1850
|
||||
Wire Wire Line
|
||||
3750 2200 3600 2200
|
||||
Wire Notes Line
|
||||
1450 950 4350 950
|
||||
Wire Notes Line
|
||||
4350 950 4350 2450
|
||||
Wire Notes Line
|
||||
4350 2450 1450 2450
|
||||
Wire Notes Line
|
||||
1450 2450 1450 950
|
||||
$Comp
|
||||
L Device:LED_RGB D1
|
||||
U 1 1 62C43A7B
|
||||
P 9550 4800
|
||||
F 0 "D1" H 9550 5297 50 0000 C CNN
|
||||
F 1 "LED_RGB" H 9550 5206 50 0000 C CNN
|
||||
F 2 "LED_SMD:LED_RGB_PLCC-6" H 9550 4750 50 0001 C CNN
|
||||
F 3 "~" H 9550 4750 50 0001 C CNN
|
||||
1 9550 4800
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:+3.3V #PWR0108
|
||||
U 1 1 62C44A94
|
||||
P 10000 4800
|
||||
F 0 "#PWR0108" H 10000 4650 50 0001 C CNN
|
||||
F 1 "+3.3V" V 10015 4928 50 0000 L CNN
|
||||
F 2 "" H 10000 4800 50 0001 C CNN
|
||||
F 3 "" H 10000 4800 50 0001 C CNN
|
||||
1 10000 4800
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
9750 4800 9900 4800
|
||||
Wire Wire Line
|
||||
9750 4600 9900 4600
|
||||
Wire Wire Line
|
||||
9900 4600 9900 4800
|
||||
Connection ~ 9900 4800
|
||||
Wire Wire Line
|
||||
9900 4800 10000 4800
|
||||
Wire Wire Line
|
||||
9900 4800 9900 5000
|
||||
Wire Wire Line
|
||||
9900 5000 9750 5000
|
||||
$Comp
|
||||
L Device:R R9
|
||||
U 1 1 62C495F7
|
||||
P 9100 4600
|
||||
F 0 "R9" V 9307 4600 50 0000 C CNN
|
||||
F 1 "1k" V 9216 4600 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 9030 4600 50 0001 C CNN
|
||||
F 3 "~" H 9100 4600 50 0001 C CNN
|
||||
1 9100 4600
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R8
|
||||
U 1 1 62C4BDE9
|
||||
P 8850 4800
|
||||
F 0 "R8" V 9057 4800 50 0000 C CNN
|
||||
F 1 "1k" V 8966 4800 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 8780 4800 50 0001 C CNN
|
||||
F 3 "~" H 8850 4800 50 0001 C CNN
|
||||
1 8850 4800
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R10
|
||||
U 1 1 62C4C336
|
||||
P 9100 5000
|
||||
F 0 "R10" V 9307 5000 50 0000 C CNN
|
||||
F 1 "1k" V 9216 5000 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 9030 5000 50 0001 C CNN
|
||||
F 3 "~" H 9100 5000 50 0001 C CNN
|
||||
1 9100 5000
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
9350 4600 9250 4600
|
||||
Wire Wire Line
|
||||
9350 4800 9000 4800
|
||||
Wire Wire Line
|
||||
9350 5000 9250 5000
|
||||
Text GLabel 8650 4600 0 50 Input ~ 0
|
||||
LED_R
|
||||
Text GLabel 8650 4800 0 50 Input ~ 0
|
||||
LED_G
|
||||
Text GLabel 8650 5000 0 50 Input ~ 0
|
||||
LED_B
|
||||
Wire Wire Line
|
||||
8700 4800 8650 4800
|
||||
Wire Wire Line
|
||||
8950 4600 8650 4600
|
||||
Wire Wire Line
|
||||
8950 5000 8650 5000
|
||||
Wire Notes Line
|
||||
8200 4050 10550 4050
|
||||
Wire Notes Line
|
||||
10550 4050 10550 5400
|
||||
Wire Notes Line
|
||||
10550 5400 8200 5400
|
||||
Wire Notes Line
|
||||
8200 5400 8200 4050
|
||||
$Comp
|
||||
L Sensor_Temperature:DS18B20 U2
|
||||
U 1 1 62C6296F
|
||||
P 6600 4900
|
||||
F 0 "U2" H 6370 4946 50 0000 R CNN
|
||||
F 1 "DS18B20" H 6370 4855 50 0000 R CNN
|
||||
F 2 "Package_TO_SOT_THT:TO-92_Inline" H 5600 4650 50 0001 C CNN
|
||||
F 3 "http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf" H 6450 5150 50 0001 C CNN
|
||||
1 6600 4900
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:GND #PWR0109
|
||||
U 1 1 62C6373E
|
||||
P 6600 5350
|
||||
F 0 "#PWR0109" H 6600 5100 50 0001 C CNN
|
||||
F 1 "GND" H 6605 5177 50 0000 C CNN
|
||||
F 2 "" H 6600 5350 50 0001 C CNN
|
||||
F 3 "" H 6600 5350 50 0001 C CNN
|
||||
1 6600 5350
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:+3.3V #PWR0110
|
||||
U 1 1 62C63C02
|
||||
P 6600 4450
|
||||
F 0 "#PWR0110" H 6600 4300 50 0001 C CNN
|
||||
F 1 "+3.3V" H 6615 4623 50 0000 C CNN
|
||||
F 2 "" H 6600 4450 50 0001 C CNN
|
||||
F 3 "" H 6600 4450 50 0001 C CNN
|
||||
1 6600 4450
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R7
|
||||
U 1 1 62C6405D
|
||||
P 6900 4600
|
||||
F 0 "R7" H 6970 4646 50 0000 L CNN
|
||||
F 1 "4k7" H 6970 4555 50 0000 L CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 6830 4600 50 0001 C CNN
|
||||
F 3 "~" H 6900 4600 50 0001 C CNN
|
||||
1 6900 4600
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
6600 5200 6600 5350
|
||||
Wire Wire Line
|
||||
6600 4600 6600 4450
|
||||
Wire Wire Line
|
||||
6900 4900 6900 4750
|
||||
Wire Wire Line
|
||||
6900 4450 6600 4450
|
||||
Connection ~ 6600 4450
|
||||
Text GLabel 7050 4900 2 50 Output ~ 0
|
||||
TEMP
|
||||
Wire Wire Line
|
||||
7050 4900 6900 4900
|
||||
Connection ~ 6900 4900
|
||||
Wire Notes Line
|
||||
5750 4050 7500 4050
|
||||
Wire Notes Line
|
||||
7500 4050 7500 5750
|
||||
Wire Notes Line
|
||||
7500 5750 5750 5750
|
||||
Wire Notes Line
|
||||
5750 5750 5750 4050
|
||||
$Comp
|
||||
L Switch:SW_Push SW1
|
||||
U 1 1 62C73229
|
||||
P 5950 1400
|
||||
F 0 "SW1" H 5950 1685 50 0000 C CNN
|
||||
F 1 "SW_Push" H 5950 1594 50 0000 C CNN
|
||||
F 2 "Button_Switch_SMD:SW_SPST_B3U-3000P" H 5950 1600 50 0001 C CNN
|
||||
F 3 "~" H 5950 1600 50 0001 C CNN
|
||||
1 5950 1400
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R6
|
||||
U 1 1 62C73CE8
|
||||
P 5950 1700
|
||||
F 0 "R6" V 6157 1700 50 0000 C CNN
|
||||
F 1 "10k" V 6066 1700 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 5880 1700 50 0001 C CNN
|
||||
F 3 "~" H 5950 1700 50 0001 C CNN
|
||||
1 5950 1700
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:GND #PWR0111
|
||||
U 1 1 62C76961
|
||||
P 6350 1400
|
||||
F 0 "#PWR0111" H 6350 1150 50 0001 C CNN
|
||||
F 1 "GND" V 6355 1272 50 0000 R CNN
|
||||
F 2 "" H 6350 1400 50 0001 C CNN
|
||||
F 3 "" H 6350 1400 50 0001 C CNN
|
||||
1 6350 1400
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:+3.3V #PWR0112
|
||||
U 1 1 62C776AD
|
||||
P 6350 1700
|
||||
F 0 "#PWR0112" H 6350 1550 50 0001 C CNN
|
||||
F 1 "+3.3V" V 6365 1828 50 0000 L CNN
|
||||
F 2 "" H 6350 1700 50 0001 C CNN
|
||||
F 3 "" H 6350 1700 50 0001 C CNN
|
||||
1 6350 1700
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
6350 1400 6150 1400
|
||||
Wire Wire Line
|
||||
6350 1700 6100 1700
|
||||
Wire Wire Line
|
||||
5750 1400 5550 1400
|
||||
Wire Wire Line
|
||||
5550 1400 5550 1550
|
||||
Wire Wire Line
|
||||
5550 1700 5800 1700
|
||||
Text GLabel 5450 1550 0 50 Output ~ 0
|
||||
BTN_AP
|
||||
Wire Wire Line
|
||||
5450 1550 5550 1550
|
||||
Connection ~ 5550 1550
|
||||
Wire Wire Line
|
||||
5550 1550 5550 1700
|
||||
Wire Notes Line
|
||||
5000 950 6850 950
|
||||
Wire Notes Line
|
||||
6850 950 6850 1950
|
||||
Wire Notes Line
|
||||
6850 1950 5000 1950
|
||||
Wire Notes Line
|
||||
5000 1950 5000 950
|
||||
Text GLabel 4350 5450 2 50 Output ~ 0
|
||||
LED_B
|
||||
Wire Wire Line
|
||||
4350 5450 4300 5450
|
||||
Wire Wire Line
|
||||
4300 5450 4300 5350
|
||||
Connection ~ 4300 5350
|
||||
Wire Wire Line
|
||||
4300 5350 4250 5350
|
||||
$Comp
|
||||
L power:+5V #PWR0106
|
||||
U 1 1 62D05402
|
||||
P 7850 1500
|
||||
F 0 "#PWR0106" H 7850 1350 50 0001 C CNN
|
||||
F 1 "+5V" V 7865 1628 50 0000 L CNN
|
||||
F 2 "" H 7850 1500 50 0001 C CNN
|
||||
F 3 "" H 7850 1500 50 0001 C CNN
|
||||
1 7850 1500
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
8100 1500 7850 1500
|
||||
$Comp
|
||||
L power:+5V #PWR0113
|
||||
U 1 1 62D0B1E1
|
||||
P 3750 1250
|
||||
F 0 "#PWR0113" H 3750 1100 50 0001 C CNN
|
||||
F 1 "+5V" V 3765 1378 50 0000 L CNN
|
||||
F 2 "" H 3750 1250 50 0001 C CNN
|
||||
F 3 "" H 3750 1250 50 0001 C CNN
|
||||
1 3750 1250
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:Jumper JP4
|
||||
U 1 1 62D1E97A
|
||||
P 3300 1550
|
||||
F 0 "JP4" H 3300 1814 50 0000 C CNN
|
||||
F 1 "Jumper" H 3300 1723 50 0000 C CNN
|
||||
F 2 "Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm" H 3300 1550 50 0001 C CNN
|
||||
F 3 "~" H 3300 1550 50 0001 C CNN
|
||||
1 3300 1550
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
3000 1250 2350 1250
|
||||
Wire Wire Line
|
||||
2350 1250 2350 1450
|
||||
Wire Wire Line
|
||||
3600 1250 3750 1250
|
||||
Wire Wire Line
|
||||
3600 1550 3600 1850
|
||||
Connection ~ 3600 1850
|
||||
Wire Wire Line
|
||||
2350 1550 3000 1550
|
||||
$EndSCHEMATC
|
||||
75272
hardware/wemos_mbus_shield/kicad/fp-info-cache
Normal file
3
hardware/wemos_mbus_shield/kicad/fp-lib-table
Normal file
@@ -0,0 +1,3 @@
|
||||
(fp_lib_table
|
||||
(lib (name D1_mini)(type KiCad)(uri "$(KIPRJMOD)/lib/D1_mini.pretty")(options "")(descr ""))
|
||||
)
|
||||
@@ -0,0 +1,27 @@
|
||||
(module Pin_Headers:Pin_Header_Straight_1x08 (layer F.Cu) (tedit 5766A5B6)
|
||||
(descr "Through hole pin header")
|
||||
(tags "pin header")
|
||||
(fp_text reference P1 (at 0.11176 -2.43586) (layer F.SilkS)
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
)
|
||||
(fp_text value CONN_01X08 (at 0 -3.1) (layer F.Fab) hide
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
)
|
||||
(fp_line (start -1.75 -1.75) (end -1.75 19.55) (layer F.CrtYd) (width 0.05))
|
||||
(fp_line (start 1.75 -1.75) (end 1.75 19.55) (layer F.CrtYd) (width 0.05))
|
||||
(fp_line (start -1.75 -1.75) (end 1.75 -1.75) (layer F.CrtYd) (width 0.05))
|
||||
(fp_line (start -1.75 19.55) (end 1.75 19.55) (layer F.CrtYd) (width 0.05))
|
||||
(pad 1 thru_hole rect (at 0 0) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 2 thru_hole oval (at 0 2.54) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 3 thru_hole oval (at 0 5.08) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 4 thru_hole oval (at 0 7.62) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 5 thru_hole oval (at 0 10.16) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 6 thru_hole oval (at 0 12.7) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 7 thru_hole oval (at 0 15.24) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 8 thru_hole oval (at 0 17.78) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(model Pin_Headers.3dshapes/Pin_Header_Straight_1x08.wrl
|
||||
(at (xyz 0 -0.35 0))
|
||||
(scale (xyz 1 1 1))
|
||||
(rotate (xyz 0 0 90))
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,54 @@
|
||||
(module OSHW (layer F.Cu) (tedit 5766B04E)
|
||||
(descr OSHW)
|
||||
(tags "Symbol, OSHW-Logo, Silk Screen,")
|
||||
(fp_text reference "" (at 0.09906 -4.38912) (layer F.SilkS) hide
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
)
|
||||
(fp_text value OSHW (at 0 5) (layer F.Fab) hide
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
)
|
||||
(fp_line (start -1.78054 0.92964) (end -2.03962 1.49098) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -2.03962 1.49098) (end -1.50114 2.00914) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.50114 2.00914) (end -0.98044 1.7399) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.98044 1.7399) (end -0.70104 1.89992) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.73914 1.8796) (end 1.06934 1.6891) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.06934 1.6891) (end 1.50876 2.0193) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.50876 2.0193) (end 1.9812 1.52908) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.9812 1.52908) (end 1.69926 1.04902) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.69926 1.04902) (end 1.88976 0.57912) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.88976 0.57912) (end 2.49936 0.39116) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 2.49936 0.39116) (end 2.49936 -0.28956) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 2.49936 -0.28956) (end 1.94056 -0.42926) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.94056 -0.42926) (end 1.7399 -1.00076) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.7399 -1.00076) (end 2.00914 -1.47066) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 2.00914 -1.47066) (end 1.53924 -1.9812) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.53924 -1.9812) (end 1.02108 -1.71958) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.02108 -1.71958) (end 0.55118 -1.92024) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.55118 -1.92024) (end 0.381 -2.46126) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.381 -2.46126) (end -0.30988 -2.47904) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.30988 -2.47904) (end -0.5207 -1.9304) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.5207 -1.9304) (end -0.9398 -1.76022) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.9398 -1.76022) (end -1.49098 -2.02946) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.49098 -2.02946) (end -2.00914 -1.50114) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -2.00914 -1.50114) (end -1.76022 -0.96012) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.76022 -0.96012) (end -1.9304 -0.48006) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.9304 -0.48006) (end -2.47904 -0.381) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -2.47904 -0.381) (end -2.4892 0.32004) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -2.4892 0.32004) (end -1.9304 0.5207) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.9304 0.5207) (end -1.7907 0.91948) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.35052 0.89916) (end 0.65024 0.7493) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.65024 0.7493) (end 0.8509 0.55118) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.8509 0.55118) (end 1.00076 0.14986) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.00076 0.14986) (end 1.00076 -0.24892) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.00076 -0.24892) (end 0.8509 -0.59944) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.8509 -0.59944) (end 0.39878 -0.94996) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.39878 -0.94996) (end -0.0508 -1.00076) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.0508 -1.00076) (end -0.44958 -0.89916) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.44958 -0.89916) (end -0.8509 -0.55118) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.8509 -0.55118) (end -1.00076 -0.09906) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.00076 -0.09906) (end -0.94996 0.39878) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.94996 0.39878) (end -0.70104 0.70104) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.70104 0.70104) (end -0.35052 0.89916) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.35052 0.89916) (end -0.70104 1.89992) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.35052 0.89916) (end 0.7493 1.89992) (layer F.SilkS) (width 0.15))
|
||||
)
|
||||
BIN
hardware/wemos_mbus_shield/kicad/meta/brd.png
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
hardware/wemos_mbus_shield/kicad/meta/icon.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
21
hardware/wemos_mbus_shield/kicad/meta/info.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>D1Shield</title>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<P>This project template is the basis of an expansion board for the
|
||||
<A HREF="https://www.wemos.cc/en/latest/d1/d1_mini.html" TARGET="blank">D1 mini board</A>.
|
||||
<BR><BR>This base project includes a PCB edge defined
|
||||
as the same size as the D1 mini PCB with the connectors placed
|
||||
correctly to align the two boards. All IO present on the D1 mini
|
||||
board is connected to the project through the expansion
|
||||
headers. <BR><BR>The board looks like the following:
|
||||
</P>
|
||||
<P><IMG SRC="brd.png">
|
||||
</P>
|
||||
<p><i>Dwgs.User</i> layer show mechanical components of the D1mini board.</p>
|
||||
<P>©2016 Jérôme Labidurie<br/>
|
||||
Licence: <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC:BY-SA 3.0</a><br/>
|
||||
<a href="http://dinask.eu">dinask.eu</a></P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
4
hardware/wemos_mbus_shield/kicad/sym-lib-table
Normal file
@@ -0,0 +1,4 @@
|
||||
(sym_lib_table
|
||||
(lib (name d1_mini_shield-rescue)(type Legacy)(uri ${KIPRJMOD}/d1_mini_shield-rescue.lib)(options "")(descr ""))
|
||||
(lib (name tss721)(type Legacy)(uri ${KIPRJMOD}/tss721.lib)(options "")(descr ""))
|
||||
)
|
||||
9
hardware/wemos_mbus_shield/kicad/tss721.dcm
Normal file
@@ -0,0 +1,9 @@
|
||||
EESchema-DOCLIB Version 2.0
|
||||
#
|
||||
$CMP TSS721
|
||||
D TSS721A Meter Bus Transceiver, SOIC-16/TSSOP-16
|
||||
K MBUS Tranciever
|
||||
F http://www.ti.com/lit/ds/symlink/tss721a.pdf
|
||||
$ENDCMP
|
||||
#
|
||||
#End Doc Library
|
||||
37
hardware/wemos_mbus_shield/kicad/tss721.lib
Normal file
@@ -0,0 +1,37 @@
|
||||
EESchema-LIBRARY Version 2.4
|
||||
#encoding utf-8
|
||||
#
|
||||
# TSS721
|
||||
#
|
||||
DEF TSS721 U 0 40 Y Y 1 F N
|
||||
F0 "U" 200 850 50 H V L CNN
|
||||
F1 "TSS721" 200 750 50 H V L CNN
|
||||
F2 "" 0 -850 50 H V C CIN
|
||||
F3 "" -200 -800 50 H V C CNN
|
||||
ALIAS TSS721A
|
||||
$FPLIST
|
||||
SOIC*3.9x9.9mm*Pitch1.27mm*
|
||||
TSSOP*4.4x5mm*Pitch0.65mm*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -500 -700 500 700 0 1 10 f
|
||||
X BUSL2 1 -600 400 100 R 50 50 1 1 I
|
||||
X VS 10 -600 0 100 R 50 50 1 1 P
|
||||
X VDD 11 0 800 100 D 50 50 1 1 W
|
||||
X RX 12 600 500 100 L 50 50 1 1 I
|
||||
X RXI 13 600 400 100 L 50 50 1 1 I I
|
||||
X RIS 14 300 -800 100 U 50 50 1 1 I
|
||||
X GND 15 0 -800 100 U 50 50 1 1 W
|
||||
X BUSL1 16 -600 500 100 R 50 50 1 1 I
|
||||
X VB 2 -600 -150 100 R 50 50 1 1 P
|
||||
X STC 3 -600 -500 100 R 50 50 1 1 P
|
||||
X RIDD 4 200 -800 100 U 50 50 1 1 O
|
||||
X PF 5 -600 100 100 R 50 50 1 1 I
|
||||
X SC 6 400 -800 100 U 50 50 1 1 P
|
||||
X TXI 7 600 100 100 L 50 50 1 1 O I
|
||||
X TX 8 600 200 100 L 50 50 1 1 O
|
||||
X BAT 9 -100 800 100 D 50 50 1 1 I
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
#End Library
|
||||
BIN
images/dashboard.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
images/dayplot.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
images/future-energy-price.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
images/main-header.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
images/monthplot.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
images/real-time-calculation.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
images/sensor-displays.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
images/status-bar.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
images/tempsensors.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
@@ -1,9 +0,0 @@
|
||||
name=HanConfigAp
|
||||
version=1.0.0
|
||||
author=roarfred
|
||||
maintainer=roarfred <not@important.com>
|
||||
sentence=HAN Configuraiton accesspoint
|
||||
paragraph=HAN Configuraiton accesspoint
|
||||
category=Sensors
|
||||
url=https://github.com/roarfred/AmsToMqttBridge
|
||||
architectures=*
|
||||
@@ -1,142 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2016 Arturo Guadalupi. All right reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "Base64.h"
|
||||
#include <Arduino.h>
|
||||
#if (defined(__AVR__))
|
||||
#include <avr\pgmspace.h>
|
||||
#else
|
||||
#include <pgmspace.h>
|
||||
#endif
|
||||
const char PROGMEM _Base64AlphabetTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
"abcdefghijklmnopqrstuvwxyz"
|
||||
"0123456789+/";
|
||||
|
||||
int Base64Class::encode(char *output, char *input, int inputLength) {
|
||||
int i = 0, j = 0;
|
||||
int encodedLength = 0;
|
||||
unsigned char A3[3];
|
||||
unsigned char A4[4];
|
||||
|
||||
while(inputLength--) {
|
||||
A3[i++] = *(input++);
|
||||
if(i == 3) {
|
||||
fromA3ToA4(A4, A3);
|
||||
|
||||
for(i = 0; i < 4; i++) {
|
||||
output[encodedLength++] = pgm_read_byte(&_Base64AlphabetTable[A4[i]]);
|
||||
}
|
||||
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(i) {
|
||||
for(j = i; j < 3; j++) {
|
||||
A3[j] = '\0';
|
||||
}
|
||||
|
||||
fromA3ToA4(A4, A3);
|
||||
|
||||
for(j = 0; j < i + 1; j++) {
|
||||
output[encodedLength++] = pgm_read_byte(&_Base64AlphabetTable[A4[j]]);
|
||||
}
|
||||
|
||||
while((i++ < 3)) {
|
||||
output[encodedLength++] = '=';
|
||||
}
|
||||
}
|
||||
output[encodedLength] = '\0';
|
||||
return encodedLength;
|
||||
}
|
||||
|
||||
int Base64Class::decode(char * output, char * input, int inputLength) {
|
||||
int i = 0, j = 0;
|
||||
int decodedLength = 0;
|
||||
unsigned char A3[3];
|
||||
unsigned char A4[4];
|
||||
|
||||
|
||||
while (inputLength--) {
|
||||
if(*input == '=') {
|
||||
break;
|
||||
}
|
||||
|
||||
A4[i++] = *(input++);
|
||||
if (i == 4) {
|
||||
for (i = 0; i <4; i++) {
|
||||
A4[i] = lookupTable(A4[i]);
|
||||
}
|
||||
|
||||
fromA4ToA3(A3,A4);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
output[decodedLength++] = A3[i];
|
||||
}
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (i) {
|
||||
for (j = i; j < 4; j++) {
|
||||
A4[j] = '\0';
|
||||
}
|
||||
|
||||
for (j = 0; j <4; j++) {
|
||||
A4[j] = lookupTable(A4[j]);
|
||||
}
|
||||
|
||||
fromA4ToA3(A3,A4);
|
||||
|
||||
for (j = 0; j < i - 1; j++) {
|
||||
output[decodedLength++] = A3[j];
|
||||
}
|
||||
}
|
||||
output[decodedLength] = '\0';
|
||||
return decodedLength;
|
||||
}
|
||||
|
||||
int Base64Class::encodedLength(int plainLength) {
|
||||
int n = plainLength;
|
||||
return (n + 2 - ((n + 2) % 3)) / 3 * 4;
|
||||
}
|
||||
|
||||
int Base64Class::decodedLength(char * input, int inputLength) {
|
||||
int i = 0;
|
||||
int numEq = 0;
|
||||
for(i = inputLength - 1; input[i] == '='; i--) {
|
||||
numEq++;
|
||||
}
|
||||
|
||||
return ((6 * inputLength) / 8) - numEq;
|
||||
}
|
||||
|
||||
//Private utility functions
|
||||
inline void Base64Class::fromA3ToA4(unsigned char * A4, unsigned char * A3) {
|
||||
A4[0] = (A3[0] & 0xfc) >> 2;
|
||||
A4[1] = ((A3[0] & 0x03) << 4) + ((A3[1] & 0xf0) >> 4);
|
||||
A4[2] = ((A3[1] & 0x0f) << 2) + ((A3[2] & 0xc0) >> 6);
|
||||
A4[3] = (A3[2] & 0x3f);
|
||||
}
|
||||
|
||||
inline void Base64Class::fromA4ToA3(unsigned char * A3, unsigned char * A4) {
|
||||
A3[0] = (A4[0] << 2) + ((A4[1] & 0x30) >> 4);
|
||||
A3[1] = ((A4[1] & 0xf) << 4) + ((A4[2] & 0x3c) >> 2);
|
||||
A3[2] = ((A4[2] & 0x3) << 6) + A4[3];
|
||||
}
|
||||
|
||||
inline unsigned char Base64Class::lookupTable(char c) {
|
||||
if(c >='A' && c <='Z') return c - 'A';
|
||||
if(c >='a' && c <='z') return c - 71;
|
||||
if(c >='0' && c <='9') return c + 4;
|
||||
if(c == '+') return 62;
|
||||
if(c == '/') return 63;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Base64Class Base64;
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2016 Arturo Guadalupi. All right reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _BASE64_H
|
||||
#define _BASE64_H
|
||||
|
||||
class Base64Class{
|
||||
public:
|
||||
int encode(char *output, char *input, int inputLength);
|
||||
int decode(char * output, char * input, int inputLength);
|
||||
int encodedLength(int plainLength);
|
||||
int decodedLength(char * input, int inputLength);
|
||||
|
||||
private:
|
||||
inline void fromA3ToA4(unsigned char * A4, unsigned char * A3);
|
||||
inline void fromA4ToA3(unsigned char * A3, unsigned char * A4);
|
||||
inline unsigned char lookupTable(char c);
|
||||
};
|
||||
extern Base64Class Base64;
|
||||
|
||||
#endif // _BASE64_H
|
||||
@@ -1,91 +0,0 @@
|
||||
#include "HanConfigAp.h"
|
||||
|
||||
Stream* HanConfigAp::debugger;
|
||||
|
||||
bool HanConfigAp::hasConfig() {
|
||||
return config->hasConfig();
|
||||
}
|
||||
|
||||
void HanConfigAp::setup(int accessPointButtonPin, configuration* config, Stream* debugger)
|
||||
{
|
||||
this->debugger = debugger;
|
||||
this->config = config;
|
||||
|
||||
// Test if we're missing configuration
|
||||
if (!config->hasConfig())
|
||||
{
|
||||
print("No config. We're booting as AP. Look for SSID ");
|
||||
println(this->AP_SSID);
|
||||
isActivated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Load the configuration
|
||||
if (this->debugger) config->print(this->debugger);
|
||||
|
||||
if (accessPointButtonPin != INVALID_BUTTON_PIN)
|
||||
{
|
||||
// Assign pin for boot as AP
|
||||
pinMode(accessPointButtonPin, INPUT_PULLUP);
|
||||
|
||||
// Test if we're holding down the AP pin, over 5 seconds
|
||||
int time = millis() + 5000;
|
||||
print("Press the AP button now to boot as access point");
|
||||
while (millis() < time)
|
||||
{
|
||||
print(".");
|
||||
if (digitalRead(accessPointButtonPin) == LOW)
|
||||
{
|
||||
print("AP button was pressed. Booting as access point now. Look for SSID ");
|
||||
println(this->AP_SSID);
|
||||
isActivated = true;
|
||||
break;
|
||||
}
|
||||
delay(100);
|
||||
}
|
||||
println("");
|
||||
}
|
||||
}
|
||||
|
||||
if (isActivated)
|
||||
{
|
||||
// Setup AP
|
||||
WiFi.disconnect(true);
|
||||
WiFi.softAPdisconnect(true);
|
||||
WiFi.mode(WIFI_OFF);
|
||||
delay(2000);
|
||||
|
||||
WiFi.softAP(AP_SSID);
|
||||
WiFi.mode(WIFI_AP);
|
||||
|
||||
/* Setup the DNS server redirecting all the domains to this IP */
|
||||
dnsServer.setErrorReplyCode(DNSReplyCode::NoError);
|
||||
dnsServer.start(DNS_PORT, "*", WiFi.softAPIP());
|
||||
}
|
||||
}
|
||||
|
||||
bool HanConfigAp::loop() {
|
||||
if(isActivated) {
|
||||
//DNS
|
||||
dnsServer.processNextRequest();
|
||||
}
|
||||
|
||||
return isActivated;
|
||||
}
|
||||
|
||||
size_t HanConfigAp::print(const char* text)
|
||||
{
|
||||
if (debugger) debugger->print(text);
|
||||
}
|
||||
size_t HanConfigAp::println(const char* text)
|
||||
{
|
||||
if (debugger) debugger->println(text);
|
||||
}
|
||||
size_t HanConfigAp::print(const Printable& data)
|
||||
{
|
||||
if (debugger) debugger->print(data);
|
||||
}
|
||||
size_t HanConfigAp::println(const Printable& data)
|
||||
{
|
||||
if (debugger) debugger->println(data);
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// ap.h
|
||||
|
||||
#ifndef _ACCESSPOINT_h
|
||||
#define _ACCESSPOINT_h
|
||||
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
||||
#if defined(ESP8266)
|
||||
#include <ESP8266WiFi.h>
|
||||
#elif defined(ESP32) // ARDUINO_ARCH_ESP32
|
||||
#include <WiFi.h>
|
||||
#else
|
||||
#warning "Unsupported board type"
|
||||
#endif
|
||||
|
||||
#include <DNSServer.h>
|
||||
#include "configuration.h"
|
||||
|
||||
#define INVALID_BUTTON_PIN 0xFFFFFFFF
|
||||
|
||||
class HanConfigAp {
|
||||
public:
|
||||
void setup(int accessPointButtonPin, configuration* config, Stream* debugger);
|
||||
bool loop();
|
||||
bool hasConfig();
|
||||
bool isActivated = false;
|
||||
|
||||
private:
|
||||
const char* AP_SSID = "AMS2MQTT";
|
||||
|
||||
configuration* config;
|
||||
|
||||
// DNS server
|
||||
const byte DNS_PORT = 53;
|
||||
DNSServer dnsServer;
|
||||
|
||||
static size_t print(const char* text);
|
||||
static size_t println(const char* text);
|
||||
static size_t print(const Printable& data);
|
||||
static size_t println(const Printable& data);
|
||||
|
||||
static Stream* debugger;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,265 +0,0 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
bool configuration::hasConfig()
|
||||
{
|
||||
bool hasConfig = false;
|
||||
EEPROM.begin(EEPROM_SIZE);
|
||||
hasConfig = EEPROM.read(EEPROM_CONFIG_ADDRESS) == EEPROM_CHECK_SUM;
|
||||
EEPROM.end();
|
||||
return hasConfig;
|
||||
}
|
||||
|
||||
bool configuration::save()
|
||||
{
|
||||
int address = EEPROM_CONFIG_ADDRESS;
|
||||
|
||||
EEPROM.begin(EEPROM_SIZE);
|
||||
EEPROM.put(address, EEPROM_CHECK_SUM);
|
||||
address++;
|
||||
|
||||
address += saveString(address, ssid);
|
||||
address += saveString(address, ssidPassword);
|
||||
address += saveByte(address, meterType);
|
||||
|
||||
|
||||
if(mqttHost) {
|
||||
address += saveBool(address, true);
|
||||
address += saveString(address, mqttHost);
|
||||
address += saveInt(address, mqttPort);
|
||||
address += saveString(address, mqttClientID);
|
||||
address += saveString(address, mqttPublishTopic);
|
||||
address += saveString(address, mqttSubscribeTopic);
|
||||
} else {
|
||||
address += saveBool(address, false);
|
||||
}
|
||||
|
||||
if (isSecure()) {
|
||||
address += saveBool(address, true);
|
||||
address += saveString(address, mqttUser);
|
||||
address += saveString(address, mqttPass);
|
||||
}
|
||||
else
|
||||
address += saveBool(address, false);
|
||||
|
||||
|
||||
address += saveByte(address, authSecurity);
|
||||
if (authSecurity > 0) {
|
||||
address += saveString(address, authUser);
|
||||
address += saveString(address, authPass);
|
||||
}
|
||||
|
||||
address += saveInt(address, fuseSize);
|
||||
address += saveInt(address, distSys);
|
||||
|
||||
bool success = EEPROM.commit();
|
||||
EEPROM.end();
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
bool configuration::load()
|
||||
{
|
||||
int address = EEPROM_CONFIG_ADDRESS;
|
||||
bool success = false;
|
||||
|
||||
ssid = 0;
|
||||
ssidPassword = 0;
|
||||
meterType = (byte)0;
|
||||
mqttHost = 0;
|
||||
mqttClientID = 0;
|
||||
mqttPublishTopic = 0;
|
||||
mqttSubscribeTopic = 0;
|
||||
mqttUser = 0;
|
||||
mqttPass = 0;
|
||||
mqttPort = 1883;
|
||||
authSecurity = 0;
|
||||
authUser = 0;
|
||||
authPass = 0;
|
||||
fuseSize = 0;
|
||||
distSys = 0;
|
||||
|
||||
EEPROM.begin(EEPROM_SIZE);
|
||||
int cs = EEPROM.read(address);
|
||||
if (cs == EEPROM_CHECK_SUM)
|
||||
{
|
||||
address++;
|
||||
|
||||
address += readString(address, &ssid);
|
||||
address += readString(address, &ssidPassword);
|
||||
address += readByte(address, &meterType);
|
||||
|
||||
bool mqtt = false;
|
||||
address += readBool(address, &mqtt);
|
||||
if(mqtt) {
|
||||
address += readString(address, &mqttHost);
|
||||
address += readInt(address, &mqttPort);
|
||||
address += readString(address, &mqttClientID);
|
||||
address += readString(address, &mqttPublishTopic);
|
||||
address += readString(address, &mqttSubscribeTopic);
|
||||
}
|
||||
|
||||
bool secure = false;
|
||||
address += readBool(address, &secure);
|
||||
if (secure)
|
||||
{
|
||||
address += readString(address, &mqttUser);
|
||||
address += readString(address, &mqttPass);
|
||||
}
|
||||
else
|
||||
{
|
||||
mqttUser = 0;
|
||||
mqttPass = 0;
|
||||
}
|
||||
|
||||
address += readByte(address, &authSecurity);
|
||||
if (authSecurity > 0) {
|
||||
address += readString(address, &authUser);
|
||||
address += readString(address, &authPass);
|
||||
} else {
|
||||
authUser = 0;
|
||||
authPass = 0;
|
||||
}
|
||||
|
||||
address += readInt(address, &fuseSize);
|
||||
address += readByte(address, &distSys);
|
||||
|
||||
success = true;
|
||||
}
|
||||
EEPROM.end();
|
||||
return success;
|
||||
}
|
||||
|
||||
bool configuration::isSecure()
|
||||
{
|
||||
return (mqttUser != 0) && (String(mqttUser).length() > 0);
|
||||
}
|
||||
|
||||
int configuration::readInt(int address, int *value)
|
||||
{
|
||||
int lower = EEPROM.read(address);
|
||||
int higher = EEPROM.read(address + 1);
|
||||
*value = lower + (higher << 8);
|
||||
return 2;
|
||||
}
|
||||
int configuration::saveInt(int address, int value)
|
||||
{
|
||||
byte lowByte = value & 0xFF;
|
||||
byte highByte = ((value >> 8) & 0xFF);
|
||||
|
||||
EEPROM.write(address, lowByte);
|
||||
EEPROM.write(address + 1, highByte);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
int configuration::readBool(int address, bool *value)
|
||||
{
|
||||
byte y = EEPROM.read(address);
|
||||
*value = (bool)y;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int configuration::saveBool(int address, bool value)
|
||||
{
|
||||
byte y = (byte)value;
|
||||
EEPROM.write(address, y);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int configuration::readByte(int address, byte *value)
|
||||
{
|
||||
*value = EEPROM.read(address);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int configuration::saveByte(int address, byte value)
|
||||
{
|
||||
EEPROM.write(address, value);
|
||||
return 1;
|
||||
}
|
||||
void configuration::print(Stream* debugger)
|
||||
{
|
||||
debugger->println("Configuration:");
|
||||
debugger->println("-----------------------------------------------");
|
||||
debugger->printf("ssid: %s\r\n", this->ssid);
|
||||
debugger->printf("ssidPassword: %s\r\n", this->ssidPassword);
|
||||
debugger->printf("meterType: %i\r\n", this->meterType);
|
||||
if(this->mqttHost) {
|
||||
debugger->printf("mqttHost: %s\r\n", this->mqttHost);
|
||||
debugger->printf("mqttPort: %i\r\n", this->mqttPort);
|
||||
debugger->printf("mqttClientID: %s\r\n", this->mqttClientID);
|
||||
debugger->printf("mqttPublishTopic: %s\r\n", this->mqttPublishTopic);
|
||||
debugger->printf("mqttSubscribeTopic: %s\r\n", this->mqttSubscribeTopic);
|
||||
}
|
||||
|
||||
if (this->isSecure())
|
||||
{
|
||||
debugger->printf("SECURE MQTT CONNECTION:\r\n");
|
||||
debugger->printf("mqttUser: %s\r\n", this->mqttUser);
|
||||
debugger->printf("mqttPass: %s\r\n", this->mqttPass);
|
||||
}
|
||||
|
||||
if (this->authSecurity > 0) {
|
||||
debugger->printf("WEB AUTH:\r\n");
|
||||
debugger->printf("authSecurity: %i\r\n", this->authSecurity);
|
||||
debugger->printf("authUser: %s\r\n", this->authUser);
|
||||
debugger->printf("authPass: %s\r\n", this->authPass);
|
||||
}
|
||||
debugger->printf("fuseSize: %i\r\n", this->fuseSize);
|
||||
debugger->printf("distSys: %i\r\n", this->distSys);
|
||||
|
||||
debugger->println("-----------------------------------------------");
|
||||
}
|
||||
|
||||
template <class T> int configuration::writeAnything(int ee, const T& value)
|
||||
{
|
||||
const byte* p = (const byte*)(const void*)&value;
|
||||
unsigned int i;
|
||||
for (i = 0; i < sizeof(value); i++)
|
||||
EEPROM.write(ee++, *p++);
|
||||
return i;
|
||||
}
|
||||
|
||||
template <class T> int configuration::readAnything(int ee, T& value)
|
||||
{
|
||||
byte* p = (byte*)(void*)&value;
|
||||
unsigned int i;
|
||||
for (i = 0; i < sizeof(value); i++)
|
||||
*p++ = EEPROM.read(ee++);
|
||||
return i;
|
||||
}
|
||||
|
||||
int configuration::readString(int pAddress, char* pString[])
|
||||
{
|
||||
int address = 0;
|
||||
byte length = EEPROM.read(pAddress + address);
|
||||
address++;
|
||||
|
||||
char* buffer = new char[length];
|
||||
for (int i = 0; i<length; i++)
|
||||
{
|
||||
buffer[i] = EEPROM.read(pAddress + address++);
|
||||
}
|
||||
*pString = buffer;
|
||||
return address;
|
||||
}
|
||||
int configuration::saveString(int pAddress, char* pString)
|
||||
{
|
||||
int address = 0;
|
||||
int length = pString ? strlen(pString) + 1 : 0;
|
||||
EEPROM.put(pAddress + address, length);
|
||||
address++;
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
EEPROM.put(pAddress + address, pString[i]);
|
||||
address++;
|
||||
}
|
||||
|
||||
return address;
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
// config.h
|
||||
|
||||
#ifndef _CONFIGURATION_h
|
||||
#define _CONFIGURATION_h
|
||||
|
||||
#include <EEPROM.h>
|
||||
|
||||
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
||||
class configuration {
|
||||
public:
|
||||
char* ssid;
|
||||
char* ssidPassword;
|
||||
char* mqttHost;
|
||||
int mqttPort;
|
||||
char* mqttClientID;
|
||||
char* mqttPublishTopic;
|
||||
char* mqttSubscribeTopic;
|
||||
char* mqttUser;
|
||||
char* mqttPass;
|
||||
byte meterType;
|
||||
|
||||
byte authSecurity;
|
||||
char* authUser;
|
||||
char* authPass;
|
||||
|
||||
int fuseSize;
|
||||
byte distSys;
|
||||
|
||||
bool hasConfig();
|
||||
bool isSecure();
|
||||
bool save();
|
||||
bool load();
|
||||
|
||||
void print(Stream* debugger);
|
||||
protected:
|
||||
|
||||
private:
|
||||
const int EEPROM_SIZE = 512;
|
||||
const byte EEPROM_CHECK_SUM = 75; // Used to check if config is stored. Change if structure changes
|
||||
const int EEPROM_CONFIG_ADDRESS = 0;
|
||||
|
||||
int saveString(int pAddress, char* pString);
|
||||
int readString(int pAddress, char* pString[]);
|
||||
int saveInt(int pAddress, int pValue);
|
||||
int readInt(int pAddress, int *pValue);
|
||||
int saveBool(int pAddress, bool pValue);
|
||||
int readBool(int pAddress, bool *pValue);
|
||||
int saveByte(int pAddress, byte pValue);
|
||||
int readByte(int pAddress, byte *pValue);
|
||||
|
||||
|
||||
template <class T> int writeAnything(int ee, const T& value);
|
||||
template <class T> int readAnything(int ee, T& value);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,197 +0,0 @@
|
||||
/*
|
||||
* Simple sketch to simulate reading data from a Kamstrup
|
||||
* AMS Meter.
|
||||
*
|
||||
* Created 24. October 2017 by Roar Fredriksen
|
||||
* Modified 06. November 2017 by Ruben Andreassen
|
||||
*/
|
||||
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include <HanReader.h>
|
||||
#include <Kamstrup.h>
|
||||
|
||||
// The HAN Port reader
|
||||
HanReader hanReader;
|
||||
|
||||
// WiFi and MQTT endpoints
|
||||
const char* ssid = "ssid";
|
||||
const char* password = "password";
|
||||
const char* mqtt_server = "ip or dns";
|
||||
const char* mqtt_topic = "sensors/out/espams";
|
||||
const char* device_name = "espams";
|
||||
|
||||
bool enableDebug = false;
|
||||
|
||||
WiFiClient espClient;
|
||||
PubSubClient client(espClient);
|
||||
|
||||
void setup() {
|
||||
//setupDebugPort(); //Comment out this line if you dont need debugging on Serial1
|
||||
setupWiFi();
|
||||
setupMqtt();
|
||||
|
||||
// initialize the HanReader
|
||||
// (passing no han port, as we are feeding data manually, but provide Serial for debugging)
|
||||
if (enableDebug) {
|
||||
hanReader.setup(&Serial, 2400, SERIAL_8N1, &Serial1);
|
||||
} else {
|
||||
hanReader.setup(&Serial, 2400, SERIAL_8N1, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void setupMqtt()
|
||||
{
|
||||
client.setServer(mqtt_server, 1883);
|
||||
}
|
||||
|
||||
void setupDebugPort()
|
||||
{
|
||||
enableDebug = true;
|
||||
// Initialize the Serial port for debugging
|
||||
Serial1.begin(115200);
|
||||
while (!Serial1) {}
|
||||
Serial1.setDebugOutput(true);
|
||||
Serial1.println("Serial1");
|
||||
Serial1.println("Serial debugging port initialized");
|
||||
}
|
||||
|
||||
|
||||
void setupWiFi()
|
||||
{
|
||||
// Initialize wifi
|
||||
if (enableDebug) {
|
||||
Serial1.print("Connecting to ");
|
||||
Serial1.println(ssid);
|
||||
}
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin(ssid, password);
|
||||
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
delay(500);
|
||||
if (enableDebug) Serial1.print(".");
|
||||
}
|
||||
|
||||
if (enableDebug) {
|
||||
Serial1.println("");
|
||||
Serial1.println("WiFi connected");
|
||||
Serial1.println("IP address: ");
|
||||
Serial1.println(WiFi.localIP());
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
loopMqtt();
|
||||
|
||||
// Read one byte from the port, and see if we got a full package
|
||||
if (hanReader.read())
|
||||
{
|
||||
// Get the list identifier
|
||||
int listSize = hanReader.getListSize();
|
||||
|
||||
if (enableDebug) {
|
||||
Serial1.println("");
|
||||
Serial1.print("List size: ");
|
||||
Serial1.print(listSize);
|
||||
Serial1.print(": ");
|
||||
}
|
||||
|
||||
// Only care for the ACtive Power Imported, which is found in the first list
|
||||
if (listSize == (int)Kamstrup::List1 || listSize == (int)Kamstrup::List2)
|
||||
{
|
||||
// Define a json object to keep the data
|
||||
StaticJsonBuffer<MQTT_MAX_PACKET_SIZE> jsonBuffer;
|
||||
JsonObject& root = jsonBuffer.createObject();
|
||||
|
||||
// Any generic useful info here
|
||||
root["dn"] = device_name;
|
||||
root["up"] = millis();
|
||||
|
||||
// Add a sub-structure to the json object,
|
||||
// to keep the data from the meter itself
|
||||
JsonObject& data = root.createNestedObject("data");
|
||||
|
||||
data["ls"] = listSize;
|
||||
|
||||
data["lvi"] = hanReader.getString((int)Kamstrup_List1::ListVersionIdentifier);
|
||||
data["mid"] = hanReader.getString((int)Kamstrup_List1::MeterID);
|
||||
data["mt"] = hanReader.getString((int)Kamstrup_List1::MeterType);
|
||||
data["t"] = hanReader.getPackageTime();
|
||||
|
||||
data["aip"] = hanReader.getInt((int)Kamstrup_List1::ActiveImportPower); //power
|
||||
data["aep"] = hanReader.getInt((int)Kamstrup_List1::ActiveExportPower);
|
||||
data["rip"] = hanReader.getInt((int)Kamstrup_List1::ReactiveImportPower);
|
||||
data["rep"] = hanReader.getInt((int)Kamstrup_List1::ReactiveExportPower);
|
||||
|
||||
data["al1"] = (float)hanReader.getInt((int)Kamstrup_List1::CurrentL1) / 100.0;
|
||||
data["al2"] = (float)hanReader.getInt((int)Kamstrup_List1::CurrentL2) / 100.0;
|
||||
data["al3"] = (float)hanReader.getInt((int)Kamstrup_List1::CurrentL3) / 100.0;
|
||||
|
||||
data["vl1"] = hanReader.getInt((int)Kamstrup_List1::VoltageL1);
|
||||
data["vl2"] = hanReader.getInt((int)Kamstrup_List1::VoltageL2);
|
||||
data["vl3"] = hanReader.getInt((int)Kamstrup_List1::VoltageL3);
|
||||
|
||||
if (listSize == (int)Kamstrup::List2)
|
||||
{
|
||||
data["cl"] = hanReader.getTime((int)Kamstrup_List2::MeterClock);
|
||||
data["caie"] = hanReader.getInt((int)Kamstrup_List2::CumulativeActiveImportEnergy);
|
||||
data["caee"] = hanReader.getInt((int)Kamstrup_List2::CumulativeActiveExportEnergy);
|
||||
data["crie"] = hanReader.getInt((int)Kamstrup_List2::CumulativeReactiveImportEnergy);
|
||||
data["cree"] = hanReader.getInt((int)Kamstrup_List2::CumulativeReactiveExportEnergy);
|
||||
}
|
||||
|
||||
if (enableDebug) {
|
||||
root.printTo(Serial1);
|
||||
Serial1.println("JSON length");
|
||||
Serial1.println(root.measureLength());
|
||||
Serial1.println("");
|
||||
}
|
||||
|
||||
// Publish the json to the MQTT server
|
||||
char msg[MQTT_MAX_PACKET_SIZE];
|
||||
root.printTo(msg, MQTT_MAX_PACKET_SIZE);
|
||||
bool result = client.publish(mqtt_topic, msg);
|
||||
|
||||
if (enableDebug) {
|
||||
Serial1.println("MQTT publish result:");
|
||||
Serial1.println(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Ensure the MQTT lirary gets some attention too
|
||||
void loopMqtt()
|
||||
{
|
||||
if (!client.connected()) {
|
||||
reconnectMqtt();
|
||||
}
|
||||
client.loop();
|
||||
}
|
||||
|
||||
void reconnectMqtt() {
|
||||
// Loop until we're reconnected
|
||||
while (!client.connected()) {
|
||||
if (enableDebug) Serial1.print("Attempting MQTT connection...");
|
||||
// Attempt to connect
|
||||
if (client.connect("ESP8266Client")) {
|
||||
if (enableDebug) Serial1.println("connected");
|
||||
// Once connected, publish an announcement...
|
||||
// client.publish("sensors", "hello world");
|
||||
// ... and resubscribe
|
||||
// client.subscribe("inTopic");
|
||||
}
|
||||
else {
|
||||
if (enableDebug) {
|
||||
Serial1.print("failed, rc=");
|
||||
Serial1.print(client.state());
|
||||
Serial1.println(" try again in 5 seconds");
|
||||
}
|
||||
// Wait 5 seconds before retrying
|
||||
delay(5000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
# Setup
|
||||
|
||||
1. Copy AmsToMqttBridge\Code\Arduino\HanReader\src to Arduino\libraries
|
||||
2. Download the following libraries and put them in Arduino\libraries
|
||||
- ESP8266WiFi
|
||||
- PubSubClient
|
||||
- ArduinoJson
|
||||
3. **Set MQTT_MAX_PACKET_SIZE in PubSubClient.h to at least 512 (i used 1024)**
|
||||
4. Edit the following variables in the project:
|
||||
- ssid
|
||||
- password
|
||||
- mqtt_server
|
||||
- mqtt_topic
|
||||
- device_name
|
||||
|
||||
## Output example:
|
||||
### List 1
|
||||
```
|
||||
{
|
||||
"dn": "espams",
|
||||
"up": 1475902,
|
||||
"data": {
|
||||
"ls": 25,
|
||||
"lvi": "Kamstrup_V0001",
|
||||
"mid": "5706567274389702",
|
||||
"mt": "6841121BN243101040",
|
||||
"t": 1510088840,
|
||||
"aip": 3499,
|
||||
"aep": 0,
|
||||
"rip": 0,
|
||||
"rep": 424,
|
||||
"al1": 10.27,
|
||||
"al2": 6.37,
|
||||
"al3": 11.79,
|
||||
"vl1": 231,
|
||||
"vl2": 226,
|
||||
"vl3": 231
|
||||
}
|
||||
}
|
||||
```
|
||||
### List 2
|
||||
```
|
||||
{
|
||||
"dn": "espams",
|
||||
"up": 1041212,
|
||||
"data": {
|
||||
"ls": 35,
|
||||
"lvi": "Kamstrup_V0001",
|
||||
"mid": "5706567274389702",
|
||||
"mt": "6841121BN243101040",
|
||||
"t": 1510088405,
|
||||
"aip": 4459,
|
||||
"aep": 0,
|
||||
"rip": 0,
|
||||
"rep": 207,
|
||||
"al1": 14.72,
|
||||
"al2": 6.39,
|
||||
"al3": 15.02,
|
||||
"vl1": 231,
|
||||
"vl2": 227,
|
||||
"vl3": 231,
|
||||
"cl": 1510088405,
|
||||
"caie": 588500,
|
||||
"caee": 0,
|
||||
"crie": 93,
|
||||
"cree": 80831
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### List 1 and 2 fields
|
||||
- dn = Device Name
|
||||
- up = MS since last reboot
|
||||
- ls = List Size
|
||||
- lvi = List Version Identifier
|
||||
- mid = Meter ID
|
||||
- mt = Meter Type
|
||||
- t = Time
|
||||
- aie = Active Import Power
|
||||
- aep = Active Export Power
|
||||
- rip = Reactive Import Power
|
||||
- rep = Reactive Export Power
|
||||
- al1 = Current L1
|
||||
- al2 = Current L2
|
||||
- al3 = Current L3
|
||||
- cl1 = Voltage L1
|
||||
- cl2 = Voltage L2
|
||||
- cl3 = Voltage L3
|
||||
|
||||
### List 2 additional fields
|
||||
- cl = Meter Clock
|
||||
- caie = Cumulative Active Import Energy
|
||||
- caee = Cumulative Active Export Energy
|
||||
- crie = Cumulative Reactive Import Energy
|
||||
- cree = Cumulative Reactive Export Energy
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Simple sketch to read MBus data from electrical meter
|
||||
* As the protocol requires "Even" parity, and this is
|
||||
* only supported on the hardware port of the ESP8266,
|
||||
* we'll have to use Serial1 for debugging.
|
||||
*
|
||||
* This means you'll have to program the ESP using the
|
||||
* regular RX/TX port, and then you must remove the FTDI
|
||||
* and connect the MBus signal from the meter to the
|
||||
* RS pin. The FTDI/RX can be moved to Pin2 for debugging
|
||||
*
|
||||
* Created 14. september 2017 by Roar Fredriksen
|
||||
*/
|
||||
|
||||
#include "HanReader.h"
|
||||
#include "Kaifa.h"
|
||||
|
||||
// The HAN Port reader
|
||||
HanReader hanReader;
|
||||
|
||||
void setup() {
|
||||
setupDebugPort();
|
||||
|
||||
// initialize the HanReader
|
||||
// (passing Serial as the HAN port and Serial1 for debugging)
|
||||
hanReader.setup(&Serial, &Serial1);
|
||||
}
|
||||
|
||||
void setupDebugPort()
|
||||
{
|
||||
// Initialize the Serial1 port for debugging
|
||||
// (This port is fixed to Pin2 of the ESP8266)
|
||||
Serial1.begin(115200);
|
||||
while (!Serial1) {}
|
||||
Serial1.setDebugOutput(true);
|
||||
Serial1.println("Serial1");
|
||||
Serial1.println("Serial debugging port initialized");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// Read one byte from the port, and see if we got a full package
|
||||
if (hanReader.read())
|
||||
{
|
||||
// Get the list identifier
|
||||
int listSize = hanReader.getListSize();
|
||||
|
||||
Serial1.println("");
|
||||
Serial1.print("List size: ");
|
||||
Serial1.print(listSize);
|
||||
Serial1.print(": ");
|
||||
|
||||
// Only care for the ACtive Power Imported, which is found in the first list
|
||||
if (listSize == (int)Kaifa::List1)
|
||||
{
|
||||
int power = hanReader.getInt((int)Kaifa_List1::ActivePowerImported);
|
||||
Serial1.print("Power consumtion is right now: ");
|
||||
Serial1.print(power);
|
||||
Serial1.println(" W");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
/*
|
||||
* Simple sketch to read MBus data from electrical meter
|
||||
* As the protocol requires "Even" parity, and this is
|
||||
* only supported on the hardware port of the ESP8266,
|
||||
* we'll have to use Serial1 for debugging.
|
||||
*
|
||||
* This means you'll have to program the ESP using the
|
||||
* regular RX/TX port, and then you must remove the FTDI
|
||||
* and connect the MBus signal from the meter to the
|
||||
* RS pin. The FTDI/RX can be moved to Pin2 for debugging
|
||||
*
|
||||
* Created 14. september 2017 by Roar Fredriksen
|
||||
*/
|
||||
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include "HanReader.h"
|
||||
#include "Kaifa.h"
|
||||
|
||||
// The HAN Port reader
|
||||
HanReader hanReader;
|
||||
|
||||
// WiFi and MQTT endpoints
|
||||
const char* ssid = "Roar_Etne";
|
||||
const char* password = "**********";
|
||||
const char* mqtt_server = "192.168.10.203";
|
||||
|
||||
WiFiClient espClient;
|
||||
PubSubClient client(espClient);
|
||||
|
||||
void setup() {
|
||||
setupDebugPort();
|
||||
setupWiFi();
|
||||
setupMqtt();
|
||||
|
||||
// initialize the HanReader
|
||||
// (passing Serial as the HAN port and Serial1 for debugging)
|
||||
hanReader.setup(&Serial, &Serial1);
|
||||
}
|
||||
|
||||
void setupMqtt()
|
||||
{
|
||||
client.setServer(mqtt_server, 1883);
|
||||
}
|
||||
|
||||
void setupDebugPort()
|
||||
{
|
||||
// Initialize the Serial1 port for debugging
|
||||
// (This port is fixed to Pin2 of the ESP8266)
|
||||
Serial1.begin(115200);
|
||||
while (!Serial1) {}
|
||||
Serial1.setDebugOutput(true);
|
||||
Serial1.println("Serial1");
|
||||
Serial1.println("Serial debugging port initialized");
|
||||
}
|
||||
|
||||
void setupWiFi()
|
||||
{
|
||||
// Initialize wifi
|
||||
Serial1.print("Connecting to ");
|
||||
Serial1.println(ssid);
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin(ssid, password);
|
||||
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
delay(500);
|
||||
Serial1.print(".");
|
||||
}
|
||||
|
||||
Serial1.println("");
|
||||
Serial1.println("WiFi connected");
|
||||
Serial1.println("IP address: ");
|
||||
Serial1.println(WiFi.localIP());
|
||||
}
|
||||
|
||||
void loop() {
|
||||
loopMqtt();
|
||||
|
||||
// Read one byt from the port, and see if we got a full package
|
||||
if (hanReader.read())
|
||||
{
|
||||
// Get the list identifier
|
||||
int listSize = hanReader.getListSize();
|
||||
|
||||
Serial1.println("");
|
||||
Serial1.print("List size: ");
|
||||
Serial1.print(listSize);
|
||||
Serial1.print(": ");
|
||||
|
||||
// Only care for the ACtive Power Imported, which is found in the first list
|
||||
if (listSize == (int)Kaifa::List1 || listSize == (int)Kaifa::List2 || listSize == (int)Kaifa::List3)
|
||||
{
|
||||
if (listSize == (int)Kaifa::List1)
|
||||
{
|
||||
Serial1.println(" (list #1 has no ID)");
|
||||
}
|
||||
else
|
||||
{
|
||||
String id = hanReader.getString((int)Kaifa_List2::ListVersionIdentifier);
|
||||
Serial1.println(id);
|
||||
}
|
||||
|
||||
// Get the timestamp (as unix time) from the package
|
||||
time_t time = hanReader.getPackageTime();
|
||||
Serial.print("Time of the package is: ");
|
||||
Serial.println(time);
|
||||
|
||||
// Define a json object to keep the data
|
||||
StaticJsonBuffer<500> jsonBuffer;
|
||||
JsonObject& root = jsonBuffer.createObject();
|
||||
|
||||
// Any generic useful info here
|
||||
root["id"] = "espdebugger";
|
||||
root["up"] = millis();
|
||||
root["t"] = time;
|
||||
|
||||
// Add a sub-structure to the json object,
|
||||
// to keep the data from the meter itself
|
||||
JsonObject& data = root.createNestedObject("data");
|
||||
|
||||
// Based on the list number, get all details
|
||||
// according to OBIS specifications for the meter
|
||||
if (listSize == (int)Kaifa::List1)
|
||||
{
|
||||
data["P"] = hanReader.getInt((int)Kaifa_List1::ActivePowerImported);
|
||||
}
|
||||
else if (listSize == (int)Kaifa::List2)
|
||||
{
|
||||
data["lv"] = hanReader.getString((int)Kaifa_List2::ListVersionIdentifier);
|
||||
data["id"] = hanReader.getString((int)Kaifa_List2::MeterID);
|
||||
data["type"] = hanReader.getString((int)Kaifa_List2::MeterType);
|
||||
data["P"] = hanReader.getInt((int)Kaifa_List2::ActiveImportPower);
|
||||
data["Q"] = hanReader.getInt((int)Kaifa_List2::ReactiveImportPower);
|
||||
data["I1"] = hanReader.getInt((int)Kaifa_List2::CurrentL1);
|
||||
data["I2"] = hanReader.getInt((int)Kaifa_List2::CurrentL2);
|
||||
data["I3"] = hanReader.getInt((int)Kaifa_List2::CurrentL3);
|
||||
data["U1"] = hanReader.getInt((int)Kaifa_List2::VoltageL1);
|
||||
data["U2"] = hanReader.getInt((int)Kaifa_List2::VoltageL2);
|
||||
data["U3"] = hanReader.getInt((int)Kaifa_List2::VoltageL3);
|
||||
}
|
||||
else if (listSize == (int)Kaifa::List3)
|
||||
{
|
||||
data["lv"] = hanReader.getString((int)Kaifa_List3::ListVersionIdentifier);;
|
||||
data["id"] = hanReader.getString((int)Kaifa_List3::MeterID);
|
||||
data["type"] = hanReader.getString((int)Kaifa_List3::MeterType);
|
||||
data["P"] = hanReader.getInt((int)Kaifa_List3::ActiveImportPower);
|
||||
data["Q"] = hanReader.getInt((int)Kaifa_List3::ReactiveImportPower);
|
||||
data["I1"] = hanReader.getInt((int)Kaifa_List3::CurrentL1);
|
||||
data["I2"] = hanReader.getInt((int)Kaifa_List3::CurrentL2);
|
||||
data["I3"] = hanReader.getInt((int)Kaifa_List3::CurrentL3);
|
||||
data["U1"] = hanReader.getInt((int)Kaifa_List3::VoltageL1);
|
||||
data["U2"] = hanReader.getInt((int)Kaifa_List3::VoltageL2);
|
||||
data["U3"] = hanReader.getInt((int)Kaifa_List3::VoltageL3);
|
||||
data["tPI"] = hanReader.getInt((int)Kaifa_List3::CumulativeActiveImportEnergy);
|
||||
data["tPO"] = hanReader.getInt((int)Kaifa_List3::CumulativeActiveExportEnergy);
|
||||
data["tQI"] = hanReader.getInt((int)Kaifa_List3::CumulativeReactiveImportEnergy);
|
||||
data["tQO"] = hanReader.getInt((int)Kaifa_List3::CumulativeReactiveExportEnergy);
|
||||
}
|
||||
|
||||
// Write the json to the debug port
|
||||
root.printTo(Serial1);
|
||||
Serial1.println();
|
||||
|
||||
// Publish the json to the MQTT server
|
||||
char msg[1024];
|
||||
root.printTo(msg, 1024);
|
||||
client.publish("sensors/out/espdebugger", msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure the MQTT lirary gets some attention too
|
||||
void loopMqtt()
|
||||
{
|
||||
if (!client.connected()) {
|
||||
reconnectMqtt();
|
||||
}
|
||||
client.loop();
|
||||
}
|
||||
|
||||
void reconnectMqtt() {
|
||||
// Loop until we're reconnected
|
||||
while (!client.connected()) {
|
||||
Serial1.print("Attempting MQTT connection...");
|
||||
// Attempt to connect
|
||||
if (client.connect("ESP8266Client")) {
|
||||
Serial1.println("connected");
|
||||
// Once connected, publish an announcement...
|
||||
// client.publish("sensors", "hello world");
|
||||
// ... and resubscribe
|
||||
// client.subscribe("inTopic");
|
||||
}
|
||||
else {
|
||||
Serial1.print("failed, rc=");
|
||||
Serial1.print(client.state());
|
||||
Serial1.println(" try again in 5 seconds");
|
||||
// Wait 5 seconds before retrying
|
||||
delay(5000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
name=HANreader
|
||||
version=1.0.0
|
||||
author=roarfred
|
||||
maintainer=roarfred <not@important.com>
|
||||
sentence=HAN support
|
||||
paragraph=HAN support
|
||||
category=Sensors
|
||||
url=https://github.com/roarfred/AmsToMqttBridge
|
||||
architectures=*
|
||||
@@ -1,19 +0,0 @@
|
||||
Arduino Compatible Cross Platform C++ Library Project : For more information see http://www.visualmicro.com
|
||||
|
||||
This project works exactly the same way as an Arduino library.
|
||||
|
||||
Add this project to any solution that contains an Arduino project and #include <headers.h> in code as you would any normal Arduino library headers.
|
||||
|
||||
To enable intellisense and to support live build discovery outside of the "standard" Arduino library locations, ensure that the library is added as a shared project reference to the master Arduino project. To do this, right click the master project "References" node and then click "Add Reference". A window will open and the library will appear on the "Shared Projects" tab. Click the checkbox next to the library name to add the reference. If this library is moved the shared referencemust be removed and re-added.
|
||||
|
||||
VS2017 has a bug, workround: After moving existing source code within a "library or shared project", close and re-open the solution.
|
||||
|
||||
Visual Studio will display intellisense for libraries based on the platform/board that has been specified for the currently active "Startup Project" of the current solution.
|
||||
|
||||
|
||||
IMPORTANT: The arduino.cc Library Rules must be followed when adding code or restructing libraries.
|
||||
|
||||
|
||||
|
||||
|
||||
blog: http://www.visualmicro.com/post/2017/01/16/Arduino-Cross-Platform-Library-Development.aspx
|
||||
@@ -1,305 +0,0 @@
|
||||
// Aidon.h
|
||||
|
||||
#ifndef _AIDON_h
|
||||
#define _AIDON_h
|
||||
|
||||
|
||||
enum class Aidon
|
||||
{
|
||||
List1 = 0x01,
|
||||
List1PhaseShort = 0x09,
|
||||
List1PhaseLong = 0x0E,
|
||||
List3PhaseShort = 0x0D,
|
||||
List3PhaseLong = 0x12,
|
||||
List3PhaseITShort = 0x0C,
|
||||
List3PhaseITLong = 0x11,
|
||||
};
|
||||
|
||||
enum class Aidon_List1
|
||||
{
|
||||
ListSize,
|
||||
IGN_0,
|
||||
ActiveImportPower_OBIS,
|
||||
ActiveImportPower,
|
||||
IGN_1,
|
||||
ActiveImportPowerInt8,
|
||||
ActiveImportPowerEnum
|
||||
};
|
||||
|
||||
|
||||
enum class Aidon_List1Phase
|
||||
{
|
||||
ListSize,
|
||||
IGN_0,
|
||||
ListVersionIdentifier_OBIS,
|
||||
ListVersionIdentifier,
|
||||
IGN_1,
|
||||
MeterID_OBIS,
|
||||
MeterID,
|
||||
IGN_2,
|
||||
MeterType_OBIS,
|
||||
MeterType,
|
||||
IGN_3,
|
||||
ActiveImportPower_OBIS,
|
||||
ActiveImportPower,
|
||||
IGN_4,
|
||||
ActiveImportPowerInt8,
|
||||
ActiveImportPowerEnum,
|
||||
IGN_5,
|
||||
ActiveExportPower_OBIS,
|
||||
ActiveExportPower,
|
||||
IGN_6,
|
||||
ActiveExportPowerInt8,
|
||||
ActiveExportPowerEnum,
|
||||
IGN_7,
|
||||
ReactiveImportPower_OBIS,
|
||||
ReactiveImportPower,
|
||||
IGN_8,
|
||||
ReactiveImportPowerInt8,
|
||||
ReactiveImportPowerEnum,
|
||||
IGN_9,
|
||||
ReactiveExportPower_OBIS,
|
||||
ReactiveExportPower,
|
||||
IGN_10,
|
||||
ReactiveExportPowerInt8,
|
||||
ReactiveExportPowerEnum,
|
||||
IGN_11,
|
||||
CurrentL1_OBIS,
|
||||
CurrentL1,
|
||||
IGN_12,
|
||||
CurrentL1Int8,
|
||||
CurrentL1Enum,
|
||||
IGN_13,
|
||||
VoltageL1_OBIS,
|
||||
VoltageL1,
|
||||
IGN_14,
|
||||
VoltageL1Int8,
|
||||
VoltageL1Enum,
|
||||
IGN_15,
|
||||
Timestamp_OBIS,
|
||||
Timestamp,
|
||||
IGN_16,
|
||||
CumulativeActiveImportEnergy_OBIS,
|
||||
CumulativeActiveImportEnergy,
|
||||
IGN_17,
|
||||
CumulativeActiveImportEnergyInt8,
|
||||
CumulativeActiveImportEnergyEnum,
|
||||
IGN_18,
|
||||
CumulativeActiveExportEnergy_OBIS,
|
||||
CumulativeActiveExportEnergy,
|
||||
IGN_19,
|
||||
CumulativeActiveExportEnergyInt8,
|
||||
CumulativeActiveExportEnergyEnum,
|
||||
IGN_20,
|
||||
CumulativeReactiveImportEnergy_OBIS,
|
||||
CumulativeReactiveImportEnergy,
|
||||
IGN_21,
|
||||
CumulativeReactiveImportEnergyInt8,
|
||||
CumulativeReactiveImportEnergyEnum,
|
||||
IGN_22,
|
||||
CumulativeReactiveExportEnergy_OBIS,
|
||||
CumulativeReactiveExportEnergy,
|
||||
IGN_23,
|
||||
CumulativeReactiveExportEnergyInt8,
|
||||
CumulativeReactiveExportEnergyEnum
|
||||
};
|
||||
|
||||
enum class Aidon_List3Phase
|
||||
{
|
||||
ListSize,
|
||||
IGN_0,
|
||||
ListVersionIdentifier_OBIS,
|
||||
ListVersionIdentifier,
|
||||
IGN_1,
|
||||
MeterID_OBIS,
|
||||
MeterID,
|
||||
IGN_2,
|
||||
MeterType_OBIS,
|
||||
MeterType,
|
||||
IGN_3,
|
||||
ActiveImportPower_OBIS,
|
||||
ActiveImportPower,
|
||||
IGN_4,
|
||||
ActiveImportPowerInt8,
|
||||
ActiveImportPowerEnum,
|
||||
IGN_5,
|
||||
ActiveExportPower_OBIS,
|
||||
ActiveExportPower,
|
||||
IGN_6,
|
||||
ActiveExportPowerInt8,
|
||||
ActiveExportPowerEnum,
|
||||
IGN_7,
|
||||
ReactiveImportPower_OBIS,
|
||||
ReactiveImportPower,
|
||||
IGN_8,
|
||||
ReactiveImportPowerInt8,
|
||||
ReactiveImportPowerEnum,
|
||||
IGN_9,
|
||||
ReactiveExportPower_OBIS,
|
||||
ReactiveExportPower,
|
||||
IGN_10,
|
||||
ReactiveExportPowerInt8,
|
||||
ReactiveExportPowerEnum,
|
||||
IGN_11,
|
||||
CurrentL1_OBIS,
|
||||
CurrentL1,
|
||||
IGN_12,
|
||||
CurrentL1Int8,
|
||||
CurrentL1Enum,
|
||||
IGN_13,
|
||||
CurrentL2_OBIS,
|
||||
CurrentL2,
|
||||
IGN_14,
|
||||
CurrentL2Int8,
|
||||
CurrentL2Enum,
|
||||
IGN_15,
|
||||
CurrentL3_OBIS,
|
||||
CurrentL3,
|
||||
IGN_16,
|
||||
CurrentL3Int8,
|
||||
CurrentL3Enum,
|
||||
IGN_17,
|
||||
VoltageL1_OBIS,
|
||||
VoltageL1,
|
||||
IGN_18,
|
||||
VoltageL1Int8,
|
||||
VoltageL1Enum,
|
||||
IGN_19,
|
||||
VoltageL2_OBIS,
|
||||
VoltageL2,
|
||||
IGN_20,
|
||||
VoltageL2Int8,
|
||||
VoltageL2Enum,
|
||||
IGN_21,
|
||||
VoltageL3_OBIS,
|
||||
VoltageL3,
|
||||
IGN_22,
|
||||
VoltageL3Int8,
|
||||
VoltageL3Enum,
|
||||
IGN_23,
|
||||
Timestamp_OBIS,
|
||||
Timestamp,
|
||||
IGN_24,
|
||||
CumulativeActiveImportEnergy_OBIS,
|
||||
CumulativeActiveImportEnergy,
|
||||
IGN_25,
|
||||
CumulativeActiveImportEnergyInt8,
|
||||
CumulativeActiveImportEnergyEnum,
|
||||
IGN_26,
|
||||
CumulativeActiveExportEnergy_OBIS,
|
||||
CumulativeActiveExportEnergy,
|
||||
IGN_27,
|
||||
CumulativeActiveExportEnergyInt8,
|
||||
CumulativeActiveExportEnergyEnum,
|
||||
IGN_28,
|
||||
CumulativeReactiveImportEnergy_OBIS,
|
||||
CumulativeReactiveImportEnergy,
|
||||
IGN_29,
|
||||
CumulativeReactiveImportEnergyInt8,
|
||||
CumulativeReactiveImportEnergyEnum,
|
||||
IGN_30,
|
||||
CumulativeReactiveExportEnergy_OBIS,
|
||||
CumulativeReactiveExportEnergy,
|
||||
IGN_31,
|
||||
CumulativeReactiveExportEnergyInt8,
|
||||
CumulativeReactiveExportEnergyEnum
|
||||
};
|
||||
|
||||
enum class Aidon_List3PhaseIT
|
||||
{
|
||||
ListSize,
|
||||
IGN_0,
|
||||
ListVersionIdentifier_OBIS,
|
||||
ListVersionIdentifier,
|
||||
IGN_1,
|
||||
MeterID_OBIS,
|
||||
MeterID,
|
||||
IGN_2,
|
||||
MeterType_OBIS,
|
||||
MeterType,
|
||||
IGN_3,
|
||||
ActiveImportPower_OBIS,
|
||||
ActiveImportPower,
|
||||
IGN_4,
|
||||
ActiveImportPowerInt8,
|
||||
ActiveImportPowerEnum,
|
||||
IGN_5,
|
||||
ActiveExportPower_OBIS,
|
||||
ActiveExportPower,
|
||||
IGN_6,
|
||||
ActiveExportPowerInt8,
|
||||
ActiveExportPowerEnum,
|
||||
IGN_7,
|
||||
ReactiveImportPower_OBIS,
|
||||
ReactiveImportPower,
|
||||
IGN_8,
|
||||
ReactiveImportPowerInt8,
|
||||
ReactiveImportPowerEnum,
|
||||
IGN_9,
|
||||
ReactiveExportPower_OBIS,
|
||||
ReactiveExportPower,
|
||||
IGN_10,
|
||||
ReactiveExportPowerInt8,
|
||||
ReactiveExportPowerEnum,
|
||||
IGN_11,
|
||||
CurrentL1_OBIS,
|
||||
CurrentL1,
|
||||
IGN_12,
|
||||
CurrentL1Int8,
|
||||
CurrentL1Enum,
|
||||
IGN_13,
|
||||
CurrentL3_OBIS,
|
||||
CurrentL3,
|
||||
IGN_14,
|
||||
CurrentL3Int8,
|
||||
CurrentL3Enum,
|
||||
IGN_15,
|
||||
VoltageL1_OBIS,
|
||||
VoltageL1,
|
||||
IGN_16,
|
||||
VoltageL1Int8,
|
||||
VoltageL1Enum,
|
||||
IGN_17,
|
||||
VoltageL2_OBIS,
|
||||
VoltageL2,
|
||||
IGN_18,
|
||||
VoltageL2Int8,
|
||||
VoltageL2Enum,
|
||||
IGN_19,
|
||||
VoltageL3_OBIS,
|
||||
VoltageL3,
|
||||
IGN_20,
|
||||
VoltageL3Int8,
|
||||
VoltageL3Enum,
|
||||
IGN_21,
|
||||
Timestamp_OBIS,
|
||||
Timestamp,
|
||||
IGN_22,
|
||||
CumulativeActiveImportEnergy_OBIS,
|
||||
CumulativeActiveImportEnergy,
|
||||
IGN_23,
|
||||
CumulativeActiveImportEnergyInt8,
|
||||
CumulativeActiveImportEnergyEnum,
|
||||
IGN_24,
|
||||
CumulativeActiveExportEnergy_OBIS,
|
||||
CumulativeActiveExportEnergy,
|
||||
IGN_25,
|
||||
CumulativeActiveExportEnergyInt8,
|
||||
CumulativeActiveExportEnergyEnum,
|
||||
IGN_26,
|
||||
CumulativeReactiveImportEnergy_OBIS,
|
||||
CumulativeReactiveImportEnergy,
|
||||
IGN_27,
|
||||
CumulativeReactiveImportEnergyInt8,
|
||||
CumulativeReactiveImportEnergyEnum,
|
||||
IGN_28,
|
||||
CumulativeReactiveExportEnergy_OBIS,
|
||||
CumulativeReactiveExportEnergy,
|
||||
IGN_29,
|
||||
CumulativeReactiveExportEnergyInt8,
|
||||
CumulativeReactiveExportEnergyEnum
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#include "Crc16.h"
|
||||
|
||||
Crc16Class::Crc16Class()
|
||||
{
|
||||
unsigned short value;
|
||||
unsigned short temp;
|
||||
for (unsigned short i = 0; i < 256; ++i)
|
||||
{
|
||||
value = 0;
|
||||
temp = i;
|
||||
for (byte j = 0; j < 8; ++j)
|
||||
{
|
||||
if (((value ^ temp) & 0x0001) != 0)
|
||||
{
|
||||
value = (ushort)((value >> 1) ^ polynomial);
|
||||
}
|
||||
else
|
||||
{
|
||||
value >>= 1;
|
||||
}
|
||||
temp >>= 1;
|
||||
}
|
||||
table[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned short Crc16Class::ComputeChecksum(byte *data, int start, int length)
|
||||
{
|
||||
ushort fcs = 0xffff;
|
||||
for (int i = start; i < (start + length); i++)
|
||||
{
|
||||
byte index = (fcs ^ data[i]) & 0xff;
|
||||
fcs = (ushort)((fcs >> 8) ^ table[index]);
|
||||
}
|
||||
fcs ^= 0xffff;
|
||||
return fcs;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
#ifndef _CRC16_h
|
||||
#define _CRC16_h
|
||||
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
||||
class Crc16Class
|
||||
{
|
||||
public:
|
||||
Crc16Class();
|
||||
unsigned short ComputeChecksum(byte *data, int start, int length);
|
||||
protected:
|
||||
private:
|
||||
const unsigned short polynomial = 0x8408;
|
||||
unsigned short table[256];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
#include "DlmsReader.h"
|
||||
|
||||
DlmsReader::DlmsReader()
|
||||
{
|
||||
//this->Clear();
|
||||
}
|
||||
|
||||
void DlmsReader::Clear()
|
||||
{
|
||||
this->position = 0;
|
||||
this->dataLength = 0;
|
||||
this->destinationAddressLength = 0;
|
||||
this->sourceAddressLength = 0;
|
||||
this->frameFormatType = 0;
|
||||
}
|
||||
|
||||
bool DlmsReader::Read(byte data)
|
||||
{
|
||||
if (position == 0 && data != 0x7E)
|
||||
{
|
||||
// we haven't started yet, wait for the start flag (no need to capture any data yet)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// We have completed reading of one package, so clear and be ready for the next
|
||||
if (dataLength > 0 && position >= dataLength + 2)
|
||||
Clear();
|
||||
|
||||
// Check if we're about to run into a buffer overflow
|
||||
if (position >= DLMS_READER_BUFFER_SIZE)
|
||||
Clear();
|
||||
|
||||
// Check if this is a second start flag, which indicates the previous one was a stop from the last package
|
||||
if (position == 1 && data == 0x7E)
|
||||
{
|
||||
// just return, we can keep the one byte we had in the buffer
|
||||
return false;
|
||||
}
|
||||
|
||||
// We have started, so capture every byte
|
||||
buffer[position++] = data;
|
||||
|
||||
if (position == 1)
|
||||
{
|
||||
// This was the start flag, we're not done yet
|
||||
return false;
|
||||
}
|
||||
else if (position == 2)
|
||||
{
|
||||
// Capture the Frame Format Type
|
||||
frameFormatType = (byte)(data & 0xF0);
|
||||
if (!IsValidFrameFormat(frameFormatType))
|
||||
Clear();
|
||||
return false;
|
||||
}
|
||||
else if (position == 3)
|
||||
{
|
||||
// Capture the length of the data package
|
||||
dataLength = ((buffer[1] & 0x0F) << 8) | buffer[2];
|
||||
return false;
|
||||
}
|
||||
else if (destinationAddressLength == 0)
|
||||
{
|
||||
// Capture the destination address
|
||||
destinationAddressLength = GetAddress(3, destinationAddress, 0, DLMS_READER_MAX_ADDRESS_SIZE);
|
||||
if (destinationAddressLength > 3)
|
||||
Clear();
|
||||
return false;
|
||||
}
|
||||
else if (sourceAddressLength == 0)
|
||||
{
|
||||
// Capture the source address
|
||||
sourceAddressLength = GetAddress(3 + destinationAddressLength, sourceAddress, 0, DLMS_READER_MAX_ADDRESS_SIZE);
|
||||
if (sourceAddressLength > 3)
|
||||
Clear();
|
||||
return false;
|
||||
}
|
||||
else if (position == 4 + destinationAddressLength + sourceAddressLength + 2)
|
||||
{
|
||||
// Verify the header checksum
|
||||
ushort headerChecksum = GetChecksum(position - 3);
|
||||
if (headerChecksum != Crc16.ComputeChecksum(buffer, 1, position - 3))
|
||||
Clear();
|
||||
return false;
|
||||
}
|
||||
else if (position == dataLength + 1)
|
||||
{
|
||||
// Verify the data package checksum
|
||||
ushort checksum = this->GetChecksum(position - 3);
|
||||
if (checksum != Crc16.ComputeChecksum(buffer, 1, position - 3))
|
||||
Clear();
|
||||
return false;
|
||||
}
|
||||
else if (position == dataLength + 2)
|
||||
{
|
||||
// We're done, check the stop flag and signal we're done
|
||||
if (data == 0x7E)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
Clear();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DlmsReader::IsValidFrameFormat(byte frameFormatType)
|
||||
{
|
||||
return frameFormatType == 0xA0;
|
||||
}
|
||||
|
||||
int DlmsReader::GetRawData(byte *dataBuffer, int start, int length)
|
||||
{
|
||||
if (dataLength > 0 && position == dataLength + 2)
|
||||
{
|
||||
int headerLength = 3 + destinationAddressLength + sourceAddressLength + 2;
|
||||
int bytesWritten = 0;
|
||||
for (int i = headerLength + 1; i < dataLength - 1; i++)
|
||||
{
|
||||
dataBuffer[i + start - headerLength - 1] = buffer[i];
|
||||
bytesWritten++;
|
||||
}
|
||||
return bytesWritten;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DlmsReader::GetAddress(int addressPosition, byte* addressBuffer, int start, int length)
|
||||
{
|
||||
int addressBufferPos = start;
|
||||
for (int i = addressPosition; i < position; i++)
|
||||
{
|
||||
addressBuffer[addressBufferPos++] = buffer[i];
|
||||
|
||||
// LSB=1 means this was the last address byte
|
||||
if ((buffer[i] & 0x01) == 0x01)
|
||||
break;
|
||||
|
||||
// See if we've reached last byte, try again when we've got more data
|
||||
else if (i == position - 1)
|
||||
return 0;
|
||||
}
|
||||
return addressBufferPos - start;
|
||||
}
|
||||
|
||||
ushort DlmsReader::GetChecksum(int checksumPosition)
|
||||
{
|
||||
return (ushort)(buffer[checksumPosition + 2] << 8 |
|
||||
buffer[checksumPosition + 1]);
|
||||
}
|
||||