Compare commits

...

1385 Commits

Author SHA1 Message Date
Gunnar Skjold
a6ae25f3e7 Changed way of creating release (#944) 2025-03-24 10:51:07 +01:00
dependabot[bot]
8051db6a9b Bump esbuild from 0.18.20 to 0.25.1 in /lib/SvelteUi/app (#943)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.18.20 to 0.25.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.20...v0.25.1)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-24 09:10:54 +01:00
Gunnar Skjold
d0bfdae5d8 Automatic release notes (#942) 2025-03-24 09:05:02 +01:00
Gunnar Skjold
4d681ed2e2 Support fw upgrade via MQTT with JSON payload (#941) 2025-03-24 09:00:05 +01:00
Gunnar Skjold
8ee3f53714 Fixed firmare upload when web context is defined (#938) 2025-03-24 08:59:52 +01:00
Gunnar Skjold
e8cf8a98ed Fixed baud/parity autodetect (#937) 2025-03-24 08:59:40 +01:00
Gunnar Skjold
9153a98694 Fix: #935 - Brownout reboot loop (#936) 2025-03-24 08:59:30 +01:00
Gunnar Skjold
37aa6ae816 Fix: #918 - MQTT/SSL does not reconnect after disconnect (#933) 2025-03-24 08:59:18 +01:00
Gunnar Skjold
8a35346fcf Fixed backup and restore of price modifiers (#925) (#932)
* Fix: #925 - Backup/restore of price modifiers

* Removed unused importy
2025-03-24 08:58:31 +01:00
Gunnar Skjold
792ae4c935 Fix: #926 - Historical data lost when upgrading ESP8266 between 2.4.x versions (#931) 2025-03-24 08:58:14 +01:00
Gunnar Skjold
a7324d828a Fixed nullpointer in upgrade 2025-02-14 18:51:07 +01:00
Gunnar Skjold
fe739c51d3 Cloud stuff 2025-02-14 18:04:12 +01:00
Gunnar Skjold
795d2d0375 Some debugging of cloud connection 2025-02-14 14:51:47 +01:00
Gunnar Skjold
5ef36a91f6 Updated esbuild dependency 2025-02-13 13:10:50 +01:00
Gunnar Skjold
8491d6c471 Changed to the latest possible node version 2025-02-13 13:07:57 +01:00
Gunnar Skjold
f95f22058a Merge branch 'main' of github.com:UtilitechAS/amsreader-firmware 2025-02-13 13:01:05 +01:00
Gunnar Skjold
b5c45cebfa Merge pull request #866 from saddfox/devcontainer
Add devcontainer
2025-02-13 12:55:57 +01:00
Gunnar Skjold
19a953b269 Updated workflows 2025-02-13 12:55:43 +01:00
Gunnar Skjold
6ae970ff68 Updated workflows 2025-02-13 12:45:43 +01:00
Gunnar Skjold
0f0ee82af9 Various bug fix for GUI 2025-02-13 12:33:54 +01:00
Gunnar Skjold
d84b9351e1 Fixed ESP8266 build 2025-02-03 18:02:20 +01:00
Gunnar Skjold
6668258b66 Support for update entity in HA 2025-02-03 17:51:36 +01:00
Gunnar Skjold
9c42aab04f Fixed extra price 2025-01-27 16:31:43 +01:00
Gunnar Skjold
c771870e3e Merge branch 'main' of github.com:UtilitechAS/amsreader-firmware 2025-01-27 16:08:02 +01:00
Gunnar Skjold
fb59ee52c1 Merge pull request #890 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/nanoid-3.3.8
Bump nanoid from 3.3.7 to 3.3.8 in /lib/SvelteUi/app
2025-01-27 16:04:28 +01:00
Gunnar Skjold
3483910136 Merge pull request #907 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/vite-4.5.9
Bump vite from 4.5.5 to 4.5.9 in /lib/SvelteUi/app
2025-01-27 16:04:16 +01:00
Gunnar Skjold
13e70f7bd4 Merge pull request #906 from dbeinder/nullterm
Reserve space for null terminator
2025-01-27 16:03:44 +01:00
Gunnar Skjold
210001e232 Prevent meterid override 2025-01-24 13:22:08 +01:00
Gunnar Skjold
094e588ad5 Strip non-ascii from meter id 2025-01-24 07:44:21 +01:00
Gunnar Skjold
f9d0cdfa47 Fixed nullpointer 2025-01-23 21:37:17 +01:00
Gunnar Skjold
0476058958 Fixed wifi scan for 8266 2025-01-23 14:46:52 +01:00
Gunnar Skjold
3e337a5639 Option to enter manual SSID 2025-01-23 14:37:28 +01:00
Gunnar Skjold
bf0e1d1bf3 Lib updates 2025-01-23 14:16:05 +01:00
Gunnar Skjold
d3b65b0175 SSID scan 2025-01-23 14:13:23 +01:00
Gunnar Skjold
2caa7252a0 Enforce pattern on all input fields 2025-01-23 12:01:39 +01:00
Gunnar Skjold
f7596de166 Fixed memory leak 2025-01-23 11:22:03 +01:00
Gunnar Skjold
f5178459e8 Fixed incorrect additional price in array 2025-01-22 19:59:41 +01:00
Gunnar Skjold
a55f7dc66a Fixed vcc reading on esp8266 2025-01-22 19:09:08 +01:00
Gunnar Skjold
3d9cad8953 Fixed invalid characters in meterId 2025-01-22 17:56:33 +01:00
Gunnar Skjold
67535b2792 Fixed cloud connection for C3 2025-01-22 17:49:54 +01:00
Gunnar Skjold
2b5f3f50df Fixed cloud connection for C3 2025-01-22 17:49:38 +01:00
Gunnar Skjold
111807a743 Web framework update 2025-01-22 17:32:41 +01:00
dependabot[bot]
348ba8cfc4 Bump vite from 4.5.5 to 4.5.9 in /lib/SvelteUi/app
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.5 to 4.5.9.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.9/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.9/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-22 06:43:57 +00:00
david-beinder
81c72f0ca3 Reserve space for null terminator 2025-01-18 01:11:24 +01:00
Gunnar Skjold
20de294a8c Updated build 2025-01-12 18:21:40 +01:00
Gunnar Skjold
e31faaa726 Added a DSMR frame as documentation 2025-01-12 17:59:26 +01:00
Gunnar Skjold
4ad2921132 Fixed config reload for HA and Domoticz if changed 2025-01-12 12:01:16 +01:00
Gunnar Skjold
1fa62fa97c Fixed aidon package timestamp 2025-01-12 10:32:14 +01:00
Gunnar Skjold
affa66f78f Allow special characters in mqtt user/pass 2025-01-12 10:23:57 +01:00
Gunnar Skjold
84860bc684 Failsafe on combining tariff counters 2025-01-12 10:16:19 +01:00
Gunnar Skjold
0cadedf9df Fixed red blink after 49 days 2025-01-12 10:05:57 +01:00
Gunnar Skjold
0c3eea8d37 Added timestamp sensors to HA 2025-01-12 09:57:29 +01:00
Gunnar Skjold
1d4e7e564d Fixed timestamp bug 2025-01-09 15:35:22 +01:00
Gunnar Skjold
067aa0c6cb More changes for slovakian iskra 2024-12-23 11:57:32 +01:00
dependabot[bot]
3d540e2a65 Bump nanoid from 3.3.7 to 3.3.8 in /lib/SvelteUi/app
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-17 12:48:44 +00:00
Gunnar Skjold
61d4728ffa DSMR with encrypted payload 2024-12-14 10:54:02 +01:00
Gunnar Skjold
42e0ca963c Merge branch 'main' into pnu 2024-12-12 10:51:52 +01:00
Gunnar Skjold
3bc40cb136 Some adjustments for Iskra 2024-12-12 09:44:10 +01:00
Gunnar Skjold
1453bbbb7e Adjustments on auto updater for 8266 2024-12-07 21:45:47 +01:00
Gunnar Skjold
9da2d0760e More adjustments for auto update 2024-12-07 11:32:45 +01:00
Gunnar Skjold
18af98511a Some adjustments 2024-12-05 20:10:44 +01:00
Gunnar Skjold
40c84d2429 Fixed firmware upload from GUI 2024-12-05 19:15:17 +01:00
Gunnar Skjold
c0d95f918e Merge branch 'main' into pnu 2024-12-05 18:15:37 +01:00
Gunnar Skjold
0947d335ce Fixed unprocessable characters in json 2024-12-05 14:20:12 +01:00
Gunnar Skjold
43e2b2478b Added more for Slovenian Iskra 2024-12-05 13:57:33 +01:00
Gunnar Skjold
a5fc1f0cbe New firmware upload 2024-12-05 13:40:30 +01:00
Gunnar Skjold
bf3059ba04 Now moving LittleFS in a better way 2024-12-04 20:37:56 +01:00
Gunnar Skjold
319b534d4f Improved firmware update 2024-11-29 16:44:56 +01:00
Gunnar Skjold
b7c2510098 Store upgrade progress to eeprom 2024-11-29 11:26:00 +01:00
Gunnar Skjold
07205b8008 Merge branch 'main' into pnu
# Conflicts:
#	lib/HwTools/src/HwTools.cpp
#	lib/SvelteUi/app/dist/index.css
#	lib/SvelteUi/app/dist/index.js
#	lib/SvelteUi/app/vite.config.js
2024-11-29 08:05:49 +01:00
saddfox
165a385844 add devcontainer 2024-11-10 18:09:18 +01:00
Gunnar Skjold
fa76233151 Added missing code for setting mqtt keep alive 2024-11-09 15:44:30 +01:00
Gunnar Skjold
22b7877ee9 Fixed build error 2024-11-09 15:29:19 +01:00
Gunnar Skjold
bd9a1bb330 Some frame data 2024-11-09 15:17:04 +01:00
Gunnar Skjold
1b5efaa937 Fixed some labels 2024-11-09 15:16:53 +01:00
Gunnar Skjold
05ce4c5c1a Ability to change MQTT timeout and keepalive 2024-11-09 15:12:54 +01:00
Gunnar Skjold
e022f630b2 Removed UDP as recommended cloud connection method 2024-11-07 09:55:15 +01:00
Gunnar Skjold
a73ff87653 Removed UDP as recommended cloud connection method 2024-11-07 09:37:05 +01:00
Gunnar Skjold
70d6a8699b Added default settings to KMP communicator 2024-11-06 18:22:56 +01:00
Gunnar Skjold
118c633878 Fixed autodetect 2024-11-06 18:10:38 +01:00
Gunnar Skjold
fa5985f60b Prevent redirect loop when changing from context to empty 2024-11-04 08:41:34 +01:00
Gunnar Skjold
c1309e9a13 Add package timestamp if missing 2024-11-03 11:28:03 +01:00
Gunnar Skjold
718eef7999 Fixed configfile download when using context path 2024-11-03 11:21:35 +01:00
Gunnar Skjold
afdd282adf Make client id required 2024-11-03 10:43:27 +01:00
Gunnar Skjold
1302f18fab Adjustments to make IPv6 address visible in GUI 2024-11-03 10:21:13 +01:00
Gunnar Skjold
fc89670ea4 Manually merged changes from pull #826 2024-11-03 10:07:51 +01:00
Gunnar Skjold
225320ea7d git branchMerge branch 'main' of github.com:UtilitechAS/amsreader-firmware 2024-11-03 10:02:00 +01:00
Gunnar Skjold
b2cf3bb0c4 Merge pull request #847 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/rollup-3.29.5
Bump rollup from 3.29.4 to 3.29.5 in /lib/SvelteUi/app
2024-11-03 09:59:23 +01:00
Gunnar Skjold
e36a8ade42 Merge pull request #848 from ackjewtn/add_wesp32_poe_board
Add support for wESP32-PoE board
2024-11-03 09:59:13 +01:00
Gunnar Skjold
2ef67d92c4 Fixed missing prices after changes in entsoe API 2024-11-03 09:51:54 +01:00
Peter Wahlberg
1c9af6b1c2 Revert formatting 2024-09-27 17:17:02 +02:00
Peter Wahlberg
4f47ffa21e Add support for wESP32-PoE board 2024-09-27 17:01:30 +02:00
dependabot[bot]
3d1026f829 Bump rollup from 3.29.4 to 3.29.5 in /lib/SvelteUi/app
Bumps [rollup](https://github.com/rollup/rollup) from 3.29.4 to 3.29.5.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v3.29.4...v3.29.5)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 05:02:27 +00:00
Gunnar Skjold
af6ecc5d47 Adjustments of clock parsing from dlms 2024-09-21 20:03:46 +02:00
Gunnar Skjold
025c556626 More relaxed on when hourly data is received 2024-09-21 16:04:05 +02:00
Gunnar Skjold
0b342d6c49 Some changes to data update 2024-09-21 13:00:22 +02:00
Gunnar Skjold
ada57b1052 Trying to fix data reset issue 2024-09-19 12:54:58 +02:00
Gunnar Skjold
cf773985b1 Merge pull request #836 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/svelte-4.2.19
Bump svelte from 3.59.2 to 4.2.19 in /lib/SvelteUi/app
2024-09-19 12:39:39 +02:00
Gunnar Skjold
75a14ad9cb Merge pull request #840 from ruffy91/patch-1
Added kWH multiplier to phases
2024-09-19 12:39:26 +02:00
Fabian
fbe90cbc5a Update IEC6205675.cpp
kWh multiplier also applies to all the phases, not only total energy
2024-09-04 21:38:20 +02:00
dependabot[bot]
f0bc895952 Bump svelte from 3.59.2 to 4.2.19 in /lib/SvelteUi/app
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 3.59.2 to 4.2.19.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.19/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.19/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-30 17:21:59 +00:00
Gunnar Skjold
f5c10c1a50 Send price config to cloud 2024-08-24 21:22:43 +02:00
Gunnar Skjold
c4736c730e Send price config to cloud 2024-08-24 20:55:34 +02:00
Gunnar Skjold
d2c96c733c Send price config to cloud 2024-08-24 09:40:58 +02:00
Gunnar Skjold
d0dd9de4d7 Updated fix for missing graph data 2024-08-24 08:37:24 +02:00
Gunnar Skjold
159244974d Trying to fix issue 2024-08-20 20:55:26 +02:00
Gunnar Skjold
933926fbb4 Fixed debug logging 2024-08-15 20:02:35 +02:00
Gunnar Skjold
2c95f036ba Fixed power factor sensors in HA 2024-08-15 19:44:24 +02:00
Gunnar Skjold
c5c0b52eb7 Try to fix day clearing issue 2024-08-15 19:33:30 +02:00
Gunnar Skjold
561b62cafe Cloud configuration 2024-08-15 19:18:10 +02:00
Gunnar Skjold
55520cd7f6 GUI package upgrades 2024-08-06 20:54:39 +02:00
Gunnar Skjold
e27d41839e Merge branch 'main' of github.com:UtilitechAS/amsreader-firmware 2024-08-06 20:52:41 +02:00
Gunnar Skjold
569a0ddfaa Some final adjustments 2024-08-06 20:51:02 +02:00
Gunnar Skjold
de63263dbb Fixed date skew when computer is on different timezone 2024-08-02 22:34:53 -08:00
Gunnar Skjold
8adb7055c0 Fixed date skew when computer is on different timezone 2024-08-02 19:02:00 -11:00
Gunnar Skjold
11e09c5b56 Fixed undefined month 2024-08-03 07:32:10 +02:00
Gunnar Skjold
ac32f74eba Bugfix 2024-08-02 19:59:30 +02:00
Gunnar Skjold
d49b8c3839 Option to disable UART TX 2024-08-02 19:59:16 +02:00
Gunnar Skjold
054fd43a0d Initial implementation of custom upgrade code 2024-08-02 17:56:39 +02:00
ArnieO
423c5da25e Uploaded overview of meters / interfaces 2024-07-17 09:11:04 +02:00
Gunnar Skjold
9a4a8a10f2 Corrected RSA block size 2024-07-14 21:31:17 +02:00
Gunnar Skjold
d15992142e Removed test ip 2024-07-14 21:24:29 +02:00
Gunnar Skjold
fed3948f85 Corrected RSA block size 2024-07-14 21:23:45 +02:00
Gunnar Skjold
b77342a648 Some cloud changes 2024-07-14 21:07:50 +02:00
Gunnar Skjold
04f407aba0 Stability improvements 2024-07-11 17:48:50 +02:00
Gunnar Skjold
b122fae04c Updated license headers 2024-07-11 14:03:00 +02:00
Gunnar Skjold
8a4efd0047 Restructuring to be able to include precompiled kmp lib 2024-07-11 13:15:22 +02:00
Gunnar Skjold
4407526d96 Changed order of if cases 2024-07-03 09:56:08 +02:00
Gunnar Skjold
1d91416348 Fix for meters with clock skew 2024-07-03 09:22:09 +02:00
Gunnar Skjold
a1bbcc20e3 Fixed 8266 build 2024-06-29 10:24:38 +02:00
Gunnar Skjold
2b779920d7 Fixed issue when graphs go blank if meter clock is running fast 2024-06-29 10:18:24 +02:00
Gunnar Skjold
de79fd4c43 Send prices to MQTT when having fixed price only 2024-06-29 10:15:15 +02:00
Gunnar Skjold
8dfaa34d03 Buffer adjustments for 8266 2024-06-29 10:14:43 +02:00
Gunnar Skjold
0d0dc07903 Some changes for cloud service 2024-06-29 10:13:41 +02:00
Gunnar Skjold
e38a064928 Fixed timezone issue in DLMS timestamps 2024-06-27 10:54:22 +02:00
Gunnar Skjold
81b3aacc4d Fixed debug 2024-06-15 09:21:12 +02:00
Gunnar Skjold
6277d5880d Updated frontened 2024-06-10 17:28:34 +02:00
Gunnar Skjold
8424d1f75e Set threephase when applying OBIS codes 2024-06-09 10:21:55 +02:00
Gunnar Skjold
099b23d2d5 Merge branch 'main' of github.com:UtilitechAS/amsreader-firmware 2024-06-07 19:13:21 +02:00
Gunnar Skjold
28d746415c Remote KMP as selection in config 2024-06-07 19:13:03 +02:00
Gunnar Skjold
fd373a5846 Disable remote debug for C3 2024-06-07 19:12:33 +02:00
Gunnar Skjold
cd7315990f Build option to enable KMP 2024-06-07 18:55:37 +02:00
Gunnar Skjold
59bf0ce066 Build option to disable remote debug 2024-06-07 18:48:26 +02:00
Gunnar Skjold
93e55f457a Tariff thresholds on MQTT 2024-06-06 21:38:03 +02:00
Gunnar Skjold
4d340c5482 Use estimated if Aidon sends same value as last hour 2024-06-06 21:37:45 +02:00
Gunnar Skjold
1db0082103 Added export price sensor to HA payload 2024-06-06 18:09:33 +02:00
Gunnar Skjold
f593e14e68 Combined import/export in data.json 2024-06-06 17:34:33 +02:00
Gunnar Skjold
da6328c246 Fixed HA hostname ESP8266 build issue 2024-06-06 17:17:59 +02:00
Gunnar Skjold
5eeab2ba89 Fixed amperage plot 2024-06-06 15:55:43 +02:00
Gunnar Skjold
eeaaf088ac Fixed issues with HA sensors 2024-06-06 15:41:21 +02:00
Gunnar Skjold
32afea2817 Iskra 2024-06-04 20:33:03 +02:00
Gunnar Skjold
e7b496280d KMP stuff 2024-06-03 18:09:40 +02:00
Gunnar Skjold
d0621e98cd Fixed blank webpage 2024-05-30 14:07:45 +02:00
Gunnar Skjold
202d57843c Iskra case fix? 2024-05-30 13:28:50 +02:00
Gunnar Skjold
770d662f2c Changes to allow interaction with cloud service 2024-05-30 09:46:45 +02:00
Gunnar Skjold
da1d5993f4 Merge pull request #796 from devdems/main
Add Slovenia
2024-05-23 23:34:06 +02:00
Gunnar Skjold
7ad97daf86 Some cleanup 2024-05-23 22:20:01 +02:00
Gunnar Skjold
3b155d78b1 Removed som debugging 2024-05-23 21:58:17 +02:00
Gunnar Skjold
37a1e3b93e Another iskra special case 2024-05-23 20:57:32 +02:00
Gunnar Skjold
846cf85331 Use export price for export calculations 2024-05-23 20:33:13 +02:00
Gunnar Skjold
a1a6953521 Use export price for export cost calculations 2024-05-23 20:21:56 +02:00
Gunnar Skjold
a137316cec Added voltage check for all Pow* devices 2024-05-23 19:40:28 +02:00
Gunnar Skjold
faa468b287 Fixed loading order of json and when to display price graph 2024-05-23 19:12:38 +02:00
Gunnar Skjold
703c68a2cf Fixed autodetect 2024-05-23 18:58:20 +02:00
Gunnar Skjold
b6168a0082 Fixed 404 2024-05-23 17:35:17 +02:00
Gunnar Skjold
38ec99f2ee Move price elements 2024-05-23 17:34:26 +02:00
Gunnar Skjold
22f8349f2f Fixed bugs after testing 2024-05-23 17:13:32 +02:00
Gunnar Skjold
d98a021f39 Edit day and month data 2024-05-23 15:17:19 +02:00
Gunnar Skjold
77d899fe0a Fixed month in clock 2024-05-23 14:06:42 +02:00
Gunnar Skjold
c03bfcbcd7 Auto change buffer size based on baud rate when autodetect 2024-05-23 14:03:16 +02:00
Gunnar Skjold
f3732674b0 Fixed autodetect and enabled for Pow-K (To handle when configured as P1) 2024-05-23 13:59:16 +02:00
devdems
5926ddfaf9 Update ConfigurationPanel.svelte
Add Slovenia
2024-05-21 16:07:20 +02:00
Gunnar Skjold
99e341e582 Changed buffer size defaults and some null terminator issues on json mqtt 2024-05-01 07:38:30 +02:00
Gunnar Skjold
05506cdc9f Fixed ESP8266 build issue 2024-04-21 10:35:30 +02:00
Gunnar Skjold
3f1861deda MQTT on interval 2024-04-21 10:21:39 +02:00
Gunnar Skjold
efacbd4b31 Code restructuring 2024-04-21 08:43:59 +02:00
Gunnar Skjold
beaaa191e8 Color fix 2024-04-20 13:08:39 +02:00
Gunnar Skjold
43d49f21a3 Changed GPIO dropdowns 2024-04-20 10:51:27 +02:00
Gunnar Skjold
95c495b773 Some changes for cloud service 2024-04-20 09:13:41 +02:00
Gunnar Skjold
68c680debf Set TX pin low if passive communicator 2024-04-19 14:51:27 +02:00
Gunnar Skjold
fec6cc7612 Updated HA state class on realtime sensors 2024-04-19 08:48:57 +02:00
Gunnar Skjold
dc3cea80b6 Fixed HA state class on realtime sensors 2024-04-15 19:54:40 +02:00
Gunnar Skjold
ce67ef2bea Show current export price in export gauge 2024-04-14 14:47:53 +02:00
Gunnar Skjold
3a980fac4c Fixed price config 2024-04-14 14:20:46 +02:00
Gunnar Skjold
77873f4a38 Fixed mixup of last month cost and kwh 2024-04-14 13:33:11 +02:00
Gunnar Skjold
d9d384ea02 Fixed code 2024-04-14 13:30:46 +02:00
Gunnar Skjold
16fb1ea87c Fixed context bug 2024-04-14 13:24:20 +02:00
Gunnar Skjold
c74e719327 Fixed ESP8266 build issue 2024-04-13 11:38:03 +02:00
Gunnar Skjold
8c8e14f60c Some changes for cloud 2024-04-13 11:29:56 +02:00
Gunnar Skjold
3b93897a8e Added new headers to upgrade request 2024-04-13 10:19:08 +02:00
Gunnar Skjold
e080c7d535 Fixed static IP 2024-04-11 22:08:58 +02:00
Gunnar Skjold
64ea8c4888 Fixed static IP 2024-04-10 20:44:05 +02:00
Gunnar Skjold
e7ae24b26f Fixed accidental clearing more than just GPIO 2024-04-10 20:36:43 +02:00
Gunnar Skjold
84ff999c4c Fixed missing config tile 2024-04-09 21:57:44 +02:00
Gunnar Skjold
71e7e779da Some adjustments to GUI 2024-04-09 20:52:57 +02:00
Gunnar Skjold
99904f9097 Fixed stuck value 2024-04-09 18:12:23 +02:00
Gunnar Skjold
89015191de Improved MQTT stability and changed some defaults 2024-04-09 17:16:12 +02:00
Gunnar Skjold
a7d3382947 Fixed missing L2 2024-04-08 14:59:53 +02:00
Gunnar Skjold
abef32c73c Fixed some defaults 2024-04-07 12:01:05 +02:00
Gunnar Skjold
b52c580f6f Merge branch 'main' of github.com:UtilitechAS/amsreader-firmware 2024-04-07 11:50:02 +02:00
Gunnar Skjold
429f0ba699 Merge pull request #761 from avandorp/avandorp-ha-uptime-device-class
Use correct home assistant device class for uptime
2024-04-07 11:45:02 +02:00
Gunnar Skjold
d918a593ce Removed connect timeout from MQTT 2024-04-07 11:31:21 +02:00
Arthur van Dorp
fb410ecfef Use correct home assistant device class for uptime 2024-04-06 21:43:06 +02:00
Gunnar Skjold
ee6c249370 Cloud updates 2024-04-06 12:53:36 +02:00
Gunnar Skjold
05b340738e Make realtime plot work for production 2024-04-06 12:53:17 +02:00
Gunnar Skjold
86663f53f6 Some adjustments and debugging for realtime plot 2024-04-06 12:16:08 +02:00
Gunnar Skjold
bd11dee1e5 White numbers on graph in dark mode 2024-04-06 11:44:41 +02:00
Gunnar Skjold
29c8011cda Changes for cloud 2024-04-06 11:34:04 +02:00
Gunnar Skjold
4884d3a0e2 Merge pull request #757 from UtilitechAS/dev-v2.3
Dev v2.3
2024-04-05 21:55:49 +02:00
Gunnar Skjold
6079b17e3d Remove unnecessary style 2024-04-05 21:33:57 +02:00
Gunnar Skjold
d069d4e102 Remove unknown headers 2024-04-05 21:23:44 +02:00
Gunnar Skjold
e1162ad970 Fixed 8266 build 2024-04-05 21:01:16 +02:00
Gunnar Skjold
71be381e1a Fixed error 2024-04-05 20:54:08 +02:00
Gunnar Skjold
a19901b58f Cloud config in config print 2024-04-05 20:16:43 +02:00
Gunnar Skjold
361d3a38ed Changed LED behaviour when in AP mode 2024-04-04 19:53:44 +02:00
Gunnar Skjold
c22bca3130 Fixed config export and import 2024-04-04 19:31:16 +02:00
Gunnar Skjold
2bfd863882 Added ESP32-S3 build 2024-04-04 16:12:27 +02:00
Gunnar Skjold
17c87c40df Set some defaults 2024-04-04 15:46:26 +02:00
Gunnar Skjold
10b76ab2e6 Adjustments 2024-04-04 15:26:13 +02:00
Gunnar Skjold
15c3b2067c Fixed removal of price config row 2024-04-04 14:56:55 +02:00
Gunnar Skjold
e366f10632 Removed logging 2024-04-04 14:40:59 +02:00
Gunnar Skjold
fc1850195b Adjustments to realtime plot 2024-04-04 14:31:33 +02:00
Gunnar Skjold
b85d11b1f3 Merge branch 'main' into dev-v2.3 2024-04-04 13:38:14 +02:00
Gunnar Skjold
fff6d1b068 Temporarily removed KMP 2024-04-04 13:37:17 +02:00
Gunnar Skjold
bdb0bf3df0 Merge pull request #742 from avandorp/patch-1
Add uptime to system sensors for home assistant
2024-04-04 10:03:59 +02:00
Gunnar Skjold
c6e111c347 Merge pull request #747 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/follow-redirects-1.15.6
Bump follow-redirects from 1.15.4 to 1.15.6 in /lib/SvelteUi/app
2024-04-04 10:03:32 +02:00
Gunnar Skjold
063b960fc2 Merge pull request #755 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/vite-3.2.10
Bump vite from 3.2.8 to 3.2.10 in /lib/SvelteUi/app
2024-04-04 10:03:21 +02:00
Gunnar Skjold
95967aaf59 Fixed debug on HAN error 2024-04-04 09:35:39 +02:00
dependabot[bot]
34e103c1d8 Bump vite from 3.2.8 to 3.2.10 in /lib/SvelteUi/app
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.2.8 to 3.2.10.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v3.2.10/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.2.10/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 18:48:26 +00:00
Gunnar Skjold
bdd2ec10cd Adjusted x-labels on realtime plot 2024-04-02 13:01:00 +02:00
Gunnar Skjold
37f90cb267 White logo and some adjustments 2024-04-02 12:57:08 +02:00
Gunnar Skjold
db90dbfd8f Adjustments to realtime plot 2024-04-02 12:05:29 +02:00
Gunnar Skjold
61d23ab453 Fixed LNG 0 values 2024-04-02 11:43:45 +02:00
Gunnar Skjold
864cd1fbbb Fixed breaking data 2024-04-02 11:35:37 +02:00
Gunnar Skjold
517869f43d GUI improvements after testign 2024-04-02 10:54:40 +02:00
Gunnar Skjold
766849d6fc Adjustment 2024-03-26 13:39:29 +01:00
Gunnar Skjold
67e6a51a8a Force board profiles on boot 2024-03-26 10:40:56 +01:00
Gunnar Skjold
4093b64dd0 Fixed 8266 build 2024-03-26 10:40:37 +01:00
Gunnar Skjold
4068f127ba Color adjustments 2024-03-25 10:16:33 +01:00
Gunnar Skjold
71abe188ca MQTT JSON classic/multi topic/flat 2024-03-23 11:20:39 +01:00
Gunnar Skjold
5022f42692 New strategy for updating data storage 2024-03-23 09:12:58 +01:00
Gunnar Skjold
6c1401d042 Fixed data loading 2024-03-21 20:49:32 +01:00
Gunnar Skjold
7041a29894 Natural rounding 2024-03-21 20:37:06 +01:00
Gunnar Skjold
e292f79421 Roaming support 2024-03-21 20:27:11 +01:00
Gunnar Skjold
d7ce808321 Added label comments for ethernet boards 2024-03-21 14:25:05 +01:00
Gunnar Skjold
210ddad515 Show tariff when using NOx with support 2024-03-21 14:21:39 +01:00
Gunnar Skjold
449257ae3f Update meter config when changed 2024-03-21 14:18:35 +01:00
Gunnar Skjold
def9867990 Changed calculation behaviour 2024-03-21 13:49:16 +01:00
Gunnar Skjold
26a63e30e0 Increased range for counters in data storage 2024-03-21 13:39:14 +01:00
Gunnar Skjold
9efdf1daa5 Changed variable type 2024-03-21 09:13:13 +01:00
Gunnar Skjold
f2e7879974 Optimized some JSONs 2024-03-21 08:57:56 +01:00
Gunnar Skjold
b8ac1a9565 Removed some debug 2024-03-20 19:30:38 +01:00
Gunnar Skjold
14eb27e0d9 crc 2024-03-19 21:50:09 +01:00
Gunnar Skjold
f68666bd4a crc 2024-03-19 11:31:14 +01:00
Gunnar Skjold
2087c287bf Fixed 8266 build 2024-03-18 17:05:09 +01:00
Gunnar Skjold
d85da6c9cb Added more baud rates 2024-03-18 17:04:31 +01:00
Gunnar Skjold
6a99b0a6a7 8N2 2024-03-17 09:50:49 +01:00
Gunnar Skjold
dfca5e37dc CRC and Pow board profile 2024-03-17 09:14:02 +01:00
dependabot[bot]
1f74f1e6b2 Bump follow-redirects from 1.15.4 to 1.15.6 in /lib/SvelteUi/app
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 23:22:24 +00:00
Gunnar Skjold
bdba6a0254 Support TX pin 2024-03-16 20:32:45 +01:00
Gunnar Skjold
7c4c096e94 KMP 2024-03-15 18:26:50 +01:00
Gunnar Skjold
1ab5a4d2cb Visual updates 2024-03-15 18:26:30 +01:00
Gunnar Skjold
4bd2b5230b Updated unit scaling 2024-03-15 18:26:13 +01:00
Gunnar Skjold
c0945abfa0 Timeout on MQTT 2024-03-15 18:23:18 +01:00
Gunnar Skjold
d94f27949c Dependency update 2024-03-15 18:22:32 +01:00
Gunnar Skjold
6a427b513d Added sensors to LNG format 2024-03-15 18:21:17 +01:00
Gunnar Skjold
47a7d4e13b KMP headers 2024-03-10 09:03:06 +01:00
Gunnar Skjold
263ce9749a Prep for KMP 2024-03-06 19:47:57 +01:00
Gunnar Skjold
13d0521984 Prep for KMP 2024-03-06 19:44:44 +01:00
Gunnar Skjold
e3511f0ee2 Fixed HDLC partitioning 2024-03-04 09:08:31 +01:00
Gunnar Skjold
f4de3e6178 Fixed language switch problem 2024-03-02 09:03:45 +01:00
Gunnar Skjold
2bb5361b22 Testing logo change 2024-03-02 08:33:28 +01:00
Gunnar Skjold
9caec71e1c Support HDLC segmentation 2024-03-02 08:33:19 +01:00
Gunnar Skjold
7813d3ea08 Fixed ESP32 UART2 2024-03-02 07:51:11 +01:00
Arthur van Dorp
73ed4f87e4 Add uptime to system sensors for home assistant
Uptime is already part of the MQTT messages, but not sensors indicated to home assistant. Useful for troubleshooting purposes.
2024-03-01 18:41:38 +01:00
Gunnar Skjold
c06dabba51 Adjustments for high scale wattage 2024-02-29 15:41:34 +01:00
Gunnar Skjold
23cbcf9a0a Adjustments for v2.3 testing 2024-02-29 14:20:51 +01:00
Gunnar Skjold
785cefabb5 Merge branch 'main' into dev-v2.3 2024-02-29 09:06:47 +01:00
Gunnar Skjold
aa6283de5b Merge branch 'main' of github.com:UtilitechAS/amsreader-firmware 2024-02-29 09:00:23 +01:00
Gunnar Skjold
2b563c7230 Fixed error blink after 49.7 days 2024-02-29 08:54:42 +01:00
Gunnar Skjold
45d0fa2bfa Fixed code 2024-02-29 08:53:47 +01:00
ArnieO
09fdd2dc22 Update LICENSE
Correct two cases of garbled text where there should have been apostrophe sign.
2024-02-15 12:29:29 +01:00
Gunnar Skjold
ab2086f909 Fixed price save 2024-02-15 08:40:08 +01:00
Gunnar Skjold
16d1ee9761 Fixed IPv6 tick 2024-02-15 08:11:38 +01:00
Gunnar Skjold
348488af72 Stripping some debugging 2024-02-14 20:06:18 +01:00
Gunnar Skjold
9103a5b730 Adjustments to WDT 2024-02-13 20:54:44 +01:00
Gunnar Skjold
830e22d182 IPv6 support 2024-01-31 20:58:46 +01:00
Gunnar Skjold
21bff28aee Smart config 2024-01-26 20:17:13 +01:00
Gunnar Skjold
e9472513d2 MQTT LWT 2024-01-26 19:47:28 +01:00
Gunnar Skjold
b6e69ca5d0 Merge pull request #711 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/follow-redirects-1.15.4
Bump follow-redirects from 1.15.2 to 1.15.4 in /lib/SvelteUi/app
2024-01-26 19:39:52 +01:00
Gunnar Skjold
d28ef99cee Merge pull request #719 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/vite-3.2.8
Bump vite from 3.2.7 to 3.2.8 in /lib/SvelteUi/app
2024-01-26 19:39:37 +01:00
Gunnar Skjold
3b531fab5b Merge branch 'main' into dev-v2.3 2024-01-26 19:29:58 +01:00
Gunnar Skjold
e575ab755c Only authenticate GCM if auth key available 2024-01-26 19:21:27 +01:00
Gunnar Skjold
1ba452213d Removed debugging 2024-01-26 19:15:56 +01:00
Gunnar Skjold
a2c20575c8 Pulse meter 2024-01-26 18:23:40 +01:00
Gunnar Skjold
9a767d9ac4 Pulse meter 2024-01-26 18:21:51 +01:00
Gunnar Skjold
52bc2f6a9b Special price regions for NO with government support 2024-01-25 18:03:23 +01:00
Gunnar Skjold
cfa4502af8 Some changes to make firmware fit on all platforms 2024-01-25 12:27:26 +01:00
Gunnar Skjold
6fe308b5f6 Platform update 2024-01-23 21:06:20 +01:00
Gunnar Skjold
80be1ceef1 Subtract price 2024-01-23 20:41:56 +01:00
Gunnar Skjold
bfa1a65dfd Some changes 2024-01-20 16:25:28 +01:00
Gunnar Skjold
afcc542e25 Fixed build errors 2024-01-20 13:49:47 +01:00
Gunnar Skjold
f334847e82 Fixed debug 2024-01-20 13:47:57 +01:00
Gunnar Skjold
9eb56beb6c GUI translations 2024-01-20 13:47:42 +01:00
dependabot[bot]
87c565763a Bump vite from 3.2.7 to 3.2.8 in /lib/SvelteUi/app
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.2.7 to 3.2.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v3.2.8/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.2.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 23:40:56 +00:00
Gunnar Skjold
87ddf00afa Support for pulse meter 2024-01-18 07:57:56 +01:00
Gunnar Skjold
e7ca408baa Fixed host and ip change issues 2024-01-11 14:03:20 +01:00
dependabot[bot]
1d5c45c43c Bump follow-redirects from 1.15.2 to 1.15.4 in /lib/SvelteUi/app
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 20:02:12 +00:00
Gunnar Skjold
183cb1e2b1 Adjustments after changing type of phase power 2024-01-07 11:04:43 +01:00
Gunnar Skjold
768dc97c9c Per phase power and power factor graphs 2024-01-07 10:58:11 +01:00
Gunnar Skjold
fe3f100edb Merge branch 'main' into dev-v2.3 2024-01-06 20:12:27 +01:00
Gunnar Skjold
8a59fcb89a Adaptations for new sensors 2024-01-06 20:10:33 +01:00
Gunnar Skjold
333169ef8f Merge pull request #613 from cnrd/phase-accumlation
Added support for getting accumulated energy for phases (Kamstrup)
2024-01-06 19:53:10 +01:00
Gunnar Skjold
d497aa91f4 Fixed month/day limitations on prices 2024-01-06 19:34:50 +01:00
Gunnar Skjold
b951fe9099 Fixed 8266 build 2024-01-06 19:11:22 +01:00
Gunnar Skjold
48ab87ba50 Support start and end date on prices 2024-01-06 18:58:50 +01:00
Gunnar Skjold
bad107926c Fixed cloud bugs 2024-01-06 10:05:44 +01:00
Gunnar Skjold
6012c19fc4 Updated cloud connector 2024-01-06 09:52:35 +01:00
Gunnar Skjold
460238e99d Support changing context path to accomodate being behind a proxy 2023-12-26 10:10:58 +01:00
Gunnar Skjold
64870cf9ca Adjustments to export plot color 2023-12-25 19:43:25 +01:00
Gunnar Skjold
cd446f8cb8 Some adjustments to realtime plot 2023-12-25 19:36:55 +01:00
Gunnar Skjold
f68a3a321a Modifications to dark mode 2023-12-25 19:25:43 +01:00
Gunnar Skjold
9ff6cf355f Fixing bugs 2023-12-25 18:36:35 +01:00
Gunnar Skjold
453492b5eb Fixed percent price 2023-12-25 14:52:22 +01:00
Gunnar Skjold
f11263a48f Fixed link color 2023-12-25 14:48:46 +01:00
Gunnar Skjold
fffd95dcf2 Price config 2023-12-25 14:47:28 +01:00
Gunnar Skjold
fa87cfaa61 Fixed build errors 2023-12-25 07:44:42 +01:00
Gunnar Skjold
50de5abf93 Merge branch 'main' into dev-v2.3 2023-12-25 07:41:01 +01:00
Gunnar Skjold
b1294fdd86 Run default device tests 2023-12-24 11:33:44 +01:00
Gunnar Skjold
ce2a67a284 Confirm firmware version 2023-12-24 10:18:35 +01:00
Gunnar Skjold
39e42d5333 Upload firmware to target 2023-12-24 09:13:21 +01:00
Gunnar Skjold
7503f9a077 Upload firmware to target 2023-12-24 09:12:21 +01:00
Gunnar Skjold
651f72489c Fixed workflow file 2023-12-24 08:47:00 +01:00
Gunnar Skjold
3596a87ff9 Using internal python 2023-12-24 08:15:38 +01:00
Gunnar Skjold
5c1acf5c45 Changed python on build to 3.11 2023-12-24 08:14:21 +01:00
Gunnar Skjold
c46b7972d0 Changes to workflow 2023-12-24 08:01:08 +01:00
Gunnar Skjold
df26c91a3b Initial actions-driven test environment 2023-12-24 07:59:05 +01:00
Gunnar Skjold
7a70bd7511 Some adjustments to MQTT 2023-12-24 07:10:58 +01:00
Gunnar Skjold
c583c2b44a Fixed mqtt changed flag 2023-12-24 07:03:05 +01:00
Gunnar Skjold
4c28d512a1 Changed mqtt disconnect to avoid exception 2023-12-24 06:59:40 +01:00
Gunnar Skjold
1775d0abce Fixed bug 2023-12-24 06:30:36 +01:00
Gunnar Skjold
8e65f1fe14 Fixed bug 2023-12-24 06:27:24 +01:00
Gunnar Skjold
c1d1bf6bb5 Fixed bug 2023-12-23 21:52:19 +01:00
Gunnar Skjold
fc09ab5cc9 Slight update on how missing I2 is shown 2023-12-23 18:39:09 +01:00
Gunnar Skjold
6e3a6f71e2 Fixed buffer issues and ESP8266 HA reboot issue" 2023-12-23 18:32:27 +01:00
Gunnar Skjold
557ba659d5 Make sure MQTT config is updated for current connection if changed 2023-12-22 19:47:00 +01:00
Gunnar Skjold
32ad71bba6 Fixed checking "Clear all other configuration" 2023-12-21 15:56:30 +01:00
Gunnar Skjold
8816097bca Fixed receive buffer for large payloads 2023-12-21 15:25:23 +01:00
Gunnar Skjold
378b67a5bd Show when I2 is unavailable 2023-12-21 14:50:20 +01:00
Gunnar Skjold
859868c99b Use multipliers with DSMR 2023-12-21 14:23:36 +01:00
Gunnar Skjold
d7ca741c92 Some changes for HA 2023-12-21 14:12:46 +01:00
Gunnar Skjold
d49753ed33 Resend sensors to HA if online status received 2023-12-15 20:37:25 +01:00
Gunnar Skjold
2ae15ac13a Expire time on HA sensors 2023-12-15 20:19:49 +01:00
Gunnar Skjold
00278659f8 Resend sensors to HA if online status received 2023-12-15 20:03:24 +01:00
Gunnar Skjold
0c1525b018 Fixed ESP8266 for previous commit 2023-12-15 19:04:39 +01:00
Gunnar Skjold
ed778441d5 Ability to load cert/key for mqtt without ca 2023-12-15 18:50:08 +01:00
Gunnar Skjold
c43c07386a Fixed some minuor issues 2023-12-10 18:01:57 +01:00
Gunnar Skjold
91958f5464 Show AP IP if no connection handler 2023-12-10 17:31:39 +01:00
Gunnar Skjold
194905237b Added ESP32S3 2023-12-10 17:27:16 +01:00
Gunnar Skjold
f3805ad111 Fixed build issue 2023-12-10 17:05:09 +01:00
Gunnar Skjold
0f22fd561e Improved ethernet connection 2023-12-10 16:56:13 +01:00
Gunnar Skjold
ee462ec468 Merge branch 'main' into dev-v2.3 2023-12-10 09:49:22 +01:00
Gunnar Skjold
ed899440ed Typ-o fix 2023-12-10 09:17:44 +01:00
Gunnar Skjold
8e9e60ec03 Fixed build 2023-12-04 14:01:24 +01:00
Gunnar Skjold
a121fbd28e Updated build 2023-12-04 13:48:45 +01:00
Gunnar Skjold
d823d747a5 Updated build 2023-12-04 13:42:53 +01:00
Gunnar Skjold
c1b35b8ce0 Some changes before release 2023-12-04 13:40:58 +01:00
Gunnar Skjold
fd996f44ba URL for price sources 2023-12-04 13:18:12 +01:00
Gunnar Skjold
0606c47367 Merge branch 'main' of github.com:UtilitechAS/amsreader-firmware 2023-12-04 13:00:10 +01:00
Gunnar Skjold
b6cd55719c Added cHF as currency 2023-12-04 12:58:08 +01:00
Gunnar Skjold
b79f48d6ac Merge pull request #682 from UtilitechAS/license_migration
Migrating to Fair Source license
2023-12-04 12:50:57 +01:00
Gunnar Skjold
ad342d2b7a Changed L2 calculation formula 2023-12-04 12:46:17 +01:00
Gunnar Skjold
8eb7136981 Additional delay for exchange rate fetch 2023-12-04 12:31:21 +01:00
Gunnar Skjold
1c5303e771 Default multiplier 1.0 2023-12-04 12:20:59 +01:00
Gunnar Skjold
9efc19090e Improved feedback for upgrade error 2023-12-04 12:17:07 +01:00
Gunnar Skjold
a30cd76354 Indicator for estimated I2. Also fix on charts 2023-12-04 11:59:18 +01:00
Gunnar Skjold
ddd08e25df Keep last reason for reboot 2023-12-03 21:38:20 +01:00
Gunnar Skjold
09d255d656 Fix 2023-12-03 21:14:26 +01:00
Gunnar Skjold
7239f295e8 Fixed volt and amp for some browsers 2023-12-03 21:13:48 +01:00
Gunnar Skjold
111bd70763 Merge branch 'main' into dev-v2.3 2023-11-25 10:46:46 +01:00
Gunnar Skjold
0e6abd0f18 Removing option for auto reboot on wifi error 2023-11-25 10:31:21 +01:00
Gunnar Skjold
2b0626b203 Enabled tariff thresholds for sweden 2023-11-25 10:18:49 +01:00
Gunnar Skjold
afa013ca03 Renamed EntsoeApi to PriceService 2023-11-25 10:04:21 +01:00
Gunnar Skjold
6d4d901dba Migrating to new license 2023-11-25 09:11:13 +01:00
Gunnar Skjold
9c66a47464 Updates for MQTT handler 2023-11-25 09:08:56 +01:00
Gunnar Skjold
5dc405f1da Trying to fix barchart 2023-11-25 09:05:45 +01:00
Gunnar Skjold
a2977180c1 Preserve old exchange rate if new cannot be fetched 2023-11-25 09:05:30 +01:00
Gunnar Skjold
725af5150d Adjustments to GUI 2023-11-25 09:05:17 +01:00
Gunnar Skjold
f734cb2179 SSDP 2023-11-25 09:04:33 +01:00
Gunnar Skjold
8a0c0298ab Some adjustments for fetching exchange rate 2023-11-25 09:04:06 +01:00
Gunnar Skjold
56b6a720c9 Some changes for DLMS 2023-11-16 20:43:47 +01:00
Gunnar Skjold
76d76844a9 Merge branch 'master' into dev-v2.3 2023-11-16 18:35:50 +01:00
Gunnar Skjold
ae82914795 Initial changes for v2.3 2023-11-16 18:21:56 +01:00
Gunnar Skjold
0fa178a617 Merge branch 'mqtt_changes' 2023-11-16 18:20:50 +01:00
Gunnar Skjold
8cada69aaf Migrating to new license 2023-11-16 17:59:33 +01:00
Gunnar Skjold
6bdd7855a7 8266 2023-11-08 20:47:55 +01:00
Gunnar Skjold
faafc5a993 Fix 8266 2023-11-08 20:41:05 +01:00
Gunnar Skjold
bbaf96f532 Merge branch 'master' into mqtt_changes 2023-11-08 20:34:39 +01:00
Gunnar Skjold
133c8bc967 Limit buffer size on ESP8266 to avoid reboots 2023-11-08 18:52:27 +01:00
Gunnar Skjold
f04e15f5d0 Limit buffer size on ESP8266 to avoid reboots 2023-11-08 18:40:37 +01:00
Gunnar Skjold
445973f9ce Some updates for price fetching 2023-11-05 10:24:42 +01:00
Gunnar Skjold
d6af7374c2 Merge branch 'master' into mqtt_changes 2023-11-03 19:57:17 +01:00
Gunnar Skjold
63c3d31552 Increased MQTT write buffer size 2023-11-01 21:53:56 +01:00
Gunnar Skjold
d82e705875 Ensure that the default 1.0 multiplier for currency is not used 2023-11-01 21:48:44 +01:00
Gunnar Skjold
206c90ca46 Fixed price display for 25hr days 2023-10-29 09:47:58 +01:00
Gunnar Skjold
92ceb316cb Changes to energyspeedometer QT 2023-10-28 08:30:15 +02:00
Gunnar Skjold
a6d8857655 Fixed number of decimal points on MQTT payload 2023-10-28 08:20:39 +02:00
Gunnar Skjold
98858315de Changes for Energy Speedometer connection 2023-10-20 14:33:56 +02:00
Gunnar Skjold
1ceffd0bc9 Changes for Energy Speedometer connection 2023-10-20 13:26:38 +02:00
Gunnar Skjold
f7cb022e3e Merge branch 'master' into mqtt_changes 2023-10-20 08:13:52 +02:00
Gunnar Skjold
4634050700 Ability to clear fixed price 2023-10-15 15:47:31 +02:00
Gunnar Skjold
60fff4533a 11b mode for 8266 2023-10-15 15:47:05 +02:00
Gunnar Skjold
6a0921a445 Added option to disable 802.11b for ESP8266 2023-10-14 08:44:55 +02:00
Gunnar Skjold
2a44f89a7b Disabling voltage check for wifi 2023-10-14 08:20:11 +02:00
Gunnar Skjold
7b025ddb01 Moved MQTT connection into handler 2023-10-14 08:07:56 +02:00
Gunnar Skjold
f9b4680b9c Improved MQTT SSL 2023-10-12 18:44:40 +02:00
Gunnar Skjold
2a10096306 Merge pull request #652 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/postcss-8.4.31
Bump postcss from 8.4.24 to 8.4.31 in /lib/SvelteUi/app
2023-10-11 20:24:25 +02:00
Gunnar Skjold
17d8d325c0 Added support for MQTTs without CA validation and public/private key 2023-10-11 20:23:53 +02:00
Gunnar Skjold
88ddc6ea15 Fixed runaway price update 2023-10-10 21:08:37 +02:00
Gunnar Skjold
3af19c9b15 Minor adjustment to autodisable of 802.11b 2023-10-10 20:54:13 +02:00
dependabot[bot]
2d6b523e37 Bump postcss from 8.4.24 to 8.4.31 in /lib/SvelteUi/app
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.24 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.24...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-07 20:36:22 +00:00
Gunnar Skjold
28a6a62907 Fixed issue where price graph disappears 2023-10-04 07:01:13 +02:00
Gunnar Skjold
be9b7a16e4 Removed 802.11b tick from ESP8266 2023-09-26 20:53:14 +02:00
Gunnar Skjold
81dedcbf6e Fix for negative calculated L2 current 2023-09-26 20:40:46 +02:00
Gunnar Skjold
248660e818 Auto disable 802.11b for BUS powered devices on first boot if possible 2023-09-26 20:32:54 +02:00
Gunnar Skjold
1a265492dd Fixed realtime data update 2023-09-26 20:14:08 +02:00
Gunnar Skjold
7b0c2eea33 Fixed realtime data update 2023-09-26 20:12:24 +02:00
Gunnar Skjold
f459b0af14 Experimenting with different color for export 2023-09-24 07:41:14 +02:00
Gunnar Skjold
545be710ba Smarter price fetch from GUI 2023-09-23 20:16:30 +02:00
Gunnar Skjold
fc01d7fd56 Removed unnecessary ESP32 check 2023-09-23 14:23:18 +02:00
Gunnar Skjold
954984d8ee Fixed build error 2023-09-23 14:12:48 +02:00
Gunnar Skjold
dd47523fd0 Updated gui dist 2023-09-23 14:05:22 +02:00
Gunnar Skjold
9b9d535dd0 Merge pull request #606 from dbeinder/use11b
Add option to disable 802.11b data rates
2023-09-23 14:04:01 +02:00
Gunnar Skjold
e2ff7613b6 Merge branch 'master' into use11b 2023-09-23 14:03:55 +02:00
Gunnar Skjold
b9d6f16529 Improved voltage check for pow-u 2023-09-21 09:27:18 +02:00
Gunnar Skjold
96c9c4c3a2 Possible fix for overflow situation 2023-09-20 20:30:15 +02:00
Gunnar Skjold
3229ae237e Fix for tariff peak overwrite 2023-09-20 20:29:54 +02:00
Gunnar Skjold
ecea4977b1 Updated ttl on web resources 2023-09-13 19:52:23 +02:00
Gunnar Skjold
a3551316ba Changed from slow to normal mem for noinit attr 2023-09-13 19:48:36 +02:00
Gunnar Skjold
03edc65a7a Preserve realtime data on reboot. Also disconnect WiFi on Pow-U if power drops too low 2023-09-12 20:50:23 +02:00
Gunnar Skjold
40215ee746 Fixed uptime rollower in MQTT raw mode 2023-09-12 18:58:25 +02:00
Gunnar Skjold
b76efc42db Fixed peak sensor for HA 2023-09-11 08:27:41 +02:00
Gunnar Skjold
94debd4233 Added CPU frequency to status page 2023-09-10 20:51:21 +02:00
Gunnar Skjold
dfbfbab531 Changed wifi disconnect behaviour 2023-09-10 20:38:07 +02:00
Gunnar Skjold
b91dc5a17d Fixed issue where downscaling caused data to be lost 2023-09-05 13:24:10 +02:00
Gunnar Skjold
67ca1fed01 Added a conditional vcc pin to s2 mini profile 2023-09-05 12:15:18 +02:00
Gunnar Skjold
baf8dc8310 De-centered zero line in graphs 2023-09-05 11:40:10 +02:00
Gunnar Skjold
6b0ea0abc0 Store current price in HA LTS 2023-09-05 10:54:31 +02:00
Gunnar Skjold
bcea9698dd Apply previous state when receiving only accumulated values from meter 2023-09-05 08:57:15 +02:00
Gunnar Skjold
b435f0eaaf Previously uncommited change 2023-08-31 09:32:21 +02:00
Gunnar Skjold
61c5500fdd Fixed red HAN after 49.7 days 2023-08-31 09:18:48 +02:00
Gunnar Skjold
719ceb610c Fixed realtime export counter 2023-08-24 07:49:09 +02:00
Gunnar Skjold
fc42d4391b Fixed ENTSO-E price fetching around midnight 2023-08-18 09:20:41 +02:00
Gunnar Skjold
53afd37d08 Do not show serial break 2023-08-18 09:09:39 +02:00
Gunnar Skjold
103fe5c457 Fixed alignment on iskra 2023-08-01 08:45:15 +02:00
Gunnar Skjold
494cb55ef4 Added previously unadded change for date correction in gui 2023-07-31 08:54:35 +02:00
Gunnar Skjold
0a08767c9b Iskra proprietary fix 2023-07-31 08:53:59 +02:00
Gunnar Skjold
49fd79f367 Fixed fetching prices just after midnight 2023-07-30 16:32:54 +02:00
Gunnar Skjold
1ba168b268 Added frame data 2023-07-30 16:27:51 +02:00
Gunnar Skjold
c765746c62 Fixed clock issue after midnight 2023-07-30 16:27:37 +02:00
Gunnar Skjold
e8016025d8 Added special Iskra data 2023-07-30 16:12:44 +02:00
Conrad Juhl Andersen
7cbcbd4bc8 Added support for getting accumulated energy for phases (Kamstrup) 2023-07-20 13:04:27 +02:00
Gunnar Skjold
4a3d884526 Disable TX pin on HAN port 2023-07-11 16:43:06 +02:00
Gunnar Skjold
9c25eaff55 Merge pull request #607 from dbeinder/ui_compress
Pre-compress index JS/CSS with gzip
2023-07-09 20:39:20 +02:00
david-beinder
76f09b306a Pre-compress index JS/CSS with gzip 2023-07-06 01:20:53 +02:00
david-beinder
7c5a1b1fb8 Add option to disable 802.11b data rates 2023-07-05 23:49:53 +02:00
ArnieO
84fe477783 Add files via upload
Mottatt Omnia E-meter User guide fra Kamstrup.
2023-07-05 14:03:36 +02:00
Gunnar Skjold
4b34df091c Removed handshake timeout as reason for AP mode 2023-07-03 15:46:12 +02:00
Gunnar Skjold
7aa7f6adc6 Fixed display of cost when all turns negative 2023-07-03 08:58:32 +02:00
Gunnar Skjold
c462b3bb00 Fixed clock skew on graphs around midnight 2023-07-02 14:51:57 +02:00
Gunnar Skjold
4f90954084 Fixed scaling issue on graphs 2023-07-02 14:03:06 +02:00
Gunnar Skjold
1132db9bfa Only switch to AP mode on WiFi connection error if user have never visited GUI (first setup) 2023-07-02 13:57:22 +02:00
Gunnar Skjold
9d09c619e4 Removed unused label 2023-07-02 13:55:46 +02:00
Gunnar Skjold
78891e8d33 Save buffer size 2023-07-02 13:54:04 +02:00
Gunnar Skjold
e629bb0d68 Configurable buffer size and patch of GUI dependencies 2023-07-02 13:43:45 +02:00
Gunnar Skjold
ca1c237776 Swap to AP mode if WiFi psk is wrong 2023-06-11 09:45:17 +02:00
Gunnar Skjold
5b6b9879b1 Switch to subunit of currency if price is low 2023-06-11 08:54:03 +02:00
Gunnar Skjold
06a0366762 Fixed negative month cost in realtime calculation 2023-06-11 08:20:09 +02:00
Gunnar Skjold
538624b6eb Fixed wrong date 2023-06-11 08:08:33 +02:00
Gunnar Skjold
4496b958ff Fixed overlapping labels in graph 2023-06-11 08:03:07 +02:00
Gunnar Skjold
b2a93c0b4c Changed label for monthplot 2023-06-11 07:06:03 +02:00
Gunnar Skjold
2cbe566910 Fixed mouseover label on prices for "tomorrow" 2023-06-11 06:59:07 +02:00
Gunnar Skjold
a4b07f4097 Merge branch 'master' of github.com:UtilitechAS/amsreader-firmware 2023-06-11 06:53:17 +02:00
Gunnar Skjold
f8cb9d187f Adjusted retry delay on prices 2023-06-11 06:41:46 +02:00
Gunnar Skjold
5e9fe74dd0 Merge pull request #586 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/vite-3.2.7
Bump vite from 3.0.9 to 3.2.7 in /lib/SvelteUi/app
2023-06-06 10:58:24 +02:00
dependabot[bot]
5b7b30c0d0 Bump vite from 3.0.9 to 3.2.7 in /lib/SvelteUi/app
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.0.9 to 3.2.7.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v3.2.7/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.2.7/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 02:25:27 +00:00
Gunnar Skjold
9d902c63de Fixed NPE 2023-05-22 12:51:26 +02:00
Gunnar Skjold
a57405a7a5 Fixed NaN in clock 2023-05-22 10:26:12 +02:00
Gunnar Skjold
550d32ee33 Fixed issue with new device 2023-05-22 09:55:15 +02:00
Gunnar Skjold
9f7e174c7b Updated code that fixes broken DNS on IPv6 networks 2023-05-21 13:50:05 +02:00
Gunnar Skjold
104617afd2 Use device timezone in gui 2023-05-21 12:34:00 +02:00
Gunnar Skjold
959664f61d Even more changes for negative prices 2023-05-21 12:10:00 +02:00
Gunnar Skjold
5834b07393 Adjustments to avoid dns resolving in a closed network 2023-05-20 22:03:26 +02:00
Gunnar Skjold
8dbcf2424a Hack to fix DNS on networks with IPv6 2023-05-20 21:59:18 +02:00
Gunnar Skjold
74345046b1 Adjustments for negative prices 2023-05-20 21:58:57 +02:00
Gunnar Skjold
516c80e38c Fixed negative and 0 price 2023-05-16 22:04:51 +02:00
Gunnar Skjold
17bbac8670 Updated exchange rate api call 2023-05-05 19:34:48 +02:00
Gunnar Skjold
ccee3f505d Changes after testing 2023-05-05 18:30:30 +02:00
Gunnar Skjold
48eb640838 Changes after testing 2023-05-05 18:12:26 +02:00
Gunnar Skjold
90ebe3803d More adaptations 2023-05-04 17:31:16 +02:00
Gunnar Skjold
07ff4e2b0c Added last month in realtime data. Also increased precision on realtime data 2023-05-04 14:33:14 +02:00
Gunnar Skjold
7e011a184b Added delay for stability purposes 2023-05-04 12:12:08 +02:00
Gunnar Skjold
324459df97 Reduce verbose debug 2023-05-04 12:02:16 +02:00
Gunnar Skjold
2db38835c5 Fixed errors in SVG 2023-05-04 11:58:39 +02:00
Gunnar Skjold
804e43824b Fixed data storage update 2023-05-04 11:44:22 +02:00
Gunnar Skjold
60c7cea724 Extended range for multipliers 2023-05-03 07:51:11 +02:00
Gunnar Skjold
b9fe6cab83 Improved on automatic clearing of graph 2023-05-02 14:21:58 +02:00
Gunnar Skjold
e3f41fdb4c Fixed issue introduced in previous commit 2023-05-02 14:02:40 +02:00
Gunnar Skjold
9e5cb48101 Improved update and clearing of hour/day in data storage for graphs 2023-05-02 13:39:16 +02:00
Gunnar Skjold
259d8424a3 Merge pull request #550 from dbeinder/version_lib
Speedup build
2023-05-02 10:51:26 +02:00
david-beinder
a6ae86abb8 Remove redundant 'typedef'
'typedef' is not needed in C++ and generates a warning
2023-05-02 10:48:54 +02:00
david-beinder
a23abf626b Convert Arduino sketch to C++ 2023-05-02 10:48:54 +02:00
david-beinder
849eac1c0f Move version constants into its own compile-unit
Speeds up the build by moving those constants into a separate compile-unit.
Currently, since the version header is auto regenerated on each build,
all modules that include it, also have to be recompiled every time.
2023-05-02 10:48:53 +02:00
Gunnar Skjold
13dda2bb19 Added decimals on month plot if number under 10. Also added mouse-over with better precision 2023-05-02 10:40:53 +02:00
Gunnar Skjold
eea1782280 Fixed segfault when enabling verbose debug with fixed price 2023-05-02 10:20:54 +02:00
Gunnar Skjold
d729d0c5bd Fixed update of data in month plot after entering new month 2023-05-02 10:15:31 +02:00
Gunnar Skjold
72cc0996e1 Merge branch 'master' of github.com:UtilitechAS/amsreader-firmware 2023-04-29 06:40:32 +02:00
Gunnar Skjold
b1ad844bc6 Fixed reactive energy sensors in HA 2023-04-29 06:40:25 +02:00
Gunnar Skjold
4977ad3471 Merge pull request #548 from dbeinder/fixedprice
Add backup, restore, clearing of 'fixedPrice' setting
2023-04-29 06:16:02 +02:00
david-beinder
a3dcd2cfb2 Add backup, restore, clearing of 'fixedPrice' 2023-04-28 22:46:44 +02:00
Gunnar Skjold
c1701c8ee9 Fixed c3 bootloader 2023-04-28 19:32:54 +02:00
Gunnar Skjold
1e88148971 Fixed flash script 2023-04-28 18:42:49 +02:00
Gunnar Skjold
cef7ed15cb Merge pull request #543 from UtilitechAS/dependabot/npm_and_yarn/lib/SvelteUi/app/yaml-2.2.2
Bump yaml from 2.1.1 to 2.2.2 in /lib/SvelteUi/app
2023-04-28 18:37:53 +02:00
dependabot[bot]
7c93537fef Bump yaml from 2.1.1 to 2.2.2 in /lib/SvelteUi/app
Bumps [yaml](https://github.com/eemeli/yaml) from 2.1.1 to 2.2.2.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](https://github.com/eemeli/yaml/compare/v2.1.1...v2.2.2)

---
updated-dependencies:
- dependency-name: yaml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-25 20:32:45 +00:00
Gunnar Skjold
8b97544a2c Remove old Kaifa special case code 2023-04-25 11:53:58 +02:00
Gunnar Skjold
a5f872a86c More timezone adjustments after testing 2023-04-25 08:09:47 +02:00
Gunnar Skjold
6e8233e4af Fixed timestamp from meter 2023-04-24 15:46:56 +02:00
Gunnar Skjold
d85d68b4a6 Hide firmware upgrade when no upgrade 2023-04-24 15:46:34 +02:00
Gunnar Skjold
ed9cf4b87d Fixed NTP 2023-04-24 15:26:31 +02:00
Gunnar Skjold
39e86fa180 Show only half the labels on small screens 2023-04-21 18:55:15 +02:00
Gunnar Skjold
5d278a9d5a Splitting loop into smaller methods 2023-04-19 15:12:49 +02:00
Gunnar Skjold
61040e3e7c Crossing fingers 2023-04-18 22:06:29 +02:00
Gunnar Skjold
c4005f10a3 Some debugging changes and other optimizations 2023-04-18 11:50:44 +02:00
Gunnar Skjold
7bed5add5d Fix 2023-04-17 21:44:36 +02:00
Gunnar Skjold
18e382f21f Fix 2023-04-17 21:41:20 +02:00
Gunnar Skjold
94865b632e Some more optimization 2023-04-17 21:33:00 +02:00
Gunnar Skjold
f0461a7cdb Some adjustments 2023-04-17 11:49:22 +02:00
Gunnar Skjold
4cd6013d64 More improvements on buffer 2023-04-15 20:51:35 +02:00
Gunnar Skjold
b06dbb8d79 Buffer improvements and fixed special characters in ssid 2023-04-15 20:38:26 +02:00
Gunnar Skjold
02fe2073c2 Better error handling for price api 2023-04-15 09:30:19 +02:00
Gunnar Skjold
ec7ceafa84 General optimizations 2023-04-15 09:14:25 +02:00
Gunnar Skjold
276ac67d2e Only clear HA config if illegal characters are loaded from flash 2023-04-15 07:47:48 +02:00
Gunnar Skjold
be116d5b35 Improved firmware upgrade 2023-04-15 07:44:33 +02:00
Gunnar Skjold
9c8788225d Clear HA or domoticz config if not in use 2023-04-15 06:06:26 +02:00
Gunnar Skjold
df44b05792 Clear HA conf by default 2023-04-13 10:20:15 +02:00
Gunnar Skjold
8ee8eee6c4 Fixed laout error on realtime data 2023-04-10 14:14:20 +02:00
Gunnar Skjold
28e13b73e6 Fixed missing HA sensors 2023-04-10 14:08:41 +02:00
Gunnar Skjold
088e5645c7 Increased RX serial buff 2023-04-07 09:00:53 +02:00
Gunnar Skjold
3e3d61912d Serial debugging 2023-04-07 08:39:36 +02:00
Gunnar Skjold
b7854baa6d Some HAN serial port debugging 2023-04-07 08:36:42 +02:00
Gunnar Skjold
68bbfd6527 Load data before restoring from config file 2023-04-05 07:54:59 +02:00
Gunnar Skjold
c1ca3d0c65 Fixed month number in clock 2023-04-03 07:07:44 +02:00
Gunnar Skjold
71cac46470 Config restore loads username into password field 2023-04-03 07:06:18 +02:00
Gunnar Skjold
700f023292 Possibility to specify fixed energy price 2023-04-01 10:57:21 +02:00
Gunnar Skjold
ea43b2b632 Some changes after testing new HA features 2023-04-01 10:43:55 +02:00
Gunnar Skjold
c456e3fdf1 Fixed config loading for ha 2023-04-01 08:20:41 +02:00
Gunnar Skjold
4947f0ec7f Clear HA config in next config version 2023-04-01 08:02:12 +02:00
Gunnar Skjold
799c2f19d9 Changes after uahn merge 2023-04-01 08:00:15 +02:00
Gunnar Skjold
18dc188835 Merge pull request #481 from dbeinder/mosquito
Add HAN pullup config and mosquito board
2023-04-01 07:43:34 +02:00
Gunnar Skjold
7db745829e Merge branch 'master' into mosquito 2023-04-01 07:43:24 +02:00
Gunnar Skjold
81fedaaa6a Moved from postfix to prefix on HA sensor name tag 2023-04-01 07:38:24 +02:00
Gunnar Skjold
71e0f13f0e Various changes after testing new HA features 2023-04-01 07:31:40 +02:00
Gunnar Skjold
f214af3595 Added price API rate limit error 2023-03-31 13:57:38 +02:00
Gunnar Skjold
fb9ae2f5f6 Updated boot reason descriptions 2023-03-31 13:52:22 +02:00
Gunnar Skjold
4c73f39214 Fixed state class on sensors 2023-03-31 13:49:02 +02:00
Gunnar Skjold
1e7176af0b HA configuration 2023-03-30 14:54:10 +02:00
Gunnar Skjold
0d8c88b1fc Fixed DST 25hr day error on month plot 2023-03-30 12:25:07 +02:00
Gunnar Skjold
d189d904fe Fixed edge case where graph data sometimes goes crazy 2023-03-30 11:55:39 +02:00
Gunnar Skjold
3c86e824a2 Added boot time to status page 2023-03-30 09:44:41 +02:00
Gunnar Skjold
061f6433d6 Added another proprietary L&G 2023-03-30 09:00:12 +02:00
Gunnar Skjold
0d923e30d6 Added another proprietary L&G 2023-03-30 08:59:56 +02:00
Gunnar Skjold
51f761d25e Fixed incorrect change of HA current hour/day/month kwh state class 2023-03-29 08:53:13 +02:00
Gunnar Skjold
58fec70e7c Added detection for Kaifa through system title 2023-03-27 09:20:16 +02:00
Gunnar Skjold
dff55b4eee Remove copy/paste l2current substitution from DSMR parser 2023-03-27 08:46:41 +02:00
Gunnar Skjold
931f0d400b Only publish prices once when fetching today and tomorrow at the same time 2023-03-26 15:24:55 +02:00
Gunnar Skjold
0178dc4184 Various fixes for HA 2023-03-26 15:12:24 +02:00
Gunnar Skjold
be522b40f9 Fixed swapped voltage ranges, esp32 vs esp8266 2023-03-26 10:52:01 +02:00
Gunnar Skjold
068c55e7bb Fixed disabling encryption 2023-03-26 10:49:00 +02:00
Gunnar Skjold
8e88d7e11b Show boot reason on status page 2023-03-26 10:40:02 +02:00
Gunnar Skjold
e36acef1d4 Fixed DST offset in day graph 2023-03-26 10:14:10 +02:00
Gunnar Skjold
07d5481a72 Actual fix for DST change 2023-03-26 10:06:37 +02:00
Gunnar Skjold
dbd6205cca Fixed issue with price graph in relation to entering or leaving DST 2023-03-25 19:14:21 +01:00
david-beinder
35d47902c6 Add HAN pullup config and mosquito board 2023-03-18 23:39:55 +01:00
Gunnar Skjold
938f9f69d1 Fixed memory leak in baud autodetect 2023-03-11 10:17:44 +01:00
Gunnar Skjold
cd27472e2d Fixed checkbox tick and changed backup/restore label 2023-03-11 09:19:09 +01:00
Gunnar Skjold
64f8414217 Fixed precision on domoticz energy counter 2023-03-11 08:53:51 +01:00
Gunnar Skjold
a2c1250724 Some updates for esp32c3 2023-02-27 09:00:07 +01:00
Gunnar Skjold
4b7160b502 Only report realtime data on MQTT if EnergyAccounting is initialized 2023-02-27 08:30:56 +01:00
Gunnar Skjold
cc50457404 Fixed spikes in realtime production on top of hour 2023-02-27 08:04:29 +01:00
Gunnar Skjold
cd48192a74 Removed classic UI 2023-02-22 18:09:16 +01:00
Gunnar Skjold
cd031c33aa Added forced 2400 baud for Pow-K 2023-02-22 07:12:54 +01:00
Gunnar Skjold
6c59b15681 Added esp32c3 release build 2023-02-22 07:07:51 +01:00
Gunnar Skjold
7c8593122b Removed forced baud rate 2023-02-22 07:07:31 +01:00
Gunnar Skjold
6d8fd4e083 Merge pull request #460 from dbeinder/c3-generic-boards
Add generic boards for ESP32-C3
2023-02-22 06:56:09 +01:00
david-beinder
79d674710f Add generic boards for ESP32-C3 2023-02-21 23:25:14 +01:00
Gunnar Skjold
062068eacd Increased range of tariff thresholds 2023-02-21 15:29:10 +01:00
Gunnar Skjold
98309ea532 Allow extended ascii in ssid 2023-02-21 13:55:38 +01:00
Gunnar Skjold
0f75fa4a58 Fixed redirect issue after initial setup with DHCP on ESP8266 2023-02-21 13:40:55 +01:00
Gunnar Skjold
d08f75d9c3 Fixed error changing from static ip to dhcp 2023-02-21 12:44:43 +01:00
Gunnar Skjold
dd4a43c831 Better feedback from entso-e 2023-02-21 07:54:11 +01:00
Gunnar Skjold
1f5a04e606 Increased range for instant values 2023-02-14 20:23:23 +01:00
Gunnar Skjold
4d6e63a171 Fixed GPIO HAN select for ESP8266 2023-02-12 20:48:38 +01:00
Gunnar Skjold
0093410e05 Removed kicad backup 2023-02-10 18:57:50 +01:00
Gunnar Skjold
ee63a606e8 Fixed voltage read issue 2023-02-10 18:55:55 +01:00
Gunnar Skjold
d0ccd2d007 Minor ui adjustment 2023-02-10 17:28:19 +01:00
Gunnar Skjold
bb2f74d1ca Various UI improvements 2023-02-06 18:20:48 +01:00
Gunnar Skjold
dfef18fa09 Updated Entsoe endpoint 2023-02-06 11:32:53 +01:00
Gunnar Skjold
485c21dc69 Removed unnecessary build flag 2023-02-06 10:59:40 +01:00
Gunnar Skjold
9ceb84bc9c C3 build 2023-02-06 07:46:34 +01:00
Gunnar Skjold
24e68428c4 Commited gui dist files 2023-02-05 19:26:48 +01:00
Gunnar Skjold
c2c5855e6a Fixed issue where authentication key got corrupted from configfile upload 2023-02-02 16:15:03 +01:00
Gunnar Skjold
de19de2129 Fixed incorrect change in previous commit 2023-02-01 19:00:50 +01:00
Gunnar Skjold
1719263de0 Fixed config migration issue from v2.1 2023-02-01 18:46:22 +01:00
Gunnar Skjold
e70b872c98 Removed v2.0 config loading 2023-02-01 18:46:06 +01:00
Gunnar Skjold
b7d28238ab Extended cache for js and css 2023-01-31 17:16:18 +01:00
Gunnar Skjold
6c9a8b0692 Label fix 2023-01-31 17:04:46 +01:00
Gunnar Skjold
9f3dba3aab Fixed reconnect after setup 2023-01-30 20:58:08 +01:00
Gunnar Skjold
e4e4ad4107 Fixed autodetect 2023-01-30 18:32:17 +01:00
Gunnar Skjold
e8fb9570bb Chasing a reboot bug... 2023-01-30 16:52:12 +01:00
Gunnar Skjold
bc42099962 Fixing some bug reports 2023-01-30 16:07:08 +01:00
Gunnar Skjold
be71cbe609 Some changes after bug reports 2023-01-30 12:02:23 +01:00
Gunnar Skjold
0d6df03c94 Fixed reboot loop, changed temperature sensor behaviour and changed some debugging 2023-01-29 22:45:35 +01:00
Gunnar Skjold
d777040c0a Fixed loading error from previous version energy accounting 2023-01-29 17:04:04 +01:00
Gunnar Skjold
a5636a60f8 Some changes after testing 2023-01-28 20:24:18 +01:00
Gunnar Skjold
6f817b2ed5 Some changes after testing 2023-01-28 20:19:06 +01:00
Gunnar Skjold
e4fec4f4c2 Some final changes 2023-01-28 11:53:26 +01:00
Gunnar Skjold
3a25964ec4 Merge pull request #412 from UtilitechAS/dev-v2.2
v2.2
2023-01-28 10:54:20 +01:00
Gunnar Skjold
1227dff412 Changed autocomplete in setup form 2023-01-26 19:55:39 +01:00
Gunnar Skjold
26ee2e6efc Some changes after testing + changing hostname for hub 2023-01-26 19:42:19 +01:00
Gunnar Skjold
d6a8d31278 Some updates for documentation 2023-01-23 18:19:33 +01:00
Gunnar Skjold
3f2b534baa Merge branch 'master' into dev-v2.2 2023-01-23 13:59:38 +01:00
Gunnar Skjold
70f413013c Merge pull request #408 from aadnehovda/patch-1
Unknown HA entity units.
2023-01-23 13:57:33 +01:00
Ådne Hovda
6edcd174bb Unknown HA entity units.
It appears that HA units are case sensitive: https://developers.home-assistant.io/docs/core/entity/sensor/, so for SensorDeviceClass.REACTIVE_POWER it should be "var", not "VAr". Also for SensorDeviceClass.TEMPERATURE, the degree symbol is required: "°C".

    Entity sensor.ams_ed6e_qo (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'VAr' which is not a valid unit for the device class ('reactive_power') it is using; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
    Entity sensor.ams_ed6e_q (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'VAr' which is not a valid unit for the device class ('reactive_power') it is using; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
    Entity sensor.ams_ed6e_tqo (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kVArh' which is not a valid unit for the device class ('energy') it is using; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
    Entity sensor.ams_ed6e_tqi (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kVArh' which is not a valid unit for the device class ('energy') it is using; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
2023-01-23 11:09:47 +01:00
Gunnar Skjold
3170ef6ce9 c3 scripts 2023-01-21 13:45:47 +01:00
Gunnar Skjold
fb56f4d012 More changes for repo 2023-01-21 13:45:09 +01:00
Gunnar Skjold
c5756f0cba Renamed repo 2023-01-21 13:43:11 +01:00
Gunnar Skjold
95c9ecc8b2 Merge branch 'master' into dev-v2.2 2023-01-18 21:14:49 +01:00
Gunnar Skjold
bdee066c33 Fixed reboot loop 2023-01-18 21:14:40 +01:00
Gunnar Skjold
957039d0c0 Merge branch 'master' into dev-v2.2 2023-01-18 20:48:38 +01:00
Gunnar Skjold
dd23a0fa60 Fixed reboot look 2023-01-18 20:48:27 +01:00
Gunnar Skjold
7777a0a059 Merge branch 'master' into dev-v2.2 2023-01-18 17:11:10 +01:00
Gunnar Skjold
e8fc6d48bf Fixed issue where GPIO setup becomes invalid 2023-01-18 17:11:01 +01:00
Gunnar Skjold
c98148c886 Update readme 2023-01-17 19:56:28 +01:00
Gunnar Skjold
6ba2b4060e Update images for readme and wiki 2023-01-17 19:55:00 +01:00
Gunnar Skjold
762c17ca8e Updated readme and example ini file 2023-01-17 19:48:24 +01:00
Gunnar Skjold
fad6ada1e0 Updated release 2023-01-17 19:15:57 +01:00
Gunnar Skjold
fb1d343ee3 Removed debugging 2023-01-17 19:03:07 +01:00
Gunnar Skjold
1f3c32e80a Adding secrets to build 2023-01-17 18:57:11 +01:00
Gunnar Skjold
43fbca7099 Update release build 2023-01-17 18:42:09 +01:00
Gunnar Skjold
7a36082564 Trying stuff to get build working 2023-01-17 18:34:47 +01:00
Gunnar Skjold
fb2cfdfe01 Trying to fix build 2023-01-17 18:28:08 +01:00
Gunnar Skjold
6c3dca9344 Updated build 2023-01-17 18:15:32 +01:00
Gunnar Skjold
cce5d75fd7 Updated build 2023-01-17 18:13:54 +01:00
Gunnar Skjold
8fd411c1d6 Updated build 2023-01-17 18:13:20 +01:00
Gunnar Skjold
4b15ac74fc Update FUNDING.yml 2023-01-17 18:05:44 +01:00
Gunnar Skjold
508b2e6c45 Icon for safari 2023-01-17 17:51:50 +01:00
Gunnar Skjold
af630615db Changes after testing 2023-01-17 17:49:01 +01:00
Gunnar Skjold
222a4f13e2 Changes after testing 2023-01-17 17:48:42 +01:00
Gunnar Skjold
3bc6c75c5a Some more changes for L&G 2023-01-15 11:20:28 +01:00
Gunnar Skjold
dbb3eac709 Some changes for L&G 2023-01-15 10:56:46 +01:00
Gunnar Skjold
1cee48eab4 Some design changes 2023-01-14 09:34:28 +01:00
Gunnar Skjold
c28752a00a Fixed firmware upgrade 2023-01-12 21:24:36 +01:00
Gunnar Skjold
365061df29 Some changes after testing 2023-01-12 20:17:37 +01:00
Gunnar Skjold
870617f780 More changes for v2.2 2023-01-11 20:41:27 +01:00
Gunnar Skjold
4972b980ba Changes for v2.2 2023-01-06 14:34:07 +01:00
Gunnar Skjold
51c70abda3 Merge branch 'master' into dev-v2.2 2023-01-04 18:55:38 +01:00
Gunnar Skjold
8d448533c7 Fixed config export for esp32 2022-12-19 18:36:04 +01:00
Gunnar Skjold
43cb9a0000 Fixed DSMR CRC check 2022-12-19 18:14:12 +01:00
Gunnar Skjold
d49b7eac09 Minor change 2022-12-19 16:49:40 +01:00
Gunnar Skjold
8f057e687c Merge pull request #387 from lassebm/lg-e360-fixes
Landis+Gyr E360 fixes
2022-12-19 16:45:52 +01:00
Lasse Bang Mikkelsen
5b4f680114 Align Landis+Gyr naming 2022-12-17 12:38:18 +01:00
Lasse Bang Mikkelsen
fabdfbadf4 Add support for Landis+Gyr meters using "LGF" manufacturer ID 2022-12-16 20:20:40 +01:00
Lasse Bang Mikkelsen
afa47ea633 Use list type 4 when phase active import/export power is available 2022-12-16 20:19:15 +01:00
Gunnar Skjold
461d76e651 Merge branch 'master' into dev-v2.2 2022-12-15 18:32:36 +01:00
Gunnar Skjold
c40e20c8e9 Extract active import/export per phase from DSMR 2022-12-15 18:25:13 +01:00
Gunnar Skjold
4e97554514 Some changes during testing 2022-12-14 19:37:32 +01:00
Gunnar Skjold
28a9d6746b Fixed discover when setting different hostname in setup 2022-12-14 18:15:46 +01:00
Gunnar Skjold
7ea4fe881c HAN serial autodetect 2022-12-13 21:05:42 +01:00
Gunnar Skjold
c4eaf8184b Check if authenticated to show upgrade links and config up/download 2022-12-10 09:27:18 +01:00
Gunnar Skjold
312972f77d Some improvements to v2.2 2022-12-09 20:26:48 +01:00
Gunnar Skjold
27b9058af5 Some improvements to v2.2 2022-12-09 20:26:31 +01:00
Gunnar Skjold
bc4d61098c Some error handling 2022-12-09 19:10:24 +01:00
Gunnar Skjold
b2de6472cf Some experiments with captive portal 2022-12-09 18:24:43 +01:00
Gunnar Skjold
6c3ddc57b5 Removed "auto multiplier" for Kamstrup 2022-12-08 13:44:21 +01:00
Gunnar Skjold
2ff7044c85 Fixed incorrect value for peaks in MQTT 2022-12-07 20:13:30 +01:00
Gunnar Skjold
0145be851e Merge branch 'master' into dev-v2.2 2022-12-07 20:11:14 +01:00
Gunnar Skjold
6b0d540f39 Added 300 baud 2022-12-07 11:51:45 +01:00
Gunnar Skjold
2218ac4e8a Fixed graph clearing problem 2022-12-07 11:32:55 +01:00
Gunnar Skjold
33bd3da310 Various fix for realtime values 2022-12-06 15:45:43 +01:00
Gunnar Skjold
a239e1a63d Fix on special case for Kaifa MA304T3 2022-12-06 08:28:30 +01:00
Gunnar Skjold
8a809ec128 Bugfix from testing 2022-12-04 14:32:47 +01:00
Gunnar Skjold
b48a0f13fe More v2.2 2022-12-04 14:12:35 +01:00
Gunnar Skjold
b07ed075f4 Even more v2.2 2022-12-02 20:38:56 +01:00
Gunnar Skjold
0927cab8e2 Some changes for fetching prices from amshub 2022-12-02 19:24:53 +01:00
Gunnar Skjold
eed35b7bbc Merge branch 'hub-prices' into dev-v2.2 2022-12-02 19:08:29 +01:00
Gunnar Skjold
e34da5fd83 Merge branch 'master' into hub-prices 2022-12-02 19:04:14 +01:00
Gunnar Skjold
148fb14c93 More v2.2 2022-12-02 19:03:16 +01:00
Gunnar Skjold
000cfd8697 Merge branch 'master' into dev-v2.2 2022-12-01 18:12:32 +01:00
Gunnar Skjold
1ef5703971 Fixed changing mdns settings 2022-12-01 18:06:19 +01:00
Gunnar Skjold
cda3b80b35 Some changes 2022-11-29 21:24:58 +01:00
Gunnar Skjold
c7b8090634 Some minor changes 2022-11-29 21:02:23 +01:00
Gunnar Skjold
63a8d79b95 Making it work on 8266 2022-11-29 20:50:36 +01:00
Gunnar Skjold
02ae3fc7f5 More v2.2 2022-11-29 20:20:56 +01:00
Gunnar Skjold
2dcc874592 More v2.2 2022-11-25 19:18:32 +01:00
Gunnar Skjold
d4d9d2224f More v2.2 2022-11-23 20:52:37 +01:00
Gunnar Skjold
902e43979b Even more v2.2 2022-11-21 18:48:04 +01:00
Gunnar Skjold
8e54f23367 More v2.2 2022-11-20 20:47:29 +01:00
Gunnar Skjold
ab7128c53a Further work on v2.2 2022-11-19 15:44:23 +01:00
Gunnar Skjold
6563700df4 Merge branch 'master' into dev-v2.2 2022-11-15 18:07:02 +01:00
Gunnar Skjold
538de5ea99 Increased range of multipliers 2022-11-08 18:41:31 +01:00
Gunnar Skjold
042e2bcc85 Fixed power saving 2022-11-07 14:57:53 +01:00
Gunnar Skjold
b6f630b134 Some more Svelte implementation 2022-11-01 20:59:38 +01:00
Gunnar Skjold
65a09dcecf Merge branch 'master' into dev-v2.2 2022-11-01 19:07:00 +01:00
Gunnar Skjold
775e5a0881 Support different size numbers in L&G payload 2022-11-01 18:41:43 +01:00
Gunnar Skjold
6c0d5fcc09 Some adjustments to wifi power saving option 2022-10-31 10:09:07 +01:00
Gunnar Skjold
69d8fa9254 Made wifi sleep mode configurable 2022-10-27 19:17:50 +02:00
root
71d261bf34 Merge branch 'hub-prices' of github.com:gskjold/AmsReader into hub-prices 2022-10-23 19:11:51 +02:00
root
9f4f5b4620 Merge branch 'master' into hub-prices 2022-10-23 19:09:15 +02:00
Gunnar Skjold
c38c305bab Fixed threshold update via config file 2022-10-21 19:21:55 +02:00
Gunnar Skjold
bfee2a1d64 Fixed month average calculation 2022-10-21 18:43:30 +02:00
Gunnar Skjold
ec7edae9a1 Updated issue templates 2022-10-21 17:43:33 +02:00
Gunnar Skjold
d8e265b7ac Fixed JSON errors 2022-10-20 20:12:33 +02:00
Gunnar Skjold
1987cddab7 Some more cleanup 2022-10-20 20:11:13 +02:00
Gunnar Skjold
e18be5f97c Better memory optimization 2022-10-19 20:58:57 +02:00
Gunnar Skjold
537597d6d1 Expanding size of daily and monthly data points 2022-10-19 20:30:29 +02:00
Gunnar Skjold
a89013cec3 Fixed config file upload 2022-10-19 20:24:21 +02:00
Gunnar Skjold
9c7a0cb7ff Fixed graph error 2022-10-19 19:59:41 +02:00
Gunnar Skjold
ade12199b9 Reclaiming some heap space 2022-10-19 19:54:26 +02:00
Gunnar Skjold
92692c6eaf More implementation of Svelte GUI 2022-10-18 20:52:42 +02:00
Gunnar Skjold
e4114c3e74 Merge branch 'master' into dev-v2.2 2022-10-18 18:30:37 +02:00
Gunnar Skjold
39b68aca51 Removed invalid code 2022-10-18 18:30:26 +02:00
root
feffbb53a3 Merge branch 'master' of github.com:gskjold/AmsToMqttBridge into hub-prices 2022-10-17 15:42:23 +02:00
Gunnar Skjold
8ac1e034b1 Reverted WiFi_connect method 2022-10-17 13:09:28 +02:00
Gunnar Skjold
f446dff865 Fixed LED blink delay 2022-10-17 13:09:04 +02:00
root
e1b2554af2 Merge branch 'master' of github.com:gskjold/AmsToMqttBridge into hub-prices 2022-10-16 18:46:47 +02:00
Gunnar Skjold
627a50ab50 Fixed priceapi dropdowns 2022-10-16 18:46:31 +02:00
Gunnar Skjold
a20d007b45 Merge branch 'hub-prices' of github.com:gskjold/AmsReader into hub-prices 2022-10-16 18:32:25 +02:00
Gunnar Skjold
64840e13f0 Merge branch 'master' into hub-prices 2022-10-16 18:31:26 +02:00
Gunnar Skjold
34ebe9601a Changed blink behaviour 2022-10-16 18:31:11 +02:00
root
72f1d59338 Merge branch 'hub-prices' of github.com:gskjold/AmsReader into hub-prices 2022-10-16 17:36:48 +02:00
Gunnar Skjold
07ed425320 Merge branch 'master' into hub-prices 2022-10-16 17:34:19 +02:00
Gunnar Skjold
2e75e1c4dc Moved HA files 2022-10-13 20:58:08 +02:00
Gunnar Skjold
e6df68481f Merge branch 'master' into dev-v2.2 2022-10-13 20:47:48 +02:00
Gunnar Skjold
fa299198fc Fixed all build warnings 2022-10-13 20:33:59 +02:00
Gunnar Skjold
6d81b0a856 Fixed all build warnings 2022-10-13 20:24:56 +02:00
Gunnar Skjold
dd095da97b Reduced footprint of GPIO config page 2022-10-13 19:27:25 +02:00
Gunnar Skjold
1b6ce203b7 Better debug output whem receiving unknown data 2022-10-13 17:40:44 +02:00
Gunnar Skjold
2850be4e48 Merge pull request #322 from tbarnekov/extend_power_info
Populate Active Import and Export per phase and export to HA
2022-10-12 20:34:09 +02:00
Gunnar Skjold
7eca31de84 Fixed build errors 2022-10-12 20:01:55 +02:00
Gunnar Skjold
a64f960cc7 Added Pow-U+ profile 2022-10-12 19:30:00 +02:00
Gunnar Skjold
ce3a47a7e6 Fixed error blinks and improved WiFi reconnect 2022-10-12 19:25:48 +02:00
Thomas Barnekov
8395e1dc77 Merge remote-tracking branch 'origin/master' into extend_power_info 2022-10-10 17:06:09 +02:00
Thomas Barnekov
39a4761415 Add DOCTYPE to html to fix quirks mode 2022-10-10 16:59:43 +02:00
root
dc25c147b9 Merge remote-tracking branch 'public/master' into hub-prices 2022-10-07 17:36:49 +00:00
Gunnar Skjold
867ab9d6c2 Build variable for upgrade URL 2022-10-07 19:35:30 +02:00
Gunnar Skjold
6a76144566 Merge branch 'master' into hub-prices 2022-10-07 17:49:47 +02:00
Thomas Barnekov
5e03e3d3c2 Move per-phase power consumption and power factor values to new ha4.json 2022-10-07 13:40:29 +02:00
Thomas Barnekov
adb5050621 Merge branch 'gskjold:master' into extend_power_info 2022-10-06 17:31:43 +02:00
Gunnar Skjold
026cd25c8c Setting modem sleep to max 2022-10-06 17:30:37 +02:00
Gunnar Skjold
06ec97b42a Make sure we dont use more than 5 peaks if defined higher 2022-10-06 17:20:13 +02:00
Gunnar Skjold
b420a0e6f4 Limit peak count if over 5 2022-10-06 17:12:12 +02:00
Thomas Barnekov
7cd52d5689 Add individual power reading for all phases (include in HA) 2022-10-06 00:35:30 +02:00
Thomas Barnekov
ad78ff3082 Fix implicit cast and non-const char pointer warnings 2022-10-05 22:42:43 +02:00
Gunnar Skjold
fe7be81f1e Rudimentary detection for L&G data. Probably change this in the future 2022-10-01 12:11:46 +02:00
Gunnar Skjold
7674fc2ad0 Merge branch 'lng-parser' 2022-10-01 11:56:08 +02:00
Gunnar Skjold
d50181c347 Upgrade with custom URL 2022-10-01 11:43:42 +02:00
Gunnar Skjold
8ca771fa5a Changed "BUS" to "M-BUS" 2022-10-01 09:25:56 +02:00
Gunnar Skjold
7d557b2679 Only show new version when actually new in firmware page. Also be more specific on USB power in upgrade warning 2022-10-01 09:24:07 +02:00
Gunnar Skjold
2f0c912388 Exclude decimals in BUILD_EPOCH flag 2022-10-01 09:22:09 +02:00
Gunnar Skjold
57e6d0fbe3 Modifications to make price sensors work in HA 2022-09-30 19:18:23 +02:00
Gunnar Skjold
e7c25fafda Prices and realtime HA sensors 2022-09-28 20:13:03 +02:00
Gunnar Skjold
2a4772fe25 Fixed memory leak when reconnecting to MQTT/SSL 2022-09-27 19:59:37 +02:00
Gunnar Skjold
f1f7408208 Added price zones 2022-09-25 11:46:04 +02:00
Gunnar Skjold
feb8e5007b Fixed MQTT buffer size 2022-09-25 10:50:34 +02:00
Gunnar Skjold
c4af1ee74f Fixed saving tariff thresholds 2022-09-25 10:50:09 +02:00
Gunnar Skjold
992e1b6121 Net value for active power (L&G) 2022-09-12 08:03:32 +02:00
Gunnar Skjold
95d3008a66 Updates to Svelte UI 2022-09-12 07:29:25 +02:00
Gunnar Skjold
04cd6ac387 Some changes to make Svelte UI work 2022-09-03 14:37:31 +02:00
Gunnar Skjold
584c7b1154 More restructuring 2022-09-03 14:03:15 +02:00
Gunnar Skjold
493c4b4337 Moved Svelte UI to lib folder 2022-09-03 13:41:11 +02:00
Gunnar Skjold
488c969858 Some serious restructuring to be able to swap between implementations 2022-09-03 13:12:29 +02:00
Gunnar Skjold
8b0d4185d3 Created new UI with Svelte 2022-09-03 12:19:56 +02:00
Gunnar Skjold
9cc7529934 Fixed L&G scaling 2022-08-31 08:19:09 +02:00
Gunnar Skjold
ef8715be6d Merge branch 'master' into lng-parser 2022-08-31 08:04:24 +02:00
Gunnar Skjold
e232b875fa Fixed Aidon timestamp 2022-08-23 21:07:06 +02:00
Gunnar Skjold
f18171fecc Fixed MQTT byte mode 2022-08-23 20:39:47 +02:00
Gunnar Skjold
a3c7a09211 Adding peaks to data.json and MQTT RAW 2022-08-23 20:21:19 +02:00
Gunnar Skjold
a6f3bc3f71 Added version to system json 2022-08-23 19:49:19 +02:00
Gunnar Skjold
44bcd386d1 aggregate obis 1.8.x and 2.8.x for L&G 2022-08-23 09:04:45 +02:00
Gunnar Skjold
01547f9a52 Adjustments to make L&G parser work 2022-08-19 13:26:29 +02:00
Gunnar Skjold
608470c5f7 Merge branch 'master' into hub-prices 2022-08-18 19:56:31 +02:00
Gunnar Skjold
940d38af5c Merge branch 'master' into lng-parser 2022-08-17 17:33:24 +02:00
Gunnar Skjold
4e451c51e1 HW serial fix for S2 2022-08-17 17:33:06 +02:00
Gunnar Skjold
43def1c311 Fixed Pow-P1 profile 2022-08-17 17:32:53 +02:00
Gunnar Skjold
2978116207 Fixed formatting error in HA payload 2022-08-16 11:55:07 +02:00
Gunnar Skjold
a055465ce0 Untestet L&G data parser 2022-08-16 08:22:43 +02:00
Gunnar Skjold
68b3415a6c Cleanup for price API 2022-08-13 16:32:55 +02:00
Gunnar Skjold
d8f3ae8b07 Merge branch 'master' into hub-prices 2022-08-13 16:00:25 +02:00
Gunnar Skjold
998b986604 Adjusted modem sleep to a safer value 2022-08-12 20:48:34 +02:00
Gunnar Skjold
7799431405 Remove unused files 2022-08-12 20:42:13 +02:00
Gunnar Skjold
1a92cd1978 Fetch prices from hub 2022-08-12 20:41:53 +02:00
Gunnar Skjold
508c14a671 Fixed modem sleep on S2 and fixed default wifi power 2022-08-12 09:02:04 +02:00
Gunnar Skjold
4a7ef87269 Fixed realtime day calculation 2022-08-10 17:43:51 +02:00
Gunnar Skjold
3a4fc707b0 Show real time production 2022-08-10 10:53:16 +02:00
Gunnar Skjold
5d2e320b07 Fixed export labels on graph 2022-08-10 10:28:31 +02:00
Gunnar Skjold
d12613b91a Trying to fix HA accumulated 2022-08-10 10:01:24 +02:00
Gunnar Skjold
e6a02f34ab USB power warning when upgrading 2022-08-10 09:31:50 +02:00
Gunnar Skjold
0b2ffbfd77 Revert to arduino 2.0.3 because of #298 2022-08-10 09:30:31 +02:00
Gunnar Skjold
cab6c54ed9 Correct Vcc GPIO for Pow-K+ 2022-08-01 12:48:31 +02:00
Gunnar Skjold
313024f273 Support OTA upgrade from ESP8266 2022-08-01 08:17:24 +02:00
Gunnar Skjold
91fc078c5e Higher precision on prices 2022-07-31 20:26:38 +02:00
Gunnar Skjold
5b9d44a3e9 Fixed loading of energy accounting 2022-07-31 20:19:01 +02:00
Gunnar Skjold
ed523bda24 Pow-P1 profile 2022-07-30 13:21:34 +02:00
Gunnar Skjold
e3a1a242d2 Fixed debugging 2022-07-29 22:24:06 +02:00
Gunnar Skjold
ddfade65d8 Merge branch 'master' into new-parser 2022-07-29 21:21:40 +02:00
Gunnar Skjold
0ef8390df0 Fixed config file 2022-07-28 13:45:53 +02:00
Gunnar Skjold
f43fe5f864 Fixed cost overflow 2022-07-28 13:40:23 +02:00
Gunnar Skjold
f9ddd7533a Changes after testing + adding S2 profiles 2022-07-21 20:54:55 +02:00
Gunnar Skjold
f9f18bc106 Merge branch 'master' into new-parser 2022-07-20 18:50:47 +02:00
Gunnar Skjold
280dd8605b Changed platform to reduce ESP32 footprint 2022-07-19 07:49:11 +02:00
Gunnar Skjold
41324cf590 Merge branch 'master' into new-parser 2022-07-19 07:40:19 +02:00
Gunnar Skjold
64132d5ce3 Reducing memory footprint to fit ESP32 2022-07-19 07:40:13 +02:00
Gunnar Skjold
0e75732022 Merge branch 'master' into new-parser 2022-07-19 07:20:43 +02:00
Gunnar Skjold
6975714922 Merge branch 'master' of github.com:gskjold/AmsToMqttBridge 2022-07-19 06:43:19 +02:00
Gunnar Skjold
7f3e0e6089 Limit threshold average to use a single peak per day 2022-07-19 06:43:06 +02:00
Gunnar Skjold
6ff5518738 Create README.md 2022-07-17 20:34:51 +02:00
Gunnar Skjold
be29daee77 Shared Wemos MBUS shield 2022-07-17 20:17:39 +02:00
Gunnar Skjold
a90ed40aee Fixed config file loading of energyaccounting 2022-07-05 21:48:56 +02:00
Gunnar Skjold
32ba6c31f0 Max hour average from more than one hour. Plus a fix for real time cost calculation 2022-07-05 20:34:48 +02:00
Gunnar Skjold
caf00f99e3 Merge branch 'master' into new-parser 2022-06-28 18:16:06 +02:00
Gunnar Skjold
aaa318e511 Updated issue templates 2022-06-28 14:02:00 +02:00
Gunnar Skjold
648cac0b06 Some adjustmenst 2022-06-23 20:22:15 +02:00
Gunnar Skjold
a5d1a2c0ee Some adjustments 2022-06-23 20:03:29 +02:00
Gunnar Skjold
55f1b4b129 Fixed ESP32-S2 ADC 2022-06-23 19:25:41 +02:00
Gunnar Skjold
b805363c60 MQTT/SSL config re-enabled for ESP8266 in case it actually is in use 2022-06-23 08:13:13 +02:00
Gunnar Skjold
846b166ae9 MQTT/SSL config re-enabled for ESP8266 in case it actually is in use 2022-06-23 08:12:25 +02:00
Gunnar Skjold
4e039c2cc9 Escape backslash in JSON 2022-06-23 08:10:57 +02:00
Gunnar Skjold
e5556fe80b Fixed minimum value for lowest threshold 2022-06-19 08:31:13 +02:00
Gunnar Skjold
c5aa65a780 Fixed previous commit 2022-06-12 10:55:28 +02:00
Gunnar Skjold
30cf1435da Fixed firmware upgrade for ESP32S2 2022-06-12 10:34:01 +02:00
Gunnar Skjold
fca46a3f54 Restructured AMS data parsing 2022-06-12 09:46:20 +02:00
Gunnar Skjold
0dca85d67b Fixed currency conversion between nordic currencies 2022-06-04 10:28:23 +02:00
Gunnar Skjold
d9a5a21fe0 Added link to known hardware configurations 2022-06-04 10:12:52 +02:00
Gunnar Skjold
68eaa7d39b Reload prices when ENTSO-E config has changed 2022-06-04 10:07:15 +02:00
Gunnar Skjold
3231d0747e Fixed code error 2022-06-04 10:05:09 +02:00
Gunnar Skjold
2617956b38 Disabled MQTT SSL for ESP8266 2022-06-04 09:55:25 +02:00
Gunnar Skjold
07614226b3 Fixed 404 after uploading SSL certificates to MQTT 2022-06-04 08:20:42 +02:00
Gunnar Skjold
cddb170f24 Added build target for esp32 solo 2022-06-01 20:51:25 +02:00
Gunnar Skjold
ba7915ca7c Added UART1 HW serial for ESP32-S2 2022-05-25 09:27:31 +02:00
Gunnar Skjold
ee12db4f51 Added baud rates 2022-05-15 08:56:26 +02:00
Gunnar Skjold
f01fbfca53 Fixed code that modified original byte stream 2022-05-14 10:59:48 +02:00
Gunnar Skjold
fab637cf60 Fixed GBT multiframe 2022-05-13 09:16:40 +02:00
Gunnar Skjold
b2e144efcf Fixed error 2022-05-13 09:03:38 +02:00
Gunnar Skjold
10308ce738 Added support for GBT transfer 2022-05-07 10:01:30 +02:00
Gunnar Skjold
70f5b0f912 Change default MQTT buffer 2022-04-23 08:48:34 +02:00
Gunnar Skjold
d724a90085 Fixed analog read of voltage 2022-04-17 10:07:25 +02:00
Gunnar Skjold
1ab529785a Fixed loop error 2022-04-14 10:50:00 +02:00
Gunnar Skjold
3a81e62bbe Support for encrypted DSMR 2022-04-14 10:38:04 +02:00
Gunnar Skjold
4882916b5c Fixed comment 2022-04-14 08:19:07 +02:00
Gunnar Skjold
1f7e43256a Fixed detection of sagemcom 2022-04-14 08:18:51 +02:00
Gunnar Skjold
a0d3632fd7 Fixed clearing of prices on MQTT 2022-04-04 07:31:08 +02:00
Gunnar Skjold
b25564a89f Clear all unknown prices instead of just last 2022-04-03 13:27:21 +02:00
Gunnar Skjold
191d9fa562 Added month max to mqtt 2022-04-01 20:39:22 +02:00
Gunnar Skjold
e009b4e54e Fixed price update every hour 2022-04-01 07:58:58 +02:00
Gunnar Skjold
811625b706 Adaptations for ESP8266 for last commit 2022-03-30 19:09:50 +02:00
Gunnar Skjold
15fa452c7c Fixed ENTSO-E for CEST fetch 2022-03-30 19:06:48 +02:00
Gunnar Skjold
e725c01597 Updated build for esp32 2022-03-30 17:38:08 +02:00
Gunnar Skjold
35b884713c Merge branch 'agpl' 2022-03-30 17:09:54 +02:00
Gunnar Skjold
d5fc9f6fc6 Remove temp screenshot 2022-03-30 17:05:29 +02:00
Gunnar Skjold
19c8396b1c Updated screenshot 2022-03-30 17:04:36 +02:00
Gunnar Skjold
f4622a068b Merge pull request #256 from gskjold/dev-v2.1.0
Dev v2.1.0
2022-03-30 17:00:55 +02:00
Gunnar Skjold
9922862299 Fixed -127 value on last hour of day when we enter CEST 2022-03-26 17:47:33 +01:00
Gunnar Skjold
e7fc504975 Fixed prices that are not cleared after midnight? 2022-03-26 09:45:35 +01:00
Gunnar Skjold
6cdb943763 Fixed decrypt on esp32 without auth key 2022-03-26 09:31:49 +01:00
Gunnar Skjold
3e937a4e5d Updated CI 2022-03-26 09:26:12 +01:00
Gunnar Skjold
fcd3e3ca25 Fixed firmware download for esp32-s2 2022-03-26 09:21:57 +01:00
Gunnar Skjold
772004c0a2 Added zip files to release resources, combined with flash script 2022-03-26 09:19:03 +01:00
Gunnar Skjold
c3e5ce344c Fixed S2 build 2022-03-25 21:16:18 +01:00
Gunnar Skjold
b11b1d5e37 Default meter config to 0 2022-03-25 20:37:34 +01:00
Gunnar Skjold
b5d34990df Fixed typ-o 2022-03-24 08:46:35 +01:00
Gunnar Skjold
a287d310ac Added ESP32-S2 build 2022-03-24 08:38:29 +01:00
Gunnar Skjold
afe6190c46 Merge pull request #251 from kng/dev-ha
ha discvovery, handle unset values
2022-03-23 07:34:03 +01:00
Daniel Ekman
2125945728 ha discvovery, handle unset values 2022-03-22 11:24:38 +01:00
Gunnar Skjold
fb60127cf7 Removed test code 2022-03-20 20:17:19 +01:00
Gunnar Skjold
a07c55889f Build fix 2022-03-20 20:11:29 +01:00
Gunnar Skjold
a675f56f9c Restart after uploading config file, then restore, then reboot again 2022-03-20 20:02:51 +01:00
Gunnar Skjold
0590ec375d Delete firmware file if exists after factory reset 2022-03-18 19:35:58 +01:00
Gunnar Skjold
48bd352619 Remove stat_cla property from HA discovery message if null 2022-03-18 19:19:37 +01:00
Gunnar Skjold
40016f314e Multipliers for HAN data 2022-03-18 19:16:03 +01:00
Gunnar Skjold
b9234f6f64 Fixed HA MQTT corruption 2022-03-17 20:36:21 +01:00
Gunnar Skjold
beafcd300b Added realtime day use to MQTT 2022-03-17 18:51:13 +01:00
Gunnar Skjold
a92524eaf8 Some adjustments for real time calculation 2022-03-17 18:47:57 +01:00
Gunnar Skjold
a60dd8a60a Added separate buffer for HAN data 2022-03-17 18:14:31 +01:00
Gunnar Skjold
53296ccf42 Fixed update of meter state with list type 4 2022-03-16 12:46:59 +01:00
Gunnar Skjold
42a627e32e Fixed download/upload config 2022-03-12 20:38:51 +01:00
Gunnar Skjold
c38034c69b Merge branch 'master' into dev-v2.1.0 2022-03-12 20:06:30 +01:00
Gunnar Skjold
0ec1a8ece3 Experimenting with fw upgrade for esp8266 2022-03-12 11:16:37 +01:00
Gunnar Skjold
45275c271e Changed to "correct" bootstrap js. Seems we have a mix, but ok 2022-03-12 11:12:49 +01:00
Gunnar Skjold
116761b46e Fixed overflow issue 2022-03-12 09:19:01 +01:00
Gunnar Skjold
a2c13fd0da Changed cursor for watt display 2022-03-12 09:01:08 +01:00
Gunnar Skjold
b727f84c72 Possibility to show watt instead of kw 2022-03-12 08:56:09 +01:00
Gunnar Skjold
3706625760 Changed colors for amp graph 2022-03-12 08:46:18 +01:00
Gunnar Skjold
0e1d2211ec Added SRI to js/css resources 2022-03-12 08:40:34 +01:00
Gunnar Skjold
785bec0269 Added export to graph 2022-03-12 08:26:24 +01:00
Gunnar Skjold
2a4a199ae6 Updated python version for release action 2022-03-12 08:26:08 +01:00
Gunnar Skjold
b6b9db5431 Merge branch 'master' into dev-v2.1.0 2022-03-11 19:48:20 +01:00
Gunnar Skjold
55bdd4437a Fixed drawing amp graph when all phases export 2022-03-11 19:44:51 +01:00
Gunnar Skjold
3948fff184 Fixed calculation of highest hour 2022-03-11 19:42:44 +01:00
Gunnar Skjold
c4b099b752 Added profile for Pow-K+ 2022-03-11 19:28:28 +01:00
Gunnar Skjold
5cfcc015f4 Fixed hostname for esp32 2022-03-11 19:21:27 +01:00
Gunnar Skjold
724768afc4 Fixed MQTT problem 2022-03-11 19:16:08 +01:00
Gunnar Skjold
efc20f1da9 Merge branch 'master' into dev-v2.1.0 2022-03-11 18:58:41 +01:00
Gunnar Skjold
b071344871 Fixed reading of numbers. Added support for newer Kaifa payload 2022-03-11 18:55:01 +01:00
Gunnar Skjold
e0e98f0ec1 Logging 2022-02-28 10:45:09 +01:00
Gunnar Skjold
53d34852f1 Fixed labels for domoticz 2022-02-28 08:31:53 +01:00
Gunnar Skjold
c26073b2a3 Some adjustments to make config file download work again 2022-02-26 20:47:34 +01:00
Gunnar Skjold
b12a632618 Some memory optimization 2022-02-26 16:03:46 +01:00
Gunnar Skjold
420be1b943 Some memory optimization and configfile download fix 2022-02-26 14:57:12 +01:00
Gunnar Skjold
142d280805 Consolidated two HA discovery JSON to one 2022-02-26 14:02:26 +01:00
Gunnar Skjold
196b79e4c8 Fixed corrupted payload for HA 2022-02-26 13:57:01 +01:00
Gunnar Skjold
2ef1700cfe Added static HA content to progmem 2022-02-22 21:33:50 +01:00
Gunnar Skjold
cbbb52d32a Some cleanup and buffer sharing 2022-02-22 21:05:34 +01:00
Gunnar Skjold
6bded12ec5 Increased buffer size for HA payload 2022-02-20 21:20:10 +01:00
Gunnar Skjold
5ae56f265e Some final changes before releasing for test 2022-02-20 20:10:08 +01:00
Gunnar Skjold
705b3e34d1 Swedish kamstrup frame with wh instead of wh/10 2022-02-20 19:41:29 +01:00
Gunnar Skjold
fcb4ccb462 Merge pull request #240 from mikkle/mqtt_mem_free
publish ESP free mem in mqtt publishSystem
2022-02-20 19:30:20 +01:00
Mikkel Troest
e0cd14e904 publish ESP free mem in mqtt publishSystem 2022-02-20 15:39:52 +01:00
Gunnar Skjold
bb6e8838b4 Adaptation to 2.1 contract 2022-02-20 11:22:14 +01:00
Gunnar Skjold
5325f8f845 Merge branch 'pr-172' into dev-v2.1.0 2022-02-20 11:17:33 +01:00
Gunnar Skjold
113b8bf820 Merge branch 'master' into dev-v2.1.0 2022-02-20 11:15:49 +01:00
Gunnar Skjold
7e41168606 Fix for unstable ESP8266 when debug is disabled 2022-02-20 10:51:19 +01:00
Gunnar Skjold
0af2378d05 Merge branch 'master' into dev-v2.1.0 2022-02-19 10:33:17 +01:00
Gunnar Skjold
7f4498c062 Send system values to MQTT on regular interval 2022-02-19 10:32:23 +01:00
Gunnar Skjold
6e9e988ff0 Fixed issue where HAN stops working when debugging is disabled 2022-02-19 10:27:24 +01:00
Gunnar Skjold
1f03013c98 Add possibility to factory reset on boot 2022-02-19 09:57:48 +01:00
Gunnar Skjold
6690e809fb Fixed reboot issue 2022-02-19 09:57:27 +01:00
Gunnar Skjold
b41dd862b6 Merge branch 'master' into dev-v2.1.0 2022-02-19 09:08:02 +01:00
Gunnar Skjold
04c269d982 Double precision on accumulated values 2022-02-19 09:07:35 +01:00
Gunnar Skjold
f8a86058a1 Adjustments to data storage update 2022-02-12 19:54:11 +01:00
Gunnar Skjold
47dda366e3 Fixed ESP32 build 2022-02-12 11:52:06 +01:00
Gunnar Skjold
0700d22d43 Merge branch 'pull-172' into pr-172 2022-02-12 11:49:07 +01:00
Gunnar Skjold
bf633f20c4 Merge pull request #172 from kng/homeassistant
Homeassistant mqtt discovery, wip
2022-02-12 11:48:43 +01:00
Gunnar Skjold
297681bcff Some adjustments to make HA autodiscover work for ESP8266 2022-02-12 11:43:31 +01:00
Gunnar Skjold
68906b54a6 Merge branch 'homeassistant' of github.com:kng/AmsToMqttBridge into pull-172 2022-02-12 11:14:58 +01:00
Gunnar Skjold
0c1d666afd Improve graph calculation stability 2022-02-12 11:12:48 +01:00
Gunnar Skjold
18a38e4104 Some changes to source file header 2022-02-12 10:28:09 +01:00
Gunnar Skjold
ef0041caa6 Added paypal as funding option 2022-02-12 10:27:27 +01:00
Gunnar Skjold
1ce51f6c85 Added AGPLv3 2022-02-12 10:26:56 +01:00
Gunnar Skjold
c23b2a477e Merge branch 'master' into dev-v2.1.0 2022-02-12 10:16:27 +01:00
Gunnar Skjold
0dd77dbaa8 Fixed styling for export graph 2022-02-12 10:09:03 +01:00
Gunnar Skjold
29524c2123 Reducing stack mem footprint 2022-02-10 10:35:57 +01:00
Gunnar Skjold
e2fb5e2673 Removed exception handling 2022-02-08 08:37:54 +01:00
Gunnar Skjold
751a0edca7 160mhz esp32 and some error handling in loop() 2022-02-07 21:18:27 +01:00
Gunnar Skjold
a8e62e086c Divide current another decimal point for Kamstrup CT meters 2022-02-06 19:33:59 +01:00
Gunnar Skjold
35eb69bebb Trying higher buffer for MQTT 2022-02-06 19:28:32 +01:00
Gunnar Skjold
5c7c0699b2 Added images 2022-02-06 11:29:19 +01:00
Gunnar Skjold
460482a6dc Fixed voltage range for yellow ESP indicator 2022-02-06 11:28:56 +01:00
Gunnar Skjold
28db4873a0 Fixed label 2022-02-06 09:32:35 +01:00
Gunnar Skjold
98de734761 Added energy accounting to config file 2022-02-06 09:16:38 +01:00
Gunnar Skjold
b742c8f3c6 Human readable parity in config file 2022-02-05 21:52:13 +01:00
Gunnar Skjold
4cfd274e52 Upload configuration file 2022-02-05 21:44:28 +01:00
Gunnar Skjold
4f7bd0436a Merge branch 'master' into dev-v2.1.0 2022-02-05 19:50:55 +01:00
Gunnar Skjold
7e31a60000 Support null values in the middle of the payload 2022-02-05 19:46:41 +01:00
Gunnar Skjold
793bc877fc Support null values in the middle of the payload 2022-02-05 19:34:44 +01:00
Gunnar Skjold
5ab6de21dc Added some documentation 2022-02-05 19:18:07 +01:00
Gunnar Skjold
7c5a5bcf65 Config file download 2022-02-05 19:17:38 +01:00
Gunnar Skjold
2e203d7713 Merge branch 'master' into dev-v2.1.0 2022-02-04 17:39:13 +01:00
Gunnar Skjold
db5e242ad8 Various changes 2022-02-04 17:36:30 +01:00
Gunnar Skjold
5be921a342 Various changes 2022-02-04 17:35:47 +01:00
Gunnar Skjold
ddd24b20aa Started implementing loading config from FS 2022-01-30 20:53:03 +01:00
Gunnar Skjold
7c1ee20e7b Commit hash as version 2022-01-30 11:10:30 +01:00
Gunnar Skjold
5f0adc0f10 Commit hash as version 2022-01-30 10:54:51 +01:00
Gunnar Skjold
244f78ad1a Fixed bugs 2022-01-30 10:52:51 +01:00
Gunnar Skjold
9066af8dc7 Added list type 4 for power factor 2022-01-29 20:49:50 +01:00
Gunnar Skjold
5cfb58c2e6 Expose TX power adjustment 2022-01-29 20:34:35 +01:00
Gunnar Skjold
fb8d9e51a6 Option to send raw data frame to MQTT 2022-01-29 19:53:59 +01:00
Gunnar Skjold
77ce5d8e90 Energy accounting 2022-01-29 19:27:48 +01:00
Gunnar Skjold
8c69f9a738 Merge branch 'master' into dev-v2.1.0 2022-01-28 19:00:29 +01:00
Gunnar Skjold
dd87d70876 Free value on fuse size and production capacity 2022-01-28 18:29:50 +01:00
Gunnar Skjold
52992f09ee Stability adjustments 2022-01-28 17:41:48 +01:00
Gunnar Skjold
e8a56d5fc7 Merge branch 'master' into dev-v2.1.0 2022-01-23 20:22:01 +01:00
Gunnar Skjold
6aa02d54c8 Improvements for ENTSO-E 2022-01-23 17:52:10 +01:00
Gunnar Skjold
9dbf9137c7 Merge branch 'master' of github.com:gskjold/AmsToMqttBridge 2022-01-21 17:57:35 +01:00
Gunnar Skjold
c0a9a01b41 Fixed uint problem with current 2022-01-21 17:57:01 +01:00
Gunnar Skjold
7b203b196f Fixed voltage and current labels for esp8266 2022-01-21 17:50:02 +01:00
Gunnar Skjold
a72f02a779 First implementation of energy accounting 2022-01-21 17:37:23 +01:00
Gunnar Skjold
50c06e2cfe Removed ap pin from generic ESP32 2022-01-16 19:38:35 +01:00
Gunnar Skjold
e4d4753181 Fixed incorrect labels for IT/TT current 2022-01-16 17:24:57 +01:00
Gunnar Skjold
04daf551fb Fixed incorrect time diff for price fetch 2022-01-16 17:04:58 +01:00
Gunnar Skjold
4b51f0f235 Only update exchange rate once per day 2022-01-16 10:50:08 +01:00
Gunnar Skjold
5e4ccca663 Fetch prices between 13:30 and 14:00 2022-01-16 10:37:08 +01:00
Gunnar Skjold
6b0ec39759 Various updates 2022-01-16 09:58:13 +01:00
Gunnar Skjold
1f7d845a32 Removed debugging 2022-01-14 07:13:43 +01:00
Gunnar Skjold
6de5b719f3 Various changes 2022-01-14 07:12:08 +01:00
Daniel Ekman
f6d2bef285 reduce discovery code to single loop 2022-01-14 00:01:25 +01:00
Daniel Ekman
c444a108a5 Merge branch 'gskjold:master' into homeassistant 2022-01-13 22:50:25 +01:00
Gunnar Skjold
90859ee6b8 Cleanup 2022-01-09 20:47:33 +01:00
Gunnar Skjold
78dd856a97 Various changes 2022-01-09 20:45:25 +01:00
Gunnar Skjold
9897ccc563 Some adjustments for chrome dark mode 2022-01-08 11:19:18 +01:00
Gunnar Skjold
701e5904c5 Fixed build error on ESP8266 2022-01-08 10:39:03 +01:00
Gunnar Skjold
54ea17d345 Re-organized documents 2022-01-08 10:21:19 +01:00
Gunnar Skjold
327fed6f08 Month plot fix and some other things 2022-01-08 10:13:02 +01:00
Gunnar Skjold
8fe1a1edf2 Fixed checksum error for encrypted meters 2022-01-05 19:25:52 +01:00
Gunnar Skjold
6fd8dc0432 Fixed package timestamp for Kaifa 2022-01-03 13:52:04 +01:00
Gunnar Skjold
f586336ae3 Voltage calculation for Kaifa and other three phase meters not reporting voltage for L2 2022-01-03 09:46:53 +01:00
Gunnar Skjold
1527ee7d45 Timezone conversion for Kaifa 2022-01-03 09:05:04 +01:00
Gunnar Skjold
c543b38829 Timezone conversion for Kaifa 2022-01-03 09:00:19 +01:00
Gunnar Skjold
6d12d7120c Increase accumulated values to 3 decimals 2022-01-03 08:41:58 +01:00
Gunnar Skjold
c1d4ba772e Added extra char for string terminator to wifi config 2022-01-03 08:24:10 +01:00
Gunnar Skjold
a03d4113e7 Added checksum verification for Mbus payload 2022-01-03 08:23:49 +01:00
Gunnar Skjold
8751b6325d Updated example ini 2021-12-28 17:30:19 +01:00
Gunnar Skjold
ff02dd43a9 Deleted internal Timezone lib 2021-12-27 14:15:06 +01:00
Gunnar Skjold
b772fb6323 Issue template config 2021-12-27 14:14:24 +01:00
Daniel Ekman
586c0cba25 include supply volt and temp 2021-12-23 17:34:28 +01:00
Daniel Ekman
18bc6753db publish all disscovery params 2021-12-22 20:20:21 +01:00
Daniel Ekman
b79e6112b1 move energy to separate topic 2021-12-22 17:10:10 +01:00
Gunnar Skjold
f5acfce578 Fixed build error 2021-12-22 09:26:03 +01:00
Gunnar Skjold
4b902e2544 Added some defaults for NTP and DNS 2021-12-22 08:09:46 +01:00
Daniel Ekman
2e4e4328f2 first working discovery 2021-12-21 23:17:29 +01:00
Daniel Ekman
03089e92cb basic stuff implemented 2021-12-21 20:40:17 +01:00
Daniel Ekman
86939d4890 topic contains all fields, null if not used 2021-12-21 15:56:09 +01:00
Daniel Ekman
d7d25083dc flat data messages 2021-12-21 14:21:02 +01:00
Daniel Ekman
92e8beadc0 intial test with HA, copy of json 2021-12-21 13:07:07 +01:00
Gunnar Skjold
217247b28e Temperature sensor graph sort 2021-12-19 10:23:18 +01:00
Gunnar Skjold
4828f5a727 Temperature graph 2021-12-19 09:57:51 +01:00
Gunnar Skjold
062a3634a9 Fixed entso-e debugging 2021-12-19 09:17:57 +01:00
Gunnar Skjold
376cd0cf90 Fixed NULL access 2021-12-19 09:15:06 +01:00
Gunnar Skjold
2a20893a58 Fixed real time calculation issues 2021-12-19 09:14:31 +01:00
Gunnar Skjold
f3dba112de Merge branch 'master' of github.com:gskjold/AmsToMqttBridge 2021-12-18 18:30:22 +01:00
Gunnar Skjold
b037d6bb64 Try at least twice before showing ESP as red 2021-12-18 18:25:31 +01:00
Gunnar Skjold
6f7eacddff Trying to get ESP32S2 to work 2021-12-18 18:24:58 +01:00
Gunnar Skjold
4185411315 Merge pull request #169 from kng/master
Change time.h to timelib.h for 32bit to compile
2021-12-18 17:21:19 +01:00
Daniel Ekman
2a1b5a5f6d Change time.h to timelib.h for 32bit to compile 2021-12-18 17:10:53 +01:00
Gunnar Skjold
246a4f96fe Merge pull request #168 from kng/master
Assignment error in meter types
2021-12-18 15:43:09 +01:00
Daniel Ekman
c7d235b367 Assignment error in meter types 2021-12-18 15:37:30 +01:00
Gunnar Skjold
c5c8fbc2a0 Trying timezone from repo again 2021-12-18 15:25:06 +01:00
Gunnar Skjold
8adf591c4e Fixed timelib 2021-12-18 15:20:15 +01:00
Gunnar Skjold
aa893f7ede Fixed bug in price fetch 2021-12-18 15:17:34 +01:00
Gunnar Skjold
f8b1725e94 Revert lib changes 2021-12-18 14:41:58 +01:00
Gunnar Skjold
ae7e3d11d5 Merge branch 'master' of github.com:gskjold/AmsToMqttBridge 2021-12-18 14:33:59 +01:00
Gunnar Skjold
73b20a0766 Merge pull request #167 from kng/master
Libdeps updated to avoid conflict with time.h
2021-12-18 14:29:58 +01:00
Daniel Ekman
d8cf961258 Libdeps updated to avoid conflict with time.h 2021-12-18 13:55:57 +01:00
Gunnar Skjold
bccd19812d Added power factor to MQTT JSON 2021-12-16 11:37:00 +01:00
Gunnar Skjold
6954ff5432 Merge pull request #163 from mikkle/pf-mqtt-cp-fix
Fix c/p error in mqtt powerfactor publishing
2021-12-16 11:26:01 +01:00
Mikkel Troest
6200f31b83 Fix c/p error in mqtt powerfactor publishing 2021-12-16 10:36:38 +01:00
Gunnar Skjold
5408b3c2a9 Make sure temperatures are read just after receiving HAN data 2021-12-13 20:57:17 +01:00
Gunnar Skjold
bd0b3ebb26 Removed debugging 2021-12-12 10:38:40 +01:00
Gunnar Skjold
895a9bc6b1 Fixed api key overwrite 2021-12-12 10:36:50 +01:00
Gunnar Skjold
ff935fc920 Specify that prices only work for ESP32 2021-12-12 08:36:23 +01:00
Gunnar Skjold
3833421e5f Fixed "new version" announcement 2021-12-10 19:09:24 +01:00
Gunnar Skjold
ebdc357a47 Check for scaling and use if available 2021-12-10 18:46:57 +01:00
Gunnar Skjold
7da617e8c2 Merge pull request #154 from gskjold/dev-1.6.0
v2.0
2021-12-10 08:52:10 +01:00
Gunnar Skjold
0b86761d2c Fixed a couple of things before release 2021-12-10 08:38:48 +01:00
Gunnar Skjold
d697f7e37f Final changes before 2.0 2021-12-10 08:19:48 +01:00
Gunnar Skjold
db859e3ff5 Fixed readme 2021-12-08 21:06:52 +01:00
Gunnar Skjold
94d22957bd Removed old screenshot 2021-12-08 21:06:00 +01:00
Gunnar Skjold
1ebaf443cc Updated readme 2021-12-08 21:05:42 +01:00
Gunnar Skjold
a336f711b0 Fixed day graph 2021-12-08 20:35:53 +01:00
Gunnar Skjold
e6d3b47d4f Some adjustment to data storage 2021-12-07 19:34:34 +01:00
Gunnar Skjold
eb479f8216 More adaptations for Austian meters 2021-12-07 19:07:43 +01:00
Gunnar Skjold
38cba4e8da Various fixes 2021-12-06 19:33:40 +01:00
Gunnar Skjold
bc6d45ecf2 Fixed WiFi instability? 2021-12-06 16:58:55 +01:00
Gunnar Skjold
097131d7fb Some changes 2021-12-06 10:47:42 +01:00
Gunnar Skjold
2107ca50e4 More changes for Austrian meters, untested 2021-12-06 10:47:08 +01:00
Gunnar Skjold
178f603937 Fix 2021-12-05 20:14:46 +01:00
Gunnar Skjold
21687368c6 Preparing for austrian meters 2021-12-05 20:09:34 +01:00
Gunnar Skjold
6054e900e6 Experimenting 2021-12-05 13:08:34 +01:00
Gunnar Skjold
3da5275624 Fixed merge problem 2021-12-05 12:21:21 +01:00
Gunnar Skjold
3fda2cfe7a Removed test code 2021-12-05 12:16:13 +01:00
Gunnar Skjold
2bb651f95c Merge branch 'master' into dev-1.6.0 2021-12-05 12:15:39 +01:00
Gunnar Skjold
e2442a26ee Trying to figure out esp8266 wifi reconnect 2021-12-05 12:07:34 +01:00
Gunnar Skjold
cbd2ab4a7a Trying to figure out esp8266 wifi reconnect 2021-12-05 12:07:20 +01:00
Gunnar Skjold
76f8e2c343 2.0 development 2021-12-04 15:41:13 +01:00
Gunnar Skjold
ab101c8622 Some changes after testing 2021-11-30 08:01:20 +01:00
Gunnar Skjold
f425abb52d Added missing file from last commit 2021-11-27 20:29:18 +01:00
Gunnar Skjold
dc5bfff655 Merge branch 'master' into dev-1.6.0 2021-11-27 20:23:35 +01:00
Gunnar Skjold
eb59245118 Added usage plots and ADC reading for Vcc 2021-11-27 20:16:26 +01:00
Gunnar Skjold
d18fd27a24 Fixed accumulated values from Kaifa 1p 2021-11-23 20:55:55 +01:00
Gunnar Skjold
6f09f523e4 Added possibility to upgrade from GUI if there is enough RAM for SSL 2021-11-18 20:42:13 +01:00
Gunnar Skjold
e78d59c31a Different menu for ESP8266 and ESP32 2021-11-18 20:28:29 +01:00
Gunnar Skjold
e7f3217d7b Added support for power factor 2021-11-18 20:20:51 +01:00
Gunnar Skjold
ab534ce60a Ignore firmware update if AP button is pressed 2021-11-18 19:43:48 +01:00
Gunnar Skjold
933246eae8 Changed from SPIFFS to LittleFS 2021-11-18 19:40:20 +01:00
Gunnar Skjold
5c38d1cf3e Fixes after testing 2021-11-18 19:06:33 +01:00
Gunnar Skjold
580085f717 Fixed kamstrup list version 2021-11-17 21:47:00 +01:00
Gunnar Skjold
9831d4aa78 Removed buffer size 2021-11-17 21:46:37 +01:00
Gunnar Skjold
a3561d5c58 Fixed free mem formatting bug 2021-11-17 20:50:30 +01:00
Gunnar Skjold
2a524cd0ac Fixed Kamstrup bug 2021-11-17 20:42:45 +01:00
Gunnar Skjold
254e010594 Fixed save crash 2021-11-16 20:40:21 +01:00
Gunnar Skjold
24025d6785 Added support for IEC62056-21 2021-11-16 20:07:47 +01:00
Gunnar Skjold
4c92e592d6 Added support for uart_swap for ESP8266 2021-11-08 12:05:48 +01:00
Gunnar Skjold
f192ddae81 Some changes while testing 2021-11-06 21:02:38 +01:00
Gunnar Skjold
1cd2446365 Some modifications to support timestamp from all meters 2021-11-06 19:44:50 +01:00
Gunnar Skjold
6d26102b8e New meter config 2021-11-06 19:30:58 +01:00
Gunnar Skjold
8e9da8f255 First step in implementing a new DLMS parser 2021-11-06 16:56:02 +01:00
Gunnar Skjold
72bdb6e363 Update issue templates 2021-11-01 07:14:54 +01:00
Gunnar Skjold
6df942f488 Revert time version update 2021-10-31 09:37:58 +01:00
Gunnar Skjold
1e323ac3b9 Various changes for version updates and some debugging for upload 2021-10-31 09:33:25 +01:00
Gunnar Skjold
05bdbaf1f5 Fixed error 2021-10-30 18:42:59 +02:00
Gunnar Skjold
6cca25788e Fixed copy/paste error 2021-10-23 10:45:57 +02:00
Gunnar Skjold
e929f87ea9 Fixed decimals in json 2021-10-23 10:38:53 +02:00
Gunnar Skjold
21a4102553 Changes for correct time conversion 2021-10-23 10:05:14 +02:00
Gunnar Skjold
768645fc0a Added more decimals in data.json 2021-10-23 10:04:52 +02:00
Gunnar Skjold
c670549dea Warning for BUS powered devices on firmware upgrade 2021-10-23 09:21:53 +02:00
Gunnar Skjold
147b2ca33e Fixed build error 2021-10-23 09:07:07 +02:00
Gunnar Skjold
c645b82ed3 Fixed voltage and amp meters 2021-10-23 09:04:00 +02:00
Gunnar Skjold
26bb8a0fea Support two phase power calculation 2021-10-23 08:59:16 +02:00
Gunnar Skjold
507ed13770 Added GPIO designation to UART in dropdown 2021-10-23 08:40:40 +02:00
Gunnar Skjold
a0f53a0c52 Partial fix of dead gauges 2021-10-21 21:17:03 +02:00
Gunnar Skjold
13bbc81b7f Clear debug config on setup if not already set 2021-09-23 20:56:24 +02:00
Gunnar Skjold
7412ba2697 Removed temp sensor update if no sensors were found 2021-09-23 20:30:22 +02:00
Gunnar Skjold
dce7b7e64b Support for long MQTT username and password 2021-09-23 19:28:55 +02:00
Gunnar Skjold
7627d6c369 Updated readme 2021-09-23 18:48:58 +02:00
Gunnar Skjold
9fc9adea1c Fixed crash when enabling substitute values in meter config 2021-09-23 18:30:15 +02:00
Gunnar Skjold
46df07fe40 Fixed build error on ESP32 2021-09-23 18:20:54 +02:00
Gunnar Skjold
0aeb5555e7 Fixed long web passwords 2021-09-23 18:10:16 +02:00
Gunnar Skjold
181fe3c909 Removed meter from setup 2021-09-23 17:36:43 +02:00
Gunnar Skjold
867d6a4ef8 Added profiles for Pow board 2021-09-23 17:34:21 +02:00
Gunnar Skjold
d52216a73e Moved hardware page to Wiki 2021-09-23 17:28:51 +02:00
Gunnar Skjold
d70b41a454 Added images for Pow 2021-09-23 17:25:52 +02:00
Gunnar Skjold
332c366561 Renamed kamstrup meters 2021-09-22 11:44:59 +02:00
Gunnar Skjold
b572ad97f8 Added Kamstrup document 2021-09-22 11:42:22 +02:00
Gunnar Skjold
aa307f8690 Fixed incorrect value for accumulated export 2021-09-22 11:40:48 +02:00
Gunnar Skjold
19223312b5 Fixed danish KAmstrup 2021-09-13 10:14:47 +02:00
Gunnar Skjold
74bc5aa7a0 Fixed build 2021-09-13 10:14:28 +02:00
Gunnar Skjold
e66e8a96ff Added some frames as documentation 2021-09-13 08:10:39 +02:00
Gunnar Skjold
ce95360a64 Minor fix 2021-09-13 08:08:39 +02:00
Gunnar Skjold
7802aeaab1 Removed unnecessary config for arduinojson 2021-09-13 08:07:38 +02:00
Gunnar Skjold
37ce3566bf Fixed config clear 2021-09-13 08:07:03 +02:00
Gunnar Skjold
606bac100a Cleanup 2021-03-24 09:37:46 +01:00
Gunnar Skjold
be569d1802 Fixed buffer for JSON generation 2021-03-17 20:36:40 +01:00
Gunnar Skjold
3e21105b2d Fixed prices in JSON handler 2021-03-17 20:33:11 +01:00
Gunnar Skjold
9946827431 Fixed cheapest price calculation 2021-03-17 20:17:36 +01:00
Gunnar Skjold
90d03ca77f Retain flag for prices 2021-03-16 11:44:01 +01:00
Gunnar Skjold
7727b17122 Fixed publishing of prices 2021-03-16 11:02:59 +01:00
Gunnar Skjold
fbc4c8c502 Merge pull request #101 from gskjold/dev-v1.5.0
Dev v1.5.0
2021-03-10 19:22:23 +01:00
Gunnar Skjold
5d6a4ea0a4 Updated readme 2021-03-10 19:15:00 +01:00
Gunnar Skjold
91ce486bde Updated readme 2021-03-10 19:14:22 +01:00
Gunnar Skjold
523139749e Auto install minifier 2021-03-10 19:14:12 +01:00
Gunnar Skjold
5b9f3b7aed Minor changes after testing 2021-03-10 18:33:45 +01:00
Gunnar Skjold
af76243761 Retain flag for accumulated values 2021-03-10 17:45:16 +01:00
Gunnar Skjold
605dc4901c Fixed incorrect check for 32/35 A main fuse 2021-03-10 17:45:02 +01:00
Gunnar Skjold
54fb950513 Changes after testing 2021-01-22 08:01:23 +01:00
Gunnar Skjold
ff84278edf Some changes after testing 2021-01-20 07:41:09 +01:00
Gunnar Skjold
f15cf5d75e Some changes after testing 2021-01-18 20:32:51 +01:00
Gunnar Skjold
33070af111 Refactored MQTT payload handling into separate classes 2021-01-17 20:11:04 +01:00
Gunnar Skjold
53573184f3 Simplified temperature.json 2021-01-17 15:53:56 +01:00
Gunnar Skjold
decc4788a7 Simplified code that generates data.json 2021-01-17 15:08:01 +01:00
Gunnar Skjold
f9597c786e Changed to BearSSL for meter decryption on ESP8266 + some minor changes 2021-01-17 12:34:57 +01:00
Gunnar Skjold
af8f5a7c24 Memory optimization and bugfix 2021-01-16 16:02:39 +01:00
Gunnar Skjold
a830a52863 Stripped HTML to improve stability 2021-01-14 20:03:49 +01:00
Gunnar Skjold
037bac24de Changes in user interface 2021-01-14 16:19:00 +01:00
Gunnar Skjold
837c3cf802 Taking timezone into account when calculating midnight 2021-01-11 20:21:36 +01:00
Gunnar Skjold
75956c087c Closing http connections after receiving data 2021-01-11 09:49:25 +01:00
Gunnar Skjold
88528b4099 Added reboot and cleaned up a bit in UI 2021-01-10 22:30:55 +01:00
Gunnar Skjold
6176d34e84 Link to documentation 2021-01-10 22:03:02 +01:00
Gunnar Skjold
f2dda26bbb Added support for retrieving energy price from ENTSO-E API 2021-01-10 20:54:25 +01:00
Gunnar Skjold
402ecf67d7 Merge branch 'master' into dev-v1.5.0 2021-01-09 11:25:31 +01:00
Gunnar Skjold
a83a6c1c53 Fixed release 2021-01-09 11:21:01 +01:00
Gunnar Skjold
5beb13894c Initial implementation of supporting timezone in timestamp 2021-01-09 11:11:49 +01:00
Gunnar Skjold
c3fa618ab2 Fixed build problem 2021-01-09 09:50:20 +01:00
Gunnar Skjold
7713ae8566 Trying to fix GitHub Actions build issue 2021-01-09 09:36:20 +01:00
Gunnar Skjold
7ae860ec72 Fixed incorrect reading of analog temperature 2021-01-09 09:33:09 +01:00
Gunnar Skjold
376008a735 Merge pull request #96 from kallemooo/fixFromHex
Changed fromHex() to use an supplied buffer
2021-01-04 09:58:32 +01:00
Karl Thorén
feed10184b Changed fromHex() to use an supplied buffer
Solves the problem with returning a pointer to local variable.

Signed-off-by: Karl Thorén <karl.h.thoren@gmail.com>
2020-12-27 16:29:53 +01:00
Gunnar Skjold
59ca29f6a8 Update README.md 2020-09-25 06:46:16 +02:00
Gunnar Skjold
644a3fa40b Fixed factory reset 2020-09-05 20:03:06 +02:00
Gunnar Skjold
a2c1c8fc61 Updated ESP32 flash procedure 2020-09-05 19:27:36 +02:00
Gunnar Skjold
b823f029ea Updated readme 2020-09-05 19:12:59 +02:00
Gunnar Skjold
fd907deec1 Merge pull request #87 from gskjold/dev-v1.4.0
Dev v1.4.0
2020-09-05 19:05:01 +02:00
Gunnar Skjold
c1b56e25ad Minor changes 2020-09-05 18:59:52 +02:00
Gunnar Skjold
5491088cec Cleared out some unnecessary files from mbedtls lib 2020-09-05 11:14:00 +02:00
Gunnar Skjold
04271accc1 Dynamic temperature page 2020-09-05 11:10:36 +02:00
Gunnar Skjold
a332e38b97 Some cleanup 2020-09-05 09:40:07 +02:00
Gunnar Skjold
17bd85ebd0 Added more debugging code. Also some changes after testing 2020-09-04 07:25:11 +02:00
Gunnar Skjold
4207216770 Some changes for mbedtls when building ESP32 2020-08-28 21:20:11 +02:00
Gunnar Skjold
02491e074b Added comment 2020-08-28 20:33:46 +02:00
Gunnar Skjold
e79a0585f0 Some changes during testing 2020-08-28 19:58:33 +02:00
Gunnar Skjold
859220d33f Added missing getter 2020-08-28 17:55:07 +02:00
Gunnar Skjold
5d47105951 Added support for TMP236 analog temp sensor 2020-08-28 17:46:34 +02:00
Gunnar Skjold
e71f937856 Some changes during testing 2020-08-06 13:11:31 +02:00
Gunnar Skjold
d730aac33b Send temperature updates to MQTT 2020-08-05 20:33:49 +02:00
Gunnar Skjold
e121ec75d8 Support multiple temperature sensors 2020-08-05 19:55:16 +02:00
Gunnar Skjold
6479fd6a63 Splitted system config into Web, NTP, GPIO and Debugging 2020-08-05 13:45:10 +02:00
Gunnar Skjold
603f2925ce Removing mbedtls code in HanReader lib 2020-07-31 11:25:45 +02:00
Gunnar Skjold
1284f3f848 Using internal mbedtls lib for encrypted meters. Next up, find out how to modify config.h when using external lib. 2020-07-31 11:19:23 +02:00
Gunnar Skjold
620e355a27 Support encrypted meters and added vcc offset 2020-07-31 10:15:11 +02:00
Gunnar Skjold
47ddf57547 Merge branch 'master' into dev-v1.4.0 2020-07-26 11:24:43 +02:00
Gunnar Skjold
fcbfe4d96f Changes to make substituted I2 correct when exporting power 2020-07-25 09:17:39 +02:00
Gunnar Skjold
d789d6ff3b Reduced number of build targets 2020-07-25 09:15:05 +02:00
Gunnar Skjold
b4f18de030 Made base64 work for both platforms 2020-07-25 08:48:51 +02:00
Gunnar Skjold
00d5d215cd Switched to internal base64 2020-07-25 08:45:31 +02:00
Gunnar Skjold
8de5a58a6b Changed dependency for Base64 2020-07-06 19:17:45 +02:00
Gunnar Skjold
012794e682 Make web content minifier optional 2020-07-06 19:14:37 +02:00
Gunnar Skjold
38eb2d8c19 Merge pull request #79 from gskjold/dev-v1.3.0
Dev v1.3.0
2020-06-06 20:30:47 +02:00
Gunnar Skjold
d95137adbc Support for Kamstrup IT meters 2020-05-28 18:44:38 +02:00
Gunnar Skjold
cde3f80fca Ensure that GPIO is correctly set after setup 2020-05-28 14:19:03 +02:00
Gunnar Skjold
cdc012743f Changes for building on GitHub actions for all branches 2020-05-27 08:38:59 +02:00
Gunnar Skjold
23c90315a5 Some changes before public testing 2020-05-24 17:14:16 +02:00
Gunnar Skjold
8d938f111c Fixed mDNS 2020-05-24 16:30:51 +02:00
Gunnar Skjold
cff6c02d57 Some cleanup and changes. Trying to get self-update to work, no luck 2020-05-22 22:26:31 +02:00
Gunnar Skjold
0c92f7401c Removed unused code 2020-05-22 17:24:17 +02:00
Gunnar Skjold
195a0d4e77 Merge branch 'dev-v1.3.0' of github.com:gskjold/AmsToMqttBridge into dev-v1.3.0 2020-05-22 17:23:41 +02:00
Gunnar Skjold
43f50e0e0a Check for updates from GitHub and minor changes during testing 2020-05-22 17:23:38 +02:00
Gunnar Skjold
f2f20afd9c Merge pull request #76 from atlej68/dev-1.3.0-test
dev-1.3.0-testing: Timezone for esp32 and minor domoticz fix.
2020-05-22 17:22:54 +02:00
Atle Johansen
f22cfbb223 Domoticz: make config save values, cleanup. 2020-05-16 18:39:23 +02:00
Atle Johansen
803c5116bd alt. to Tz.h for esp32 (Tz.h not avail. for esp32) 2020-05-16 17:04:28 +02:00
Gunnar Skjold
a542fbc931 Yellow flash for AP mode if RGB LED is configured 2020-05-16 10:20:27 +02:00
Gunnar Skjold
85a70016fa Checking for new version on GitHub 2020-05-14 21:13:13 +02:00
Gunnar Skjold
778daf8645 Fixed som HTML and JS problems. Removed external NTP library and using espressif internal NTP client instead 2020-05-10 12:29:00 +02:00
Gunnar Skjold
efa99f970c Factory reset and splitted HTML into head, content and footer files to reduce memory footprint while parsing HTML templates 2020-05-10 11:51:00 +02:00
Gunnar Skjold
953f2d4110 Some modifications to increase stability 2020-05-08 22:58:16 +02:00
Gunnar Skjold
c3c0ca0a1b Added option to substitute missing I2 for Aidon IT meters. Also cleaned up some more UI 2020-05-04 16:07:23 +02:00
Gunnar Skjold
dc83853d2e Fixed some GPIO and Vcc configuration issues 2020-05-03 21:27:19 +02:00
Gunnar Skjold
f5123e9aa1 UI cleanup and added devkit board to initial setup 2020-05-03 21:01:58 +02:00
Gunnar Skjold
2da69dd451 Merge branch 'dev-v1.3.0' of github.com:gskjold/AmsToMqttBridge into dev-v1.3.0 2020-05-03 16:49:28 +02:00
Gunnar Skjold
2858123c1b Added configuration of GPIO in UI. Added initial setup page in AP mode. Major changes in storing configuration. 2020-05-03 16:29:38 +02:00
Gunnar Skjold
9d4488f8df Merge pull request #70 from atlej68/add_domoticz
Add domoticz
2020-05-03 16:28:05 +02:00
Gunnar Skjold
f78c8e3582 Merge pull request #69 from atlej68/add_devkit
Add devkit boards
2020-05-03 16:27:45 +02:00
Atle Johansen
431d6714b5 fix typo 2020-05-01 15:46:16 +02:00
Atle Johansen
550a3c1a0b reverse local change 2020-05-01 15:24:17 +02:00
Atle Johansen
b6f5e72638 merge with 1..3.0 and implementation of comments 2020-05-01 15:22:39 +02:00
Atle Johansen
958ff37d7d Merge remote-tracking branch 'upstream/dev-v1.3.0' into add_domoticz 2020-05-01 14:21:55 +02:00
Gunnar Skjold
1ea9da22c7 Merge pull request #68 from stenjo/feature/fullreport
Implementation of MQTT RAW full format
2020-05-01 12:16:06 +02:00
Gunnar Skjold
0c93c52e3d Implemented support for MQTT SSL and cleaned up necessary code 2020-05-01 12:10:08 +02:00
Atle Johansen
41784511e9 Add config for direct MQTT messages to Domoticz 2020-04-30 18:56:21 +02:00
Atle Johansen
a78fdc0b59 Add devkit boards 2020-04-30 18:28:12 +02:00
Gunnar Skjold
cc032fdf29 Implemented upload of certificates for MQTT SSL 2020-04-29 21:04:42 +02:00
Sten Otto Johnsen
f696e0b59b Removed checksum change 2020-04-24 12:15:25 +02:00
Sten Otto Johnsen
f67f12a188 Adding full report on raw data 2020-04-24 00:05:12 +02:00
Gunnar Skjold
719ed56e21 Merge pull request #66 from gskjold/dev-v1.2.3
Dev v1.2.3
2020-04-19 20:23:05 +02:00
Gunnar Skjold
cc72d0e0b3 Uncommited changes 2020-04-18 19:18:39 +02:00
Gunnar Skjold
ab175ec9ec Added correct conversion for int8, int16 and uint32 2020-04-18 11:04:43 +02:00
Gunnar Skjold
398407350c Fixed typ-o in MQTT topic for temperature and moved voltage bootup check into compiler option SELF_POWERED 2020-04-10 08:52:56 +02:00
Gunnar Skjold
5e33a15e85 Fixed build file 2020-04-09 08:58:56 +02:00
Gunnar Skjold
7f51534e91 Fixed page title on reboot page 2020-04-09 08:56:50 +02:00
Gunnar Skjold
0f5af6b274 Fixed ESP32 crash with RemoteDebug and unformatted SPIFFS. Added battery voltage for Lolin D32 and moved ESP_VCC_CALIB_FACTOR to cover all boards 2020-04-09 08:44:25 +02:00
Gunnar Skjold
7886ce668e Fixed build file? 2020-04-07 21:16:31 +02:00
Gunnar Skjold
0f4848c872 Added missing dep 2020-04-07 20:56:49 +02:00
Gunnar Skjold
6911d203ca Merge pull request #56 from gskjold/dev-v1.2
Version 1.2
2020-04-07 20:53:39 +02:00
Gunnar Skjold
e96b5bbf1b Changes during testing 2020-03-30 21:14:58 +02:00
Gunnar Skjold
8457db50f6 Merge branch 'master' into dev-v1.2 2020-03-30 20:12:13 +02:00
Gunnar Skjold
279c5f8321 Fixed actions script 2020-03-30 07:28:02 +02:00
Gunnar Skjold
889b9153fa Increased limit for ArduinoJson positive exponentiation 2020-03-30 07:05:34 +02:00
Gunnar Skjold
0de1d0bb6f Changed accumulated values for Kaifa 2020-03-30 07:02:42 +02:00
Gunnar Skjold
bf13965a9e Various changes during testing 2020-03-26 20:55:23 +01:00
Gunnar Skjold
7b52efd332 Fix missing release version on files 2020-03-25 20:37:15 +01:00
Gunnar Skjold
c936f605d6 Fixes #45 2020-03-25 20:21:39 +01:00
Gunnar Skjold
9d0ceb9ca8 Fixes problem with release 2020-03-25 20:07:23 +01:00
Gunnar Skjold
b33273e3cc Fixes #47 2020-03-25 20:06:42 +01:00
Gunnar Skjold
d9b45d037b Some changes during testing 2020-03-24 21:19:09 +01:00
Gunnar Skjold
8c75a9530e Default config for ESP32 2020-03-24 20:26:13 +01:00
Gunnar Skjold
73d00f786a Added remote debugging 2020-03-24 20:17:44 +01:00
Gunnar Skjold
ab016fff93 Merge pull request #54 from Allram/master
Increased MQTT buffer to work with Aidon 6525 meters
2020-03-24 20:11:00 +01:00
Vegard Fladby
a215aa7766 Increased MQTT buffer to work with Aidon 6525 meters 2020-03-24 19:49:40 +01:00
Gunnar Skjold
d747c84a14 Added DNS to static IP config. Added hostname to config. Added mDNS 2020-03-22 15:08:17 +01:00
Gunnar Skjold
26634f96b0 Added firmware upload from UI 2020-03-22 11:54:27 +01:00
Gunnar Skjold
97669cf4ad When using raw payload with MQTT, only update if changed 2020-03-10 18:57:25 +01:00
Gunnar Skjold
e12980db11 Added option to send data as raw values to MQTT 2020-03-10 18:43:18 +01:00
Gunnar Skjold
732639814b Reduce resolution of "up" in JSON from millis to seconds 2020-03-10 17:46:18 +01:00
Gunnar Skjold
c07c2e66d6 Fixed uptime rollover in UI 2020-03-08 19:47:47 +01:00
Gunnar Skjold
9b70802450 Fixed conversion of date and time from meter to account for CET/CEST 2020-03-08 18:37:10 +01:00
Gunnar Skjold
30d73c3a6e Updated documentation 2020-03-01 13:24:06 +01:00
Gunnar Skjold
bd905c3595 Merge pull request #44 from gskjold/dev-v1.1.0
Dev v1.1.0
2020-03-01 12:56:12 +01:00
Gunnar Skjold
1a2e70b1fb Merge pull request #42 from ArnieO/dev-v1.1.0
Dev v1.1.0 Optional ESP8266 Vcc calibration factor in *.ini file
2020-03-01 12:53:56 +01:00
Gunnar Skjold
d6da7b2715 Merge branch 'dev-v1.1.0' of github.com:gskjold/AmsToMqttBridge into dev-v1.1.0 2020-03-01 09:41:18 +01:00
Gunnar Skjold
059a430f9a Fixed problem with AP mode with INVALID_BUTTON_PIN set 2020-03-01 09:39:58 +01:00
Gunnar Skjold
8ade50c2a6 Initialize all meter data to 0. Removed calculations for i2 2020-02-26 09:06:29 +01:00
Gunnar Skjold
5b94d8ff61 Added calculated value for L2 current when missing from Aidon 2020-02-25 14:08:04 +01:00
ArnieO
232b9c279d Optional Vcc calibration factor defined in *.ino 2020-02-24 20:05:34 +01:00
ArnieO
9b6a6af6ec Merge remote-tracking branch 'upstream/dev-v1.1.0' into dev-v1.1.0 2020-02-24 13:32:26 +01:00
Gunnar Skjold
9671e1eba3 Fixed bug where UI showed stalled HAN when exporting power. Also, maybe fixed issue with Vcc precision in UI? 2020-02-24 12:01:51 +01:00
Gunnar Skjold
78e531a7e9 Changed term for production and consumption when local production is defined 2020-02-24 07:47:39 +01:00
Gunnar Skjold
478d63505d Allow compiling when RGB is not defined 2020-02-24 07:47:12 +01:00
Gunnar Skjold
d8dfaaa730 Version hardening 2020-02-24 07:46:48 +01:00
Gunnar Skjold
f311b70b37 Merge branch 'master' into dev-v1.1.0 2020-02-24 07:17:48 +01:00
Gunnar Skjold
52bc2b14c9 Some changes after testing 2020-02-23 20:31:10 +01:00
ArnieO
2ddfc16d6a Updated comment for rgbled() function 2020-02-23 17:12:26 +01:00
Gunnar Skjold
51ab4a7f07 Reducing precision on temperature and vcc in json to reduce length 2020-02-23 11:34:25 +01:00
Gunnar Skjold
e90a30bfde Implemented blinking for red LED on error 2020-02-22 17:23:56 +01:00
Gunnar Skjold
a63e6962d3 Merge pull request #38 from ArnieO/dev-v1.1.0
Added code for optional RGB LED
2020-02-22 16:42:19 +01:00
Gunnar Skjold
951ccf7de5 Merge branch 'dev-v1.1.0' into dev-v1.1.0 2020-02-22 16:42:04 +01:00
Gunnar Skjold
001e3376df Merge pull request #39 from gskjold/dev-v1.1.0-mqttraw
Merged code preparations for other MQTT payload formats
2020-02-22 16:37:29 +01:00
Gunnar Skjold
9e4bf93f0a Some changes to reduce dlms read errors 2020-02-22 12:29:04 +01:00
ArnieO
e5ac823f69 Changed mqtt buffer to 384, JSON buffer to <512> 2020-02-21 23:29:01 +01:00
Gunnar Skjold
73fd228e2f Merge branch 'dev-v1.1.0' into dev-v1.1.0-mqttraw 2020-02-21 20:58:17 +01:00
Gunnar Skjold
fdac8f88af Minor optimization 2020-02-21 20:52:55 +01:00
Gunnar Skjold
9c8552869c Preparations for selectable MQTT payload format 2020-02-21 20:51:55 +01:00
ArnieO
be75b013c0 Added code for RGB LED 2020-02-21 19:13:44 +01:00
ArnieO
79274e490d Added code for RGB LED 2020-02-21 18:53:05 +01:00
ArnieO
47293eebe4 Added code for RGB LED 2020-02-21 18:38:28 +01:00
Gunnar Skjold
90b62638ed Dependency hardening 2020-02-20 20:36:12 +01:00
Gunnar Skjold
78e766156d Minimizing calls to web server 2020-02-18 21:33:41 +01:00
Gunnar Skjold
4b32af69a7 Fixed typo 2020-02-18 07:37:42 +01:00
Gunnar Skjold
916b5550d9 Fixed typo 2020-02-18 07:25:10 +01:00
Gunnar Skjold
48016240f9 Some cleanup after testing with ESP32 2020-02-17 20:06:52 +01:00
Gunnar Skjold
518b408205 Minor changes to fix build 2020-02-17 17:23:18 +01:00
Gunnar Skjold
73a0359597 Minor changes to fix build 2020-02-17 17:21:34 +01:00
Gunnar Skjold
bbe82f9cdc Added a small delay that helped smooth the voltage on a HAN powered device. No more sudden reboots 2020-02-16 21:45:58 +01:00
Gunnar Skjold
4786735d4c Support older config versions. Fixed css for AP mode. Some cleanup and changes to preserve power 2020-02-16 20:09:29 +01:00
Gunnar Skjold
227eb7b6ff Now using external base64 lib. Also updated some previously commited errors 2020-02-16 16:03:01 +01:00
Gunnar Skjold
00edd94033 Fixed some bugs from late night coding 2020-02-16 15:46:01 +01:00
Gunnar Skjold
ccd818e1ab Merge branch 'master' into dev-v1.1.0 2020-02-16 15:28:47 +01:00
Gunnar Skjold
fc42fb22d8 Merge pull request #33 from gskjold/dev-v1.0.1
Dev v1.0.1
2020-02-16 14:49:36 +01:00
Gunnar Skjold
f6066fbbf3 Cleanup and fix bugs found during testing 2020-02-15 22:13:04 +01:00
Gunnar Skjold
9c09740a41 Production graph and fixed vcc value 2020-02-15 21:04:18 +01:00
Gunnar Skjold
4e24e2949a Updated featheresp32 config to use Serial2 for Mbus 2020-02-15 18:01:10 +01:00
Gunnar Skjold
eff00f1fe0 Only show temp if sensor is attached. Added common functions to get temp and vcc 2020-02-14 21:48:03 +01:00
Gunnar Skjold
f484f3eb0e Merge branch 'dev-v1.0.1' into dev-v1.1.0 2020-02-14 20:19:15 +01:00
Gunnar Skjold
b2174dd521 If debug mode and HW_ROARFRED, use software serial to set upp RX for HAN with 2400 and TX for debugging with 115200 2020-02-14 20:14:30 +01:00
Gunnar Skjold
fe79a96827 Added change to allow auto modem sleep 2020-02-14 19:52:15 +01:00
Gunnar Skjold
517a40b0a6 Finalized new configuration menu and moved AP button trigger from setup to loop 2020-02-14 19:49:25 +01:00
Gunnar Skjold
75f3c8c592 Merge branch 'dev-v1.0.1' into dev-v1.1.0 2020-02-14 16:07:54 +01:00
Gunnar Skjold
554cc7c023 Added date and time from meter as rtc in json 2020-02-14 16:03:52 +01:00
Gunnar Skjold
6d0c722c98 Using kwh and kvarh as standard for accumulated numbers from kamstrup 2020-02-14 12:25:40 +01:00
Gunnar Skjold
d2f93c07bd Not sure if this does anything, but increased json and mqtt limits to see if Kamstrup list 3 is received 2020-02-13 20:50:13 +01:00
Gunnar Skjold
d63516fd49 Deleted autosave 2020-02-13 20:41:08 +01:00
Gunnar Skjold
c114b777c7 Minor changes to UI 2020-02-13 20:40:33 +01:00
Gunnar Skjold
a06729b535 Bugfix for previous commit 2020-02-12 20:11:55 +01:00
Gunnar Skjold
0ea21991ea Continued work with v1.1.0
- Merge branch 'low_power' into dev-v1.1.0
- Corrected accumulated import/export from Aidon
- Added VCC and RSSI to MQTT messages

Changes in UI:
- New top navbar
- Show VCC and WiFi information
- Show MQTT error messages
- Show ESP, HAN, WiFi and MQTT status badge
- Show accumulated Import/export
2020-02-12 19:55:06 +01:00
Gunnar Skjold
1994f16b82 Merge branch 'dev-v1.0.1' into dev-v1.1.0 2020-02-12 16:41:04 +01:00
Gunnar Skjold
b6efae656f Expose export power in JSON 2020-02-12 16:40:51 +01:00
Gunnar Skjold
fa0f93cefe Switched to reactive import for Q 2020-02-12 13:25:36 +01:00
Gunnar Skjold
058dc658c1 Switched to reactive import for Q 2020-02-12 13:16:49 +01:00
Gunnar Skjold
f6df84bf9a Auto detect meter type 2020-02-11 18:40:38 +01:00
Gunnar Skjold
4b9cb27e58 Disable web security if AP mode is triggered 2020-02-11 17:32:18 +01:00
Gunnar Skjold
5f14517258 Minor changes after testing MQTT reconnect 2020-02-11 17:25:52 +01:00
Gunnar Skjold
ad820fff01 Allow other services to get resources while trying to connect to mqtt 2020-02-11 11:04:37 +01:00
Gunnar Skjold
6d3d4adc7e Merge branch 'master' into low_power 2020-02-09 13:45:27 +01:00
Gunnar Skjold
99a23b3bf7 Cropped webui image 2020-02-09 13:19:48 +01:00
Gunnar Skjold
15e861ce70 Added AP mode pin for both Wemos D1 and D32 2020-02-09 12:18:08 +01:00
Gunnar Skjold
fdfadb9bf9 Updated Aidon parser with support for 3 phase IT/TT system 2020-02-08 18:23:56 +01:00
Gunnar Skjold
388d35c390 Updated documentation 2020-02-07 23:12:27 +01:00
Gunnar Skjold
e466a45b5c Fixed missing check in checkbox when configuration opened in firefox 2020-02-07 22:33:55 +01:00
Gunnar Skjold
2e7b9e8e43 Fixed missing check in checkbox when configuration opened in firefox 2020-02-07 22:26:17 +01:00
Gunnar Skjold
deb2148e9a Software serial for development boards. Added a few extra boards 2020-02-07 17:27:58 +01:00
Gunnar Skjold
27cb5dd833 Trying a large sleep when cap is not charged 2020-02-06 19:15:06 +01:00
Gunnar Skjold
7e6ac860fd Merge branch 'master' into low_power 2020-02-06 19:02:14 +01:00
Gunnar Skjold
3a7f6078f4 Use builtin LED for Lolin D32 2020-02-06 19:02:05 +01:00
Gunnar Skjold
dbc551a41d Moved configuration object to main file and load the config before start. Fixed issue where partiy is switched for Kamstrup half way when in debug mode 2020-02-05 20:43:37 +01:00
Gunnar Skjold
9bb596aab1 Reverted what was intended as support for earlier configuration versions. 2020-02-02 08:15:49 +01:00
Gunnar Skjold
4a3d22e75c Fixed script to generate webroot header files 2020-02-01 09:57:43 +01:00
Gunnar Skjold
d68ffc827d Trigger build on changes in scripts and web 2020-02-01 09:56:14 +01:00
Gunnar Skjold
20c62a63cf Fixed script to generate webroot header files 2020-02-01 09:54:58 +01:00
Gunnar Skjold
8f85b43fc3 Made MQTT optional 2020-02-01 09:52:37 +01:00
Gunnar Skjold
57d8603790 Added option for electric distribution system (230/400) 2020-01-31 21:30:20 +01:00
Gunnar Skjold
fc1f1554d8 Extracted webroot into usable files 2020-01-31 21:08:27 +01:00
Gunnar Skjold
70ed0b538a Merge branch 'master' into low_power 2020-01-29 21:00:10 +01:00
Gunnar Skjold
ced6f125fd Trigger build on changing ini file 2020-01-29 20:58:09 +01:00
Gunnar Skjold
f76cacf835 Trigger build on changing ini file 2020-01-29 20:56:31 +01:00
Gunnar Skjold
a8205edae9 Fixed build after merge 2020-01-29 20:53:52 +01:00
Gunnar Skjold
0a317450f6 Merge branch 'master' into low_power 2020-01-29 20:51:28 +01:00
Gunnar Skjold
e9ed6d825a Merge pull request #14 from gskjold/issue-9
New web interface that is always available
2020-01-29 20:50:26 +01:00
Gunnar Skjold
a6751c787c Merge branch 'issue-9' into low_power 2020-01-29 20:39:07 +01:00
Gunnar Skjold
378dbbcc99 Only show phases with power, and always deliver volts and amps to frontend 2020-01-29 20:38:53 +01:00
Gunnar Skjold
aed56b0b56 Merge branch 'issue-9' into low_power 2020-01-28 21:19:01 +01:00
Gunnar Skjold
36b37eb2a6 Calculate max power when receiving json from reader 2020-01-28 21:18:48 +01:00
Gunnar Skjold
550b216ba6 Merge branch 'issue-9' into low_power 2020-01-28 21:12:00 +01:00
Gunnar Skjold
7e4047096b Stripped away bootstrap css and created a smaller boot.css as replacement. Load real bootstrap from CDN. Added HTML only (non-js) view of data 2020-01-28 21:10:54 +01:00
Gunnar Skjold
7fdedd8bcf Forgot some changes 2020-01-28 19:20:50 +01:00
Gunnar Skjold
f693869bd4 Merge branch 'master' into issue-9 2020-01-28 19:18:13 +01:00
Gunnar Skjold
3312f88804 Some changes to make it compile for both ESP8266 and ESP32 2020-01-28 18:17:20 +01:00
Gunnar Skjold
50faaca559 Moved Base64 lib 2020-01-24 14:54:42 +01:00
Gunnar Skjold
bf44849ecf Added base64 lib directly into this project to fix build problem with esp32 2020-01-24 14:52:14 +01:00
Gunnar Skjold
4bfd9dee9a Merge pull request #10 from gskjold/issue-6
Make the configuration page available all the time
2020-01-24 14:47:29 +01:00
Gunnar Skjold
32d58fdd71 Stripped jquery and full bootstrap from image 2020-01-23 19:45:29 +01:00
Gunnar Skjold
aef78962fb Some modifications to reduce power consumption i AP mode 2020-01-23 18:47:02 +01:00
Gunnar Skjold
8ee713b616 Included some code from @dakarym to support the self powered board for testing 2020-01-22 15:26:07 +01:00
Gunnar Skjold
0fa3e3585a Finalized live update of meter data in web gui 2020-01-19 21:37:56 +01:00
Gunnar Skjold
a88291c0f0 Implemented new user interface and prepared for live view 2020-01-17 21:49:36 +01:00
Gunnar Skjold
ac1609bfac Merge branch 'issue-6' into issue-9 2020-01-17 19:17:44 +01:00
Gunnar Skjold
22d5839d60 Added HTML, CSS and JS for new user interface 2020-01-17 14:41:02 +01:00
Gunnar Skjold
8f0932f1f1 Added configurable basic auth to web server 2020-01-15 21:22:06 +01:00
Gunnar Skjold
aeb161455e Enable config page on runtime with populated form 2020-01-15 20:17:06 +01:00
Gunnar Skjold
568180d7b2 Update release.yml 2019-12-12 19:49:22 +01:00
Gunnar Skjold
0d99da6c9a Update build.yml 2019-12-12 19:48:22 +01:00
Gunnar Skjold
843cea7626 Updated readme 2019-12-12 19:39:00 +01:00
Gunnar Skjold
c82a2a1d4b Added adafruit esp32 feather as a target 2019-12-12 19:32:20 +01:00
Gunnar Skjold
86dd8c1b87 Updated readme 2019-12-12 19:25:32 +01:00
Gunnar Skjold
bdc0c03a76 Restructuring and cleaning out unnecessary files 2019-12-12 19:25:10 +01:00
Gunnar Skjold
5680b5a501 Restructuring and cleaning out unnecessary files 2019-12-12 19:23:15 +01:00
Gunnar Skjold
4cd1fa87d1 Making watt, amperage and volt the standard unit for all meters 2019-12-11 18:20:21 +01:00
Gunnar Skjold
1579562612 Set correct parity for Kamstrup 2019-12-11 14:40:08 +01:00
Gunnar Skjold
2713b5adae Updated readme with release and flashing section 2019-11-22 21:08:30 +01:00
Gunnar Skjold
c20b07bfc2 Add release version to binaries 2019-11-22 20:36:42 +01:00
573 changed files with 114379 additions and 229989 deletions

View File

@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "amsreader-devcontainer",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "19",
"pnpmVersion": "none",
"nvmVersion": "latest"
},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.9"
}
},
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": ".devcontainer/postCreateCommand.sh",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"platformio.platformio-ide",
"ms-vscode.cpptools",
"svelte.svelte-vscode"
]
}
}
}

View File

@@ -0,0 +1,18 @@
#!/bin/bash
set -e
# Upgrade pip
python -m pip install --upgrade pip
# Install Python packages
pip install -U platformio css_html_js_minify
# Navigate to the Svelte app directory
cd lib/SvelteUi/app
# Install npm dependencies and build the app
npm ci
npm run build
# Return to the previous directory
cd -

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
custom: ["https://amsleser.no"]

43
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,43 @@
---
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]
- MQTT payload type: [e.g. JSON]
- 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
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Meter configuration
url: https://github.com/UtilitechAS/amsreader-firmware/wiki/Known-hardware-configurations
about: Please check your meter configuration here first.
- name: Frequently asked questions
url: https://github.com/UtilitechAS/amsreader-firmware/wiki/FAQ
about: Please check frequently asked questions first.

View 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.

27
.github/ISSUE_TEMPLATE/support.md vendored Normal file
View File

@@ -0,0 +1,27 @@
---
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]
- MQTT payload type: [e.g. JSON]
- HAN GPIO: [e.g. GPIO5]
- HAN baud and parity: [e.g. 2400 8E1]
- Temperature sensors [e.g. 3xDS18B20]
- ENTSO-E API enabled: [yes/no]

View File

@@ -2,6 +2,13 @@ name: Build
on:
push:
paths:
- src/**
- lib/**
- scripts/**
- web/**
- platformio.ini
- .github/workflows/**
branches:
- '*'
tags:
@@ -15,26 +22,44 @@ jobs:
steps:
- name: Check out code from repo
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Inject secrets into ini file
run: |
sed -i 's/NO_AMS2MQTT_PRICE_KEY/AMS2MQTT_PRICE_KEY="${{secrets.AMS2MQTT_PRICE_KEY}}"/g' platformio.ini
sed -i 's/NO_AMS2MQTT_PRICE_AUTHENTICATION/AMS2MQTT_PRICE_AUTHENTICATION="${{secrets.AMS2MQTT_PRICE_AUTHENTICATION}}"/g' platformio.ini
sed -i 's/NO_ENERGY_SPEEDOMETER_USER/ENERGY_SPEEDOMETER_USER=\\"${{secrets.ENERGY_SPEEDOMETER_USER}}\\"/g' platformio.ini
sed -i 's/NO_ENERGY_SPEEDOMETER_PASS/ENERGY_SPEEDOMETER_PASS=\\"${{secrets.ENERGY_SPEEDOMETER_PASS}}\\"/g' platformio.ini
- name: Cache Python dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('platformio.ini') }}
- name: Cache PlatformIO dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.pio/libdeps
key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }}
- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python 3.9
uses: actions/setup-python@v5
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: Set up node
uses: actions/setup-node@v4
with:
node-version: '19.x'
- name: Build with node
run: |
cd lib/SvelteUi/app
npm ci
npm run build
cd -
env:
CI: true
- name: PlatformIO lib install
run: pio lib install
run: pio pkg install
- name: PlatformIO run
run: pio run

View File

@@ -13,54 +13,201 @@ jobs:
steps:
- name: Check out code from repo
uses: actions/checkout@v1
uses: actions/checkout@v4
- 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: Inject secrets into ini file
run: |
sed -i 's/NO_AMS2MQTT_PRICE_KEY/AMS2MQTT_PRICE_KEY="${{secrets.AMS2MQTT_PRICE_KEY}}"/g' platformio.ini
sed -i 's/NO_AMS2MQTT_PRICE_AUTHENTICATION/AMS2MQTT_PRICE_AUTHENTICATION="${{secrets.AMS2MQTT_PRICE_AUTHENTICATION}}"/g' platformio.ini
sed -i 's/NO_AMS2MQTT_SC_KEY/AMS2MQTT_SC_KEY=\\"${{secrets.AMS2MQTT_SC_KEY}}\\"/g' platformio.ini
sed -i 's/NO_ENERGY_SPEEDOMETER_USER/ENERGY_SPEEDOMETER_USER=\\"${{secrets.ENERGY_SPEEDOMETER_USER}}\\"/g' platformio.ini
sed -i 's/NO_ENERGY_SPEEDOMETER_PASS/ENERGY_SPEEDOMETER_PASS=\\"${{secrets.ENERGY_SPEEDOMETER_PASS}}\\"/g' platformio.ini
- name: Cache Python dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('platformio.ini') }}
- name: Cache PlatformIO dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.pio/libdeps
key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }}
- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python 3.9
uses: actions/setup-python@v5
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: Set up node
uses: actions/setup-node@v4
with:
node-version: '19.x'
- name: Build with node
run: |
cd lib/SvelteUi/app
npm ci
npm run build
cd -
env:
CI: false
- name: PlatformIO lib install
run: pio lib install
- name: PlatformIO run
run: pio run
- name: Create Release
- name: Create release with release notes
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ncipollo/release-action@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload esp12e binary to release
uses: actions/upload-release-asset@v1.0.1
name: Release ${{ github.ref }}
generateReleaseNotes: true
- name: Build esp8266 firmware
run: pio run -e esp8266
- name: Create esp8266 zip file
run: /bin/sh scripts/esp8266/mkzip.sh
- 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/esp12e/firmware.bin
asset_name: ams2mqtt-esp12e-${{ steps.release_tag.outputs.tag }}.bin
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 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_path: esp8266.zip
asset_name: ams2mqtt-esp8266-${{ steps.release_tag.outputs.tag }}.zip
asset_content_type: application/zip
- name: Build esp32 firmware
run: pio run -e esp32
- name: Create esp32 zip file
run: /bin/sh scripts/esp32/mkzip.sh
- name: Upload esp32 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/esp32/firmware.bin
asset_name: ams2mqtt-esp32-${{ steps.release_tag.outputs.tag }}.bin
asset_content_type: application/octet-stream
- 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: esp32.zip
asset_name: ams2mqtt-esp32-${{ steps.release_tag.outputs.tag }}.zip
asset_content_type: application/zip
- name: Build esp32s2 firmware
run: pio run -e esp32s2
- name: Create esp32s2 zip file
run: /bin/sh scripts/esp32s2/mkzip.sh
- 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/esp32s2/firmware.bin
asset_name: ams2mqtt-esp32s2-${{ steps.release_tag.outputs.tag }}.bin
asset_content_type: application/octet-stream
- 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: esp32s2.zip
asset_name: ams2mqtt-esp32s2-${{ steps.release_tag.outputs.tag }}.zip
asset_content_type: application/zip
- name: Build esp32s3 firmware
run: pio run -e esp32s3
- name: Create esp32s3 zip file
run: /bin/sh scripts/esp32s3/mkzip.sh
- name: Upload esp32s3 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/esp32s3/firmware.bin
asset_name: ams2mqtt-esp32s3-${{ steps.release_tag.outputs.tag }}.bin
asset_content_type: application/octet-stream
- name: Upload esp32s3 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: esp32s3.zip
asset_name: ams2mqtt-esp32s3-${{ steps.release_tag.outputs.tag }}.zip
asset_content_type: application/zip
- name: Build esp32solo firmware
run: pio run -e esp32solo
- name: Create esp32solo zip file
run: /bin/sh scripts/esp32solo/mkzip.sh
- 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/esp32solo/firmware.bin
asset_name: ams2mqtt-esp32solo-${{ steps.release_tag.outputs.tag }}.bin
asset_content_type: application/octet-stream
- name: Upload esp32solo 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: esp32solo.zip
asset_name: ams2mqtt-esp32solo-${{ steps.release_tag.outputs.tag }}.zip
asset_content_type: application/zip
- name: Build esp32c3 firmware
run: pio run -e esp32c3
- name: Create esp32c3 zip file
run: /bin/sh scripts/esp32c3/mkzip.sh
- name: Upload esp32c3 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/esp32c3/firmware.bin
asset_name: ams2mqtt-esp32c3-${{ steps.release_tag.outputs.tag }}.bin
asset_content_type: application/octet-stream
- name: Upload esp32c3 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: esp32c3.zip
asset_name: ams2mqtt-esp32c3-${{ steps.release_tag.outputs.tag }}.zip
asset_content_type: application/zip

14
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.vs/
.idea/
[Dd]ebug/
[Rr]elease/
**/__vm/
@@ -6,4 +7,15 @@
*.sw[op]
.vscode
.pio
platformio-user.ini
platformio-user.ini
/lib/FirmwareVersion/src/generated_version.h
/src/web/root
/src/AmsToMqttBridge.ino.cpp
/test
/web/test.html
/sdkconfig
/.tmp
/*.zip
node_modules
/gui/dist
/scripts/*dev

View File

@@ -1,371 +0,0 @@
/*
Name: AmsToMqttBridge.ino
Created: 3/13/2018 7:40:28 PM
Author: roarf
*/
//#define HAS_DALLAS_TEMP_SENSOR 1 // Set to zero if Dallas one wire temp sensor is not present
//#define IS_CUSTOM_AMS_BOARD 1 // Set to zero if using NodeMCU or board not designed by Roar Fredriksen
#include <ArduinoJson.h>
#include <MQTT.h>
#if HAS_DALLAS_TEMP_SENSOR
#include <DallasTemperature.h>
#include <OneWire.h>
#endif
#if defined(ESP8266)
#include <ESP8266WiFi.h>
#elif defined(ESP32)
#include <WiFi.h>
#endif
#include "HanConfigAp.h"
#include "HanReader.h"
#include "HanToJson.h"
#define WIFI_CONNECTION_TIMEOUT 30000;
#if IS_CUSTOM_AMS_BOARD
#define LED_PIN 2 // The blue on-board LED of the ESP8266 custom AMS board
#define LED_ACTIVE_HIGH 0
#define AP_BUTTON_PIN 0
#else
#define LED_PIN LED_BUILTIN
#define LED_ACTIVE_HIGH 1
#define AP_BUTTON_PIN INVALID_BUTTON_PIN
#endif
#if HAS_DALLAS_TEMP_SENSOR
#define TEMP_SENSOR_PIN 5 // Temperature sensor connected to GPIO5
OneWire oneWire(TEMP_SENSOR_PIN);
DallasTemperature tempSensor(&oneWire);
#endif
// Object used to boot as Access Point
HanConfigAp ap;
// WiFi client and MQTT client
WiFiClient *client;
MQTTClient mqtt(384);
// Object used for debugging
HardwareSerial* debugger = NULL;
// The HAN Port reader, used to read serial data and decode DLMS
HanReader hanReader;
// the setup function runs once when you press reset or power the board
void setup()
{
// Uncomment to debug over the same port as used for HAN communication
//debugger = &Serial;
if (debugger) {
// Setup serial port for debugging
debugger->begin(2400, SERIAL_8E1);
//debugger->begin(115200);
while (!debugger);
debugger->println("");
debugger->println("Started...");
}
// Flash the LED, to indicate we can boot as AP now
pinMode(LED_PIN, OUTPUT);
led_on();
delay(1000);
// Initialize the AP
ap.setup(AP_BUTTON_PIN, debugger);
led_off();
if (!ap.isActivated)
{
setupWiFi();
// Configure uart for AMS data
Serial.begin(2400, SERIAL_8E1);
while (!Serial);
hanReader.setup(&Serial, debugger);
// Compensate for the known Kaifa bug
hanReader.compensateFor09HeaderBug = (ap.config.meterType == 1);
}
}
// the loop function runs over and over again until power down or reset
void loop()
{
// Only do normal stuff if we're not booted as AP
if (!ap.loop())
{
// Turn off the LED
led_off();
// allow the MQTT client some resources
mqtt.loop();
delay(10); // <- fixes some issues with WiFi stability
// Reconnect to WiFi and MQTT as needed
if (!mqtt.connected()) {
MQTT_connect();
}
else
{
// Read data from the HAN port
readHanPort();
}
}
else
{
// Continously flash the LED when AP mode
if (millis() / 1000 % 2 == 0) led_on();
else led_off();
}
}
void led_on()
{
#if LED_ACTIVE_HIGH
digitalWrite(LED_PIN, HIGH);
#else
digitalWrite(LED_PIN, LOW);
#endif
}
void led_off()
{
#if LED_ACTIVE_HIGH
digitalWrite(LED_PIN, LOW);
#else
digitalWrite(LED_PIN, HIGH);
#endif
}
void setupWiFi()
{
// Turn off AP
WiFi.enableAP(false);
// Connect to WiFi
WiFi.mode(WIFI_STA);
WiFi.begin(ap.config.ssid, ap.config.ssidPassword);
// Wait for WiFi connection
if (debugger) debugger->print("\nWaiting for WiFi to connect...");
while (WiFi.status() != WL_CONNECTED) {
if (debugger) debugger->print(".");
delay(500);
}
if (debugger) debugger->println(" connected");
client = new WiFiClient();
mqtt.begin(ap.config.mqtt, *client);
// Direct incoming MQTT messages
if (ap.config.mqttSubscribeTopic != 0 && strlen(ap.config.mqttSubscribeTopic) > 0) {
mqtt.subscribe(ap.config.mqttSubscribeTopic);
mqtt.onMessage(mqttMessageReceived);
}
// Notify everyone we're here!
sendMqttData("Connected!");
}
void mqttMessageReceived(String &topic, String &payload)
{
if (debugger) {
debugger->println("Incoming MQTT message:");
debugger->print("[");
debugger->print(topic);
debugger->print("] ");
debugger->println(payload);
}
// Do whatever needed here...
// Ideas could be to query for values or to initiate OTA firmware update
}
void readHanPort()
{
if (hanReader.read())
{
// Flash LED on, this shows us that data is received
led_on();
// Get the timestamp (as unix time) from the package
time_t time = hanReader.getPackageTime();
if (debugger) debugger->print("Time of the package is: ");
if (debugger) debugger->println(time);
// Define a json object to keep the data
StaticJsonDocument<500> json;
// Any generic useful info here
json["id"] = WiFi.macAddress();
json["up"] = millis();
json["t"] = time;
// Add a sub-structure to the json object,
// to keep the data from the meter itself
JsonObject data = json.createNestedObject("data");
#if HAS_DALLAS_TEMP_SENSOR
// Get the temperature too
tempSensor.requestTemperatures();
data["temp"] = tempSensor.getTempCByIndex(0);
#endif
hanToJson(data, ap.config.meterType, hanReader);
// Write the json to the debug port
if (debugger) {
debugger->print("Sending data to MQTT: ");
serializeJsonPretty(json, *debugger);
debugger->println();
}
// Make sure we have configured a publish topic
if (! ap.config.mqttPublishTopic == 0 || strlen(ap.config.mqttPublishTopic) == 0)
{
// Publish the json to the MQTT server
String msg;
serializeJson(json, msg);
mqtt.publish(ap.config.mqttPublishTopic, msg.c_str());
mqtt.loop();
}
// Flash LED off
led_off();
}
}
// Function to connect and reconnect as necessary to the MQTT server.
// Should be called in the loop function and it will take care if connecting.
void MQTT_connect()
{
// Connect to WiFi access point.
if (debugger)
{
debugger->println();
debugger->println();
debugger->print("Connecting to WiFi network ");
debugger->println(ap.config.ssid);
}
if (WiFi.status() != WL_CONNECTED)
{
// Make one first attempt at connect, this seems to considerably speed up the first connection
WiFi.disconnect();
WiFi.begin(ap.config.ssid, ap.config.ssidPassword);
delay(1000);
}
// Wait for the WiFi connection to complete
long vTimeout = millis() + WIFI_CONNECTION_TIMEOUT;
while (WiFi.status() != WL_CONNECTED) {
delay(50);
if (debugger) debugger->print(".");
// If we timed out, disconnect and try again
if (vTimeout < millis())
{
if (debugger)
{
debugger->print("Timout during connect. WiFi status is: ");
debugger->println(WiFi.status());
}
WiFi.disconnect();
WiFi.begin(ap.config.ssid, ap.config.ssidPassword);
vTimeout = millis() + WIFI_CONNECTION_TIMEOUT;
}
yield();
}
if (debugger) {
debugger->println();
debugger->println("WiFi connected");
debugger->println("IP address: ");
debugger->println(WiFi.localIP());
debugger->print("\nconnecting to MQTT: ");
debugger->print(ap.config.mqtt);
debugger->print(", port: ");
debugger->print(ap.config.mqttPort);
debugger->println();
}
// Wait for the MQTT connection to complete
while (!mqtt.connected()) {
// Connect to a unsecure or secure MQTT server
if ((ap.config.mqttUser == 0 && mqtt.connect(ap.config.mqttClientID)) ||
(ap.config.mqttUser != 0 && mqtt.connect(ap.config.mqttClientID, ap.config.mqttUser, ap.config.mqttPass)))
{
if (debugger) debugger->println("\nSuccessfully connected to MQTT!");
// Subscribe to the chosen MQTT topic, if set in configuration
if (ap.config.mqttSubscribeTopic != 0 && strlen(ap.config.mqttSubscribeTopic) > 0)
{
mqtt.subscribe(ap.config.mqttSubscribeTopic);
if (debugger) debugger->printf(" Subscribing to [%s]\r\n", ap.config.mqttSubscribeTopic);
}
}
else
{
if (debugger)
{
debugger->print(".");
debugger->print("failed, ");
debugger->println(" trying again in 5 seconds");
}
// Wait 2 seconds before retrying
mqtt.disconnect();
delay(2000);
}
// Allow some resources for the WiFi connection
yield();
delay(2000);
}
}
// Send a simple string embedded in json over MQTT
void sendMqttData(String data)
{
// Make sure we have configured a publish topic
if (ap.config.mqttPublishTopic == 0 || strlen(ap.config.mqttPublishTopic) == 0)
return;
// Make sure we're connected
if (!client->connected() || !mqtt.connected()) {
MQTT_connect();
}
// Build a json with the message in a "data" attribute
StaticJsonDocument<500> json;
json["id"] = WiFi.macAddress();
json["up"] = millis();
json["data"] = data;
// Stringify the json
String msg;
serializeJson(json, msg);
// Send the json over MQTT
mqtt.publish(ap.config.mqttPublishTopic, msg.c_str());
if (debugger) debugger->print("sendMqttData: ");
if (debugger) debugger->println(data);
}

View File

@@ -1,31 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AmsToMqttBridge", "AmsToMqttBridge.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HanReader", "..\HanReader\HanReader.vcxitems", "{CD0F5364-923B-49E4-8BE5-EA7D8A60DF80}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\HanReader\HanReader.vcxitems*{c5f80730-f44f-4478-bdae-6634efc2ca88}*SharedItemsImports = 4
..\HanReader\HanReader.vcxitems*{cd0f5364-923b-49e4-8be5-ea7d8a60df80}*SharedItemsImports = 9
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.ActiveCfg = Debug|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5DFC14B6-4C33-4307-8BDA-C050F68A74F6}
EndGlobalSection
EndGlobal

View File

@@ -1,104 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C5F80730-F44F-4478-BDAE-6634EFC2CA88}</ProjectGuid>
<RootNamespace>AmsToMqttBridge</RootNamespace>
<ProjectName>AmsToMqttBridge</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>
</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>
</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
<Import Project="..\HanReader\HanReader.vcxitems" Label="Shared" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(ProjectDir)..\AmsToMqttBridge;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\EEPROM;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\DNSServer\src;$(ProjectDir)..\HanReader\src;$(ProjectDir)..\..\..\..\..\..\..\..\..\Program Files (x86)\Arduino\libraries;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries;$(ProjectDir)..\..\..\..\..\..\..\Google Drive\Private\Elektronikk\Arduino\libraries;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\libb64;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\spiffs;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\umm_malloc;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\variants\generic;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\lwip\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\xtensa-lx106-elf;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\lib\gcc\xtensa-lx106-elf\4.8.2\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>$(ProjectDir)__vm\.AmsToMqttBridge.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
<PreprocessorDefinitions>__ESP8266_ESp8266__;__ESP8266_ESP8266__;__ets__;ICACHE_FLASH;F_CPU=80000000L;LWIP_OPEN_SRC;ARDUINO=106012;ARDUINO_ESP8266_ESP01;ARDUINO_ARCH_ESP8266;ESP8266;__cplusplus=201103L;_VMICRO_INTELLISENSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectCapability Include="VisualMicro" />
</ItemGroup>
<PropertyGroup>
<DebuggerFlavor>VisualMicroDebugger</DebuggerFlavor>
</PropertyGroup>
<ItemGroup>
<None Include="AmsToMqttBridge.ino">
<FileType>CppCode</FileType>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="accesspoint.h" />
<ClInclude Include="configuration.h" />
<ClInclude Include="__vm\.AmsToMqttBridge.vsarduino.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="accesspoint.cpp" />
<ClCompile Include="configuration.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties custom_esp8266_generic_UploadSpeed="256000" />
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="AmsToMqttBridge.ino" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="__vm\.AmsToMqttBridge.vsarduino.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@@ -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=*

File diff suppressed because one or more lines are too long

View File

@@ -1,60 +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>
#include <ESP8266WebServer.h>
#elif defined(ESP32) // ARDUINO_ARCH_ESP32
#include <WiFi.h>
#include <WebServer.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, Stream* debugger);
bool loop();
bool hasConfig();
configuration config;
bool isActivated = false;
private:
const char* AP_SSID = "AMS2MQTT";
// 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);
// Web server
static void handleRoot();
static void handleSave();
#if defined(ESP8266)
static ESP8266WebServer server;
#elif defined(ESP32) // ARDUINO_ARCH_ESP32
static WebServer server;
#endif
static Stream* debugger;
};
#endif

View File

@@ -1,230 +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);
address += saveString(address, mqtt);
address += saveInt(address, mqttPort);
address += saveString(address, mqttClientID);
address += saveString(address, mqttPublishTopic);
address += saveString(address, mqttSubscribeTopic);
if (isSecure()) {
address += saveBool(address, true);
address += saveString(address, mqttUser);
address += saveString(address, mqttPass);
}
else
address += saveBool(address, false);
bool success = EEPROM.commit();
EEPROM.end();
return success;
}
bool configuration::load()
{
int address = EEPROM_CONFIG_ADDRESS;
bool success = false;
EEPROM.begin(EEPROM_SIZE);
if (EEPROM.read(address) == EEPROM_CHECK_SUM)
{
address++;
address += readString(address, &ssid);
address += readString(address, &ssidPassword);
address += readByte(address, &meterType);
address += readString(address, &mqtt);
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;
}
success = true;
}
else
{
ssid = (char*)String("").c_str();
ssidPassword = (char*)String("").c_str();
meterType = (byte)0;
mqtt = (char*)String("").c_str();
mqttClientID = (char*)String("").c_str();
mqttPublishTopic = (char*)String("").c_str();
mqttSubscribeTopic = (char*)String("").c_str();
mqttUser = 0;
mqttPass = 0;
mqttPort = 1883;
}
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)
{
/*
char* ssid;
char* ssidPassword;
byte meterType;
char* mqtt;
int mqttPort;
char* mqttClientID;
char* mqttPublishTopic;
char* mqttSubscribeTopic;
bool secure;
char* mqttUser;
char* mqttPass;
*/
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);
debugger->printf("mqtt: %s\r\n", this->mqtt);
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);
}
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 = strlen(pString) + 1;
EEPROM.put(pAddress + address, length);
address++;
for (int i = 0; i < length; i++)
{
EEPROM.put(pAddress + address, pString[i]);
address++;
}
return address;
}

View File

@@ -1,56 +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* mqtt;
int mqttPort;
char* mqttClientID;
char* mqttPublishTopic;
char* mqttSubscribeTopic;
char* mqttUser;
char* mqttPass;
byte meterType;
bool hasConfig();
bool isSecure();
bool save();
bool load();
void print(Stream* debugger);
protected:
private:
const int EEPROM_SIZE = 512;
const byte EEPROM_CHECK_SUM = 71; // 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

View File

@@ -1,15 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HanReader", "HanReader.vcxitems", "{CD0F5364-923B-49E4-8BE5-EA7D8A60DF80}"
EndProject
Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AFFB18CF-A4FB-46A9-8148-C5B4A380C48B}
EndGlobalSection
EndGlobal

View File

@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<ItemsProjectGuid>{cd0f5364-923b-49e4-8be5-ea7d8a60df80}</ItemsProjectGuid>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectCapability Include="SourceItemsFromImports" />
</ItemGroup>
<ItemGroup>
<Text Include="$(MSBuildThisFileDirectory)keywords.txt" />
<Text Include="$(MSBuildThisFileDirectory)readme.txt" />
<Text Include="$(MSBuildThisFileDirectory)library.properties" />
</ItemGroup>
<ItemGroup>
<!-- <ClInclude Include="$(MSBuildThisFileDirectory)HanReader.h" /> -->
<ClInclude Include="$(MSBuildThisFileDirectory)src\Crc16.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)src\DlmsReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)src\HanReader.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)src\Kaifa.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)src\Kamstrup.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(MSBuildThisFileDirectory)src\Crc16.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)src\DlmsReader.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)src\HanReader.cpp" />
</ItemGroup>
</Project>

View File

@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;s</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(MSBuildThisFileDirectory)src\Crc16.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)src\DlmsReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)src\HanReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="$(MSBuildThisFileDirectory)readme.txt" />
<Text Include="$(MSBuildThisFileDirectory)library.properties" />
<Text Include="$(MSBuildThisFileDirectory)keywords.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(MSBuildThisFileDirectory)src\Crc16.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)src\DlmsReader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)src\HanReader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)src\Kaifa.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)src\Kamstrup.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@@ -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);
}
}
}

View File

@@ -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

View File

@@ -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");
}
}
}

View File

@@ -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);
}
}
}

View File

@@ -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=*

View File

@@ -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

View File

@@ -1,181 +0,0 @@
// Aidon.h
#ifndef _AIDON_h
#define _AIDON_h
enum class Aidon
{
List1 = 0x01,
List1PhaseShort = 0x09,
List1PhaseLong = 0xff, // TODO: Need sample
List3PhaseShort = 0x0D,
List3PhaseLong = 0x12
};
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,
};
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
};
#endif

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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]);
}

View File

@@ -1,42 +0,0 @@
#ifndef _DLMSREADER_h
#define _DLMSREADER_h
#include "Crc16.h"
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#define DLMS_READER_BUFFER_SIZE 512
#define DLMS_READER_MAX_ADDRESS_SIZE 5
class DlmsReader
{
public:
DlmsReader();
bool Read(byte data);
int GetRawData(byte *buffer, int start, int length);
protected:
Crc16Class Crc16;
private:
byte buffer[DLMS_READER_BUFFER_SIZE];
int position;
int dataLength;
byte frameFormatType;
byte destinationAddress[DLMS_READER_MAX_ADDRESS_SIZE];
byte destinationAddressLength;
byte sourceAddress[DLMS_READER_MAX_ADDRESS_SIZE];
byte sourceAddressLength;
void Clear();
int GetAddress(int addressPosition, byte* buffer, int start, int length);
unsigned short GetChecksum(int checksumPosition);
bool IsValidFrameFormat(byte frameFormatType);
void WriteBuffer();
};
#endif

View File

@@ -1,288 +0,0 @@
#include "HanReader.h"
HanReader::HanReader()
{
}
void HanReader::setup(HardwareSerial *hanPort, Stream *debugPort)
{
han = hanPort;
bytesRead = 0;
debug = debugPort;
if (debug) debug->println("MBUS serial setup complete");
}
void HanReader::setup(HardwareSerial *hanPort)
{
setup(hanPort, NULL);
}
bool HanReader::read(byte data)
{
if (reader.Read(data))
{
bytesRead = reader.GetRawData(buffer, 0, 512);
if (debug)
{
debug->print("Got valid DLMS data (");
debug->print(bytesRead);
debug->println(" bytes):");
debugPrint(buffer, 0, bytesRead);
}
/*
Data should start with E6 E7 00 0F
and continue with four bytes for the InvokeId
*/
if (bytesRead < 9)
{
if (debug) debug->println("Invalid HAN data: Less than 9 bytes received");
return false;
}
else if (
buffer[0] != 0xE6 ||
buffer[1] != 0xE7 ||
buffer[2] != 0x00 ||
buffer[3] != 0x0F
)
{
if (debug) debug->println("Invalid HAN data: Start should be E6 E7 00 0F");
return false;
}
listSize = getInt(0, buffer, 0, bytesRead);
if (debug) debug->print("HAN data is valid, listSize: ");
if (debug) debug->println(listSize);
return true;
}
return false;
}
void HanReader::debugPrint(byte *buffer, int start, int length)
{
for (int i = start; i < start + length; i++)
{
if (buffer[i] < 0x10)
debug->print("0");
debug->print(buffer[i], HEX);
debug->print(" ");
if ((i - start + 1) % 16 == 0)
debug->println("");
else if ((i - start + 1) % 4 == 0)
debug->print(" ");
yield(); // Let other get some resources too
}
debug->println("");
}
bool HanReader::read()
{
if (han->available())
{
byte newByte = han->read();
return read(newByte);
}
return false;
}
int HanReader::getListSize()
{
return listSize;
}
time_t HanReader::getPackageTime()
{
int packageTimePosition = dataHeader
+ (compensateFor09HeaderBug ? 1 : 0);
return getTime(buffer, packageTimePosition, bytesRead);
}
time_t HanReader::getTime(int objectId)
{
return getTime(objectId, buffer, 0, bytesRead);
}
int HanReader::getInt(int objectId)
{
return getInt(objectId, buffer, 0, bytesRead);
}
String HanReader::getString(int objectId)
{
return getString(objectId, buffer, 0, bytesRead);
}
int HanReader::findValuePosition(int dataPosition, byte *buffer, int start, int length)
{
// The first byte after the header gives the length
// of the extended header information (variable)
int headerSize = dataHeader + (compensateFor09HeaderBug ? 1 : 0);
int firstData = headerSize + buffer[headerSize] + 1;
for (int i = start + firstData; i<length; i++)
{
if (dataPosition-- == 0)
return i;
else if (buffer[i] == 0x00) // null
i += 0;
else if (buffer[i] == 0x0A) // String
i += buffer[i + 1] + 1;
else if (buffer[i] == 0x09) // byte array
i += buffer[i + 1] + 1;
else if (buffer[i] == 0x01) // array (1 byte for reading size)
i += 1;
else if (buffer[i] == 0x02) // struct (1 byte for reading size)
i += 1;
else if (buffer[i] == 0x10) // int16 value (2 bytes)
i += 2;
else if (buffer[i] == 0x12) // uint16 value (2 bytes)
i += 2;
else if (buffer[i] == 0x06) // uint32 value (4 bytes)
i += 4;
else if (buffer[i] == 0x0F) // int8 value (1 bytes)
i += 1;
else if (buffer[i] == 0x16) // enum (1 bytes)
i += 1;
else
{
if (debug)
{
debug->print("Unknown data type found: 0x");
debug->println(buffer[i], HEX);
}
return 0; // unknown data type found
}
}
if (debug)
{
debug->print("Passed the end of the data. Length was: ");
debug->println(length);
}
return 0;
}
time_t HanReader::getTime(int dataPosition, byte *buffer, int start, int length)
{
// TODO: check if the time is represented always as a 12 byte string (0x09 0x0C)
int timeStart = findValuePosition(dataPosition, buffer, start, length);
timeStart += 1;
return getTime(buffer, start + timeStart, length - timeStart);
}
time_t HanReader::getTime(byte *buffer, int start, int length)
{
int pos = start;
int dataLength = buffer[pos++];
if (dataLength == 0x0C)
{
int year = buffer[pos] << 8 |
buffer[pos + 1];
int month = buffer[pos + 2];
int day = buffer[pos + 3];
int hour = buffer[pos + 5];
int minute = buffer[pos + 6];
int second = buffer[pos + 7];
return toUnixTime(year, month, day, hour, minute, second);
}
else
{
// Date format not supported
return (time_t)0L;
}
}
int HanReader::getInt(int dataPosition, byte *buffer, int start, int length)
{
int valuePosition = findValuePosition(dataPosition, buffer, start, length);
if (valuePosition > 0)
{
int value = 0;
int bytes = 0;
switch (buffer[valuePosition++])
{
case 0x10:
bytes = 2;
break;
case 0x12:
bytes = 2;
break;
case 0x06:
bytes = 4;
break;
case 0x02:
bytes = 1;
break;
case 0x01:
bytes = 1;
break;
case 0x0F:
bytes = 1;
break;
case 0x16:
bytes = 1;
break;
}
for (int i = valuePosition; i < valuePosition + bytes; i++)
{
value = value << 8 | buffer[i];
}
return value;
}
return 0;
}
String HanReader::getString(int dataPosition, byte *buffer, int start, int length)
{
int valuePosition = findValuePosition(dataPosition, buffer, start, length);
if (valuePosition > 0)
{
String value = String("");
for (int i = valuePosition + 2; i < valuePosition + buffer[valuePosition + 1] + 2; i++)
{
value += String((char)buffer[i]);
}
return value;
}
return String("");
}
time_t HanReader::toUnixTime(int year, int month, int day, int hour, int minute, int second)
{
byte daysInMonth[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
long secondsPerMinute = 60;
long secondsPerHour = secondsPerMinute * 60;
long secondsPerDay = secondsPerHour * 24;
long time = (year - 1970) * secondsPerDay * 365L;
for (int yearCounter = 1970; yearCounter<year; yearCounter++)
if ((yearCounter % 4 == 0) && ((yearCounter % 100 != 0) || (yearCounter % 400 == 0)))
time += secondsPerDay;
if (month > 2 && (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)))
time += secondsPerDay;
for (int monthCounter = 1; monthCounter<month; monthCounter++)
time += daysInMonth[monthCounter - 1] * secondsPerDay;
time += (day - 1) * secondsPerDay;
time += hour * secondsPerHour;
time += minute * secondsPerMinute;
time += second;
return (time_t)time;
}

View File

@@ -1,52 +0,0 @@
#ifndef _HANREADER_h
#define _HANREADER_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include "DlmsReader.h"
class HanReader
{
public:
const uint dataHeader = 8;
bool compensateFor09HeaderBug = false;
HanReader();
void setup(HardwareSerial *hanPort);
void setup(HardwareSerial *hanPort, Stream *debugPort);
bool read();
bool read(byte data);
int getListSize();
time_t getPackageTime();
int getInt(int objectId);
String getString(int objectId);
time_t getTime(int objectId);
private:
Stream *debug;
HardwareSerial *han;
byte buffer[512];
int bytesRead;
DlmsReader reader;
int listSize;
int findValuePosition(int dataPosition, byte *buffer, int start, int length);
time_t getTime(int dataPosition, byte *buffer, int start, int length);
time_t getTime(byte *buffer, int start, int length);
int getInt(int dataPosition, byte *buffer, int start, int length);
String getString(int dataPosition, byte *buffer, int start, int length);
time_t toUnixTime(int year, int month, int day, int hour, int minute, int second);
void debugPrint(byte *buffer, int start, int length);
};
#endif

View File

@@ -1,57 +0,0 @@
#ifndef _KAIFA_h
#define _KAIFA_h
enum class Kaifa : byte {
List1 = 0x01,
List1PhaseShort = 0x09,
List3PhaseShort = 0x0D,
List1PhaseLong = 0x0E,
List3PhaseLong = 0x12
};
enum class Kaifa_List1 {
ListSize,
ActivePowerImported
};
enum class Kaifa_List3Phase {
ListSize,
ListVersionIdentifier,
MeterID,
MeterType,
ActiveImportPower,
ActiveExportPower,
ReactiveImportPower,
ReactiveExportPower,
CurrentL1,
CurrentL2,
CurrentL3,
VoltageL1,
VoltageL2,
VoltageL3,
MeterClock,
CumulativeActiveImportEnergy,
CumulativeActiveExportEnergy,
CumulativeReactiveImportEnergy,
CumulativeReactiveExportEnergy
};
enum class Kaifa_List1Phase {
ListSize,
ListVersionIdentifier,
MeterID,
MeterType,
ActiveImportPower,
ActiveExportPower,
ReactiveImportPower,
ReactiveExportPower,
CurrentL1,
VoltageL1,
MeterClock,
CumulativeActiveImportEnergy,
CumulativeActiveExportEnergy,
CumulativeReactiveImportEnergy,
CumulativeReactiveExportEnergy
};
#endif

View File

@@ -1,88 +0,0 @@
// Kamstrup.h
#ifndef _KAMSTRUP_h
#define _KAMSTRUP_h
enum class Kamstrup
{
List3PhaseShort = 0x19,
List3PhaseLong = 0x23,
List1PhaseShort = 0x11,
List1PhaseLong = 0x1B
};
enum class Kamstrup_List3Phase
{
ListSize,
ListVersionIdentifier,
MeterID_OBIS,
MeterID,
MeterType_OBIS,
MeterType,
ActiveImportPower_OBIS,
ActiveImportPower,
ActiveExportPower_OBIS,
ActiveExportPower,
ReactiveImportPower_OBIS,
ReactiveImportPower,
ReactiveExportPower_OBIS,
ReactiveExportPower,
CurrentL1_OBIS,
CurrentL1,
CurrentL2_OBIS,
CurrentL2,
CurrentL3_OBIS,
CurrentL3,
VoltageL1_OBIS,
VoltageL1,
VoltageL2_OBIS,
VoltageL2,
VoltageL3_OBIS,
VoltageL3,
MeterClock_OBIS,
MeterClock,
CumulativeActiveImportEnergy_OBIS,
CumulativeActiveImportEnergy,
CumulativeActiveExportEnergy_OBIS,
CumulativeActiveExportEnergy,
CumulativeReactiveImportEnergy_OBIS,
CumulativeReactiveImportEnergy,
CumulativeReactiveExportEnergy_OBIS,
CumulativeReactiveExportEnergy
};
enum class Kamstrup_List1Phase
{
ListSize,
ListVersionIdentifier,
MeterID_OBIS,
MeterID,
MeterType_OBIS,
MeterType,
ActiveImportPower_OBIS,
ActiveImportPower,
ActiveExportPower_OBIS,
ActiveExportPower,
ReactiveImportPower_OBIS,
ReactiveImportPower,
ReactiveExportPower_OBIS,
ReactiveExportPower,
CurrentL1_OBIS,
CurrentL1,
VoltageL1_OBIS,
VoltageL1,
MeterClock_OBIS,
MeterClock,
CumulativeActiveImportEnergy_OBIS,
CumulativeActiveImportEnergy,
CumulativeActiveExportEnergy_OBIS,
CumulativeActiveExportEnergy,
CumulativeReactiveImportEnergy_OBIS,
CumulativeReactiveImportEnergy,
CumulativeReactiveExportEnergy_OBIS,
CumulativeReactiveExportEnergy
};
#endif

View File

@@ -1,9 +0,0 @@
name=HanToJson
version=1.0.0
author=roarfred
maintainer=roarfred <not@important.com>
sentence=HAN reader data to Json
paragraph=HAN reader data to Json
category=Sensors
url=https://github.com/roarfred/AmsToMqttBridge
architectures=*

View File

@@ -1,240 +0,0 @@
#include "HanToJson.h"
#include "Aidon.h"
#include "Kaifa.h"
#include "Kamstrup.h"
static void hanToJsonKaifa3phase(int listSize, JsonObject& data, HanReader& hanReader, Stream *debugger)
{
if (listSize >= (int)Kaifa::List3PhaseShort)
{
data["lv"] = hanReader.getString( (int)Kaifa_List3Phase::ListVersionIdentifier);
data["id"] = hanReader.getString( (int)Kaifa_List3Phase::MeterID);
data["type"] = hanReader.getString( (int)Kaifa_List3Phase::MeterType);
data["P"] = hanReader.getInt( (int)Kaifa_List3Phase::ActiveImportPower);
data["Q"] = hanReader.getInt( (int)Kaifa_List3Phase::ReactiveImportPower);
data["I1"] = hanReader.getInt( (int)Kaifa_List3Phase::CurrentL1);
data["I2"] = hanReader.getInt( (int)Kaifa_List3Phase::CurrentL2);
data["I3"] = hanReader.getInt( (int)Kaifa_List3Phase::CurrentL3);
data["U1"] = hanReader.getInt( (int)Kaifa_List3Phase::VoltageL1);
data["U2"] = hanReader.getInt( (int)Kaifa_List3Phase::VoltageL2);
data["U3"] = hanReader.getInt( (int)Kaifa_List3Phase::VoltageL3);
}
if (listSize >= (int)Kaifa::List3PhaseLong)
{
data["tPI"] = hanReader.getInt( (int)Kaifa_List3Phase::CumulativeActiveImportEnergy);
data["tPO"] = hanReader.getInt( (int)Kaifa_List3Phase::CumulativeActiveExportEnergy);
data["tQI"] = hanReader.getInt( (int)Kaifa_List3Phase::CumulativeReactiveImportEnergy);
data["tQO"] = hanReader.getInt( (int)Kaifa_List3Phase::CumulativeReactiveExportEnergy);
}
}
static void hanToJsonKaifa1phase(int listSize, JsonObject& data, HanReader& hanReader, Stream *debugger)
{
if (listSize >= (int)Kaifa::List1PhaseShort)
{
data["lv"] = hanReader.getString( (int)Kaifa_List1Phase::ListVersionIdentifier);
data["id"] = hanReader.getString( (int)Kaifa_List1Phase::MeterID);
data["type"] = hanReader.getString( (int)Kaifa_List1Phase::MeterType);
data["P"] = hanReader.getInt( (int)Kaifa_List1Phase::ActiveImportPower);
data["Q"] = hanReader.getInt( (int)Kaifa_List1Phase::ReactiveImportPower);
data["I1"] = hanReader.getInt( (int)Kaifa_List1Phase::CurrentL1);
data["U1"] = hanReader.getInt( (int)Kaifa_List1Phase::VoltageL1);
}
if (listSize >= (int)Kaifa::List1PhaseLong)
{
data["tPI"] = hanReader.getInt( (int)Kaifa_List1Phase::CumulativeActiveImportEnergy);
data["tPO"] = hanReader.getInt( (int)Kaifa_List1Phase::CumulativeActiveExportEnergy);
data["tQI"] = hanReader.getInt( (int)Kaifa_List1Phase::CumulativeReactiveImportEnergy);
data["tQO"] = hanReader.getInt( (int)Kaifa_List1Phase::CumulativeReactiveExportEnergy);
}
}
static void hanToJsonKaifa(JsonObject& data, HanReader& hanReader, Stream *debugger)
{
int listSize = hanReader.getListSize();
if (listSize == (int)Kaifa::List1)
{
// Handle listSize == 1 specially
data["P"] = hanReader.getInt( (int)Kaifa_List1::ActivePowerImported);
return;
}
switch (listSize) {
case (int)Kaifa::List3PhaseShort:
case (int)Kaifa::List3PhaseLong:
return hanToJsonKaifa3phase(listSize, data, hanReader, debugger);
case (int)Kaifa::List1PhaseShort:
case (int)Kaifa::List1PhaseLong:
return hanToJsonKaifa1phase(listSize, data, hanReader, debugger);
default:
if (debugger) debugger->printf("Warning: Unknown listSize %d\n", listSize);
return;
}
}
static void hanToJsonAidon3phase(int listSize, JsonObject& data, HanReader& hanReader, Stream *debugger)
{
if (listSize >= (int)Aidon::List3PhaseShort)
{
data["lv"] = hanReader.getString( (int)Aidon_List3Phase::ListVersionIdentifier);
data["id"] = hanReader.getString( (int)Aidon_List3Phase::MeterID);
data["type"] = hanReader.getString( (int)Aidon_List3Phase::MeterType);
data["P"] = hanReader.getInt( (int)Aidon_List3Phase::ActiveImportPower);
data["Q"] = hanReader.getInt( (int)Aidon_List3Phase::ReactiveExportPower);
data["I1"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::CurrentL1)) / 10;
data["I2"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::CurrentL2)) / 10;
data["I3"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::CurrentL3)) / 10;
data["U1"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::VoltageL1)) / 10;
data["U2"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::VoltageL2)) / 10;
data["U3"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::VoltageL3)) / 10;
}
if (listSize >= (int)Aidon::List3PhaseLong)
{
data["tPI"] = hanReader.getInt( (int)Aidon_List3Phase::CumulativeActiveImportEnergy);
data["tPO"] = hanReader.getInt( (int)Aidon_List3Phase::CumulativeActiveExportEnergy);
data["tQI"] = hanReader.getInt( (int)Aidon_List3Phase::CumulativeReactiveImportEnergy);
data["tQO"] = hanReader.getInt( (int)Aidon_List3Phase::CumulativeReactiveExportEnergy);
}
// TODO: Do not divide Aidon values by 10!?
}
static void hanToJsonAidon1phase(int listSize, JsonObject& data, HanReader& hanReader, Stream *debugger)
{
if (listSize >= (int)Aidon::List1PhaseShort)
{
data["lv"] = hanReader.getString( (int)Aidon_List1Phase::ListVersionIdentifier);
data["id"] = hanReader.getString( (int)Aidon_List1Phase::MeterID);
data["type"] = hanReader.getString( (int)Aidon_List1Phase::MeterType);
data["P"] = hanReader.getInt( (int)Aidon_List1Phase::ActiveImportPower);
data["Q"] = hanReader.getInt( (int)Aidon_List1Phase::ReactiveExportPower);
data["I1"] = ((double) hanReader.getInt( (int)Aidon_List1Phase::CurrentL1)) / 10;
data["U1"] = ((double) hanReader.getInt( (int)Aidon_List1Phase::VoltageL1)) / 10;
}
// TODO Aidon::List1PhaseLong
}
static void hanToJsonAidon(JsonObject& data, HanReader& hanReader, Stream *debugger)
{
int listSize = hanReader.getListSize();
// Based on the list number, get all details
// according to OBIS specifications for the meter
if (listSize == (int)Aidon::List1)
{
// Handle listSize == 1 specially
data["P"] = hanReader.getInt((int)Aidon_List1::ActiveImportPower);
return;
}
switch (listSize) {
case (int)Aidon::List3PhaseShort:
case (int)Aidon::List3PhaseLong:
return hanToJsonAidon3phase(listSize, data, hanReader, debugger);
case (int)Aidon::List1PhaseShort:
case (int)Aidon::List1PhaseLong:
return hanToJsonAidon1phase(listSize, data, hanReader, debugger);
default:
if (debugger) debugger->printf("Warning: Unknown listSize %d\n", listSize);
return;
}
}
static void hanToJsonKamstrup3phase(int listSize, JsonObject& data, HanReader& hanReader, Stream *debugger)
{
if (listSize >= (int)Kamstrup::List3PhaseShort)
{
data["lv"] = hanReader.getString( (int)Kamstrup_List3Phase::ListVersionIdentifier);
data["id"] = hanReader.getString( (int)Kamstrup_List3Phase::MeterID);
data["type"] = hanReader.getString( (int)Kamstrup_List3Phase::MeterType);
data["P"] = hanReader.getInt( (int)Kamstrup_List3Phase::ActiveImportPower);
data["Q"] = hanReader.getInt( (int)Kamstrup_List3Phase::ReactiveImportPower);
data["I1"] = hanReader.getInt( (int)Kamstrup_List3Phase::CurrentL1);
data["I2"] = hanReader.getInt( (int)Kamstrup_List3Phase::CurrentL2);
data["I3"] = hanReader.getInt( (int)Kamstrup_List3Phase::CurrentL3);
data["U1"] = hanReader.getInt( (int)Kamstrup_List3Phase::VoltageL1);
data["U2"] = hanReader.getInt( (int)Kamstrup_List3Phase::VoltageL2);
data["U3"] = hanReader.getInt( (int)Kamstrup_List3Phase::VoltageL3);
}
if (listSize >= (int)Kamstrup::List3PhaseLong)
{
data["tPI"] = hanReader.getInt( (int)Kamstrup_List3Phase::CumulativeActiveImportEnergy);
data["tPO"] = hanReader.getInt( (int)Kamstrup_List3Phase::CumulativeActiveExportEnergy);
data["tQI"] = hanReader.getInt( (int)Kamstrup_List3Phase::CumulativeReactiveImportEnergy);
data["tQO"] = hanReader.getInt( (int)Kamstrup_List3Phase::CumulativeReactiveExportEnergy);
}
}
static void hanToJsonKamstrup1phase(int listSize, JsonObject& data, HanReader& hanReader, Stream *debugger)
{
if (listSize >= (int)Kamstrup::List1PhaseShort)
{
data["lv"] = hanReader.getString( (int)Kamstrup_List1Phase::ListVersionIdentifier);
data["id"] = hanReader.getString( (int)Kamstrup_List1Phase::MeterID);
data["type"] = hanReader.getString( (int)Kamstrup_List1Phase::MeterType);
data["P"] = hanReader.getInt( (int)Kamstrup_List1Phase::ActiveImportPower);
data["Q"] = hanReader.getInt( (int)Kamstrup_List1Phase::ReactiveImportPower);
data["I1"] = hanReader.getInt( (int)Kamstrup_List1Phase::CurrentL1);
data["U1"] = hanReader.getInt( (int)Kamstrup_List1Phase::VoltageL1);
}
if (listSize >= (int)Kamstrup::List1PhaseLong)
{
data["tPI"] = hanReader.getInt( (int)Kamstrup_List1Phase::CumulativeActiveImportEnergy);
data["tPO"] = hanReader.getInt( (int)Kamstrup_List1Phase::CumulativeActiveExportEnergy);
data["tQI"] = hanReader.getInt( (int)Kamstrup_List1Phase::CumulativeReactiveImportEnergy);
data["tQO"] = hanReader.getInt( (int)Kamstrup_List1Phase::CumulativeReactiveExportEnergy);
}
}
static void hanToJsonKamstrup(JsonObject& data, HanReader& hanReader, Stream *debugger)
{
int listSize = hanReader.getListSize();
switch (listSize) {
case (int)Kamstrup::List3PhaseShort:
case (int)Kamstrup::List3PhaseLong:
return hanToJsonKamstrup3phase(listSize, data, hanReader, debugger);
case (int)Kamstrup::List1PhaseShort:
case (int)Kamstrup::List1PhaseLong:
return hanToJsonKamstrup1phase(listSize, data, hanReader, debugger);
default:
if (debugger) debugger->printf("Warning: Unknown listSize %d\n", listSize);
return;
}
}
void hanToJson(JsonObject& data, byte meterType, HanReader& hanReader, Stream *debugger)
{
// Based on the list number, get all details
// according to OBIS specifications for the meter
switch (meterType)
{
case 1: // Kaifa
return hanToJsonKaifa(data, hanReader, debugger);
case 2: // Aidon
return hanToJsonAidon(data, hanReader, debugger);
case 3: // Kamstrup
return hanToJsonKamstrup(data, hanReader, debugger);
default:
if (debugger) {
debugger->print("Meter type ");
debugger->print(meterType, HEX);
debugger->println(" is unknown");
}
break;
}
}
void hanToJson(JsonObject& data, byte meterType, HanReader& hanReader)
{
return hanToJson(data, meterType, hanReader, NULL);
}

View File

@@ -1,17 +0,0 @@
#ifndef _HANTOJSON_h
#define _HANTOJSON_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include <ArduinoJson.h>
#include "HanReader.h"
void hanToJson(JsonObject& data, byte meterType, HanReader& hanReader);
void hanToJson(JsonObject& root, byte meterType, HanReader& hanReader, Stream *debugPort);
#endif

View File

@@ -1,27 +0,0 @@
## Arduino Code
FW and libraries for running on various HW
### AmsToMqttBridge
The original FW by roarfred, runs a Wifi access point until configured. Uploads data as json to a MQTT server.
### WifiFeatherRestBridge
_Note: This project is still under development._
Firmware for runninw AMS decoding with off-the-shelf components, so no PCB etching or soldering necessary. Specifially,
the sketch runs on the [Adafruit Feather M0 WiFi w/ATWINC1500](https://www.adafruit.com/product/3010) card and uses the
[TSS721 M-BUS module board](https://www.aliexpress.com/item/TSS721/32751482255.html) available from Aliexpress.
![FeatherMbus](/Debugging/Documentation/feather_3010-00_mbus_slave.jpg)
### Arduino Libraries/HanReader
The shared library to read from a serial port and decode the data into packets.
### Arduino Libraries/HanToJson
Shared library to create a json structure from the read HAN packets (for the different meter types).

View File

@@ -1,283 +0,0 @@
/**
* Simple sketch to simulate reading data from different meters.
*
* Created 24. October 2017 by Roar Fredriksen
*/
#include <ArduinoJson.h>
//#include "Kaifa.h"
//#include "Kamstrup.h"
//#include "Aidon.h"
#include "HanReader.h"
#include "HanToJson.h"
// The HAN Port reader
HanReader hanReader;
HardwareSerial* debugger = NULL;
byte meterType = 1; // Start with Kaifa
int sampleIndex = 0;
int expectIndex = 0;
byte kaifa_samples[] =
{
// List #1
0x7E, 0xA0, 0x27, 0x01, 0x02, 0x01, 0x10, 0x5A, 0x87, 0xE6, 0xE7, 0x00, 0x0F, 0x40, 0x00, 0x00,
0x00, 0x09, 0x0C, 0x07, 0xE1, 0x09, 0x0E, 0x04, 0x13, 0x1F, 0x02, 0xFF, 0x80, 0x00, 0x00, 0x02,
0x01, 0x06, 0x00, 0x00, 0x03, 0x98, 0xAB, 0xAD, 0x7E,
// List#2
0x7E, 0xA0, 0x79, 0x01, 0x02, 0x01, 0x10, 0x80, 0x93, 0xE6, 0xE7, 0x00, 0x0F, 0x40, 0x00, 0x00,
0x00, 0x09, 0x0C, 0x07, 0xE1, 0x09, 0x0E, 0x04, 0x13, 0x1F, 0x0A, 0xFF, 0x80, 0x00, 0x00, 0x02,
0x0D, 0x09, 0x07, 0x4B, 0x46, 0x4D, 0x5F, 0x30, 0x30, 0x31, 0x09, 0x10, 0x36, 0x39, 0x37, 0x30,
0x36, 0x33, 0x31, 0x34, 0x30, 0x31, 0x37, 0x35, 0x33, 0x39, 0x38, 0x35, 0x09, 0x08, 0x4D, 0x41,
0x33, 0x30, 0x34, 0x48, 0x33, 0x45, 0x06, 0x00, 0x00, 0x03, 0x96, 0x06, 0x00, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x05, 0x64, 0x06,
0x00, 0x00, 0x0C, 0x92, 0x06, 0x00, 0x00, 0x0C, 0x49, 0x06, 0x00, 0x00, 0x09, 0x46, 0x06, 0x00,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x09, 0x4E, 0x1F, 0x85, 0x7E,
// List#3
0x7E, 0xA0, 0x9B, 0x01, 0x02, 0x01, 0x10, 0xEE, 0xAE, 0xE6, 0xE7, 0x00, 0x0F, 0x40, 0x00, 0x00,
0x00, 0x09, 0x0C, 0x07, 0xE1, 0x09, 0x0E, 0x04, 0x14, 0x00, 0x0A, 0xFF, 0x80, 0x00, 0x00, 0x02,
0x12, 0x09, 0x07, 0x4B, 0x46, 0x4D, 0x5F, 0x30, 0x30, 0x31, 0x09, 0x10, 0x36, 0x39, 0x37, 0x30,
0x36, 0x33, 0x31, 0x34, 0x30, 0x31, 0x37, 0x35, 0x33, 0x39, 0x38, 0x35, 0x09, 0x08, 0x4D, 0x41,
0x33, 0x30, 0x34, 0x48, 0x33, 0x45, 0x06, 0x00, 0x00, 0x03, 0xFE, 0x06, 0x00, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x07, 0x91, 0x06,
0x00, 0x00, 0x0C, 0x9D, 0x06, 0x00, 0x00, 0x0D, 0x66, 0x06, 0x00, 0x00, 0x09, 0x41, 0x06, 0x00,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x09, 0x4C, 0x09, 0x0C, 0x07, 0xE1, 0x09, 0x0E, 0x04, 0x14,
0x00, 0x0A, 0xFF, 0x80, 0x00, 0x00, 0x06, 0x00, 0x02, 0xBF, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0xF7, 0x06, 0x00, 0x00, 0x3F, 0xFC, 0x71, 0x71, 0x7E,
// List#2.1
0x7e, 0xa0, 0x65, 0x01, 0x02, 0x01, 0x10, 0xf0, 0x50, 0xe6, 0xe7, 0x00, 0x0f, 0x40, 0x00, 0x00,
0x00, 0x09, 0x0c, 0x07, 0xe3, 0x05, 0x08, 0x03, 0x16, 0x20, 0x28, 0xff, 0x80, 0x00, 0x00, 0x02,
0x09, 0x09, 0x07, 0x4b, 0x46, 0x4d, 0x5f, 0x30, 0x30, 0x31, 0x09, 0x10, 0x36, 0x39, 0x37, 0x30,
0x36, 0x33, 0x31, 0x34, 0x30, 0x31, 0x39, 0x39, 0x31, 0x36, 0x38, 0x34, 0x09, 0x08, 0x4d, 0x41,
0x31, 0x30, 0x35, 0x48, 0x32, 0x45, 0x06, 0x00, 0x00, 0x03, 0xa5, 0x06, 0x00, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x21, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x10, 0x0e, 0x06,
0x00, 0x00, 0x09, 0x0a, 0x98, 0x76, 0x7e,
};
String kaifa_expect[] = {
String("{\"t\":1505417462,\"data\":{\"P\":920}}"),
String("{\"t\":1505417470,\"data\":{\"lv\":\"KFM_001\",\"id\":\"6970631401753985\",\"type\":\"MA304H3E\",\"P\":918,\"Q\":0,\"I1\":1380,\"I2\":3218,\"I3\":3145,\"U1\":2374,\"U2\":0,\"U3\":2382}}"),
String("{\"t\":1505419210,\"data\":{\"lv\":\"KFM_001\",\"id\":\"6970631401753985\",\"type\":\"MA304H3E\",\"P\":1022,\"Q\":0,\"I1\":1937,\"I2\":3229,\"I3\":3430,\"U1\":2369,\"U2\":0,\"U3\":2380,\"tPI\":180073,\"tPO\":0,\"tQI\":247,\"tQO\":16380}}"),
String("{\"t\":1557354760,\"data\":{\"lv\":\"KFM_001\",\"id\":\"6970631401991684\",\"type\":\"MA105H2E\",\"P\":933,\"Q\":33,\"I1\":4110,\"U1\":2314}}")
};
byte aidon_samples[] =
{ // From Aidon-HAN-Interface-Description-v10A-ID-34331.pdf
// List 2 sending (1-phase)
0x7e, 0xa0, 0xd2, 0x41, 0x08, 0x83, 0x13, 0x82, 0xd6, 0xe6, 0xe7, 0x00, 0x0f, 0x40, 0x00, 0x00,
0x00, 0x00, 0x01, 0x09, 0x02, 0x02, 0x09, 0x06, 0x01, 0x01, 0x00, 0x02, 0x81, 0xff, 0x0a, 0x0b,
0x41, 0x49, 0x44, 0x4f, 0x4e, 0x5f, 0x56, 0x30, 0x30, 0x30, 0x31, 0x02, 0x02, 0x09, 0x06, 0x00,
0x00, 0x60, 0x01, 0x00, 0xff, 0x0a, 0x10, 0x37, 0x33, 0x35, 0x39, 0x39, 0x39, 0x32, 0x38, 0x39,
0x30, 0x39, 0x34, 0x31, 0x37, 0x34, 0x32, 0x02, 0x02, 0x09, 0x06, 0x00, 0x00, 0x60, 0x01, 0x07,
0xff, 0x0a, 0x04, 0x36, 0x35, 0x31, 0x35, 0x02, 0x03, 0x09, 0x06, 0x01, 0x00, 0x01, 0x07, 0x00,
0xff, 0x06, 0x00, 0x00, 0x05, 0x52, 0x02, 0x02, 0x0f, 0x00, 0x16, 0x1b, 0x02, 0x03, 0x09, 0x06,
0x01, 0x00, 0x02, 0x07, 0x00, 0xff, 0x06, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x0f, 0x00, 0x16,
0x1b, 0x02, 0x03, 0x09, 0x06, 0x01, 0x00, 0x03, 0x07, 0x00, 0xff, 0x06, 0x00, 0x00, 0x03, 0xe4,
0x02, 0x02, 0x0f, 0x00, 0x16, 0x1d, 0x02, 0x03, 0x09, 0x06, 0x01, 0x00, 0x04, 0x07, 0x00, 0xff,
0x06, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x0f, 0x00, 0x16, 0x1d, 0x02, 0x03, 0x09, 0x06, 0x01,
0x00, 0x1f, 0x07, 0x00, 0xff, 0x10, 0x00, 0x5d, 0x02, 0x02, 0x0f, 0xff, 0x16, 0x21, 0x02, 0x03,
0x09, 0x06, 0x01, 0x00, 0x20, 0x07, 0x00, 0xff, 0x12, 0x09, 0xc4, 0x02, 0x02, 0x0f, 0xff, 0x16,
0x23, 0xe0, 0xc4, 0x7e
};
String aidon_expect[] = {
String("{\"t\":0,\"data\":{\"lv\":\"AIDON_V0001\",\"id\":\"7359992890941742\",\"type\":\"6515\",\"P\":1362,\"Q\":0,\"I1\":9.3,\"U1\":250}}")
};
byte kamstrup_samples[] =
{ // [2017-10-20 04.43.32.368 - Received 229 (0xE5) bytes]
// List #1
0x7E, 0xA0, 0xE2, 0x2B, 0x21, 0x13, 0x23, 0x9A, 0xE6, 0xE7, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
0x0C, 0x07, 0xE2, 0x03, 0x04, 0x07, 0x14, 0x3B, 0x32, 0xFF, 0x80, 0x00, 0x00, 0x02, 0x19, 0x0A,
0x0E, 0x4B, 0x61, 0x6D, 0x73, 0x74, 0x72, 0x75, 0x70, 0x5F, 0x56, 0x30, 0x30, 0x30, 0x31, 0x09,
0x06, 0x01, 0x01, 0x00, 0x00, 0x05, 0xFF, 0x0A, 0x10, 0x35, 0x37, 0x30, 0x36, 0x35, 0x36, 0x37,
0x32, 0x37, 0x34, 0x33, 0x38, 0x39, 0x37, 0x30, 0x32, 0x09, 0x06, 0x01, 0x01, 0x60, 0x01, 0x01,
0xFF, 0x0A, 0x12, 0x36, 0x38, 0x34, 0x31, 0x31, 0x32, 0x31, 0x42, 0x4E, 0x32, 0x34, 0x33, 0x31,
0x30, 0x31, 0x30, 0x34, 0x30, 0x09, 0x06, 0x01, 0x01, 0x01, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00,
0x11, 0x28, 0x09, 0x06, 0x01, 0x01, 0x02, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09,
0x06, 0x01, 0x01, 0x03, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x84, 0x09, 0x06, 0x01, 0x01,
0x04, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0x01, 0x01, 0x1F, 0x07, 0x00,
0xFF, 0x06, 0x00, 0x00, 0x05, 0x66, 0x09, 0x06, 0x01, 0x01, 0x33, 0x07, 0x00, 0xFF, 0x06, 0x00,
0x00, 0x03, 0x0C, 0x09, 0x06, 0x01, 0x01, 0x47, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x05, 0x5A,
0x09, 0x06, 0x01, 0x01, 0x20, 0x07, 0x00, 0xFF, 0x12, 0x00, 0xE0, 0x09, 0x06, 0x01, 0x01, 0x34,
0x07, 0x00, 0xFF, 0x12, 0x00, 0xDF, 0x09, 0x06, 0x01, 0x01, 0x48, 0x07, 0x00, 0xFF, 0x12, 0x00,
0xDF, 0xA1, 0xD8, 0x7E,
// List #2
0x7E, 0xA1, 0x2C, 0x2B, 0x21, 0x13, 0xFC, 0x04, 0xE6, 0xE7, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
0x0C, 0x07, 0xE2, 0x03, 0x04, 0x07, 0x15, 0x00, 0x05, 0xFF, 0x80, 0x00, 0x00, 0x02, 0x23, 0x0A,
0x0E, 0x4B, 0x61, 0x6D, 0x73, 0x74, 0x72, 0x75, 0x70, 0x5F, 0x56, 0x30, 0x30, 0x30, 0x31, 0x09,
0x06, 0x01, 0x01, 0x00, 0x00, 0x05, 0xFF, 0x0A, 0x10, 0x35, 0x37, 0x30, 0x36, 0x35, 0x36, 0x37,
0x32, 0x37, 0x34, 0x33, 0x38, 0x39, 0x37, 0x30, 0x32, 0x09, 0x06, 0x01, 0x01, 0x60, 0x01, 0x01,
0xFF, 0x0A, 0x12, 0x36, 0x38, 0x34, 0x31, 0x31, 0x32, 0x31, 0x42, 0x4E, 0x32, 0x34, 0x33, 0x31,
0x30, 0x31, 0x30, 0x34, 0x30, 0x09, 0x06, 0x01, 0x01, 0x01, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00,
0x0E, 0x3B, 0x09, 0x06, 0x01, 0x01, 0x02, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09,
0x06, 0x01, 0x01, 0x03, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x86, 0x09, 0x06, 0x01, 0x01,
0x04, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0x01, 0x01, 0x1F, 0x07, 0x00,
0xFF, 0x06, 0x00, 0x00, 0x04, 0x21, 0x09, 0x06, 0x01, 0x01, 0x33, 0x07, 0x00, 0xFF, 0x06, 0x00,
0x00, 0x03, 0x0C, 0x09, 0x06, 0x01, 0x01, 0x47, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x04, 0x1C,
0x09, 0x06, 0x01, 0x01, 0x20, 0x07, 0x00, 0xFF, 0x12, 0x00, 0xE2, 0x09, 0x06, 0x01, 0x01, 0x34,
0x07, 0x00, 0xFF, 0x12, 0x00, 0xE0, 0x09, 0x06, 0x01, 0x01, 0x48, 0x07, 0x00, 0xFF, 0x12, 0x00,
0xDF, 0x09, 0x06, 0x00, 0x01, 0x01, 0x00, 0x00, 0xFF, 0x09, 0x0C, 0x07, 0xE2, 0x03, 0x04, 0x07,
0x15, 0x00, 0x05, 0xFF, 0x80, 0x00, 0x00, 0x09, 0x06, 0x01, 0x01, 0x01, 0x08, 0x00, 0xFF, 0x06,
0x00, 0x1A, 0x40, 0x49, 0x09, 0x06, 0x01, 0x01, 0x02, 0x08, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00,
0x00, 0x09, 0x06, 0x01, 0x01, 0x03, 0x08, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x05, 0x64, 0x09, 0x06,
0x01, 0x01, 0x04, 0x08, 0x00, 0xFF, 0x06, 0x00, 0x02, 0x7B, 0x21, 0x20, 0x92, 0x7E
};
String kamstrup_expect[] = {
String("{\"t\":1520197190,\"data\":{\"lv\":\"Kamstrup_V0001\",\"id\":\"5706567274389702\",\"type\":\"6841121BN243101040\",\"P\":4392,\"Q\":132,\"I1\":1382,\"I2\":780,\"I3\":1370,\"U1\":224,\"U2\":223,\"U3\":223}}"),
String("{\"t\":1520197205,\"data\":{\"lv\":\"Kamstrup_V0001\",\"id\":\"5706567274389702\",\"type\":\"6841121BN243101040\",\"P\":3643,\"Q\":134,\"I1\":1057,\"I2\":780,\"I3\":1052,\"U1\":226,\"U2\":224,\"U3\":223,\"tPI\":1720393,\"tPO\":0,\"tQI\":1380,\"tQO\":162593}}")
};
void assert_equal(DynamicJsonDocument& doc, const String& expected)
{
String jsonActual;
serializeJson(doc, jsonActual);
if (jsonActual != expected)
{
debugger->printf("Test assert failed:\n %s\n !=\n %s\n", jsonActual.c_str(), expected.c_str());
while (true) {}
}
}
void setup() {
Serial1.begin(115200);
//while (!Serial) {}
Serial1.println("Serial1 debugging port initialized");
// initialize the HanReader
// (passing no han port, as we are feeding data manually, but provide Serial for debugging)
hanReader.setup(NULL, &Serial1);
hanReader.compensateFor09HeaderBug = true; // Starting with Kaifa
debugger = &Serial1;
}
void loopKaifa()
{
if (sampleIndex >= sizeof(kaifa_samples))
{
meterType++;
sampleIndex = 0;
expectIndex = 0;
hanReader.setup(NULL, debugger);
hanReader.compensateFor09HeaderBug = false;
Serial1.println("Done with Kaifa");
}
// Read one byte from the "port", and see if we got a full package
if (hanReader.read(kaifa_samples[sampleIndex++]))
{
DynamicJsonDocument doc(500);
doc["t"] = hanReader.getPackageTime();
JsonObject data = doc.createNestedObject("data");
hanToJson(data, meterType, hanReader);
debugger->println("Kaifa JsonData: ");
serializeJsonPretty(doc, Serial1);
debugger->println();
if (expectIndex < sizeof(kaifa_expect) / sizeof(kaifa_expect[0]))
{
assert_equal(doc, kaifa_expect[expectIndex++]);
} else {
debugger->println("Not enough expected results spesified");
while (true) {}
}
}
}
void loopAidon()
{
if (sampleIndex >= sizeof(aidon_samples))
{
meterType++;
sampleIndex = 0;
expectIndex = 0;
hanReader.setup(NULL, &Serial1);
debugger->println("Done with Aidon");
}
// Read one byte from the "port", and see if we got a full package
if (hanReader.read(aidon_samples[sampleIndex++]))
{
DynamicJsonDocument doc(500);
doc["t"] = hanReader.getPackageTime();
JsonObject data = doc.createNestedObject("data");
hanToJson(data, meterType, hanReader);
debugger->println("Aidon JsonData: ");
serializeJsonPretty(doc, Serial1);
debugger->println();
if (expectIndex < sizeof(aidon_expect) / sizeof(aidon_expect[0]))
{
assert_equal(doc, aidon_expect[expectIndex++]);
} else {
debugger->println("Not enough expected results spesified");
while (true) {}
}
}
}
void loopKamstrup()
{
if (sampleIndex >= sizeof(kamstrup_samples))
{
meterType++;
sampleIndex = 0;
hanReader.setup(NULL, &Serial1);
debugger->println("Done with Kamstrup");
}
// Read one byte from the "port", and see if we got a full package
if (hanReader.read(kamstrup_samples[sampleIndex++]))
{
DynamicJsonDocument doc(500);
doc["t"] = hanReader.getPackageTime();
JsonObject data = doc.createNestedObject("data");
hanToJson(data, meterType, hanReader);
debugger->println("Kamstrup JsonData: ");
serializeJsonPretty(doc, Serial1);
debugger->println();
if (expectIndex < sizeof(kamstrup_expect) / sizeof(kamstrup_expect[0]))
{
assert_equal(doc, kamstrup_expect[expectIndex++]);
} else {
debugger->println("Not enough expected results spesified");
while (true) {}
}
}
}
void loop() {
switch (meterType)
{
case 1: // Kaifa
return loopKaifa();
case 2: // Aidon
return loopAidon();
case 3: // Kamstrup
return loopKamstrup();
default:
debugger->println("Done");
while (true) ;
break;
}
}

View File

@@ -1,121 +0,0 @@
/*
* Simple sketch to simulate reading data from a Kamstrup
* AMS Meter.
*
* Created 24. October 2017 by Roar Fredriksen
*/
#include <HanReader.h>
#include <Kaifa.h>
// The HAN Port reader
HanReader hanReader;
byte samples[] =
{
// List #1
0x7E, 0xA0, 0x27, 0x01, 0x02, 0x01, 0x10, 0x5A, 0x87, 0xE6, 0xE7, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x09, 0x0C, 0x07, 0xE1, 0x09, 0x0E, 0x04, 0x13, 0x1F, 0x02, 0xFF, 0x80, 0x00, 0x00, 0x02, 0x01, 0x06, 0x00, 0x00, 0x03, 0x98, 0xAB, 0xAD, 0x7E,
// List#2
0x7E, 0xA0, 0x79, 0x01, 0x02, 0x01, 0x10, 0x80, 0x93, 0xE6, 0xE7, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x09, 0x0C, 0x07, 0xE1, 0x09, 0x0E, 0x04, 0x13, 0x1F, 0x0A, 0xFF, 0x80, 0x00, 0x00, 0x02, 0x0D, 0x09, 0x07, 0x4B, 0x46, 0x4D, 0x5F, 0x30, 0x30, 0x31, 0x09, 0x10, 0x36, 0x39, 0x37, 0x30, 0x36, 0x33, 0x31, 0x34, 0x30, 0x31, 0x37, 0x35, 0x33, 0x39, 0x38, 0x35, 0x09, 0x08, 0x4D, 0x41, 0x33, 0x30, 0x34, 0x48, 0x33, 0x45, 0x06, 0x00, 0x00, 0x03, 0x96, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x05, 0x64, 0x06, 0x00, 0x00, 0x0C, 0x92, 0x06, 0x00, 0x00, 0x0C, 0x49, 0x06, 0x00, 0x00, 0x09, 0x46, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x09, 0x4E, 0x1F, 0x85, 0x7E,
// List#3
0x7E, 0xA0, 0x9B, 0x01, 0x02, 0x01, 0x10, 0xEE, 0xAE, 0xE6, 0xE7, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x09, 0x0C, 0x07, 0xE1, 0x09, 0x0E, 0x04, 0x14, 0x00, 0x0A, 0xFF, 0x80, 0x00, 0x00, 0x02, 0x12, 0x09, 0x07, 0x4B, 0x46, 0x4D, 0x5F, 0x30, 0x30, 0x31, 0x09, 0x10, 0x36, 0x39, 0x37, 0x30, 0x36, 0x33, 0x31, 0x34, 0x30, 0x31, 0x37, 0x35, 0x33, 0x39, 0x38, 0x35, 0x09, 0x08, 0x4D, 0x41, 0x33, 0x30, 0x34, 0x48, 0x33, 0x45, 0x06, 0x00, 0x00, 0x03, 0xFE, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x07, 0x91, 0x06, 0x00, 0x00, 0x0C, 0x9D, 0x06, 0x00, 0x00, 0x0D, 0x66, 0x06, 0x00, 0x00, 0x09, 0x41, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x09, 0x4C, 0x09, 0x0C, 0x07, 0xE1, 0x09, 0x0E, 0x04, 0x14, 0x00, 0x0A, 0xFF, 0x80, 0x00, 0x00, 0x06, 0x00, 0x02, 0xBF, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xF7, 0x06, 0x00, 0x00, 0x3F, 0xFC, 0x71, 0x71, 0x7E
};
int sampleIndex = 0;
void setup() {
setupDebugPort();
// initialize the HanReader
// (passing no han port, as we are feeding data manually, but provide Serial for debugging)
hanReader.setup(NULL, &Serial);
hanReader.compensateFor09HeaderBug = true;
}
void setupDebugPort()
{
// Initialize the Serial port for debugging
Serial.begin(115200);
while (!Serial) {}
Serial.setDebugOutput(true);
Serial.println("Serial1");
Serial.println("Serial debugging port initialized");
}
void loop() {
// Read one byte from the "port", and see if we got a full package
if (hanReader.read(samples[sampleIndex++]))
{
// Get the list identifier
int listSize = hanReader.getListSize();
Serial.println("");
Serial.print("List size: ");
Serial.print(listSize);
Serial.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)
{
Serial.println(" (list #1 has no ID)");
}
else
{
String id = hanReader.getString((int)Kaifa_List2::ListVersionIdentifier);
Serial.println(id);
}
time_t time = hanReader.getPackageTime();
Serial.print("Time of the package is: ");
Serial.println(time);
if (listSize == (int)Kaifa::List1)
{
int power = hanReader.getInt((int)Kaifa_List1::ActivePowerImported);
Serial.print("Power consumtion is right now: ");
Serial.print(power);
Serial.println(" W");
}
else
{
float current[3];
current[0] = (float)hanReader.getInt((int)Kaifa_List2::CurrentL1) / 1000.0;
current[1] = (float)hanReader.getInt((int)Kaifa_List2::CurrentL2) / 1000.0;
current[2] = (float)hanReader.getInt((int)Kaifa_List2::CurrentL3) / 1000.0;
int voltage[3];
voltage[0] = hanReader.getInt((int)Kaifa_List2::VoltageL1);
voltage[1] = hanReader.getInt((int)Kaifa_List2::VoltageL2);
voltage[2] = hanReader.getInt((int)Kaifa_List2::VoltageL3);
for (int i = 0; i < 3; i++)
{
Serial.print("L");
Serial.print(i + 1);
Serial.print(" is ");
Serial.print(voltage[i]);
Serial.print(" V (");
Serial.print(current[i]);
Serial.println(" A)");
}
if (listSize == (int)Kaifa::List3)
{
time_t clock = hanReader.getTime((int)Kaifa_List3::MeterClock);
Serial.print("Clock is: ");
Serial.println(clock);
}
}
}
}
delay(10);
if (sampleIndex >= sizeof(samples))
{
delay(2000);
sampleIndex = 0;
}
}

View File

@@ -1,31 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KaifaTest", "KaifaTest.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HanReader", "..\HanReader\HanReader.vcxitems", "{CD0F5364-923B-49E4-8BE5-EA7D8A60DF80}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\HanReader\HanReader.vcxitems*{c5f80730-f44f-4478-bdae-6634efc2ca88}*SharedItemsImports = 4
..\HanReader\HanReader.vcxitems*{cd0f5364-923b-49e4-8be5-ea7d8a60df80}*SharedItemsImports = 9
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.ActiveCfg = Debug|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {35D8A583-E857-4E42-B780-543F324B8851}
EndGlobalSection
EndGlobal

View File

@@ -1,93 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C5F80730-F44F-4478-BDAE-6634EFC2CA88}</ProjectGuid>
<RootNamespace>KaifaTest</RootNamespace>
<ProjectName>KaifaTest</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>
</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>
</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
<Import Project="..\HanReader\HanReader.vcxitems" Label="Shared" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(ProjectDir)..\KaifaTest;$(ProjectDir)..\HanReader\src;$(ProjectDir)..\..\..\..\..\..\..\..\..\Program Files (x86)\Arduino\libraries;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries;$(ProjectDir)..\..\..\..\..\..\..\Google Drive\Private\Elektronikk\Arduino\libraries;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\libb64;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\spiffs;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\umm_malloc;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\variants\generic;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\lwip\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\xtensa-lx106-elf;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\lib\gcc\xtensa-lx106-elf\4.8.2\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>$(ProjectDir)__vm\.KaifaTest.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
<PreprocessorDefinitions>__ESP8266_ESp8266__;__ESP8266_ESP8266__;__ets__;ICACHE_FLASH;F_CPU=80000000L;LWIP_OPEN_SRC;ARDUINO=106012;ARDUINO_ESP8266_ESP01;ARDUINO_ARCH_ESP8266;ESP8266;__cplusplus=201103L;_VMICRO_INTELLISENSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectCapability Include="VisualMicro" />
</ItemGroup>
<PropertyGroup>
<DebuggerFlavor>VisualMicroDebugger</DebuggerFlavor>
</PropertyGroup>
<ItemGroup>
<None Include="KaifaTest.ino">
<FileType>CppCode</FileType>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="__vm\.KaifaTest.vsarduino.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="KaifaTest.ino" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="__vm\.KaifaTest.vsarduino.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@@ -1,128 +0,0 @@
/*
* Simple sketch to simulate reading data from a Kamstrup
* AMS Meter.
*
* Created 24. October 2017 by Roar Fredriksen
*/
#include <HanReader.h>
#include <Kamstrup.h>
// The HAN Port reader
HanReader hanReader;
byte samples[] =
// [2017-10-20 04.43.32.368 - Received 229 (0xE5) bytes]
{
// List #1
0x7E, 0xA0, 0xE2, 0x2B, 0x21, 0x13, 0x23, 0x9A, 0xE6, 0xE7, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x07, 0xE2, 0x03, 0x04, 0x07, 0x14, 0x3B,
0x32, 0xFF, 0x80, 0x00, 0x00, 0x02, 0x19, 0x0A, 0x0E, 0x4B, 0x61, 0x6D, 0x73, 0x74, 0x72, 0x75, 0x70, 0x5F, 0x56, 0x30, 0x30, 0x30, 0x31, 0x09,
0x06, 0x01, 0x01, 0x00, 0x00, 0x05, 0xFF, 0x0A, 0x10, 0x35, 0x37, 0x30, 0x36, 0x35, 0x36, 0x37, 0x32, 0x37, 0x34, 0x33, 0x38, 0x39, 0x37, 0x30,
0x32, 0x09, 0x06, 0x01, 0x01, 0x60, 0x01, 0x01, 0xFF, 0x0A, 0x12, 0x36, 0x38, 0x34, 0x31, 0x31, 0x32, 0x31, 0x42, 0x4E, 0x32, 0x34, 0x33, 0x31,
0x30, 0x31, 0x30, 0x34, 0x30, 0x09, 0x06, 0x01, 0x01, 0x01, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x11, 0x28, 0x09, 0x06, 0x01, 0x01, 0x02, 0x07,
0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0x01, 0x01, 0x03, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x84, 0x09, 0x06, 0x01, 0x01,
0x04, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0x01, 0x01, 0x1F, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x05, 0x66, 0x09, 0x06,
0x01, 0x01, 0x33, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x03, 0x0C, 0x09, 0x06, 0x01, 0x01, 0x47, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x05, 0x5A,
0x09, 0x06, 0x01, 0x01, 0x20, 0x07, 0x00, 0xFF, 0x12, 0x00, 0xE0, 0x09, 0x06, 0x01, 0x01, 0x34, 0x07, 0x00, 0xFF, 0x12, 0x00, 0xDF, 0x09, 0x06,
0x01, 0x01, 0x48, 0x07, 0x00, 0xFF, 0x12, 0x00, 0xDF, 0xA1, 0xD8, 0x7E,
// List #2
0x7E, 0xA1, 0x2C, 0x2B, 0x21, 0x13, 0xFC, 0x04, 0xE6, 0xE7, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x07, 0xE2, 0x03, 0x04, 0x07, 0x15, 0x00,
0x05, 0xFF, 0x80, 0x00, 0x00, 0x02, 0x23, 0x0A, 0x0E, 0x4B, 0x61, 0x6D, 0x73, 0x74, 0x72, 0x75, 0x70, 0x5F, 0x56, 0x30, 0x30, 0x30, 0x31, 0x09,
0x06, 0x01, 0x01, 0x00, 0x00, 0x05, 0xFF, 0x0A, 0x10, 0x35, 0x37, 0x30, 0x36, 0x35, 0x36, 0x37, 0x32, 0x37, 0x34, 0x33, 0x38, 0x39, 0x37, 0x30,
0x32, 0x09, 0x06, 0x01, 0x01, 0x60, 0x01, 0x01, 0xFF, 0x0A, 0x12, 0x36, 0x38, 0x34, 0x31, 0x31, 0x32, 0x31, 0x42, 0x4E, 0x32, 0x34, 0x33, 0x31,
0x30, 0x31, 0x30, 0x34, 0x30, 0x09, 0x06, 0x01, 0x01, 0x01, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x0E, 0x3B, 0x09, 0x06, 0x01, 0x01, 0x02, 0x07,
0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0x01, 0x01, 0x03, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x86, 0x09, 0x06, 0x01, 0x01,
0x04, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0x01, 0x01, 0x1F, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x04, 0x21, 0x09, 0x06,
0x01, 0x01, 0x33, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x03, 0x0C, 0x09, 0x06, 0x01, 0x01, 0x47, 0x07, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x04, 0x1C,
0x09, 0x06, 0x01, 0x01, 0x20, 0x07, 0x00, 0xFF, 0x12, 0x00, 0xE2, 0x09, 0x06, 0x01, 0x01, 0x34, 0x07, 0x00, 0xFF, 0x12, 0x00, 0xE0, 0x09, 0x06,
0x01, 0x01, 0x48, 0x07, 0x00, 0xFF, 0x12, 0x00, 0xDF, 0x09, 0x06, 0x00, 0x01, 0x01, 0x00, 0x00, 0xFF, 0x09, 0x0C, 0x07, 0xE2, 0x03, 0x04, 0x07,
0x15, 0x00, 0x05, 0xFF, 0x80, 0x00, 0x00, 0x09, 0x06, 0x01, 0x01, 0x01, 0x08, 0x00, 0xFF, 0x06, 0x00, 0x1A, 0x40, 0x49, 0x09, 0x06, 0x01, 0x01,
0x02, 0x08, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0x01, 0x01, 0x03, 0x08, 0x00, 0xFF, 0x06, 0x00, 0x00, 0x05, 0x64, 0x09, 0x06,
0x01, 0x01, 0x04, 0x08, 0x00, 0xFF, 0x06, 0x00, 0x02, 0x7B, 0x21, 0x20, 0x92, 0x7E
};
int sampleIndex = 0;
void setup() {
setupDebugPort();
// initialize the HanReader
// (passing no han port, as we are feeding data manually, but provide Serial for debugging)
hanReader.setup(NULL, &Serial);
}
void setupDebugPort()
{
// Initialize the Serial port for debugging
Serial.begin(115200);
while (!Serial) {}
Serial.setDebugOutput(true);
Serial.println("Serial1");
Serial.println("Serial debugging port initialized");
}
void loop() {
// Read one byte from the "port", and see if we got a full package
if (hanReader.read(samples[sampleIndex++]))
{
// Get the list identifier
int listSize = hanReader.getListSize();
Serial.println("");
Serial.print("List size: ");
Serial.print(listSize);
Serial.print(": ");
// Only care for the ACtive Power Imported, which is found in the first list
if (listSize == (int)Kamstrup::List1 || listSize == (int)Kamstrup::List2)
{
String id = hanReader.getString((int)Kamstrup_List1::ListVersionIdentifier);
Serial.println(id);
time_t time = hanReader.getPackageTime();
Serial.print("Time of the package is: ");
Serial.println(time);
int power = hanReader.getInt((int)Kamstrup_List1::ActiveImportPower);
Serial.print("Power consumtion is right now: ");
Serial.print(power);
Serial.println(" W");
float current[3];
current[0] = (float)hanReader.getInt((int)Kamstrup_List1::CurrentL1) / 100.0;
current[1] = (float)hanReader.getInt((int)Kamstrup_List1::CurrentL2) / 100.0;
current[2] = (float)hanReader.getInt((int)Kamstrup_List1::CurrentL3) / 100.0;
int voltage[3];
voltage[0] = hanReader.getInt((int)Kamstrup_List1::VoltageL1);
voltage[1] = hanReader.getInt((int)Kamstrup_List1::VoltageL2);
voltage[2] = hanReader.getInt((int)Kamstrup_List1::VoltageL3);
for (int i = 0; i < 3; i++)
{
Serial.print("L");
Serial.print(i + 1);
Serial.print(" is ");
Serial.print(voltage[i]);
Serial.print(" V (");
Serial.print(current[i]);
Serial.println(" A)");
}
if (listSize == (int)Kamstrup::List2)
{
time_t clock = hanReader.getTime((int)Kamstrup_List2::MeterClock);
Serial.print("Clock is: ");
Serial.println(clock);
}
}
}
delay(10);
if (sampleIndex >= sizeof(samples))
{
delay(2000);
sampleIndex = 0;
}
}

View File

@@ -1,31 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KamstrupTest", "KamstrupTest.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HanReader", "..\HanReader\HanReader.vcxitems", "{CD0F5364-923B-49E4-8BE5-EA7D8A60DF80}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\HanReader\HanReader.vcxitems*{c5f80730-f44f-4478-bdae-6634efc2ca88}*SharedItemsImports = 4
..\HanReader\HanReader.vcxitems*{cd0f5364-923b-49e4-8be5-ea7d8a60df80}*SharedItemsImports = 9
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.ActiveCfg = Debug|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {852F88D2-3495-4048-9662-E3DDE77A7FD7}
EndGlobalSection
EndGlobal

View File

@@ -1,99 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C5F80730-F44F-4478-BDAE-6634EFC2CA88}</ProjectGuid>
<RootNamespace>
</RootNamespace>
<ProjectName>KamstrupTest</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>
</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>
</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
<Import Project="..\HanReader\HanReader.vcxitems" Label="Shared" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(ProjectDir)..\KamstrupTest;$(ProjectDir)..\HanReader\src;$(ProjectDir)..\..\..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\53ggn0bh.0i3\Micro Platforms\visualmicro\ide\libraries;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries;$(ProjectDir)..\..\..\..\..\Arduino\libraries;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\libb64;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\spiffs;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\umm_malloc;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\variants\generic;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\lwip\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\xtensa-lx106-elf;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\lib\gcc\xtensa-lx106-elf\4.8.2\include;$(ProjectDir)..\..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>$(ProjectDir)__vm\.KamstrupTest.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
<PreprocessorDefinitions>__ESP8266_ESp8266__;__ESP8266_ESP8266__;_VMDEBUG=1;__ets__;ICACHE_FLASH;F_CPU=80000000L;LWIP_OPEN_SRC;ARDUINO=10801;ARDUINO_ESP8266_ESP01;ARDUINO_ARCH_ESP8266;ESP8266;__cplusplus=201103L;_VMICRO_INTELLISENSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectCapability Include="VisualMicro" />
</ItemGroup>
<ItemGroup>
<None Include="KamstrupTest.ino">
<FileType>CppCode</FileType>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="__vm\.KamstrupTest.vsarduino.h" />
</ItemGroup>
<PropertyGroup>
<DebuggerFlavor>VisualMicroDebugger</DebuggerFlavor>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties custom_esp8266_generic_UploadSpeed="115200" arduino.upload.port="COM3" />
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="KamstrupTest.ino" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="__vm\.KamstrupTest.vsarduino.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@@ -1,33 +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
The device will boot as an AP (Access Point) the first time it starts.
Connect to the AP (ESP-AMS-MQTT) and browse to the Web page http://192.168.4.1/
Fill inn the form on the Web page and hit 'Submit'
The ESP will reboot and connect to your network, publishing it's Firmware version to the 'esp/ams/fw/version' topic.
The ESP can be reset trough the topic 'esp/ams/reset' or by pulling GPIO 13 LOW.
# Firmware Over The Air upgrade
The ESP now supports FOTA upgrades. Compile your Arduino sketch to binary (Sketch > Export compiled binary)
Upload the .bin file to a Web Server and create a version file.
Example:
If your .bin file is named 'ams.bin', create a 'ams.version' in the same folder and write a version number different from the
version published on the 'esp/ams/fw/version' topic.
Then send the URL of the file, exluding the file ending, to the 'esp/ams/fw/update' topic like this:
`mosquitto_pub -t 'esp/ams/fw/update' -m 'http://your.local.webserver/ams'` if the bin and version file is in the root folder.
The ESP will publish upgrade information to the 'esp/ams/fw/info' topic.
# Output
All output is published on `esp/ams/#`

View File

@@ -1,524 +0,0 @@
/*
* Template sketch for a selv managed ESP8266 WiFi - MQTT setup.
*
* The ESP will boot and try to connect to a WiFi network.
* If it's not able to connect, it will boot up as an Access Point (AP).
*
* The user can then connect to the AP and browse to http://192.168.4.1
* and fill inn SSID/password, MQTT IP and meter type.
*
* The ESP will then store the information in EEPROM for later use.
* It is possible to reset the ESP trough MQTT or pulling GPIO13 HIGH.
*
* The sketch also supports Firmware OTA.
*
* Created 01. march 2017 by Ruben Andreassen
*/
/**
* EEPROM
*/
#include <EEPROM.h>
struct SettingsObject {
char ssid[51];
char password[51];
char mqtt[16];
int meter;
};
SettingsObject customSettings;
/**
* WIFI
*/
#include <ESP8266WiFi.h>
WiFiClient espClient;
const char* ssid_ap = "ESP-AMS-MQTT";
/**
* Access Point
*/
#include <ESP8266WebServer.h>
ESP8266WebServer server(80); //Server on port 80
bool apMode = false;
const char MAIN_page[] PROGMEM = R"=====(
<html>
<head>
<title>AMS - MQTT Bridge</title>
</head>
<body>
<form method="post" action="/store">
SSID <input type="text" name="ssid" /><br/>
Password <input type="text" name="password" /><br/>
MQTT IP <input type="text" name="mqtt" /><br/>
Meter <select name="meter">
<option value="0">Kamstrup</option>
<option value="1">Kaifa</option>
<!-- <option value="2">Aidon</option> -->
</select><br/>
<input type="submit" value="Submit" />
</form>
</body>
</html>
)=====";
/**
* Firmware updater
*/
#include <ESP8266HTTPClient.h>
#include <ESP8266httpUpdate.h>
const int FW_VERSION = 1010;
/**
* MQTT
*/
#include <PubSubClient.h>
PubSubClient client(espClient);
const char* mqtt_topic_fw_version = "esp/ams/fw/version";
const char* mqtt_topic_fw_update = "esp/ams/fw/update";
const char* mqtt_topic_fw_info = "esp/ams/fw/info";
const char* mqtt_topic_reset = "esp/ams/reset";
/**
* AMS
*/
#include <HanReader.h>
#include <Kamstrup.h>
#include <Kaifa.h>
// The HAN Port reader
HanReader hanReader;
const char* mqtt_topic = "esp/ams";
const char* mqtt_topic_PackageTime = "esp/ams/packagetime";
const char* mqtt_topic_ListSize = "esp/ams/listsize";
const char* mqtt_topic_ListVersionIdentifier = "esp/ams/listversionidentifier";
const char* mqtt_topic_MeterID = "esp/ams/meterid";
const char* mqtt_topic_MeterType = "esp/ams/metertype";
const char* mqtt_topic_ActiveImportPower = "esp/ams/activeimportpower";
const char* mqtt_topic_ActiveExportPower = "esp/ams/activeExportpower";
const char* mqtt_topic_ReactiveImportPower = "esp/ams/reactiveimportpower";
const char* mqtt_topic_ReactiveExportPower = "esp/ams/reactiveexportpower";
const char* mqtt_topic_CurrentL1 = "esp/ams/currentl1";
const char* mqtt_topic_CurrentL2 = "esp/ams/currentl2";
const char* mqtt_topic_CurrentL3 = "esp/ams/currentl3";
const char* mqtt_topic_VoltageL1 = "esp/ams/voltagel1";
const char* mqtt_topic_VoltageL2 = "esp/ams/voltagel2";
const char* mqtt_topic_VoltageL3 = "esp/ams/voltagel3";
const char* mqtt_topic_MeterClock = "esp/ams/meterclock";
const char* mqtt_topic_CumulativeActiveImportEnergy = "esp/ams/cumulativeactiveimportenergy";
const char* mqtt_topic_CumulativeActiveExportEnergy = "esp/ams/cumulativeactiveexportenergy";
const char* mqtt_topic_CumulativeReactiveImportEnergy = "esp/ams/cumulativereactiveimportenergy";
const char* mqtt_topic_CumulativeReactiveExportEnergy = "esp/ams/cumulativereactiveexportenergy";
String last_PackageTime = "";
String last_ListVersionIdentifier = "";
String last_MeterID = "";
String last_MeterType = "";
int last_ActiveImportPower = 0;
int last_ActiveExportPower = 0;
int last_ReactiveImportPower = 0;
int last_ReactiveExportPower = 0;
int last_CurrentL1 = 0;
int last_CurrentL2 = 0;
int last_CurrentL3 = 0;
int last_VoltageL1 = 0;
int last_VoltageL2 = 0;
int last_VoltageL3 = 0;
/**
* Setup and loop
*/
void setup() {
Serial.begin(9600);
pinMode(13, INPUT); //Reset PIN
loadCredentials();
if (!setupWiFi()) {
setupAP();
} else {
setupMqtt();
setupAms();
}
}
void loop() {
if (apMode) {
server.handleClient(); //Handle client requests
} else {
if (digitalRead(13) == LOW) {
clearCredentials();
}
loopMqtt();
if (customSettings.meter == 0) {
loopAmsKamstrup();
} else if (customSettings.meter == 1) {
loopAmsKaifa();
} /*else if (customSettings.meter == 2) {
Serial.println("Aidon selected");
// Not yet supported
}*/
}
}
/**
* EEPROM
*/
void clearCredentials() {
EEPROM.begin(512);
// write a 0 to all 512 bytes of the EEPROM
for (int i = 0; i < 512; i++) {
EEPROM.write(i, (char)0);
}
EEPROM.end();
for( int i = 0; i < sizeof(customSettings.ssid); ++i) {
customSettings.ssid[i] = (char)0;
customSettings.password[i] = (char)0;
}
for( int i = 0; i < sizeof(customSettings.mqtt); ++i) {
customSettings.mqtt[i] = (char)0;
}
customSettings.meter = -1;
WiFi.disconnect(1);
}
/** Load WLAN credentials from EEPROM */
void loadCredentials() {
EEPROM.begin(512);
EEPROM.get(0, customSettings);
customSettings.ssid[strlen(customSettings.ssid)] = '\0';
customSettings.password[strlen(customSettings.password)] = '\0';
EEPROM.end();
}
/** Store WLAN credentials to EEPROM */
void saveCredentials() {
EEPROM.begin(512);
EEPROM.put(0, customSettings);
EEPROM.commit();
EEPROM.end();
}
/**
* WIFI
*/
bool setupWiFi()
{
int retryCount = 0;
delay(10);
WiFi.mode(WIFI_STA);
WiFi.begin((char*)customSettings.ssid, (char*)customSettings.password);
while (WiFi.status() != WL_CONNECTED && retryCount < 20) {
delay(500);
Serial.println("Trying to connect to WiFi");
Serial.println(WiFi.status());
retryCount++;
}
Serial.println(WiFi.status());
if (WiFi.status() != WL_CONNECTED) {
Serial.println("Could not connect");
return false;
} else {
Serial.println("Connected!");
return true;
}
}
/**
* Access Point
*/
void setupAP()
{
WiFi.mode(WIFI_AP); //Only Access point
WiFi.softAP(ssid_ap); //Start HOTspot removing password will disable security
IPAddress myIP = WiFi.softAPIP(); //Get IP address
Serial.print("HotSpt IP:");
Serial.println(myIP);
server.on("/", handleRoot); //Which routine to handle at root location
server.on("/store", handleSubmit); //Which routine to handle at root location
server.begin(); //Start server
apMode = true;
}
void handleRoot() {
String s = MAIN_page;
server.send(200, "text/html", s);
}
void handleSubmit() {
clearCredentials();
strncpy(customSettings.ssid, server.arg("ssid").c_str(), 51);
strncpy(customSettings.password, server.arg("password").c_str(), 51);
strncpy(customSettings.mqtt, server.arg("mqtt").c_str(), 16);
//strncpy(customSettings.meter, server.arg("meter").c_str(), 1);
customSettings.meter = server.arg("meter").toInt();
saveCredentials();
server.send(200, "text/plain", "Rebooting and connecting to your WiFi....");
delay(2000);
ESP.reset();
}
/**
* Firmware updater
*/
void checkForUpdates(String fwURL) {
String fwVersionURL = fwURL;
fwVersionURL.concat( ".version" );
client.publish(mqtt_topic_fw_info, ((String)"Checking for firmware updates.").c_str());
client.publish(mqtt_topic_fw_info, fwVersionURL.c_str());
HTTPClient httpClient;
httpClient.begin( fwVersionURL );
int httpCode = httpClient.GET();
if( httpCode == 200 ) {
String newFWVersion = httpClient.getString();
client.publish(mqtt_topic_fw_info, ((String)"Current firmware version").c_str());
client.publish(mqtt_topic_fw_info, ((String)FW_VERSION).c_str());
client.publish(mqtt_topic_fw_info, ((String)"Available firmware version").c_str());
client.publish(mqtt_topic_fw_info, newFWVersion.c_str());
int newVersion = newFWVersion.toInt();
if( newVersion > FW_VERSION ) {
client.publish(mqtt_topic_fw_info, ((String)"Preparing to update").c_str());
String fwImageURL = fwURL;
fwImageURL.concat( ".bin" );
client.publish(mqtt_topic_fw_info, ((String)"Downloading new firmware.").c_str());
client.publish(mqtt_topic_fw_info, fwImageURL.c_str());
t_httpUpdate_return ret = ESPhttpUpdate.update( fwImageURL );
switch(ret) {
case HTTP_UPDATE_FAILED:
//Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
client.publish(mqtt_topic_fw_info, ((String)HTTP_UPDATE_FAILED).c_str());
client.publish(mqtt_topic_fw_info, ((String)ESPhttpUpdate.getLastError()).c_str());
client.publish(mqtt_topic_fw_info, ESPhttpUpdate.getLastErrorString().c_str());
break;
case HTTP_UPDATE_NO_UPDATES:
client.publish(mqtt_topic_fw_info, ((String)HTTP_UPDATE_NO_UPDATES).c_str());
break;
}
}
else {
client.publish(mqtt_topic_fw_info, ((String)"Already on latest version").c_str());
}
}
else {
client.publish(mqtt_topic_fw_info, ((String)"Firmware version check failed, got HTTP response code").c_str());
client.publish(mqtt_topic_fw_info, ((String)httpCode).c_str());
}
httpClient.end();
}
/**
* MQTT
*/
void setupMqtt()
{
String input = (String)customSettings.mqtt;
// Define number of pieces
const int numberOfPieces = 4;
String pieces[numberOfPieces];
// Keep track of current position in array
int counter = 0;
// Keep track of the last comma so we know where to start the substring
int lastIndex = 0;
Serial.println(input);
Serial.println(input.length());
for (int i = 0; i < input.length(); i++) {
// Loop through each character and check if it's a comma
if (input.substring(i, i+1) == ".") {
// Grab the piece from the last index up to the current position and store it
pieces[counter] = input.substring(lastIndex, i);
// Update the last position and add 1, so it starts from the next character
lastIndex = i + 1;
// Increase the position in the array that we store into
counter++;
}
// If we're at the end of the string (no more commas to stop us)
if (i == input.length() - 1) {
// Grab the last part of the string from the lastIndex to the end
pieces[counter] = input.substring(lastIndex, i+1);
}
}
IPAddress server(pieces[0].toInt(), pieces[1].toInt(), pieces[2].toInt(), pieces[3].toInt());
client.setServer(server, 1883);
client.setCallback(callbackMqtt);
}
// Ensure the MQTT lirary gets some attention too
void loopMqtt()
{
if (!client.connected()) {
reconnectMqtt();
}
client.loop();
delay(100);
}
void callbackMqtt(char* topic, byte* payload, unsigned int length) {
/*for (int i = 0; i < length; i++) {
Serial.print((char)payload[i]);
}*/
if (strcmp(topic, mqtt_topic_fw_update) == 0) {
String fwURL = "";
for (int i = 0; i < length; i++) {
fwURL.concat( (char)payload[i] );
}
checkForUpdates(fwURL);
} else if (strcmp(topic, mqtt_topic_reset) == 0) {
clearCredentials();
delay(1000);
ESP.reset();
}
}
void reconnectMqtt() {
// Loop until we're reconnected
while (!client.connected()) {
// Create a random client ID
String clientId = "ESP8266Client-";
clientId += String(random(0xffff), HEX);
Serial.println("MQTT reconnect");
// Attempt to connect
if (client.connect(clientId.c_str())) {
client.subscribe(mqtt_topic_reset);
client.subscribe(mqtt_topic_fw_update);
client.publish(mqtt_topic_fw_version, ((String)FW_VERSION).c_str());
}
else {
// Wait 5 seconds before retrying
delay(5000);
}
}
}
/**
* AMS
*/
void setupAms() {
// initialize the HanReader
if (customSettings.meter == 0) {
Serial.println("Kamstup selected");
hanReader.setup(&Serial, 2400, SERIAL_8N1, NULL);
}else if (customSettings.meter == 1) {
Serial.println("Kaifa selected");
hanReader.setup(&Serial);
} /*else if (customSettings.meter == 2) {
Serial.println("Aidon selected");
// Not yet supported
}*/ else {
Serial.println("Unknown meter type");
}
}
void loopAmsKamstrup() {
// 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 (listSize == (int)Kamstrup::List1 || listSize == (int)Kamstrup::List2)
{
//Publish uptime to let the world know i'm alive
client.publish(mqtt_topic, ((String)millis()).c_str());
last_ListVersionIdentifier = publishNewValue(hanReader.getString((int)Kamstrup_List1::ListVersionIdentifier), last_ListVersionIdentifier, listSize, (int)Kamstrup::List2, mqtt_topic_ListVersionIdentifier);
last_MeterID = publishNewValue(hanReader.getString((int)Kamstrup_List1::MeterID), last_MeterID, listSize, (int)Kamstrup::List2, mqtt_topic_MeterID);
last_MeterType = publishNewValue(hanReader.getString((int)Kamstrup_List1::MeterType), last_MeterType, listSize, (int)Kamstrup::List2, mqtt_topic_MeterType);
last_PackageTime = publishNewValue((String)hanReader.getPackageTime(), last_PackageTime, listSize, (int)Kamstrup::List2, mqtt_topic_PackageTime);
last_ActiveImportPower = publishNewValue(hanReader.getInt((int)Kamstrup_List1::ActiveImportPower), last_ActiveImportPower, listSize, (int)Kamstrup::List2, mqtt_topic_ActiveImportPower);
last_ActiveExportPower = publishNewValue(hanReader.getInt((int)Kamstrup_List1::ActiveExportPower), last_ActiveExportPower, listSize, (int)Kamstrup::List2, mqtt_topic_ActiveExportPower);
last_ReactiveImportPower = publishNewValue(hanReader.getInt((int)Kamstrup_List1::ReactiveImportPower), last_ReactiveImportPower, listSize, (int)Kamstrup::List2, mqtt_topic_ReactiveImportPower);
last_ReactiveExportPower = publishNewValue(hanReader.getInt((int)Kamstrup_List1::ReactiveExportPower), last_ReactiveExportPower, listSize, (int)Kamstrup::List2, mqtt_topic_ReactiveExportPower);
last_CurrentL1 = publishNewValue(((float)hanReader.getInt((int)Kamstrup_List1::CurrentL1) / 100.0), last_CurrentL1, listSize, (int)Kamstrup::List2, mqtt_topic_CurrentL1);
last_CurrentL2 = publishNewValue(((float)hanReader.getInt((int)Kamstrup_List1::CurrentL2) / 100.0), last_CurrentL2, listSize, (int)Kamstrup::List2, mqtt_topic_CurrentL2);
last_CurrentL3 = publishNewValue(((float)hanReader.getInt((int)Kamstrup_List1::CurrentL3) / 100.0), last_CurrentL3, listSize, (int)Kamstrup::List2, mqtt_topic_CurrentL3);
last_VoltageL1 = publishNewValue(hanReader.getInt((int)Kamstrup_List1::VoltageL1), last_VoltageL1, listSize, (int)Kamstrup::List2, mqtt_topic_VoltageL1);
last_VoltageL2 = publishNewValue(hanReader.getInt((int)Kamstrup_List1::VoltageL2), last_VoltageL2, listSize, (int)Kamstrup::List2, mqtt_topic_VoltageL2);
last_VoltageL3 = publishNewValue(hanReader.getInt((int)Kamstrup_List1::VoltageL3), last_VoltageL3, listSize, (int)Kamstrup::List2, mqtt_topic_VoltageL3);
if (listSize == (int)Kamstrup::List2)
{
client.publish(mqtt_topic_MeterClock, ((String)hanReader.getTime((int)Kamstrup_List2::MeterClock)).c_str());
client.publish(mqtt_topic_CumulativeActiveImportEnergy, ((String)hanReader.getInt((int)Kamstrup_List2::CumulativeActiveImportEnergy)).c_str());
client.publish(mqtt_topic_CumulativeActiveExportEnergy, ((String)hanReader.getInt((int)Kamstrup_List2::CumulativeActiveExportEnergy)).c_str());
client.publish(mqtt_topic_CumulativeReactiveImportEnergy, ((String)hanReader.getInt((int)Kamstrup_List2::CumulativeReactiveImportEnergy)).c_str());
client.publish(mqtt_topic_CumulativeReactiveExportEnergy, ((String)hanReader.getInt((int)Kamstrup_List2::CumulativeReactiveExportEnergy)).c_str());
}
}
}
}
void loopAmsKaifa() {
//TODO
}
/*
* Only publish new values or when a spesific list size occours
*/
int publishNewValue(int currentValue, int lastValue, int currentListSize, int publishListSize, const char* topic) {
if (currentValue != lastValue || currentListSize == publishListSize) {
client.publish(topic, ((String)currentValue).c_str());
}
return currentValue;
}
float publishNewValue(float currentValue, float lastValue, int currentListSize, int publishListSize, const char* topic) {
if (currentValue != lastValue || currentListSize == publishListSize) {
client.publish(topic, ((String)currentValue).c_str());
}
return currentValue;
}
String publishNewValue(String currentValue, String lastValue, int currentListSize, int publishListSize, const char* topic) {
if (currentValue != lastValue || currentListSize == publishListSize) {
client.publish(topic, currentValue.c_str());
}
return currentValue;
}

View File

@@ -1,7 +0,0 @@
[Dd]ebug/
[Rr]elease/
# Visual Studio 2015 cache/options directory
.vs/
__vm/
*.user

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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]);
}

View File

@@ -1,42 +0,0 @@
#ifndef _DLMSREADER_h
#define _DLMSREADER_h
#include "Crc16.h"
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#define DLMS_READER_BUFFER_SIZE 256
#define DLMS_READER_MAX_ADDRESS_SIZE 5
class DlmsReader
{
public:
DlmsReader();
bool Read(byte data);
int GetRawData(byte *buffer, int start, int length);
protected:
Crc16Class Crc16;
private:
byte buffer[DLMS_READER_BUFFER_SIZE];
int position;
int dataLength;
byte frameFormatType;
byte destinationAddress[DLMS_READER_MAX_ADDRESS_SIZE];
byte destinationAddressLength;
byte sourceAddress[DLMS_READER_MAX_ADDRESS_SIZE];
byte sourceAddressLength;
void Clear();
int GetAddress(int addressPosition, byte* buffer, int start, int length);
unsigned short GetChecksum(int checksumPosition);
bool IsValidFrameFormat(byte frameFormatType);
void WriteBuffer();
};
#endif

View File

@@ -1,191 +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"
// 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
List list = hanReader.getList();
Serial1.println("");
Serial1.print("List #");
Serial1.print((byte)list, HEX);
Serial1.print(": ");
// Make sure we got a valid list
if (list == List::ListUnknown)
{
Serial1.println("Invalid list");
return;
}
// Get the timestamp (as unix time) from the package
time_t time = hanReader.getPackageTime();
// 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 (list == List::List1)
{
data["P"] = hanReader.getInt(List1_ObisObjects::ActivePowerImported);
}
else if (list == List::List2)
{
data["lv"] = hanReader.getString(List2_ObisObjects::ObisListVersionIdentifier);
data["id"] = hanReader.getString(List2_ObisObjects::MeterID);
data["type"] = hanReader.getString(List2_ObisObjects::MeterType);
data["P"] = hanReader.getInt(List2_ObisObjects::ActivePowerImported);
data["Q"] = hanReader.getInt(List2_ObisObjects::ReactivePowerImported);
data["I1"] = hanReader.getInt(List2_ObisObjects::CurrentPhaseL1);
data["I2"] = hanReader.getInt(List2_ObisObjects::CurrentPhaseL2);
data["I3"] = hanReader.getInt(List2_ObisObjects::CurrentPhaseL3);
data["U1"] = hanReader.getInt(List2_ObisObjects::VoltagePhaseL1);
data["U2"] = hanReader.getInt(List2_ObisObjects::VoltagePhaseL1);
data["U3"] = hanReader.getInt(List2_ObisObjects::VoltagePhaseL1);
}
else if (list == List::List3)
{
data["lv"] = hanReader.getString(List3_ObisObjects::ObisListVersionIdentifier);;
data["id"] = hanReader.getString(List3_ObisObjects::MeterID);
data["type"] = hanReader.getString(List3_ObisObjects::MeterType);
data["P"] = hanReader.getInt(List3_ObisObjects::ActivePowerImported);
data["Q"] = hanReader.getInt(List3_ObisObjects::ReactivePowerImported);
data["I1"] = hanReader.getInt(List3_ObisObjects::CurrentPhaseL1);
data["I2"] = hanReader.getInt(List3_ObisObjects::CurrentPhaseL2);
data["I3"] = hanReader.getInt(List3_ObisObjects::CurrentPhaseL3);
data["U1"] = hanReader.getInt(List3_ObisObjects::VoltagePhaseL1);
data["U2"] = hanReader.getInt(List3_ObisObjects::VoltagePhaseL1);
data["U3"] = hanReader.getInt(List3_ObisObjects::VoltagePhaseL1);
data["tPI"] = hanReader.getInt(List3_ObisObjects::TotalActiveEnergyImported);
data["tPO"] = hanReader.getInt(List3_ObisObjects::TotalActiveEnergyExported);
data["tQI"] = hanReader.getInt(List3_ObisObjects::TotalReactiveEnergyImported);
data["tQO"] = hanReader.getInt(List3_ObisObjects::TotalReactiveEnergyExported);
}
// 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);
}
}
}

View File

@@ -1,22 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ESPDebugger", "ESPDebugger.vcxproj", "{B9C3E8F6-86B2-4D70-89ED-D6A7B8C7AC8D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B9C3E8F6-86B2-4D70-89ED-D6A7B8C7AC8D}.Debug|x86.ActiveCfg = Debug|Win32
{B9C3E8F6-86B2-4D70-89ED-D6A7B8C7AC8D}.Debug|x86.Build.0 = Debug|Win32
{B9C3E8F6-86B2-4D70-89ED-D6A7B8C7AC8D}.Release|x86.ActiveCfg = Release|Win32
{B9C3E8F6-86B2-4D70-89ED-D6A7B8C7AC8D}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,101 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B9C3E8F6-86B2-4D70-89ED-D6A7B8C7AC8D}</ProjectGuid>
<RootNamespace>
</RootNamespace>
<ProjectName>ESPDebugger</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>
</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>
</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\Arduino\libraries\ArduinoJson\src;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src;$(ProjectDir)..\..\..\..\Arduino\libraries\PubSubClient\src;$(ProjectDir)..\..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\pabjyzh5.4hi\Micro Platforms\visualmicro\ide\libraries;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries;$(ProjectDir)..\..\..\..\Arduino\libraries;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\libb64;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\spiffs;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\umm_malloc;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\variants\generic;$(ProjectDir)..\ESPDebugger;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\include;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\lwip\include;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\xtensa-lx106-elf;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\lib\gcc\xtensa-lx106-elf\4.8.2\include;$(ProjectDir)..\..\..\..\..\..\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.3.0\tools\sdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>$(ProjectDir)__vm\.ESPDebugger.vsarduino.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
<PreprocessorDefinitions>__ESP8266_ESp8266__;__ESP8266_ESP8266__;_VMDEBUG=1;__ets__;ICACHE_FLASH;F_CPU=80000000L;LWIP_OPEN_SRC;ARDUINO=10801;ARDUINO_ESP8266_ESP01;ARDUINO_ARCH_ESP8266;ESP8266;__cplusplus=201103L;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectCapability Include="VisualMicro" />
</ItemGroup>
<ItemGroup>
<None Include="ESPDebugger.ino">
<FileType>CppCode</FileType>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Crc16.h" />
<ClInclude Include="DlmsReader.h" />
<ClInclude Include="HanReader.h" />
<ClInclude Include="KaifaHan.h" />
<ClInclude Include="__vm\.ESPDebugger.vsarduino.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Crc16.cpp" />
<ClCompile Include="DlmsReader.cpp" />
<ClCompile Include="HanReader.cpp" />
<ClCompile Include="KaifaHan.cpp" />
</ItemGroup>
<PropertyGroup>
<DebuggerFlavor>VisualMicroDebugger</DebuggerFlavor>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="ESPDebugger.ino" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="__vm\.ESPDebugger.vsarduino.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="HanReader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="KaifaHan.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="DlmsReader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Crc16.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="HanReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="KaifaHan.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Crc16.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DlmsReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -1,70 +0,0 @@
#include "HanReader.h"
HanReader::HanReader()
{
}
void HanReader::setup(HardwareSerial *hanPort, unsigned long baudrate, SerialConfig config, Stream *debugPort)
{
// Initialize H/W serial port for MBus communication
hanPort->begin(baudrate, config);
while (!hanPort) {}
bytesRead = 0;
han = hanPort;
debug = debugPort;
if (debug) debug->println("MBUS serial setup complete");
}
void HanReader::setup(HardwareSerial *hanPort)
{
setup(hanPort, 2400, SERIAL_8E1, NULL);
}
void HanReader::setup(HardwareSerial *hanPort, Stream *debugPort)
{
setup(hanPort, 2400, SERIAL_8E1, debugPort);
}
bool HanReader::read()
{
if (han->available())
{
byte newByte = han->read();
if (reader.Read(newByte))
{
bytesRead = reader.GetRawData(buffer, 0, 512);
list = (List)kaifa.GetListID(buffer, 0, bytesRead);
return true;
}
}
return false;
}
List HanReader::getList()
{
return list;
}
time_t HanReader::getPackageTime()
{
return kaifa.GetPackageTime(buffer, 0, bytesRead);
}
int HanReader::getInt(List1_ObisObjects objectId) { return getInt((int)objectId); }
int HanReader::getInt(List2_ObisObjects objectId) { return getInt((int)objectId); }
int HanReader::getInt(List3_ObisObjects objectId) { return getInt((int)objectId); }
int HanReader::getInt(int objectId)
{
return kaifa.GetInt(objectId, buffer, 0, bytesRead);
}
String HanReader::getString(List1_ObisObjects objectId) { return getString((int)objectId); }
String HanReader::getString(List2_ObisObjects objectId) { return getString((int)objectId); }
String HanReader::getString(List3_ObisObjects objectId) { return getString((int)objectId); }
String HanReader::getString(int objectId)
{
return kaifa.GetString(objectId, buffer, 0, bytesRead);
}

View File

@@ -1,45 +0,0 @@
#ifndef _HANREADER_h
#define _HANREADER_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include "KaifaHan.h"
#include "DlmsReader.h"
class HanReader
{
public:
HanReader();
void setup(HardwareSerial *hanPort);
void setup(HardwareSerial *hanPort, Stream *debugPort);
void setup(HardwareSerial *hanPort, unsigned long baudrate, SerialConfig config, Stream *debugPort);
bool read();
List getList();
time_t getPackageTime();
int getInt(List1_ObisObjects objectId);
int getInt(List2_ObisObjects objectId);
int getInt(List3_ObisObjects objectId);
int getInt(int objectId);
String getString(List1_ObisObjects objectId);
String getString(List2_ObisObjects objectId);
String getString(List3_ObisObjects objectId);
String getString(int objectId);
private:
Stream *debug;
HardwareSerial *han;
byte buffer[512];
int bytesRead;
KaifaHan kaifa;
DlmsReader reader;
List list;
};
#endif

View File

@@ -1,104 +0,0 @@
#include "KaifaHan.h"
byte KaifaHan::GetListID(byte *buffer, int start, int length)
{
if (length > 23)
{
byte list = buffer[start + 23];
if (list == (byte)List::List1) return (byte)List::List1;
if (list == (byte)List::List2) return (byte)List::List2;
if (list == (byte)List::List3) return (byte)List::List3;
}
return (byte)List::ListUnknown;
}
long KaifaHan::GetPackageTime(byte *buffer, int start, int length)
{
const int timeStart = 10;
int year = buffer[start + timeStart] << 8 |
buffer[start + timeStart + 1];
int month = buffer[start + timeStart + 2];
int day = buffer[start + timeStart + 3];
int hour = buffer[start + timeStart + 5];
int minute = buffer[start + timeStart + 6];
int second = buffer[start + timeStart + 7];
return toUnixTime(year, month, day, hour, minute, second);
}
int KaifaHan::GetInt(int dataPosition, byte *buffer, int start, int length)
{
int valuePosition = findValuePosition(dataPosition, buffer, start, length);
if (valuePosition > 0)
{
int value = 0;
for (int i = valuePosition + 1; i < valuePosition + 5; i++)
{
value = value << 8 | buffer[i];
}
return value;
}
return 0;
}
int KaifaHan::findValuePosition(int dataPosition, byte *buffer, int start, int length)
{
const int dataStart = 24;
for (int i=start + dataStart; i<length; i++)
{
if (dataPosition-- == 0)
return i;
else if (buffer[i] == 0x09) // string value
i += buffer[i+1] + 1;
else if (buffer[i] == 0x06) // integer value
i += 4;
else
return 0; // unknown data type found
}
return 0;
}
String KaifaHan::GetString(int dataPosition, byte *buffer, int start, int length)
{
int valuePosition = findValuePosition(dataPosition, buffer, start, length);
if (valuePosition > 0)
{
String value = String("");
for (int i = valuePosition + 2; i < valuePosition + buffer[valuePosition + 1]; i++)
{
value += String((char)buffer[i]);
}
return value;
}
return String("");
}
time_t KaifaHan::toUnixTime(int year, int month, int day, int hour, int minute, int second)
{
byte daysInMonth[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
long secondsPerMinute = 60;
long secondsPerHour = secondsPerMinute * 60;
long secondsPerDay = secondsPerHour * 24;
long time = (year - 1970) * secondsPerDay * 365L;
for (int yearCounter = 1970; yearCounter<year; yearCounter++)
if ((yearCounter % 4 == 0) && ((yearCounter % 100 != 0) || (yearCounter % 400 == 0)))
time += secondsPerDay;
if (month > 2 && (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)))
time += secondsPerDay;
for (int monthCounter = 1; monthCounter<month; monthCounter++)
time += daysInMonth[monthCounter - 1] * secondsPerDay;
time += (day - 1) * secondsPerDay;
time += hour * secondsPerHour;
time += minute * secondsPerMinute;
time += second;
return (time_t)time;
}

View File

@@ -1,73 +0,0 @@
#ifndef _KAIFAHAN_h
#define _KAIFAHAN_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
class KaifaHan
{
public:
byte GetListID(byte *buffer, int start, int length);
long GetPackageTime(byte *buffer, int start, int length);
int GetInt(int dataPosition, byte *buffer, int start, int length);
String GetString(int dataPosition, byte *buffer, int start, int length);
protected:
private:
int findValuePosition(int dataPosition, byte *buffer, int start, int length);
time_t toUnixTime(int year, int month, int day, int hour, int minute, int second);
};
enum class List : byte {
ListUnknown = 0x00,
List1 = 0x01,
List2 = 0x0D,
List3 = 0x12
};
enum class List1_ObisObjects {
ActivePowerImported
};
enum class List2_ObisObjects {
ObisListVersionIdentifier,
MeterID,
MeterType,
ActivePowerImported,
ActivePowerExported,
ReactivePowerImported,
ReactivePowerExported,
CurrentPhaseL1,
CurrentPhaseL2,
CurrentPhaseL3,
VoltagePhaseL1,
VoltagePhaseL2,
VoltagePhaseL3
};
enum class List3_ObisObjects {
ObisListVersionIdentifier,
MeterID,
MeterType,
ActivePowerImported,
ActivePowerExported,
ReactivePowerImported,
ReactivePowerExported,
CurrentPhaseL1,
CurrentPhaseL2,
CurrentPhaseL3,
VoltagePhaseL1,
VoltagePhaseL2,
VoltagePhaseL3,
ClockAndDate,
TotalActiveEnergyImported,
TotalActiveEnergyExported,
TotalReactiveEnergyImported,
TotalReactiveEnergyExported
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -1,253 +0,0 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
appsettings.secrets.json

View File

@@ -1,28 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HanDebugger", "HanDebugger\HanDebugger.csproj", "{EB8BDAFE-8991-4E9E-9E7E-F9BE61EBC122}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HanDebuggerTest", "HanDebuggerTest\HanDebuggerTest.csproj", "{B22621C3-84EB-46DC-8F8D-E01D0A9923C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EB8BDAFE-8991-4E9E-9E7E-F9BE61EBC122}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB8BDAFE-8991-4E9E-9E7E-F9BE61EBC122}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB8BDAFE-8991-4E9E-9E7E-F9BE61EBC122}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB8BDAFE-8991-4E9E-9E7E-F9BE61EBC122}.Release|Any CPU.Build.0 = Release|Any CPU
{B22621C3-84EB-46DC-8F8D-E01D0A9923C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B22621C3-84EB-46DC-8F8D-E01D0A9923C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B22621C3-84EB-46DC-8F8D-E01D0A9923C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B22621C3-84EB-46DC-8F8D-E01D0A9923C7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

View File

@@ -1,56 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HanDebugger
{
public static class Crc16
{
private const ushort polynomial = 0x8408;
private static ushort[] table = new ushort[256];
static Crc16()
{
ushort value;
ushort temp;
for (ushort i = 0; i < table.Length; ++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;
}
}
public static ushort ComputeChecksum(byte[] data)
{
return ComputeChecksum(data, 0, data.Length);
}
public static ushort ComputeChecksum(byte[] data, int start, int length)
{
ushort fcs = 0xffff;
for (int i = start; i < (start + length); i++)
{
var index = (fcs ^ data[i]) & 0xff;
fcs = (ushort)((fcs >> 8) ^ table[index]);
}
fcs ^= 0xffff;
return fcs;
}
}
}

View File

@@ -1,166 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HanDebugger
{
public class DlmsReader
{
private byte[] buffer;
private int position;
private int dataLength;
private byte frameFormatType;
private byte[] destinationAddress;
private byte[] sourceAddress;
public DlmsReader()
{
Clear();
}
private void Clear()
{
buffer = new byte[256];
position = 0;
dataLength = 0;
destinationAddress = null;
sourceAddress = null;
frameFormatType = 0;
}
public bool 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 >= buffer.Length)
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 (destinationAddress == null)
{
// Capture the destination address
destinationAddress = GetAddress(3);
if (destinationAddress?.Length > 3)
Clear();
return false;
}
else if (sourceAddress == null)
{
// Capture the source address
sourceAddress = GetAddress(3 + destinationAddress.Length);
if (sourceAddress?.Length > 3)
Clear();
return false;
}
else if (position == 4 + destinationAddress.Length + sourceAddress.Length + 2)
{
// Verify the header checksum
var 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
var checksum = 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;
}
private bool IsValidFrameFormat(byte frameFormatType)
{
return frameFormatType == 0xA0;
}
public byte[] GetRawData()
{
if (dataLength > 0 && position == dataLength + 2)
{
var headerLength = 3 + destinationAddress.Length + sourceAddress.Length + 2;
return buffer.Skip(headerLength + 1).Take(dataLength - headerLength - 2).ToArray();
}
else
return null;
}
private byte[] GetAddress(int addressPosition)
{
List<byte> address = new List<byte>();
for (int i = addressPosition; i < position; i++)
{
address.Add(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 null;
}
return address.ToArray();
}
private ushort GetChecksum(int checksumPosition)
{
return (ushort)(buffer[checksumPosition + 2] << 8 |
buffer[checksumPosition + 1]);
}
}
}

View File

@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{EB8BDAFE-8991-4E9E-9E7E-F9BE61EBC122}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HanDebugger</RootNamespace>
<AssemblyName>HanDebugger</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Crc16.cs" />
<Compile Include="KaifaHanBeta.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Reader.cs" />
<Compile Include="DlmsReader.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,70 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HanDebugger
{
// As it seems Kaifa/Valider put some premature firmware on my AMS,
// there's need for some dirty hacks to get any information
public class KaifaHanBeta
{
public const byte ListUnknown = 0x00;
public const byte List1 = 0x01;
public const byte List2 = 0x0D;
public const byte List3 = 0x12;
public static byte GetListID(byte[] package, int start, int length)
{
switch (package[start + 23])
{
case List1:
case List2:
case List3:
return package[start + 23];
default:
return 0x00;
}
}
public static double GetPackageTime(byte[] package, int start, int length)
{
const int timeStart = 10;
int year = package[start + timeStart] << 8 |
package[start + timeStart + 1];
int month = package[start + timeStart + 2];
int day = package[start + timeStart + 3];
int hour = package[start + timeStart + 5];
int minute = package[start + timeStart + 6];
int second = package[start + timeStart + 7];
return new DateTime(year, month, day, hour, minute, second).Subtract(new DateTime(1970, 1, 1, 0, 0, 0, 0)).TotalSeconds;
}
public static int GetInt(int dataPosition, byte[] buffer, int start, int length)
{
const int dataStart = 24;
int value = 0;
int foundPosition = 0;
for (int i = start + dataStart; i < start + length; i++)
{
if (foundPosition == 0)
{
if (buffer[i] == 0x06)
foundPosition = i;
}
else
{
value = value << 8 |
buffer[i];
if (i == foundPosition + 4)
return value;
}
}
return 0;
}
}
}

View File

@@ -1,63 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace HanDebugger
{
class Program
{
static List<byte> gBuffer = new List<byte>();
static void Main(string[] args)
{
SerialPort vPort = new SerialPort("COM3", 2400, Parity.Even, 8, StopBits.One);
vPort.DataReceived += VPort_DataReceived;
vPort.Open();
while (true)
Thread.Sleep(100);
}
private static void VPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
var vPort = sender as SerialPort;
byte[] vBuffer = new byte[1000];
int vBytesRead = vPort.Read(vBuffer, 0, vBuffer.Length);
for (int i = 0; i < vBytesRead; i++)
{
gBuffer.Add(vBuffer[i]);
// If we're catching a '7E' and it's not the beginning, it must be the end
if (gBuffer.Count > 1 && vBuffer[i] == 0x7e)
WriteAndEmptyBuffer();
}
}
private static void WriteAndEmptyBuffer()
{
Console.WriteLine();
Console.WriteLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff} - Received {gBuffer.Count} (0x{gBuffer.Count:X2}) bytes]");
int j = 0;
foreach (var vByte in gBuffer)
{
Console.Write(string.Format("{0:X2} ", (int)vByte));
if (++j % 8 == 0)
Console.Write(" ");
if (j % 24 == 0)
Console.WriteLine();
}
Console.WriteLine();
Console.WriteLine();
gBuffer.Clear();
}
}
}

View File

@@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("HanDebugger")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HanDebugger")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("eb8bdafe-8991-4e9e-9e7e-f9be61ebc122")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,72 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HanDebugger
{
public class Reader
{
private int position;
private int dataLength;
private byte[] buffer;
public Reader(byte[] buffer)
{
this.buffer = buffer;
position = 0;
dataLength = ((buffer[1] & 0x0F) << 8) | buffer[2];
}
public bool IsValid()
{
return IsValidStart() &&
IsValidLength() &&
IsValidHeaderChecksum() &&
IsValidChecksum();
}
private bool IsValidChecksum()
{
ushort checkSum = GetChecksum(dataLength - 2);
return checkSum == Crc16.ComputeChecksum(buffer, 1, dataLength - 2);
}
private bool IsValidHeaderChecksum()
{
int headerLength = GetHeaderLength();
ushort checkSum = GetChecksum(headerLength);
return checkSum == Crc16.ComputeChecksum(buffer, 1, headerLength);
}
private ushort GetChecksum(int checksumPosition)
{
return (ushort)(buffer[checksumPosition + 2] << 8 |
buffer[checksumPosition + 1]);
}
private int GetHeaderLength()
{
var pos = position + 3; // Dest address
while ((buffer[pos] & 0x01) == 0x00)
pos++;
pos++; // source address
while ((buffer[pos] & 0x01) == 0x00)
pos++;
pos++; // control field
return pos;
}
private bool IsValidLength()
{
return buffer.Length >= dataLength + 2;
}
public bool IsValidStart()
{
return (buffer[0] == 0x7E);
}
}
}

View File

@@ -1,66 +0,0 @@
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using HanDebugger;
namespace HanDebuggerTest
{
[TestClass]
public class Crc16Test
{
[TestMethod]
public void Crc16ChecksumTest()
{
TestChecksum(new byte[] { 0x80, 0x93 }, "7E A0 79 01 02 01 10", 1, 6);
TestChecksum(new byte[] { 0x80, 0x93 }, "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 11 00 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 02 FC 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8C 06 00 00 08 1C 06 00 00 07 97 06 00 00 0A CA 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 66 FD 27 7E", 1, 6);
TestChecksum(new byte[] { 0x80, 0x93 }, "A0 79 01 02 01 10");
TestChecksum(new byte[] { 0xA7, 0x44 }, "A0 79 01 02 01 10 80 93 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 0A 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 02 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8A 06 00 00 08 22 06 00 00 07 9A 06 00 00 0A D4 06 00 00 09 5B 06 00 00 00 00 06 00 00 09 66");
//string bytesAsString = "A0 79 01 02 01 10 80 93 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 0A 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 02 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8A 06 00 00 08 22 06 00 00 07 9A 06 00 00 0A D4 06 00 00 09 5B 06 00 00 00 00 06 00 00 09 66";
//byte[] bytes = bytesAsString.Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray();
//var checksum = Crc16.ComputeChecksum(bytes);
//var checksumBytes = ConvertToBytes(checksum);
//Assert.IsTrue(Equals(new byte[] { 0xa7, 0x44 }, checksumBytes), "Checksum did not match");
}
private void TestChecksum(byte[] validChecksum, string dataAsString)
{
byte[] bytes = dataAsString.Trim().Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray();
var checksum = Crc16.ComputeChecksum(bytes);
var checksumBytes = ConvertToBytes(checksum);
Assert.IsTrue(Equals(validChecksum, checksumBytes), $"Checksum did not match. Was: {Format(checksumBytes)}, Expected: {Format(validChecksum)}");
}
private void TestChecksum(byte[] validChecksum, string dataAsString, int start, int length)
{
// "A0 79 01 02 01 10"
byte[] bytes = dataAsString.Trim().Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray();
var checksum = Crc16.ComputeChecksum(bytes, start, length);
var checksumBytes = ConvertToBytes(checksum);
Assert.IsTrue(Equals(validChecksum, checksumBytes), $"Checksum did not match. Was: {Format(checksumBytes)}, Expected: {Format(validChecksum)}");
}
private string Format(byte[] buffer)
{
return string.Join(" ", buffer.Select(v => $"{v:X}").ToArray());
}
private static byte[] ConvertToBytes(ushort checksum)
{
return new byte[]
{
(byte)(checksum & 0xff),
(byte)((checksum >> 8) & 0xff)
};
}
private static bool Equals(byte[] a1, byte[] a2)
{
if (a1 == null || a2 == null) return false;
if (a1?.Length != a2?.Length) return false;
for (int i = 0; i < a1.Length; i++)
if (a1[i] != a2[i])
return false;
return true;
}
}
}

View File

@@ -1,55 +0,0 @@
using HanDebugger;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HanDebuggerTest
{
[TestClass]
public class DlmsReaderTest
{
[TestMethod]
public void TestDlmsReader()
{
var text = File.ReadAllText("SampleData.txt").Replace("\r\n", " ").Replace(" ", " ");
byte[] bytes = text.Trim().Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray();
var reader = new DlmsReader();
int packages = 0;
for (int i=0; i<bytes.Length; i++)
{
if (reader.Read(bytes[i]))
{
packages++;
//byte[] data = reader.GetRawData();
}
}
Assert.IsTrue(packages == 559, $"There should be 559 packages. Was: {packages}");
}
[TestMethod]
public void TestDlmsReaderWithError()
{
var text = File.ReadAllText("SampleData.txt").Replace("\r\n", " ").Replace(" ", " ");
byte[] bytes = text.Trim().Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray();
bytes = bytes.Skip(10).ToArray();
var reader = new DlmsReader();
int packages = 0;
for (int i = 0; i < bytes.Length; i++)
{
if (reader.Read(bytes[i]))
{
packages++;
//byte[] data = reader.GetRawData();
}
}
Assert.IsTrue(packages == 558, $"There should be 558 packages. Was: {packages}");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,87 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B22621C3-84EB-46DC-8F8D-E01D0A9923C7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HanDebuggerTest</RootNamespace>
<AssemblyName>HanDebuggerTest</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="Crc16Test.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="DlmsReaderTest.cs" />
<Compile Include="ReaderTest.cs" />
<Compile Include="KaifaHanBetaTest.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HanDebugger\HanDebugger.csproj">
<Project>{eb8bdafe-8991-4e9e-9e7e-f9be61ebc122}</Project>
<Name>HanDebugger</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="ESP 20170918 Raw.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SampleData.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Kamstrup228.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" />
</Project>

View File

@@ -1,65 +0,0 @@
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using System.Collections.Generic;
using HanDebugger;
namespace HanDebuggerTest
{
[TestClass]
[DeploymentItem(@"ESP 20170918 Raw.txt")]
[DeploymentItem("Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll")]
public class KaifaHanBetaTest
{
[TestMethod]
public void TestGetPackageID()
{
Dictionary<byte, int> packageCount = new Dictionary<byte, int>();
var packages = File.ReadAllLines("ESP 20170918 Raw.txt");
var lines = packages.Select(line => line.Trim().Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray()).ToArray();
foreach (var line in lines)
{
byte list = KaifaHanBeta.GetListID(line, 0, line.Length);
if (packageCount.ContainsKey(list))
packageCount[list]++;
else
packageCount.Add(list, 1);
}
var startTime = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(KaifaHanBeta.GetPackageTime(lines[0], 0, lines[0].Length));
var finishTime = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(KaifaHanBeta.GetPackageTime(lines[packages.Length - 1], 0, packages[packages.Length - 1].Length));
var durationInSeconds = finishTime.Subtract(startTime).TotalSeconds;
Assert.IsTrue(durationInSeconds > 60 * 60 * 4, $"There should be more than 4 hours of recording. Was: {durationInSeconds / 60 * 60 * 4}");
double list3PerSecond = (1.0 / 3600.0);
double list2PerSecond = (1.0 / 10.0) - list3PerSecond;
double list1PerSecond = (1.0 / 2.0) - list2PerSecond;
Assert.AreEqual(false, packageCount.ContainsKey(KaifaHanBeta.ListUnknown), "There should be no unknown packages");
Assert.AreEqual(durationInSeconds * list1PerSecond, packageCount[KaifaHanBeta.List1], 1 + 0.01 * packageCount[KaifaHanBeta.List1], "There should be one 'List1' every 2.5s");
Assert.AreEqual(durationInSeconds * list2PerSecond, packageCount[KaifaHanBeta.List2], 1 + 0.01 * packageCount[KaifaHanBeta.List2], "There should be one 'List2' every 10s");
Assert.AreEqual(durationInSeconds * list3PerSecond, packageCount[KaifaHanBeta.List3], 1 + 0.01 * packageCount[KaifaHanBeta.List3], "There should be one 'List3' every 1h");
double targetList1To2Ratio = 4.0;
double actualList1To2Ratio = (double)packageCount[KaifaHanBeta.List1] / (double)packageCount[KaifaHanBeta.List2];
Assert.AreEqual(targetList1To2Ratio, actualList1To2Ratio, 0.01, "There should be a ratio of List1:List2 of 4");
}
[TestMethod]
public void TestGetConsumption()
{
List<int> consumption = new List<int>();
var packages = File.ReadAllLines("ESP 20170918 Raw.txt");
var lines = packages.Select(line => line.Trim().Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray()).ToArray();
foreach (var line in lines)
{
if (KaifaHanBeta.GetListID(line, 0, line.Length) == KaifaHanBeta.List1)
{
consumption.Add(KaifaHanBeta.GetInt(0, line, 0, line.Length));
}
}
Assert.AreEqual(1500.0, consumption.Average(), 500.0, "Consumption should be between 1000 and 2000 watts");
}
}
}

View File

@@ -1 +0,0 @@
7E A0 E2 2B 21 13 23 9A E6 E7 00 0F 00 00 00 00 0C 07 E2 03 04 07 14 34 00 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 34 33 38 39 37 30 32 09 06 01 01 60 01 01 FF 0A 12 36 38 34 31 31 32 31 42 4E 32 34 33 31 30 31 30 34 30 09 06 01 01 01 07 00 FF 06 00 00 0E E7 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 00 BF 09 06 01 01 1F 07 00 FF 06 00 00 05 59 09 06 01 01 33 07 00 FF 06 00 00 01 EC 09 06 01 01 47 07 00 FF 06 00 00 05 14 09 06 01 01 20 07 00 FF 12 00 E1 09 06 01 01 34 07 00 FF 12 00 DD 09 06 01 01 48 07 00 FF 12 00 DE 46 0F 7E

View File

@@ -1,20 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("HanDebuggerTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HanDebuggerTest")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("b22621c3-84eb-46dc-8f8d-e01d0a9923c7")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,49 +0,0 @@
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using HanDebugger;
namespace HanDebuggerTest
{
[TestClass]
[DeploymentItem(@"SampleData.txt")]
[DeploymentItem(@"Kamstrup228.txt")]
[DeploymentItem("Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll")]
public class ReaderTest
{
[TestMethod]
public void TestParser()
{
var lines = File.ReadAllLines("SampleData.txt");
var sample = lines[0].Trim();
byte[] bytes = sample.Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray();
var reader = new Reader(bytes);
Assert.IsTrue(reader.IsValid(), "Data is not valid");
}
[TestMethod]
public void TestAllLines()
{
var lines = File.ReadAllLines("SampleData.txt");
for (int i=0; i<lines.Length; i++)
{
var sample = lines[i].Trim();
byte[] bytes = sample.Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray();
var reader = new Reader(bytes);
Assert.IsTrue(reader.IsValid(), $"Data is not valid (Line #{i + 1}): {sample}");
}
}
[TestMethod]
public void TestKamstrup228()
{
var text = File.ReadAllText("Kamstrup228.txt");
byte[] bytes = text.Trim().Split(' ').Select(v => (byte)int.Parse(v, System.Globalization.NumberStyles.HexNumber)).ToArray();
var reader = new Reader(bytes);
Assert.IsTrue(reader.IsValid(), "Data is not valid");
}
}
}

View File

@@ -1,559 +0,0 @@
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 11 00 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 02 FC 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8C 06 00 00 08 1C 06 00 00 07 97 06 00 00 0A CA 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 66 FD 27 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 02 FF 80 00 00 02 01 06 00 00 02 FF 21 9D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 04 FF 80 00 00 02 01 06 00 00 02 FB C8 DC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 06 FF 80 00 00 02 01 06 00 00 02 FB 73 DE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 08 FF 80 00 00 02 01 06 00 00 02 FD 64 B6 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 11 0A 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 02 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8A 06 00 00 08 22 06 00 00 07 9A 06 00 00 0A D4 06 00 00 09 5B 06 00 00 00 00 06 00 00 09 66 A7 44 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 0C FF 80 00 00 02 01 06 00 00 02 FC 9B A2 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 0E FF 80 00 00 02 01 06 00 00 02 FF BB 92 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 10 FF 80 00 00 02 01 06 00 00 02 FC D9 B8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 12 FF 80 00 00 02 01 06 00 00 02 FB DD CE 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 11 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 02 FE 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8A 06 00 00 08 21 06 00 00 07 99 06 00 00 0A C8 06 00 00 09 60 06 00 00 00 00 06 00 00 09 6C 93 0A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 16 FF 80 00 00 02 01 06 00 00 02 FD 9D AE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 18 FF 80 00 00 02 01 06 00 00 02 F9 98 E5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 1A FF 80 00 00 02 01 06 00 00 02 FB 31 C4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 1C FF 80 00 00 02 01 06 00 00 02 FD CA A6 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 11 1E 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 02 FB 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8C 06 00 00 08 11 06 00 00 07 98 06 00 00 0A C1 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 69 FB 4C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 20 FF 80 00 00 02 01 06 00 00 02 FE A3 A5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 22 FF 80 00 00 02 01 06 00 00 02 FD 83 95 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 24 FF 80 00 00 02 01 06 00 00 02 FB 78 F7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 26 FF 80 00 00 02 01 06 00 00 02 FE 6E A2 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 11 28 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 02 F9 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8B 06 00 00 08 0F 06 00 00 07 97 06 00 00 0A BF 06 00 00 09 5A 06 00 00 00 00 06 00 00 09 65 16 EB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 2A FF 80 00 00 02 01 06 00 00 02 FC E6 8E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 2C FF 80 00 00 02 01 06 00 00 03 01 99 BC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 2E FF 80 00 00 02 01 06 00 00 02 FE 82 A8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 30 FF 80 00 00 02 01 06 00 00 02 FC 69 93 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 11 32 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 02 FE 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8A 06 00 00 08 23 06 00 00 07 9C 06 00 00 0A D4 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 68 8D E0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 34 FF 80 00 00 02 01 06 00 00 02 FB A0 E2 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 36 FF 80 00 00 02 01 06 00 00 02 FE B6 B7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 38 FF 80 00 00 02 01 06 00 00 02 FA B3 FC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 11 3A FF 80 00 00 02 01 06 00 00 03 09 C4 22 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 12 00 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 03 0B 06 00 00 00 00 06 00 00 00 00 06 00 00 00 85 06 00 00 08 43 06 00 00 07 8D 06 00 00 0A FF 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 67 89 B7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 02 FF 80 00 00 02 01 06 00 00 02 F9 E0 F6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 04 FF 80 00 00 02 01 06 00 00 02 FA B6 C3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 06 FF 80 00 00 02 01 06 00 00 02 FA 0D C1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 08 FF 80 00 00 02 01 06 00 00 02 FC 1A A9 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 12 0A 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 02 F9 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8C 06 00 00 08 07 06 00 00 07 98 06 00 00 0A B6 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 67 53 02 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 0C FF 80 00 00 02 01 06 00 00 02 FA 5A C9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 0E FF 80 00 00 02 01 06 00 00 02 FD 5E BF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 10 FF 80 00 00 02 01 06 00 00 02 F7 FD 08 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 12 FF 80 00 00 02 01 06 00 00 02 F7 46 0A 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 12 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 02 F9 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8C 06 00 00 08 0D 06 00 00 07 95 06 00 00 0A BD 06 00 00 09 5A 06 00 00 00 00 06 00 00 09 63 2B DF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 16 FF 80 00 00 02 01 06 00 00 02 F9 4E E6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 18 FF 80 00 00 02 01 06 00 00 02 F8 E6 FA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 1A FF 80 00 00 02 01 06 00 00 02 FC 79 BE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 1C FF 80 00 00 02 01 06 00 00 02 FA 82 DC 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 12 1E 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 02 F9 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8B 06 00 00 08 09 06 00 00 07 97 06 00 00 0A B8 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 67 F2 4F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 20 FF 80 00 00 02 01 06 00 00 02 FC 46 88 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 22 FF 80 00 00 02 01 06 00 00 02 FA CB EF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 24 FF 80 00 00 02 01 06 00 00 02 F7 E3 33 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 26 FF 80 00 00 02 01 06 00 00 02 FE 99 AC 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 12 28 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 02 FB 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8C 06 00 00 08 15 06 00 00 07 99 06 00 00 0A C3 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 66 B3 90 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 2A FF 80 00 00 02 01 06 00 00 02 F9 BC D7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 2C FF 80 00 00 02 01 06 00 00 02 FD 55 96 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 2E FF 80 00 00 02 01 06 00 00 02 FA 51 E0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 30 FF 80 00 00 02 01 06 00 00 02 FB 21 E9 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 12 32 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 02 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8B 06 00 00 08 21 06 00 00 07 98 06 00 00 0A D2 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 66 44 03 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 34 FF 80 00 00 02 01 06 00 00 02 FA DE FD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 36 FF 80 00 00 02 01 06 00 00 02 FB EC EE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 38 FF 80 00 00 02 01 06 00 00 02 FD FB 86 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 12 3A FF 80 00 00 02 01 06 00 00 02 FB 76 E1 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 13 00 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 02 FB 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8B 06 00 00 08 12 06 00 00 07 99 06 00 00 0A C2 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 66 C2 B1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 02 FF 80 00 00 02 01 06 00 00 02 FB 5F D0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 04 FF 80 00 00 02 01 06 00 00 02 F9 80 F4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 06 FF 80 00 00 02 01 06 00 00 02 FB 29 D5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 08 FF 80 00 00 02 01 06 00 00 02 F8 93 EA 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 13 0A 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 02 F7 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8B 06 00 00 08 0E 06 00 00 07 8D 06 00 00 0A B7 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 67 0A A5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 0C FF 80 00 00 02 01 06 00 00 03 01 73 9C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 0E FF 80 00 00 02 01 06 00 00 02 FD F3 BA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 10 FF 80 00 00 02 01 06 00 00 02 FB 3C C7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 12 FF 80 00 00 02 01 06 00 00 02 F9 95 E6 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 13 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 02 FA 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8A 06 00 00 08 17 06 00 00 07 98 06 00 00 0A BB 06 00 00 09 5B 06 00 00 00 00 06 00 00 09 64 2C E0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 16 FF 80 00 00 02 01 06 00 00 02 F8 6A F2 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 18 FF 80 00 00 02 01 06 00 00 02 F8 4B FF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 1A FF 80 00 00 02 01 06 00 00 02 FE C6 98 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 1C FF 80 00 00 02 01 06 00 00 03 05 8F CF 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 13 1E 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 03 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 88 06 00 00 08 19 06 00 00 07 B2 06 00 00 0A D5 06 00 00 09 5B 06 00 00 00 00 06 00 00 09 65 E7 33 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 20 FF 80 00 00 02 01 06 00 00 03 09 11 34 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 22 FF 80 00 00 02 01 06 00 00 03 02 79 88 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 24 FF 80 00 00 02 01 06 00 00 03 0B 75 12 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 26 FF 80 00 00 02 01 06 00 00 02 FE 34 A9 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 13 28 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 03 06 06 00 00 00 00 06 00 00 00 00 06 00 00 00 87 06 00 00 08 33 06 00 00 07 98 06 00 00 0A F0 06 00 00 09 5C 06 00 00 00 00 06 00 00 09 67 D8 86 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 2A FF 80 00 00 02 01 06 00 00 03 0E F9 48 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 2C FF 80 00 00 02 01 06 00 00 02 FE 63 A1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 2E FF 80 00 00 02 01 06 00 00 02 FA FC E5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 30 FF 80 00 00 02 01 06 00 00 02 FB 8C EC 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 13 32 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 02 FC 06 00 00 00 00 06 00 00 00 00 06 00 00 00 89 06 00 00 08 15 06 00 00 07 96 06 00 00 0A C8 06 00 00 09 56 06 00 00 00 00 06 00 00 09 63 0D 02 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 34 FF 80 00 00 02 01 06 00 00 02 F9 E8 CA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 36 FF 80 00 00 02 01 06 00 00 03 04 E1 FD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 38 FF 80 00 00 02 01 06 00 00 03 15 C8 F1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 13 3A FF 80 00 00 02 01 06 00 00 03 08 17 38 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 14 00 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 03 10 06 00 00 00 00 06 00 00 00 00 06 00 00 00 85 06 00 00 08 41 06 00 00 07 99 06 00 00 0B 02 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 69 D8 2C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 02 FF 80 00 00 02 01 06 00 00 03 0E E6 71 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 04 FF 80 00 00 02 01 06 00 00 03 1C B8 45 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 06 FF 80 00 00 02 01 06 00 00 03 13 F4 BF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 08 FF 80 00 00 02 01 06 00 00 02 FF 6F 86 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 14 0A 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 03 1A 06 00 00 00 00 06 00 00 00 00 06 00 00 00 83 06 00 00 08 6A 06 00 00 07 98 06 00 00 0B 2E 06 00 00 09 5B 06 00 00 00 00 06 00 00 09 67 78 B7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 0C FF 80 00 00 02 01 06 00 00 02 FE 90 92 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 0E FF 80 00 00 02 01 06 00 00 02 FF A2 81 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 10 FF 80 00 00 02 01 06 00 00 02 FB 7F DF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 12 FF 80 00 00 02 01 06 00 00 02 FA 4D CC 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 14 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 02 FC 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8B 06 00 00 08 24 06 00 00 07 8C 06 00 00 0A CE 06 00 00 09 5C 06 00 00 00 00 06 00 00 09 66 96 0B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 16 FF 80 00 00 02 01 06 00 00 02 FE 1F 8F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 18 FF 80 00 00 02 01 06 00 00 03 02 05 A6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 1A FF 80 00 00 02 01 06 00 00 03 05 01 D0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 1C FF 80 00 00 02 01 06 00 00 03 02 73 A3 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 14 1E 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 03 05 06 00 00 00 00 06 00 00 00 00 06 00 00 00 89 06 00 00 08 26 06 00 00 07 97 06 00 00 0A EC 06 00 00 09 5A 06 00 00 00 00 06 00 00 09 66 50 B8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 20 FF 80 00 00 02 01 06 00 00 03 08 DB 3D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 22 FF 80 00 00 02 01 06 00 00 02 FD 9A 86 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 24 FF 80 00 00 02 01 06 00 00 02 FC DE 90 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 26 FF 80 00 00 02 01 06 00 00 03 00 5E B6 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 14 28 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 02 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8A 06 00 00 08 1E 06 00 00 07 99 06 00 00 0A D2 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 67 EB 6F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 2A FF 80 00 00 02 01 06 00 00 02 FE ED BE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 2C FF 80 00 00 02 01 06 00 00 02 FD BB 8B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 2E FF 80 00 00 02 01 06 00 00 02 FD 00 89 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 30 FF 80 00 00 02 01 06 00 00 02 FC 70 80 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 14 32 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 02 FE 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8B 06 00 00 08 1D 06 00 00 07 9A 06 00 00 0A D0 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 68 29 72 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 34 FF 80 00 00 02 01 06 00 00 02 F6 5C 2A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 36 FF 80 00 00 02 01 06 00 00 02 F7 6E 39 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 38 FF 80 00 00 02 01 06 00 00 02 FA AA EF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 14 3A FF 80 00 00 02 01 06 00 00 02 FC 27 88 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 15 00 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 02 FB 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8B 06 00 00 08 14 06 00 00 07 99 06 00 00 0A C4 06 00 00 09 60 06 00 00 00 00 06 00 00 09 68 E2 98 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 02 FF 80 00 00 02 01 06 00 00 03 16 82 E8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 04 FF 80 00 00 02 01 06 00 00 03 11 F0 9B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 06 FF 80 00 00 02 01 06 00 00 02 FD F1 AD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 08 FF 80 00 00 02 01 06 00 00 03 08 2A 19 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 15 0A 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 02 FE 06 00 00 00 00 06 00 00 00 00 06 00 00 00 8A 06 00 00 08 18 06 00 00 07 9A 06 00 00 0A CC 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 67 F7 2E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 0C FF 80 00 00 02 01 06 00 00 02 FE 3D 97 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 0E FF 80 00 00 02 01 06 00 00 02 FE 86 95 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 10 FF 80 00 00 02 01 06 00 00 02 FC 6D AE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 12 FF 80 00 00 02 01 06 00 00 02 FC D6 AC 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 15 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 03 13 06 00 00 00 00 06 00 00 00 00 06 00 00 00 85 06 00 00 08 61 06 00 00 07 98 06 00 00 0B 29 06 00 00 09 60 06 00 00 00 00 06 00 00 09 68 5D 02 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 16 FF 80 00 00 02 01 06 00 00 03 21 10 BD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 18 FF 80 00 00 02 01 06 00 00 02 FB 3E D0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 1A FF 80 00 00 02 01 06 00 00 03 46 33 A5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 1C FF 80 00 00 02 01 06 00 00 03 5F BE 2F 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 15 1E 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 03 66 06 00 00 00 00 06 00 00 00 00 06 00 00 00 6D 06 00 00 08 58 06 00 00 09 43 06 00 00 0C 0E 06 00 00 09 5C 06 00 00 00 00 06 00 00 09 65 90 F3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 20 FF 80 00 00 02 01 06 00 00 03 60 38 D7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 22 FF 80 00 00 02 01 06 00 00 03 32 14 A4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 24 FF 80 00 00 02 01 06 00 00 03 54 E9 A5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 26 FF 80 00 00 02 01 06 00 00 03 47 48 85 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 15 28 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 03 86 06 00 00 00 00 06 00 00 00 00 06 00 00 00 59 06 00 00 07 F5 06 00 00 0A 40 06 00 00 0C 64 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 67 70 07 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 2A FF 80 00 00 02 01 06 00 00 03 B4 C6 4F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 2C FF 80 00 00 02 01 06 00 00 03 BC 43 C4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 2E FF 80 00 00 02 01 06 00 00 03 CA 49 D0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 30 FF 80 00 00 02 01 06 00 00 03 94 4B 73 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 15 32 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 03 A1 06 00 00 00 00 06 00 00 00 00 06 00 00 00 40 06 00 00 06 F1 06 00 00 0B 82 06 00 00 0C 7F 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 65 7A A8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 34 FF 80 00 00 02 01 06 00 00 03 A5 37 56 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 36 FF 80 00 00 02 01 06 00 00 03 B0 A0 13 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 38 FF 80 00 00 02 01 06 00 00 03 C1 8F 7C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 15 3A FF 80 00 00 02 01 06 00 00 03 B7 85 68 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 16 00 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 03 BB 06 00 00 00 00 06 00 00 00 00 06 00 00 00 34 06 00 00 06 D0 06 00 00 0C 2B 06 00 00 0C DD 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 67 55 B4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 02 FF 80 00 00 02 01 06 00 00 03 BE 37 CF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 04 FF 80 00 00 02 01 06 00 00 03 C1 8A 43 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 06 FF 80 00 00 02 01 06 00 00 03 D4 1D 06 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 08 FF 80 00 00 02 01 06 00 00 03 DE 66 A4 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 16 0A 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 03 C9 06 00 00 00 00 06 00 00 00 00 06 00 00 00 2E 06 00 00 06 D5 06 00 00 0C 6D 06 00 00 0D 12 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 66 FC 7B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 0C FF 80 00 00 02 01 06 00 00 03 CA B5 F7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 0E FF 80 00 00 02 01 06 00 00 03 D8 9D C6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 10 FF 80 00 00 02 01 06 00 00 03 DA 76 FD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 12 FF 80 00 00 02 01 06 00 00 03 CF E1 B8 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 16 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 03 D0 06 00 00 00 00 06 00 00 00 00 06 00 00 00 2B 06 00 00 06 E9 06 00 00 0C 80 06 00 00 0D 35 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 64 EB 38 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 16 FF 80 00 00 02 01 06 00 00 03 D9 20 C8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 18 FF 80 00 00 02 01 06 00 00 03 D1 49 49 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 1A FF 80 00 00 02 01 06 00 00 04 31 F4 E1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 1C FF 80 00 00 02 01 06 00 00 04 0B E0 78 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 16 1E 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 03 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 51 06 00 00 07 A0 06 00 00 0C 8A 06 00 00 0D 55 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 65 E7 78 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 20 FF 80 00 00 02 01 06 00 00 04 03 5A C5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 22 FF 80 00 00 02 01 06 00 00 04 0A 20 5A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 24 FF 80 00 00 02 01 06 00 00 04 03 2C C0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 26 FF 80 00 00 02 01 06 00 00 04 08 44 7C 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 16 28 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 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 9E 06 00 00 0C 85 06 00 00 0D 4F 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 69 24 5D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 2A FF 80 00 00 02 01 06 00 00 04 04 B2 B9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 2C FF 80 00 00 02 01 06 00 00 04 03 C0 CA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 2E FF 80 00 00 02 01 06 00 00 04 04 C4 BC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 30 FF 80 00 00 02 01 06 00 00 04 00 19 E2 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 16 32 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 04 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4F 06 00 00 07 A0 06 00 00 0C 98 06 00 00 0D 5F 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 66 8A 0F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 34 FF 80 00 00 02 01 06 00 00 04 06 59 82 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 36 FF 80 00 00 02 01 06 00 00 04 12 47 D6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 38 FF 80 00 00 02 01 06 00 00 04 03 6E DA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 16 3A FF 80 00 00 02 01 06 00 00 04 00 4E EA 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 17 00 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 03 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 8D 06 00 00 0C 9C 06 00 00 0D 4D 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 67 B0 B1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 02 FF 80 00 00 02 01 06 00 00 04 03 FC E9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 04 FF 80 00 00 02 01 06 00 00 03 FE 53 8F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 06 FF 80 00 00 02 01 06 00 00 03 FF 61 9C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 08 FF 80 00 00 02 01 06 00 00 04 00 30 D3 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 17 0A 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 03 FD 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 84 06 00 00 0C 9D 06 00 00 0D 47 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 65 AD ED 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 0C FF 80 00 00 02 01 06 00 00 03 FC AD A6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 0E FF 80 00 00 02 01 06 00 00 03 FD 9F B5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 10 FF 80 00 00 02 01 06 00 00 04 0C 68 06 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 12 FF 80 00 00 02 01 06 00 00 04 00 BF CE 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 17 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 01 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4F 06 00 00 07 94 06 00 00 0C 9D 06 00 00 0D 55 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 66 4F 3E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 16 FF 80 00 00 02 01 06 00 00 03 FF B9 89 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 18 FF 80 00 00 02 01 06 00 00 03 FF 98 84 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 1A FF 80 00 00 02 01 06 00 00 04 01 DA D5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 1C FF 80 00 00 02 01 06 00 00 04 00 9E C3 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 17 1E 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 03 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 8B 06 00 00 0C 98 06 00 00 0D 4A 06 00 00 09 60 06 00 00 00 00 06 00 00 09 68 50 76 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 20 FF 80 00 00 02 01 06 00 00 04 02 7E D1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 22 FF 80 00 00 02 01 06 00 00 03 FE 2E A3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 24 FF 80 00 00 02 01 06 00 00 04 02 08 D4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 26 FF 80 00 00 02 01 06 00 00 04 03 3A C7 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 17 28 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 03 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 51 06 00 00 07 94 06 00 00 0C 91 06 00 00 0D 4C 06 00 00 09 62 06 00 00 00 00 06 00 00 09 66 E8 CD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 2A FF 80 00 00 02 01 06 00 00 04 01 B2 EB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 2C FF 80 00 00 02 01 06 00 00 04 03 6D CF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 2E FF 80 00 00 02 01 06 00 00 03 FD 2F 9E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 30 FF 80 00 00 02 01 06 00 00 03 FC 5F 97 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 17 32 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 02 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 B1 06 00 00 0C 8B 06 00 00 0D 5D 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 63 90 B6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 34 FF 80 00 00 02 01 06 00 00 04 01 4B F3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 36 FF 80 00 00 02 01 06 00 00 04 01 F0 F1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 38 FF 80 00 00 02 01 06 00 00 04 04 7C AB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 17 3A FF 80 00 00 02 01 06 00 00 04 00 E3 EF 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 18 00 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 03 FF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 93 06 00 00 0C 92 06 00 00 0D 4E 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 65 19 A5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 02 FF 80 00 00 02 01 06 00 00 04 01 C5 FF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 04 FF 80 00 00 02 01 06 00 00 03 FF F1 AB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 06 FF 80 00 00 02 01 06 00 00 04 00 3A EB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 08 FF 80 00 00 02 01 06 00 00 04 05 B6 B1 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 18 0A 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 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 51 06 00 00 07 91 06 00 00 0C 94 06 00 00 0D 4E 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 67 7C C3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 0C FF 80 00 00 02 01 06 00 00 04 00 6D E3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 0E FF 80 00 00 02 01 06 00 00 04 02 C4 C2 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 10 FF 80 00 00 02 01 06 00 00 04 00 2F F9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 12 FF 80 00 00 02 01 06 00 00 04 01 1D EA 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 18 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 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 9C 06 00 00 0C 8F 06 00 00 0D 54 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 66 EA AC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 16 FF 80 00 00 02 01 06 00 00 03 FD 80 9F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 18 FF 80 00 00 02 01 06 00 00 03 FE 3A A0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 1A FF 80 00 00 02 01 06 00 00 04 05 D5 A6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 1C FF 80 00 00 02 01 06 00 00 03 FE 4C A5 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 18 1E 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 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 93 06 00 00 0C 95 06 00 00 0D 53 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 64 F9 7E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 20 FF 80 00 00 02 01 06 00 00 04 03 DC F5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 22 FF 80 00 00 02 01 06 00 00 04 01 75 D4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 24 FF 80 00 00 02 01 06 00 00 04 02 23 E1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 26 FF 80 00 00 02 01 06 00 00 04 05 27 97 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 18 28 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 03 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4F 06 00 00 07 9E 06 00 00 0C 98 06 00 00 0D 5F 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 65 E5 BE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 2A FF 80 00 00 02 01 06 00 00 04 00 10 CF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 2C FF 80 00 00 02 01 06 00 00 04 03 46 FA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 2E FF 80 00 00 02 01 06 00 00 04 04 42 8C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 30 FF 80 00 00 02 01 06 00 00 04 02 8D F1 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 18 32 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 05 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4D 06 00 00 07 A0 06 00 00 0C 97 06 00 00 0D 62 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 66 FB 6E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 34 FF 80 00 00 02 01 06 00 00 04 00 E9 D7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 36 FF 80 00 00 02 01 06 00 00 04 04 76 93 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 38 FF 80 00 00 02 01 06 00 00 04 03 E8 EA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 18 3A FF 80 00 00 02 01 06 00 00 04 01 41 CB 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 19 00 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 4F 06 00 00 07 98 06 00 00 0C BF 06 00 00 0D 7F 06 00 00 09 60 06 00 00 00 00 06 00 00 09 68 1B 6B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 02 FF 80 00 00 02 01 06 00 00 04 07 5E 9F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 04 FF 80 00 00 02 01 06 00 00 04 02 3E CF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 06 FF 80 00 00 02 01 06 00 00 04 03 0C DC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 08 FF 80 00 00 02 01 06 00 00 04 05 1B B4 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 19 0A 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 02 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 96 06 00 00 0C 96 06 00 00 0D 57 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 66 67 73 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 0C FF 80 00 00 02 01 06 00 00 04 02 D2 C5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 0E FF 80 00 00 02 01 06 00 00 04 04 5F A2 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 10 FF 80 00 00 02 01 06 00 00 04 02 90 DF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 12 FF 80 00 00 02 01 06 00 00 04 01 B0 EF 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 19 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 03 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 A0 06 00 00 0C 96 06 00 00 0D 5F 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 65 5E 3C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 16 FF 80 00 00 02 01 06 00 00 04 03 D4 C9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 18 FF 80 00 00 02 01 06 00 00 04 05 C3 A1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 1A FF 80 00 00 02 01 06 00 00 0A D6 7E DD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 1C FF 80 00 00 02 01 06 00 00 0F F4 1B A6 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 19 1E 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 0F EB 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4B 06 00 00 37 B5 06 00 00 3A 01 06 00 00 0D 60 06 00 00 09 4A 06 00 00 00 00 06 00 00 09 60 80 3E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 20 FF 80 00 00 02 01 06 00 00 0F F0 CD D1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 22 FF 80 00 00 02 01 06 00 00 0F ED 12 18 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 24 FF 80 00 00 02 01 06 00 00 0F F4 9F 92 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 26 FF 80 00 00 02 01 06 00 00 0F F3 9B E4 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 19 28 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 0F EC 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4C 06 00 00 37 AA 06 00 00 39 FB 06 00 00 0D 64 06 00 00 09 4C 06 00 00 00 00 06 00 00 09 62 8A FA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 2A FF 80 00 00 02 01 06 00 00 0F ED FE 12 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 2C FF 80 00 00 02 01 06 00 00 0F E6 E0 AB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 2E FF 80 00 00 02 01 06 00 00 0F E1 E4 DD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 30 FF 80 00 00 02 01 06 00 00 0F DF E0 1D 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 19 32 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 0F E1 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4B 06 00 00 37 91 06 00 00 39 D9 06 00 00 0D 74 06 00 00 09 47 06 00 00 00 00 06 00 00 09 5C 0E FB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 34 FF 80 00 00 02 01 06 00 00 0F E2 F0 F2 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 36 FF 80 00 00 02 01 06 00 00 0F E1 D0 C2 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 38 FF 80 00 00 02 01 06 00 00 0F E6 4E BB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 19 3A FF 80 00 00 02 01 06 00 00 0F E4 E7 9A 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 1A 00 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 0F E5 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4C 06 00 00 37 97 06 00 00 39 EA 06 00 00 0D 6B 06 00 00 09 4A 06 00 00 00 00 06 00 00 09 5F 25 AC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 02 FF 80 00 00 02 01 06 00 00 0F E6 86 83 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 04 FF 80 00 00 02 01 06 00 00 0F E0 7D E1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 06 FF 80 00 00 02 01 06 00 00 0F E3 5D D1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 08 FF 80 00 00 02 01 06 00 00 0F E1 6E FF 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 1A 0A 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 0F EC 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4C 06 00 00 37 8C 06 00 00 39 F8 06 00 00 0D 8D 06 00 00 09 48 06 00 00 00 00 06 00 00 09 5D CE 5D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 0C FF 80 00 00 02 01 06 00 00 0F DE 6C 33 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 0E FF 80 00 00 02 01 06 00 00 0F E2 38 CA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 10 FF 80 00 00 02 01 06 00 00 0F E0 D3 F1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 12 FF 80 00 00 02 01 06 00 00 0F E2 7A D0 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 1A 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 0F E1 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4B 06 00 00 37 8C 06 00 00 39 D9 06 00 00 0D 71 06 00 00 09 48 06 00 00 00 00 06 00 00 09 61 30 BE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 16 FF 80 00 00 02 01 06 00 00 0F E0 1E F6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 18 FF 80 00 00 02 01 06 00 00 0F E1 B6 EA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 1A FF 80 00 00 02 01 06 00 00 0F E2 96 DA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 1C FF 80 00 00 02 01 06 00 00 0F E1 C0 EF 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 1A 1E 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 0F E3 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4B 06 00 00 37 8F 06 00 00 39 DF 06 00 00 0D 6F 06 00 00 09 48 06 00 00 00 00 06 00 00 09 5F EA 89 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 20 FF 80 00 00 02 01 06 00 00 0F DF CF 06 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 22 FF 80 00 00 02 01 06 00 00 0F DC EF 36 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 24 FF 80 00 00 02 01 06 00 00 0F DD AB 20 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 26 FF 80 00 00 02 01 06 00 00 0F D9 34 64 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 1A 28 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 0F D4 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4A 06 00 00 37 76 06 00 00 39 B8 06 00 00 0D 77 06 00 00 09 43 06 00 00 00 00 06 00 00 09 5B 4A 2D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 2A FF 80 00 00 02 01 06 00 00 0F CF 19 1E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 2C FF 80 00 00 02 01 06 00 00 0F D3 39 C3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 2E FF 80 00 00 02 01 06 00 00 0F D7 A6 87 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 30 FF 80 00 00 02 01 06 00 00 0F D6 D6 8E 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 1A 32 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 0F DB 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4B 06 00 00 37 79 06 00 00 39 C9 06 00 00 0D 76 06 00 00 09 45 06 00 00 00 00 06 00 00 09 5D 18 EE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 34 FF 80 00 00 02 01 06 00 00 0F D7 29 9A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 36 FF 80 00 00 02 01 06 00 00 0F DB FE 52 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 38 FF 80 00 00 02 01 06 00 00 0F DC 60 2B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1A 3A FF 80 00 00 02 01 06 00 00 0F F5 18 95 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 1B 00 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 10 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 42 06 00 00 37 C0 06 00 00 39 D1 06 00 00 0D F2 06 00 00 09 46 06 00 00 00 00 06 00 00 09 5E 08 07 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 02 FF 80 00 00 02 01 06 00 00 0F F0 9C F3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 04 FF 80 00 00 02 01 06 00 00 0F EA 8A 4B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 06 FF 80 00 00 02 01 06 00 00 0F E7 D4 92 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 08 FF 80 00 00 02 01 06 00 00 0F E5 E7 BC 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 1B 0A 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 0F E5 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4B 06 00 00 37 90 06 00 00 39 DF 06 00 00 0D 72 06 00 00 09 48 06 00 00 00 00 06 00 00 09 61 52 09 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 0C FF 80 00 00 02 01 06 00 00 0F F9 7C 63 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 0E FF 80 00 00 02 01 06 00 00 0F E1 0E FD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 10 FF 80 00 00 02 01 06 00 00 0F DA A7 6A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 12 FF 80 00 00 02 01 06 00 00 0F D6 70 A2 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 1B 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 0F DF 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4C 06 00 00 37 80 06 00 00 39 CB 06 00 00 0D 8E 06 00 00 09 44 06 00 00 00 00 06 00 00 09 5B 48 E6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 16 FF 80 00 00 02 01 06 00 00 0F D8 78 4E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 18 FF 80 00 00 02 01 06 00 00 0F D2 03 EC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 1A FF 80 00 00 02 01 06 00 00 0F D3 31 FF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 1C FF 80 00 00 02 01 06 00 00 0F D2 75 E9 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 1B 1E 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 0F D1 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4B 06 00 00 37 6D 06 00 00 39 BE 06 00 00 0D 6F 06 00 00 09 43 06 00 00 00 00 06 00 00 09 5B 06 B0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 20 FF 80 00 00 02 01 06 00 00 0F D5 38 AC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 22 FF 80 00 00 02 01 06 00 00 0F D7 91 8D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 24 FF 80 00 00 02 01 06 00 00 0F E5 CD 98 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 26 FF 80 00 00 02 01 06 00 00 0F E5 76 9A 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 1B 28 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 0F E8 06 00 00 00 00 06 00 00 00 00 06 00 00 00 49 06 00 00 37 92 06 00 00 39 DE 06 00 00 0D 85 06 00 00 09 48 06 00 00 00 00 06 00 00 09 5F 91 44 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 2A FF 80 00 00 02 01 06 00 00 0F E8 09 4E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 2C FF 80 00 00 02 01 06 00 00 0F EC E0 0F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 2E FF 80 00 00 02 01 06 00 00 0F E9 F6 5A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 30 FF 80 00 00 02 01 06 00 00 0F E5 63 88 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 1B 32 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 0F E4 06 00 00 00 00 06 00 00 00 00 06 00 00 00 49 06 00 00 37 90 06 00 00 39 D1 06 00 00 0D 81 06 00 00 09 47 06 00 00 00 00 06 00 00 09 5D 35 68 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 34 FF 80 00 00 02 01 06 00 00 0F DB E8 55 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 36 FF 80 00 00 02 01 06 00 00 0F E7 BC AC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 38 FF 80 00 00 02 01 06 00 00 0F E2 30 F6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1B 3A FF 80 00 00 02 01 06 00 00 0F DF ED 1E 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 1C 00 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 0F DB 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4C 06 00 00 37 7E 06 00 00 39 D1 06 00 00 0D 71 06 00 00 09 46 06 00 00 00 00 06 00 00 09 5E B2 82 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 02 FF 80 00 00 02 01 06 00 00 0F E7 E1 8F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 04 FF 80 00 00 02 01 06 00 00 04 0A 6F 50 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 06 FF 80 00 00 02 01 06 00 00 04 0A D4 52 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 08 FF 80 00 00 02 01 06 00 00 04 0D 4A 2B 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 1C 0A 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 06 06 00 00 00 00 06 00 00 00 00 06 00 00 00 50 06 00 00 07 98 06 00 00 0C A0 06 00 00 0D 62 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 65 1F 3A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 0C FF 80 00 00 02 01 06 00 00 04 05 74 A2 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 0E FF 80 00 00 02 01 06 00 00 04 08 2A 7B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 10 FF 80 00 00 02 01 06 00 00 04 06 AD 8A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 12 FF 80 00 00 02 01 06 00 00 04 07 9F 99 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 1C 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 08 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 A4 06 00 00 0C A0 06 00 00 0D 70 06 00 00 09 59 06 00 00 00 00 06 00 00 09 61 61 92 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 16 FF 80 00 00 02 01 06 00 00 04 06 60 8D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 18 FF 80 00 00 02 01 06 00 00 04 04 53 A3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 1A FF 80 00 00 02 01 06 00 00 04 05 61 B0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 1C FF 80 00 00 02 01 06 00 00 04 05 AC B7 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 1C 1E 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 0B 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 A1 06 00 00 0C A8 06 00 00 0D 74 06 00 00 09 5C 06 00 00 00 00 06 00 00 09 66 FD D7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 20 FF 80 00 00 02 01 06 00 00 04 0B 20 6F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 22 FF 80 00 00 02 01 06 00 00 04 08 00 5F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 24 FF 80 00 00 02 01 06 00 00 04 0A DF 7B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 26 FF 80 00 00 02 01 06 00 00 04 08 76 5A 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 1C 28 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 08 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4F 06 00 00 07 9C 06 00 00 0C A1 06 00 00 0D 68 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 65 CF 6F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 2A FF 80 00 00 02 01 06 00 00 04 08 EC 55 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 2C FF 80 00 00 02 01 06 00 00 04 08 21 52 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 2E FF 80 00 00 02 01 06 00 00 04 06 E4 B9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 30 FF 80 00 00 02 01 06 00 00 04 07 94 B0 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 1C 32 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 0A 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 9F 06 00 00 0C A3 06 00 00 0D 70 06 00 00 09 5C 06 00 00 00 00 06 00 00 09 65 72 6A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 34 FF 80 00 00 02 01 06 00 00 04 06 6B A4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 36 FF 80 00 00 02 01 06 00 00 04 07 59 B7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 38 FF 80 00 00 02 01 06 00 00 04 0C AB 04 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1C 3A FF 80 00 00 02 01 06 00 00 04 0A 26 63 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 1D 00 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 08 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4D 06 00 00 07 AA 06 00 00 0C 96 06 00 00 0D 6C 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 65 8E 58 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 02 FF 80 00 00 02 01 06 00 00 04 07 EA 89 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 04 FF 80 00 00 02 01 06 00 00 04 11 90 FB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 06 FF 80 00 00 02 01 06 00 00 04 05 8E AF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 08 FF 80 00 00 02 01 06 00 00 04 10 83 E5 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 1D 0A 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 05 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4F 06 00 00 07 95 06 00 00 0C A2 06 00 00 0D 62 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 65 30 07 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 0C FF 80 00 00 02 01 06 00 00 04 0B A7 4E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 0E FF 80 00 00 02 01 06 00 00 04 08 87 7E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 10 FF 80 00 00 02 01 06 00 00 04 05 9B BD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 12 FF 80 00 00 02 01 06 00 00 04 06 BB 8D 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 1D 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 07 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 9B 06 00 00 0C A4 06 00 00 0D 68 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 66 ED 6A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 16 FF 80 00 00 02 01 06 00 00 04 06 CD 88 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 18 FF 80 00 00 02 01 06 00 00 04 07 65 94 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 1A FF 80 00 00 02 01 06 00 00 04 08 29 6E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 1C FF 80 00 00 02 01 06 00 00 04 05 01 B2 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 1D 1E 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 06 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 98 06 00 00 0C A2 06 00 00 0D 64 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 67 D0 ED 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 20 FF 80 00 00 02 01 06 00 00 04 09 9F 49 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 22 FF 80 00 00 02 01 06 00 00 04 06 D3 B3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 24 FF 80 00 00 02 01 06 00 00 04 06 1E B4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 26 FF 80 00 00 02 01 06 00 00 04 07 2C A7 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 1D 28 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 09 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 9C 06 00 00 0C A7 06 00 00 0D 6D 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 69 86 EB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 2A FF 80 00 00 02 01 06 00 00 04 07 B6 A8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 2C FF 80 00 00 02 01 06 00 00 04 16 73 AE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 2E FF 80 00 00 02 01 06 00 00 04 07 C0 AD 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 30 FF 80 00 00 02 01 06 00 00 04 08 CE 4D 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 1D 32 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 09 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 A2 06 00 00 0C A5 06 00 00 0D 70 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 65 DD 68 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 34 FF 80 00 00 02 01 06 00 00 04 07 4F B0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 36 FF 80 00 00 02 01 06 00 00 04 09 8A 5B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 38 FF 80 00 00 02 01 06 00 00 04 0D 8F 10 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1D 3A FF 80 00 00 02 01 06 00 00 04 09 10 54 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 1E 00 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 4D 06 00 00 07 B9 06 00 00 0C AD 06 00 00 0D 74 06 00 00 09 60 06 00 00 00 00 06 00 00 09 69 FF EA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 02 FF 80 00 00 02 01 06 00 00 04 08 EA 7F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 04 FF 80 00 00 02 01 06 00 00 04 08 27 78 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 06 FF 80 00 00 02 01 06 00 00 04 08 9C 7A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 08 FF 80 00 00 02 01 06 00 00 04 0B 26 45 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 1E 0A 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 08 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4D 06 00 00 07 A3 06 00 00 0C 9E 06 00 00 0D 6A 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 67 60 76 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 0C FF 80 00 00 02 01 06 00 00 04 07 3C 8A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 0E FF 80 00 00 02 01 06 00 00 04 0D DD 27 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 10 FF 80 00 00 02 01 06 00 00 04 08 89 68 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 12 FF 80 00 00 02 01 06 00 00 04 07 C5 92 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 1E 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 0B 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4D 06 00 00 07 AA 06 00 00 0C A4 06 00 00 0D 77 06 00 00 09 60 06 00 00 00 00 06 00 00 09 67 58 FB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 16 FF 80 00 00 02 01 06 00 00 04 07 B3 97 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 18 FF 80 00 00 02 01 06 00 00 04 0B FE 50 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 1A FF 80 00 00 02 01 06 00 00 04 08 DE 60 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 1C FF 80 00 00 02 01 06 00 00 04 05 F6 BC 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 1E 1E 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 09 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 A6 06 00 00 0C A6 06 00 00 0D 74 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 65 7B F6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 20 FF 80 00 00 02 01 06 00 00 04 0E D7 33 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 22 FF 80 00 00 02 01 06 00 00 04 0B C1 66 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 24 FF 80 00 00 02 01 06 00 00 04 10 5E CF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 26 FF 80 00 00 02 01 06 00 00 04 0A 3E 72 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 1E 28 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 4D 06 00 00 07 BB 06 00 00 0C A9 06 00 00 0D 82 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 66 55 9A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 2A FF 80 00 00 02 01 06 00 00 04 0A A4 7D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 2C FF 80 00 00 02 01 06 00 00 04 0A 69 7A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 2E FF 80 00 00 02 01 06 00 00 04 09 49 4A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 30 FF 80 00 00 02 01 06 00 00 04 15 5D 88 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 1E 32 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 0E 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 C2 06 00 00 0C A9 06 00 00 0D 87 06 00 00 09 61 06 00 00 00 00 06 00 00 09 68 39 65 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 34 FF 80 00 00 02 01 06 00 00 04 09 C6 57 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 36 FF 80 00 00 02 01 06 00 00 04 0B 6F 76 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 38 FF 80 00 00 02 01 06 00 00 04 0D 78 1E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1E 3A FF 80 00 00 02 01 06 00 00 04 0A 7C 68 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 00 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 0D 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4F 06 00 00 07 B9 06 00 00 0C A7 06 00 00 0D 7E 06 00 00 09 60 06 00 00 00 00 06 00 00 09 68 58 7E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 02 FF 80 00 00 02 01 06 00 00 04 0F F8 0E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 04 FF 80 00 00 02 01 06 00 00 04 0B 11 4F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 06 FF 80 00 00 02 01 06 00 00 04 0A 23 5C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 08 FF 80 00 00 02 01 06 00 00 04 0C 34 34 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 0A 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 4F 06 00 00 07 BA 06 00 00 0C AA 06 00 00 0D 81 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 64 CA 7B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 0C FF 80 00 00 02 01 06 00 00 04 0B FD 45 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 0E FF 80 00 00 02 01 06 00 00 04 10 14 E9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 10 FF 80 00 00 02 01 06 00 00 04 0B BF 5F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 12 FF 80 00 00 02 01 06 00 00 04 0A 8D 4C 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
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 16 FF 80 00 00 02 01 06 00 00 04 09 60 7B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 18 FF 80 00 00 02 01 06 00 00 04 0D 65 30 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 1A FF 80 00 00 02 01 06 00 00 04 0D DE 32 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 1C FF 80 00 00 02 01 06 00 00 04 0C 9A 24 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 1E 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 0E 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 BD 06 00 00 0C A9 06 00 00 0D 84 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 67 96 51 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 20 FF 80 00 00 02 01 06 00 00 04 0F F3 27 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 22 FF 80 00 00 02 01 06 00 00 04 0D 5A 06 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 24 FF 80 00 00 02 01 06 00 00 04 0E 0C 33 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 26 FF 80 00 00 02 01 06 00 00 04 0F 3E 20 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 28 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 BA 06 00 00 0C AA 06 00 00 0D 82 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 68 7E E4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 2A FF 80 00 00 02 01 06 00 00 04 0E 2D 3E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 2C FF 80 00 00 02 01 06 00 00 04 0E E0 39 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 2E FF 80 00 00 02 01 06 00 00 04 0C 49 18 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 30 FF 80 00 00 02 01 06 00 00 04 0E A2 23 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 32 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 0D 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4F 06 00 00 07 BE 06 00 00 0C A8 06 00 00 0D 83 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 68 05 8B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 34 FF 80 00 00 02 01 06 00 00 04 0B 79 71 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 36 FF 80 00 00 02 01 06 00 00 04 08 59 41 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 38 FF 80 00 00 02 01 06 00 00 04 09 F1 5D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 1F 3A FF 80 00 00 02 01 06 00 00 04 15 A7 85 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 20 00 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 0B 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4F 06 00 00 07 BC 06 00 00 0C AE 06 00 00 0D 7F 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 65 CE 70 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 02 FF 80 00 00 02 01 06 00 00 04 0C 38 E6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 04 FF 80 00 00 02 01 06 00 00 04 0A C3 84 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 06 FF 80 00 00 02 01 06 00 00 04 0C 4E E3 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 08 FF 80 00 00 02 01 06 00 00 04 10 82 34 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 20 0A 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 0D 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 C0 06 00 00 0C A8 06 00 00 0D 85 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 64 0A 70 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 0C FF 80 00 00 02 01 06 00 00 04 0E 0B C8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 0E FF 80 00 00 02 01 06 00 00 04 0D 2B F8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 10 FF 80 00 00 02 01 06 00 00 04 0A 6D 94 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 12 FF 80 00 00 02 01 06 00 00 04 0B 5F 87 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 20 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 11 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4D 06 00 00 07 CC 06 00 00 0C AE 06 00 00 0D 93 06 00 00 09 60 06 00 00 00 00 06 00 00 09 66 51 C9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 16 FF 80 00 00 02 01 06 00 00 04 0D 1F E7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 18 FF 80 00 00 02 01 06 00 00 04 0C B7 FB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 1A FF 80 00 00 02 01 06 00 00 04 14 C5 65 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 1C FF 80 00 00 02 01 06 00 00 04 23 34 27 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 20 1E 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 10 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4D 06 00 00 07 C8 06 00 00 0C 9D 06 00 00 0D 83 06 00 00 09 61 06 00 00 00 00 06 00 00 09 68 EE 44 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 20 FF 80 00 00 02 01 06 00 00 04 10 DE 15 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 22 FF 80 00 00 02 01 06 00 00 04 13 FE 25 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 24 FF 80 00 00 02 01 06 00 00 04 0D CC DB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 26 FF 80 00 00 02 01 06 00 00 04 0F 65 FA 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 20 28 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 0F 06 00 00 00 00 06 00 00 00 00 06 00 00 00 4E 06 00 00 07 C7 06 00 00 0C AA 06 00 00 0D 8C 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 66 07 D8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 2A FF 80 00 00 02 01 06 00 00 04 0E 76 E4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 2C FF 80 00 00 02 01 06 00 00 04 0D 20 D1 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 2E FF 80 00 00 02 01 06 00 00 04 0A 24 A7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 30 FF 80 00 00 02 01 06 00 00 04 0A DD BF 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 20 32 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 03 64 06 00 00 00 00 06 00 00 00 00 06 00 00 00 91 06 00 00 07 C1 06 00 00 08 FE 06 00 00 0B 16 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 67 D9 99 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 34 FF 80 00 00 02 01 06 00 00 03 23 60 4B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 36 FF 80 00 00 02 01 06 00 00 03 0A 18 F5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 38 FF 80 00 00 02 01 06 00 00 03 08 2B DB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 20 3A FF 80 00 00 02 01 06 00 00 03 06 EE 30 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 21 00 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 03 05 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B0 06 00 00 07 BA 06 00 00 07 97 06 00 00 0A 35 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 68 8E 2C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 02 FF 80 00 00 02 01 06 00 00 03 0A AB CB 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 04 FF 80 00 00 02 01 06 00 00 03 02 2E 40 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 06 FF 80 00 00 02 01 06 00 00 03 08 CF ED 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 08 FF 80 00 00 02 01 06 00 00 03 0B 75 D2 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 21 0A 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 03 08 06 00 00 00 00 06 00 00 00 00 06 00 00 00 AF 06 00 00 07 BB 06 00 00 07 9E 06 00 00 0A 3B 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 69 FD 58 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 0C FF 80 00 00 02 01 06 00 00 03 05 7D 3E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 0E FF 80 00 00 02 01 06 00 00 03 08 23 E7 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 10 FF 80 00 00 02 01 06 00 00 03 05 3F 24 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 12 FF 80 00 00 02 01 06 00 00 03 04 0D 37 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 21 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 03 07 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B0 06 00 00 07 BC 06 00 00 07 9A 06 00 00 0A 3B 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 68 62 08 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 16 FF 80 00 00 02 01 06 00 00 03 05 F2 23 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 18 FF 80 00 00 02 01 06 00 00 03 05 D3 2E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 1A FF 80 00 00 02 01 06 00 00 03 09 04 E6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 1C FF 80 00 00 02 01 06 00 00 03 06 3E 19 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 21 1E 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 03 07 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B0 06 00 00 07 BC 06 00 00 07 9A 06 00 00 0A 38 06 00 00 09 60 06 00 00 00 00 06 00 00 09 6B A6 A2 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 20 FF 80 00 00 02 01 06 00 00 03 09 3B D0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 22 FF 80 00 00 02 01 06 00 00 03 07 FE 3B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 24 FF 80 00 00 02 01 06 00 00 03 08 C4 C4 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 26 FF 80 00 00 02 01 06 00 00 03 09 F6 D7 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 21 28 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 03 07 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B0 06 00 00 07 C5 06 00 00 07 8F 06 00 00 0A 3D 06 00 00 09 61 06 00 00 00 00 06 00 00 09 6A 24 5B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 2A FF 80 00 00 02 01 06 00 00 03 10 2C 55 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 2C FF 80 00 00 02 01 06 00 00 03 0B B3 FC 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 2E FF 80 00 00 02 01 06 00 00 03 0B 08 FE 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 30 FF 80 00 00 02 01 06 00 00 03 08 6A D4 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 21 32 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 03 0C 06 00 00 00 00 06 00 00 00 00 06 00 00 00 AF 06 00 00 07 C6 06 00 00 07 A2 06 00 00 0A 4B 06 00 00 09 5C 06 00 00 00 00 06 00 00 09 64 30 46 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 34 FF 80 00 00 02 01 06 00 00 03 09 95 C0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 36 FF 80 00 00 02 01 06 00 00 03 06 D9 3A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 38 FF 80 00 00 02 01 06 00 00 03 07 71 26 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 21 3A FF 80 00 00 02 01 06 00 00 03 04 51 16 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 22 00 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 03 0B 06 00 00 00 00 06 00 00 00 00 06 00 00 00 AE 06 00 00 07 BD 06 00 00 07 AC 06 00 00 0A 42 06 00 00 09 5C 06 00 00 00 00 06 00 00 09 66 2C 7C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 02 FF 80 00 00 02 01 06 00 00 03 0A 5C C5 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 04 FF 80 00 00 02 01 06 00 00 03 07 74 19 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 06 FF 80 00 00 02 01 06 00 00 03 06 46 0A 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 08 FF 80 00 00 02 01 06 00 00 03 0A 0B CD 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 22 0A 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 03 05 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B1 06 00 00 07 B2 06 00 00 07 98 06 00 00 0A 2F 06 00 00 09 60 06 00 00 00 00 06 00 00 09 6A 8F 73 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 0C FF 80 00 00 02 01 06 00 00 03 04 03 21 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 0E FF 80 00 00 02 01 06 00 00 03 04 B8 23 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 10 FF 80 00 00 02 01 06 00 00 03 03 FE 4F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 12 FF 80 00 00 02 01 06 00 00 03 05 73 28 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 22 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 03 09 06 00 00 00 00 06 00 00 00 00 06 00 00 00 AF 06 00 00 07 C0 06 00 00 07 9C 06 00 00 0A 44 06 00 00 09 5B 06 00 00 00 00 06 00 00 09 66 3E 93 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 16 FF 80 00 00 02 01 06 00 00 03 07 17 0E 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 18 FF 80 00 00 02 01 06 00 00 03 05 24 20 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 1A FF 80 00 00 02 01 06 00 00 03 07 8D 01 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 1C FF 80 00 00 02 01 06 00 00 03 05 52 25 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 22 1E 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 03 07 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B1 06 00 00 07 B7 06 00 00 07 99 06 00 00 0A 36 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 68 19 D9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 20 FF 80 00 00 02 01 06 00 00 03 07 B2 37 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 22 FF 80 00 00 02 01 06 00 00 03 07 09 35 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 24 FF 80 00 00 02 01 06 00 00 03 1B 29 E8 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 26 FF 80 00 00 02 01 06 00 00 03 05 6D 13 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 22 28 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 03 03 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B2 06 00 00 07 AE 06 00 00 07 98 06 00 00 0A 28 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 68 C1 72 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 2A FF 80 00 00 02 01 06 00 00 03 07 E5 3F 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 2C FF 80 00 00 02 01 06 00 00 03 05 3A 1B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 2E FF 80 00 00 02 01 06 00 00 03 04 08 08 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 30 FF 80 00 00 02 01 06 00 00 03 01 5C 47 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 22 32 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 03 02 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B1 06 00 00 07 B8 06 00 00 07 8F 06 00 00 0A 2D 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 69 7A 05 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 34 FF 80 00 00 02 01 06 00 00 03 0E DD BA 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 36 FF 80 00 00 02 01 06 00 00 03 05 B5 06 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 38 FF 80 00 00 02 01 06 00 00 03 0D DC 87 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 22 3A FF 80 00 00 02 01 06 00 00 03 1A 59 E1 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 23 00 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 03 13 06 00 00 00 00 06 00 00 00 00 06 00 00 00 AE 06 00 00 07 DC 06 00 00 07 98 06 00 00 0A 64 06 00 00 09 5C 06 00 00 00 00 06 00 00 09 66 E1 F0 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 02 FF 80 00 00 02 01 06 00 00 03 05 06 38 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 04 FF 80 00 00 02 01 06 00 00 03 02 74 4B 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 06 FF 80 00 00 02 01 06 00 00 03 05 70 3D 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 08 FF 80 00 00 02 01 06 00 00 03 07 43 13 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 23 0A 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 03 04 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B0 06 00 00 07 B5 06 00 00 07 98 06 00 00 0A 30 06 00 00 09 5D 06 00 00 00 00 06 00 00 09 67 69 E6 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 0C FF 80 00 00 02 01 06 00 00 03 05 27 35 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 0E FF 80 00 00 02 01 06 00 00 03 0A 6B CF 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 10 FF 80 00 00 02 01 06 00 00 03 07 77 0C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 12 FF 80 00 00 02 01 06 00 00 03 07 CC 0E 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 23 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 03 07 06 00 00 00 00 06 00 00 00 00 06 00 00 00 B0 06 00 00 07 BC 06 00 00 07 99 06 00 00 0A 3A 06 00 00 09 5F 06 00 00 00 00 06 00 00 09 67 7A 50 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 16 FF 80 00 00 02 01 06 00 00 03 04 21 39 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 18 FF 80 00 00 02 01 06 00 00 03 04 00 34 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 1A FF 80 00 00 02 01 06 00 00 03 07 20 04 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 1C FF 80 00 00 02 01 06 00 00 03 0C 3E BD 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 23 1E 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 03 08 06 00 00 00 00 06 00 00 00 00 06 00 00 00 AF 06 00 00 07 BC 06 00 00 07 99 06 00 00 0A 3D 06 00 00 09 5E 06 00 00 00 00 06 00 00 09 68 A2 19 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 20 FF 80 00 00 02 01 06 00 00 03 0C CC 8C 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 22 FF 80 00 00 02 01 06 00 00 03 09 DA D9 7E
7E A0 27 01 02 01 10 5A 87 E6 E7 00 0F 40 00 00 00 09 0C 07 E1 09 0E 04 15 23 24 FF 80 00 00 02 01 06 00 00 03 0A 8C EC 7E

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MSTest.TestAdapter" version="1.1.11" targetFramework="net452" />
<package id="MSTest.TestFramework" version="1.1.11" targetFramework="net452" />
</packages>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -1,26 +0,0 @@
## AMS <-> MQTT Bridge
# Code
Various code projects to help debug and build the final system
### HanDebugger (C# console)
A very simplified c# console application to read serial data directly from the HAN bus, using the HAN-FTDI circuit and a FTDI device (USB serial port). The application will simply use the right serial setup (2400 baud, 8E1) to set up a connection and continously read incoming data. The received data is split on the package start and -end flags (0x7E) and output to console.
![HanScreenshot](/Code/HanDebugger/screenshot.png)
### ESPDebugger (Arduino sketch on ESP8266)
Very similar to the HanDebugger, simply reading the HAN data and outputting the same data to the Serial1 port, HEX-formatted and splitted by lines on start and -end flags.
![ESPCircuit](./ESPDebugger/Circuit%20(breadboard).jpg)
![ESPScreenshot](./ESPDebugger/screenshot.png)
### SerialTestPattern (Arduino sketch, any variant)
This code outputs a changing serial test pattern.
![](SerialTestPattern/SerialTestPattern.gif)
### SerialSimulator (Python code to send sample HAN data over serial port)
Use this Python3 script (e.g. running on a desktop computer using a USB to serial dongle) to simulate the data sent over the HAN port (after being translate from Mbus to uart signals).
![](SerialSimulator/ams_serial_simulator.jpg)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 KiB

View File

@@ -1,19 +0,0 @@
import serial
import time
import sys
import sample_data
serial_port = sys.argv[1]
with serial.Serial(port=serial_port, baudrate=2400, bytesize=8, parity='E', stopbits=1) as ser:
print(ser)
print('sleeping')
time.sleep(1)
while True:
for packet in sample_data.kaifa_20190508_packets[:]:
sys.stdout.flush()
ser.write(packet)
print('sleeping')
time.sleep(2)
break

View File

@@ -1,27 +0,0 @@
# From Samples/Kaifa/HAN 20170912-3.txt:
kaifa_han_20170912_3_packets = [
# [2017-09-13 00.00.07.776 - Received 41 (0x29) bytes]
b'\x7E\xA0\x27\x01\x02\x01\x10\x5A\x87\xE6\xE7\x00\x0F\x40\x00\x00\x00\x09\x0C\x07\xE1\x09\x0D\x02\x00\x00\x06\xFF\x80\x00\x00\x02\x01\x06\x00\x00\x11\xAC\x85\x61\x7E',
# [2017-09-13 00.00.09.784 - Received 41 (0x29) bytes]
b'\x7E\xA0\x27\x01\x02\x01\x10\x5A\x87\xE6\xE7\x00\x0F\x40\x00\x00\x00\x09\x0C\x07\xE1\x09\x0D\x02\x00\x00\x08\xFF\x80\x00\x00\x02\x01\x06\x00\x00\x11\xB4\x6D\xF0\x7E',
# [2017-09-13 00.00.11.761 - Received 157 (0x9D) bytes]
b'\x7E\xA0\x9B\x01\x02\x01\x10\xEE\xAE\xE6\xE7\x00\x0F\x40\x00\x00\x00\x09\x0C\x07\xE1\x09\x0D\x02\x00\x00\x0A\xFF\x80\x00\x00\x02\x12\x09\x07\x4B\x46\x4D\x5F\x30\x30\x31\x09\x10\x36\x39\x37\x30\x36\x33\x31\x34\x30\x31\x37\x35\x33\x39\x38\x35\x09\x08\x4D\x41\x33\x30\x34\x48\x33\x45\x06\x00\x00\x11\xB5\x06\x00\x00\x00\x00\x06\x00\x00\x00\x00\x06\x00\x00\x00\x80\x06\x00\x00\x38\x48\x06\x00\x00\x3C\x76\x06\x00\x00\x14\x5B\x06\x00\x00\x09\x4D\x06\x00\x00\x00\x00\x06\x00\x00\x09\x5A\x09\x0C\x07\xE1\x09\x0D\x02\x00\x00\x0A\xFF\x80\x00\x00\x06\x00\x01\xB8\x57\x06\x00\x00\x00\x00\x06\x00\x00\x00\x65\x06\x00\x00\x33\xA4\x54\x83\x7E',
# [2017-09-13 00.00.13.769 - Received 41 (0x29) bytes]
b'\x7E\xA0\x27\x01\x02\x01\x10\x5A\x87\xE6\xE7\x00\x0F\x40\x00\x00\x00\x09\x0C\x07\xE1\x09\x0D\x02\x00\x00\x0C\xFF\x80\x00\x00\x02\x01\x06\x00\x00\x11\xB9\xFE\x2E\x7E',
# [2017-09-13 00.00.15.778 - Received 41 (0x29) bytes]
b'\x7E\xA0\x27\x01\x02\x01\x10\x5A\x87\xE6\xE7\x00\x0F\x40\x00\x00\x00\x09\x0C\x07\xE1\x09\x0D\x02\x00\x00\x0E\xFF\x80\x00\x00\x02\x01\x06\x00\x00\x11\xBA\xDE\x1E\x7E',
# [2017-09-13 00.00.17.786 - Received 41 (0x29) bytes]
b'\x7E\xA0\x27\x01\x02\x01\x10\x5A\x87\xE6\xE7\x00\x0F\x40\x00\x00\x00\x09\x0C\x07\xE1\x09\x0D\x02\x00\x00\x10\xFF\x80\x00\x00\x02\x01\x06\x00\x00\x11\xBB\xAE\x17\x7E',
# [2017-09-13 00.00.19.762 - Received 41 (0x29) bytes]
b'\x7E\xA0\x27\x01\x02\x01\x10\x5A\x87\xE6\xE7\x00\x0F\x40\x00\x00\x00\x09\x0C\x07\xE1\x09\x0D\x02\x00\x00\x12\xFF\x80\x00\x00\x02\x01\x06\x00\x00\x11\xB7\x79\xDF\x7E',
# [2017-09-13 00.00.21.771 - Received 123 (0x7B) bytes]
b'\x7E\xA0\x79\x01\x02\x01\x10\x80\x93\xE6\xE7\x00\x0F\x40\x00\x00\x00\x09\x0C\x07\xE1\x09\x0D\x02\x00\x00\x14\xFF\x80\x00\x00\x02\x0D\x09\x07\x4B\x46\x4D\x5F\x30\x30\x31\x09\x10\x36\x39\x37\x30\x36\x33\x31\x34\x30\x31\x37\x35\x33\x39\x38\x35\x09\x08\x4D\x41\x33\x30\x34\x48\x33\x45\x06\x00\x00\x11\xBB\x06\x00\x00\x00\x00\x06\x00\x00\x00\x00\x06\x00\x00\x00\x7F\x06\x00\x00\x38\x4D\x06\x00\x00\x3C\x86\x06\x00\x00\x14\x5B\x06\x00\x00\x09\x4F\x06\x00\x00\x00\x00\x06\x00\x00\x09\x5C\xC1\x54\x7E',
]
# From Kaifa MA105H2E 2019-05-08
kaifa_20190508_packets = [
b'~\xa0\'\x01\x02\x01\x10Z\x87\xe6\xe7\x00\x0f@\x00\x00\x00\t\x0c\x07\xe3\x05\x08\x03\x16 "\xff\x80\x00\x00\x02\x01\x06\x00\x00\x03\xa3L\xab~',
b'~\xa0e\x01\x02\x01\x10\xf0P\xe6\xe7\x00\x0f@\x00\x00\x00\t\x0c\x07\xe3\x05\x08\x03\x16 (\xff\x80\x00\x00\x02\t\t\x07KFM_001\t\x106970631401991684\t\x08MA105H2E\x06\x00\x00\x03\xa5\x06\x00\x00\x00\x00\x06\x00\x00\x00!\x06\x00\x00\x00\x00\x06\x00\x00\x10\x0e\x06\x00\x00\t\n\x98v~',
b'~\xa0\'\x01\x02\x01\x10Z\x87\xe6\xe7\x00\x0f@\x00\x00\x00\t\x0c\x07\xe3\x05\x08\x03\x16 "\xff\x80\x00\x00\x02\x01\x06\x00\x00\x03\xa3L\xab~',
]

View File

@@ -1,7 +0,0 @@
This is a simple Arduino sketch that can be used to generate a
serial test pattern (input to the m-bus master for instance).
It will send one byte at the time, changing one bit compared
to previous at a fixed interval.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -1,36 +0,0 @@
#include <SoftwareSerial.h>
#define RX_PIN 10
#define TX_PIN 11
SoftwareSerial mySerial(RX_PIN, TX_PIN);
// https://en.wikipedia.org/wiki/Binary_Gray_sequence
static unsigned int binary_to_gray(unsigned int num)
{
return num ^ (num >> 1);
}
void setup() {
mySerial.begin(9600);
}
void loop() {
static unsigned int i = 0;
static unsigned int ch = 0;
// Change the character more seldom than each loop entry.
if (i++ > 20) {
i = 0;
// 127 => leave the last bit sent always zero.
if (++ch > 127) {
ch = 0;
}
}
mySerial.write(binary_to_gray(ch));
// 9600 bps => 8 bit = 8/9600s ~ 0.8ms
delay(50);
}

View File

@@ -1,77 +0,0 @@
# Getting started building or modifying
## Tools
### Kicad
Install the [KiCad](http://www.kicad-pcb.org/) program to edit the schematic or PCB.
KiCad documentation and forums:
* https://kicad-pcb.org/help/documentation/#_getting_started
* https://forum.kicad.info/
* https://www.reddit.com/r/KiCad/
* https://en.wikipedia.org/wiki/KiCad
### Simulator
If you want to simulate parts of the circuit you also need a simulator. This is
highly recommended! This saves a *lot* of troubleshooting and makes you find
solutions you otherwise would not have found.
[Electronic circuit simulation](https://en.wikipedia.org/wiki/Electronic_circuit_simulation)
using computers have a long history. Many of them have origins directly or indirectly
related to the classic SPICE simulator (e.g. [Ngspice](http://ngspice.sourceforge.net)).
At the core they work similar to source code compilers - you give it a text file
describing the circuit and it produces a textual simulation result. Some of the simulators
are intended to be used just in text mode while other have a graphical frontend where
you are able to draw the circuit like in a schematic editor:
* [QUCS](http://qucs.sourceforge.net/) - Quite Universal Circuit Simulator.
* [QUCS-S](https://ra3xdh.github.io/) - A qucs version using ngspice as simulation backend. This one has been used for the simulations for board 3.
* [eSim](http://esim.fossee.in/).
* [Other alternatives](https://en.wikipedia.org/wiki/List_of_free_electronics_circuit_simulators).
### Git
While it is possible to download the content from this repository as a compresset
zip file, you want to use git to fetch the content. For Linux install depending on
distribution with
```
apt-get install git # debian, ubuntu, etc
dnf install git # fedora
yum install git # rhel, centos
```
For windows the most convenient option is to install [git for windows](https://git-scm.com/download/win).
To download the source of this repository run:
```
git clone https://github.com/roarfred/AmsToMqttBridge
cd AmsToMqttBridge
git submodule init
git submodule update --recursive
```
Make sure that all submodules are fetched. If not `git submodule status` will show something like the following (notice the `-` in front):
```bash
-f886cacb58461d356730e744d9d2ae55590825e4 kicad-symbols
```
while when properly fetched it will show the commit id normally
(plus any labels if appropriate):
```bash
f886cacb58461d356730e744d9d2ae55590825e4 kicad-symbols (5.0.0-rc1)
```
To mitigate, run update:
```bash
$ git submodule update --init
Submodule 'Electrical/kicad-libs/kicad-symbols' (https://github.com/kicad/kicad-symbols) registered for path 'kicad-symbols'
Cloning into '.../AmsToMqttBridge/Electrical/kicad-libs/kicad-symbols'...
Submodule path 'kicad-symbols': checked out 'f886cacb58461d356730e744d9d2ae55590825e4'
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Some files were not shown because too many files have changed in this diff Show More