{"_id":"@bubblyworld/gurux-dlms-ts","_rev":"7-1f55c6ef2b90f4953293dd331a48e53c","name":"@bubblyworld/gurux-dlms-ts","dist-tags":{"latest":"1.3.3"},"versions":{"1.0.0":{"name":"@bubblyworld/gurux-dlms-ts","version":"1.0.0","keywords":["dlms","cosem","wasm","meter","gurux","energy"],"author":{"name":"Guy Paterson-Jones"},"license":"GPL-2.0","_id":"@bubblyworld/gurux-dlms-ts@1.0.0","maintainers":[{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"}],"dist":{"shasum":"28851df1f07b776bd3a2d7e80a89267b8f0f43c2","tarball":"https://registry.npmjs.org/@bubblyworld/gurux-dlms-ts/-/gurux-dlms-ts-1.0.0.tgz","fileCount":64,"integrity":"sha512-x7sHFNtpaX4lm8p5JUjJUf6sZ7yR9pniRl/ZLhx05kP+gNJYpvzUWwpOQPwMVO4ruOzTZ48FQabhv/rHTmww8A==","signatures":[{"sig":"MEQCIEXBRE9zcrTBkOfF9TxRHZqYjNy4tPNiMCpHrU7ggC+dAiAvADJmoWvbi4T/o9TRjqQsI7PYH4hMCRvlULpXCC/LCg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":673868},"main":"./dist/index.node.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.node.js","exports":{".":{"node":{"import":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"},"require":{"types":"./dist/index.node.d.cts","default":"./dist/index.node.cjs"}},"browser":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"},"default":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"}}},"gitHead":"e3312ba7ff4b834b09554589b3dab500f411fe19","scripts":{"test":"vitest run","build":"npm run build:wasm && npm run build:ts","build:ts":"tsc && rollup -c && cp dist/index.node.d.ts dist/index.node.d.cts","build:wasm":"cd build && ./build.sh","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"},"_npmVersion":"11.12.1","description":"A wasm build of the GuruxDLMS.c DLMS/COSEM protocol library with a TypeScript interface. Runs with zero dependencies in both node and web environments.","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","devDependencies":{"rollup":"^4.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@rollup/plugin-typescript":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gurux-dlms-ts_1.0.0_1775715851572_0.6118768767425831","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@bubblyworld/gurux-dlms-ts","version":"1.1.0","keywords":["dlms","cosem","wasm","meter","gurux","energy"],"author":{"name":"Guy Paterson-Jones"},"license":"GPL-2.0","_id":"@bubblyworld/gurux-dlms-ts@1.1.0","maintainers":[{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"}],"dist":{"shasum":"f00878a20a1fa5f80d839b26fe9c0d97002a0a48","tarball":"https://registry.npmjs.org/@bubblyworld/gurux-dlms-ts/-/gurux-dlms-ts-1.1.0.tgz","fileCount":64,"integrity":"sha512-uVydjqCAeqWcjw5KT2s1EQir0g3QnSaGq5rKzKxXv7W075LyVe3BKF3ugrf3vw/11GS9+cOuFacGV8TFSvHg+A==","signatures":[{"sig":"MEYCIQC05ortE+6KLpjabs+v+T0mLPSpX6KNj+US+I774hUaLQIhAKH0ptzSqK8tqGBw0gbAvm5GinAWqkXqPru9KDTHJ9uW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":685235},"main":"./dist/index.node.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.node.js","exports":{".":{"node":{"import":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"},"require":{"types":"./dist/index.node.d.cts","default":"./dist/index.node.cjs"}},"browser":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"},"default":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"}}},"gitHead":"b53f2c00adb16dcb1934815cf3edc24ef75c481f","scripts":{"test":"vitest run","build":"npm run build:wasm && npm run build:ts","build:ts":"tsc && rollup -c && cp dist/index.node.d.ts dist/index.node.d.cts","build:wasm":"cd build && ./build.sh","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"},"_npmVersion":"11.12.1","description":"A wasm build of the GuruxDLMS.c DLMS/COSEM protocol library with a TypeScript interface. Runs with zero dependencies in both node and web environments.","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","devDependencies":{"rollup":"^4.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@rollup/plugin-typescript":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gurux-dlms-ts_1.1.0_1776889946438_0.9591220457457199","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@bubblyworld/gurux-dlms-ts","version":"1.2.0","keywords":["dlms","cosem","wasm","meter","gurux","energy"],"author":{"name":"Guy Paterson-Jones"},"license":"GPL-2.0","_id":"@bubblyworld/gurux-dlms-ts@1.2.0","maintainers":[{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"}],"dist":{"shasum":"21934f075377612c7552d98028334702e608c6ab","tarball":"https://registry.npmjs.org/@bubblyworld/gurux-dlms-ts/-/gurux-dlms-ts-1.2.0.tgz","fileCount":64,"integrity":"sha512-Xm3syeIT3vZCWJ7vZhdEifEXK3bsmAFnHCWoIU0eniQJtmaKKdM+csZ1f4i/wJ00MM7cPJ9tvt37hPNsTZbv/w==","signatures":[{"sig":"MEUCIQC5SOJF+oIZ4EGpw0R10jzMl8wZNTPJ0Omn2lFWTegumgIgBN/jacIw7/riiZd+isglGe4sg9LPVphFHMAvAZRtQGw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":716252},"main":"./dist/index.node.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.node.js","exports":{".":{"node":{"import":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"},"require":{"types":"./dist/index.node.d.cts","default":"./dist/index.node.cjs"}},"browser":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"},"default":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"}}},"gitHead":"7a62d33149d91642fa216065fd4d57485c9b58e7","scripts":{"test":"vitest run","build":"npm run build:wasm && npm run build:ts","build:ts":"tsc && rollup -c && cp dist/index.node.d.ts dist/index.node.d.cts","build:wasm":"cd build && ./build.sh","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"},"_npmVersion":"11.12.1","description":"A wasm build of the GuruxDLMS.c DLMS/COSEM protocol library with a TypeScript interface. Runs with zero dependencies in both node and web environments.","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","devDependencies":{"rollup":"^4.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@rollup/plugin-typescript":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gurux-dlms-ts_1.2.0_1776931489375_0.4454747119744984","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@bubblyworld/gurux-dlms-ts","version":"1.3.0","keywords":["dlms","cosem","wasm","meter","gurux","energy"],"author":{"name":"Guy Paterson-Jones"},"license":"GPL-2.0","_id":"@bubblyworld/gurux-dlms-ts@1.3.0","maintainers":[{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"}],"dist":{"shasum":"3790315a2600795d6bd1819b4040e2ec53cb9421","tarball":"https://registry.npmjs.org/@bubblyworld/gurux-dlms-ts/-/gurux-dlms-ts-1.3.0.tgz","fileCount":64,"integrity":"sha512-5xogrqFaCHWEsp8jLXsTWhbS1Qxp85NNNdS445TtBVNyAEiwL69aUVzRn7EJtsHzK1Y7oAh0+Bfjkg3J/EhyFQ==","signatures":[{"sig":"MEUCIBDJjlrHjv5oxMfxyaFGp4pvX/rPa5N6htdbA4H62kowAiEA5RgMu0JpFV5K3rh/MbebT8076rG0KXPbPr9Beg+NQOM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":719670},"main":"./dist/index.node.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.node.js","exports":{".":{"node":{"import":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"},"require":{"types":"./dist/index.node.d.cts","default":"./dist/index.node.cjs"}},"browser":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"},"default":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"}}},"gitHead":"bae5b28ca3a372363734893a0616154fe0243f15","scripts":{"test":"vitest run","build":"npm run build:wasm && npm run build:ts","build:ts":"tsc && rollup -c && cp dist/index.node.d.ts dist/index.node.d.cts","build:wasm":"cd build && ./build.sh","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"},"_npmVersion":"11.12.1","description":"A wasm build of the GuruxDLMS.c DLMS/COSEM protocol library with a TypeScript interface. Runs with zero dependencies in both node and web environments.","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","devDependencies":{"rollup":"^4.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@rollup/plugin-typescript":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gurux-dlms-ts_1.3.0_1782372747341_0.3160117961520894","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@bubblyworld/gurux-dlms-ts","version":"1.3.1","keywords":["dlms","cosem","wasm","meter","gurux","energy"],"author":{"name":"Guy Paterson-Jones"},"license":"GPL-2.0","_id":"@bubblyworld/gurux-dlms-ts@1.3.1","maintainers":[{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"}],"dist":{"shasum":"a52cb499d669dfa46c0b61c4023c615c095b31e1","tarball":"https://registry.npmjs.org/@bubblyworld/gurux-dlms-ts/-/gurux-dlms-ts-1.3.1.tgz","fileCount":64,"integrity":"sha512-BVcYpmNAsqtvR80P2hrU9HTviiY2ykf1DaIsXqW18IOqldogp/HMbzGh9UTP65vhHUuA0tHHdzMpsbVJ8GbVxA==","signatures":[{"sig":"MEUCIEQk5oaSK7S/8Db8WcqEM74BKq118cBBG8lon0dadi+yAiEA7xQ20mAwwL6p2TThDAE8jxo9TUnTTFcSKukbm0DfwBA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":720058},"main":"./dist/index.node.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.node.js","exports":{".":{"node":{"import":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"},"require":{"types":"./dist/index.node.d.cts","default":"./dist/index.node.cjs"}},"browser":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"},"default":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"}}},"gitHead":"922e47dfab26233197659a65df9a16e142320c20","scripts":{"test":"vitest run","build":"npm run build:wasm && npm run build:ts","build:ts":"tsc && rollup -c && cp dist/index.node.d.ts dist/index.node.d.cts","build:wasm":"cd build && ./build.sh","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"},"_npmVersion":"11.12.1","description":"A wasm build of the GuruxDLMS.c DLMS/COSEM protocol library with a TypeScript interface. Runs with zero dependencies in both node and web environments.","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","devDependencies":{"rollup":"^4.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@rollup/plugin-typescript":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gurux-dlms-ts_1.3.1_1787751391683_0.3251553413515076","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@bubblyworld/gurux-dlms-ts","version":"1.3.2","keywords":["dlms","cosem","wasm","meter","gurux","energy"],"author":{"name":"Guy Paterson-Jones"},"license":"GPL-2.0","_id":"@bubblyworld/gurux-dlms-ts@1.3.2","maintainers":[{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"}],"dist":{"shasum":"bc192036243d065c4274a117f83a5a00114c1e6a","tarball":"https://registry.npmjs.org/@bubblyworld/gurux-dlms-ts/-/gurux-dlms-ts-1.3.2.tgz","fileCount":64,"integrity":"sha512-LHJNgC+XKWudqE74VJBXa4w+Vfb2WbIArWYTdpSOf5iov8GrqsnWCT0CS/r/VKT+cWo6Pos4mmTZl5q87fMidA==","signatures":[{"sig":"MEYCIQCeEK6Ccv2NJBrFgztqTZlvXRUsXAk/03OuZWFhJAjB0wIhALVL1iKfKkQ4S2VpslPZDsTEYdAozIB/UHm1Xp4ruSrD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":719091},"main":"./dist/index.node.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.node.js","exports":{".":{"node":{"import":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"},"require":{"types":"./dist/index.node.d.cts","default":"./dist/index.node.cjs"}},"browser":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"},"default":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"}}},"gitHead":"e088ad56d8f0bf50cf60447b7206d63a5bcc298a","scripts":{"test":"vitest run","build":"npm run build:wasm && npm run build:ts","build:ts":"tsc && rollup -c && cp dist/index.node.d.ts dist/index.node.d.cts","build:wasm":"cd build && ./build.sh","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"},"_npmVersion":"11.12.1","description":"A wasm build of the GuruxDLMS.c DLMS/COSEM protocol library with a TypeScript interface. Runs with zero dependencies in both node and web environments.","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","devDependencies":{"rollup":"^4.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@rollup/plugin-typescript":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gurux-dlms-ts_1.3.2_1787821666426_0.8381588476397268","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"_id":"@bubblyworld/gurux-dlms-ts@1.3.3","dist":{"shasum":"323047492f1c7af811db334a6e0b3cf14759f703","tarball":"https://registry.npmjs.org/@bubblyworld/gurux-dlms-ts/-/gurux-dlms-ts-1.3.3.tgz","fileCount":64,"integrity":"sha512-tuFpkAlx0X2YyfjySGoeygDozAaNvecvgz/a8bTsLrmMazKoYydIYkBFbqYVRDFmgIIWsKOPOTNPJeMXpna8dQ==","signatures":[{"sig":"MEYCIQD9SBcVEP6N2JncPR+dBKf+D3XINXpWeq48eXNuh7cTPAIhAIdWxZMx1oL0Hd7QTGMXbO/l0z+wVrUhFzZXSAS64n28","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCcYr27ynjNM3fT+zFi/6oTbCbhTYy8XoIPlT3GmtPHpwIhAJbq0yDTlmdpJabrsztbOMgEmN78MvXzz4dyir+JErw9"}],"unpackedSize":719601},"main":"./dist/index.node.cjs","name":"@bubblyworld/gurux-dlms-ts","type":"module","types":"./dist/index.d.ts","author":{"name":"Guy Paterson-Jones"},"module":"./dist/index.node.js","exports":{".":{"node":{"import":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"},"require":{"types":"./dist/index.node.d.cts","default":"./dist/index.node.cjs"}},"browser":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"},"default":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"}}},"gitHead":"ecb54ddbfc6612eef74cb8100e304efed6ef9493","license":"GPL-2.0","scripts":{"test":"vitest run","build":"npm run build:wasm && npm run build:ts","build:ts":"tsc && rollup -c && cp dist/index.node.d.ts dist/index.node.d.cts","build:wasm":"cd build && ./build.sh","test:watch":"vitest","prepublishOnly":"npm run build"},"version":"1.3.3","_npmUser":{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"},"keywords":["dlms","cosem","wasm","meter","gurux","energy"],"_npmVersion":"11.19.0","description":"A wasm build of the GuruxDLMS.c DLMS/COSEM protocol library with a TypeScript interface. Runs with zero dependencies in both node and web environments.","directories":{},"maintainers":[{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"}],"_nodeVersion":"26.8.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","devDependencies":{"rollup":"^4.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@rollup/plugin-typescript":"^11.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gurux-dlms-ts_1.3.3_1790687245060_0.45392571699871964"}}},"time":{"created":"2026-04-09T06:24:11.492Z","modified":"2026-09-29T13:07:25.514Z","1.0.0":"2026-04-09T06:24:11.781Z","1.1.0":"2026-04-22T20:32:26.685Z","1.2.0":"2026-04-23T08:04:49.574Z","1.3.0":"2026-06-25T07:32:27.505Z","1.3.1":"2026-08-26T13:36:31.890Z","1.3.2":"2026-08-27T09:07:46.586Z","1.3.3":"2026-09-29T13:07:25.152Z"},"author":{"name":"Guy Paterson-Jones"},"license":"GPL-2.0","keywords":["dlms","cosem","wasm","meter","gurux","energy"],"description":"A wasm build of the GuruxDLMS.c DLMS/COSEM protocol library with a TypeScript interface. Runs with zero dependencies in both node and web environments.","maintainers":[{"name":"bubblyworld","email":"guy.paterson.jones@gmail.com"}],"readme":"# gurux-dlms-ts\n\n[WASM](https://webassembly.org/) build of [GuruxDLMS.c](https://github.com/Gurux/GuruxDLMS.c) with TypeScript bindings. Provides a low-level DLMS/COSEM protocol codec for communicating with smart meters. Runs in both node and browser environments with zero runtime dependencies.\n\nThe library is a codec, not I/O — you feed it bytes and it produces DLMS frames. How those frames reach the meter (TCP socket, serial port, etc.) is up to you.\n\n## Installation\n\n```bash\nnpm install @bubblyworld/gurux-dlms-ts\n```\n\n## Quick Start\n\n```typescript\nimport { DlmsClient, Register } from '@bubblyworld/gurux-dlms-ts';\n\nconst client = await DlmsClient.create({\n  clientAddress: 1,\n  serverAddress: 25348,\n  password: '00000000',\n});\n\n// HDLC handshake — send frames to the meter and collect responses.\nclient.parseUaResponse(await sendAndReceive(client.snrmRequest()));\nclient.parseAareResponse(await sendAndReceive(client.aarqRequest()));\n\n// Read active energy import (P1).\nconst register = new Register(client.getModule(), '1-0:1.8.0*255');\nawait readAttr(client, register.inner, 2); // value\nawait readAttr(client, register.inner, 3); // scaler + unit\n\nconsole.log(register.scaledValue); // e.g. 11878.14 kWh\nconsole.log(register.scaler);     // e.g. 1 (×10^1)\nconsole.log(register.unit);       // e.g. 30 (Wh)\n\nregister.free();\nawait sendAndReceive(client.releaseRequest());\nawait sendAndReceive(client.disconnectRequest());\nclient.free();\n```\n\nThe `sendAndReceive` and `readAttr` functions are your transport layer — see the examples below for TCP implementations.\n\n## OBIS Codes\n\nBoth IEC 62056-61 display format (`1-0:1.8.0*255`) and dot-separated format (`1.0.1.8.0.255`) are accepted everywhere. Invalid OBIS codes throw immediately instead of silently producing `0.0.0.0.0.0`.\n\n```typescript\nimport { normalizeObis } from '@bubblyworld/gurux-dlms-ts';\n\nnormalizeObis('1-0:1.8.0*255'); // '1.0.1.8.0.255'\nnormalizeObis('bad.obis');       // throws DlmsException\n```\n\n## Reading Registers\n\n```typescript\nimport { DlmsClient, Register, Clock, DisconnectControl } from '@bubblyworld/gurux-dlms-ts';\n\n// Energy register — read attrs 2 (value) and 3 (scaler/unit).\nconst register = new Register(client.getModule(), '1-0:1.8.0*255');\nawait readAttr(client, register.inner, 2);\nawait readAttr(client, register.inner, 3);\nconsole.log(register.scaledValue); // value × 10^scaler\n\n// Meter clock — read attr 2.\nconst clock = new Clock(client.getModule(), '0-0:1.0.0*255');\nawait readAttr(client, clock.inner, 2);\nconsole.log(clock.time); // \"04/09/2026 07:34:00\"\n\n// Disconnect control (relay) — read attrs 2, 3, 4.\nconst relay = new DisconnectControl(client.getModule(), '0-0:96.3.10*255');\nawait readAttr(client, relay.inner, 2);\nawait readAttr(client, relay.inner, 3);\nawait readAttr(client, relay.inner, 4);\nconsole.log(relay.outputState);  // true = connected\nconsole.log(relay.controlState); // 0=disconnected, 1=connected, 2=ready\nconsole.log(relay.controlMode);  // 0-6, meter-specific\n```\n\n## Relay Switching\n\nUse the `method` call on a DisconnectControl object. Method 1 = remote disconnect, method 2 = remote reconnect:\n\n```typescript\nimport { DlmsClient, DlmsObject, ObjectType } from '@bubblyworld/gurux-dlms-ts';\n\nconst relay = new DlmsObject(client.getModule(), ObjectType.DISCONNECT_CONTROL, '0-0:96.3.10*255');\n\n// Disconnect (switch off)\nconst disconnectFrames = client.method(relay, 1);\nawait sendAndReceive(disconnectFrames);\n\n// Reconnect (switch on)\nconst reconnectFrames = client.method(relay, 2);\nawait sendAndReceive(reconnectFrames);\n\nrelay.free();\n```\n\n## Load Profiles (Profile Generic)\n\nProfile generic objects contain historical meter data. Read the capture objects first (attr 3) to learn the column layout, then read the buffer by time range:\n\n```typescript\nimport { DlmsClient, ProfileGeneric } from '@bubblyworld/gurux-dlms-ts';\n\nconst pg = new ProfileGeneric(client.getModule(), '0-1:24.3.0*255');\n\n// Read column definitions.\nawait readAttr(client, pg.inner, 3);\nconst columns = pg.getCaptureColumns();\n// e.g. [{ objectType: 8, obis: '0.0.1.0.0.255', attributeIndex: 2 },\n//        { objectType: 3, obis: '1.0.1.8.0.255', attributeIndex: 2 }, ...]\n\n// Read data by time range. The range is restricted on the profile's clock\n// capture column, which is located automatically wherever it sits in the\n// column list (some meters, e.g. Kamstrup, do not put the clock first). If\n// the meter reports a sort object it is used as-is.\nconst end = new Date();\nconst start = new Date(end.getTime() - 6 * 60 * 60 * 1000);\nconst frames = client.readByRange(pg.inner, start, end);\nfor (const frame of frames) {\n  const resp = await sendAndReceive([frame]);\n  let result = client.getData(resp);\n  // Multi-block transfer — keep requesting until moreData is 0.\n  while (result.moreData !== 0) {\n    const more = client.receiverReady(result.moreData);\n    result = client.getData(await sendAndReceive(more));\n  }\n}\nclient.updateValue(pg.inner, 2, new Uint8Array(0));\n\n// Iterate rows.\nfor (let row = 0; row < pg.rowCount; row++) {\n  const timestamp = pg.getCellString(row, 0);  // clock column\n  const energy = pg.getCellDouble(row, 1);      // register column\n  console.log(`${timestamp}: ${energy}`);\n}\n\npg.free();\n```\n\n## Association View\n\nList all objects exposed by the meter. Some meters restrict this to certain client addresses or authentication levels:\n\n```typescript\nconst frames = client.getObjectsRequest();\nfor (const frame of frames) {\n  const resp = await sendAndReceive([frame]);\n  let result = client.getData(resp);\n  while (result.moreData !== 0) {\n    result = client.getData(await sendAndReceive(client.receiverReady(result.moreData)));\n  }\n}\n\nconst objects = client.parseObjects(new Uint8Array(0));\nfor (const obj of objects) {\n  console.log(`type=${obj.type} obis=${obj.obis}`);\n}\n```\n\n## Authentication Levels\n\nDLMS supports multiple authentication levels. Set them before connecting:\n\n```typescript\n// No authentication (public client, typically clientAddress=16).\nconst client = await DlmsClient.create({\n  clientAddress: 16,\n  serverAddress: 25348,\n});\nclient.setInt('authentication', 0); // NONE\n\n// Low Level Security (LLS) — password sent in the clear.\nconst client = await DlmsClient.create({\n  clientAddress: 1,\n  serverAddress: 25348,\n  password: '00000000',\n});\n// authentication defaults to LOW (1) when a password is provided.\n\n// High Level Security (HLS) — AES challenge-response.\nconst client = await DlmsClient.create({\n  clientAddress: 1,\n  serverAddress: 25348,\n  password: 'placeholder',\n});\nclient.setInt('authentication', 2); // HIGH\nclient.setStr('passwordHex', '000102030405060708090A0B0C0D0E0F');\n\n// After SNRM + AARQ, complete the HLS handshake:\nconst hlsFrames = client.applicationAssociationRequest();\nconst hlsResp = await sendAndReceive(hlsFrames);\nclient.parseApplicationAssociationResponse(hlsResp);\n\n// HIGH_GMAC (level 5) — requires cipher keys and system title.\nclient.setInt('authentication', 5);\nclient.setInt('security', 0x30); // AUTH_ENCRYPTION\nclient.setStr('blockCipherKey', '000102030405060708090A0B0C0D0E0F');\nclient.setStr('authenticationKey', 'D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF');\nclient.setStr('systemTitle', '4845580000000001');\n```\n\n## Error Handling\n\nAll errors throw `DlmsException` with a typed `error` field:\n\n```typescript\nimport { DlmsException, DlmsErrorCode } from '@bubblyworld/gurux-dlms-ts';\n\ntry {\n  await readAttr(client, register, 2);\n} catch (e) {\n  if (e instanceof DlmsException) {\n    switch (e.error.kind) {\n      case 'cosem':\n        // Data access error from the meter.\n        console.log(e.error.errorCode); // e.g. DlmsErrorCode.UNDEFINED_OBJECT\n        break;\n      case 'acse':\n        // Association/authentication error.\n        console.log(e.error.diagnostic); // ACSE diagnostic code\n        break;\n      case 'wasm':\n        // Internal codec error.\n        break;\n    }\n    console.log(e.message); // Always has a human-readable message.\n  }\n}\n```\n\nCommon COSEM errors: `UNDEFINED_OBJECT` (4), `READ_WRITE_DENIED` (3), `UNAVAILABLE_OBJECT` (11), `TEMPORARY_FAILURE` (2).\n\nCommon ACSE errors: `APPLICATION_CONTEXT_NAME_NOT_SUPPORTED` (276), `AUTHENTICATION_FAILURE` (279), `AUTHENTICATION_REQUIRED` (280).\n\n## Client Settings\n\n```typescript\nclient.setInt('maxInfoTX', 512);         // HDLC max info field size (TX)\nclient.setInt('maxInfoRX', 512);         // HDLC max info field size (RX)\nclient.setInt('windowSizeTX', 1);        // HDLC window size (TX)\nclient.setInt('windowSizeRX', 1);        // HDLC window size (RX)\nclient.setInt('authentication', 1);      // 0=NONE, 1=LOW, 2=HIGH, 5=HIGH_GMAC\nclient.setInt('security', 0x30);         // 0x10=AUTH, 0x20=ENCRYPT, 0x30=BOTH\nclient.setStr('password', '00000000');   // LLS password (ASCII)\nclient.setStr('passwordHex', 'AABB..'); // HLS secret (hex bytes)\nclient.setStr('blockCipherKey', '...');  // AES-128 encryption key (hex)\nclient.setStr('authenticationKey', '..'); // GMAC authentication key (hex)\nclient.setStr('systemTitle', '...');     // 8-byte system title (hex)\n```\n\n## Server (Meter Simulator)\n\nA DLMS server for loopback testing — no network required:\n\n```typescript\nimport { DlmsClient, DlmsServer, DlmsObject, ObjectType, loadGuruxModule } from '@bubblyworld/gurux-dlms-ts';\n\nconst module = await loadGuruxModule();\nconst server = await DlmsServer.create(module);\n\nconst register = new DlmsObject(module, ObjectType.REGISTER, '1.0.1.8.0.255');\nregister.setInt(2, 42);\nserver.addObject(register);\nserver.initialize();\n\nconst client = await DlmsClient.create({ clientAddress: 16, serverAddress: 1 }, module);\nconst ua = server.handleRequest(client.snrmRequest()[0]);\nclient.parseUaResponse(ua);\n// ... read/write/method calls work the same as with a real meter.\n```\n\n## Transport Layer Example\n\nThe library doesn't handle I/O. Here's a minimal TCP transport for Node.js:\n\n```typescript\nimport { createConnection, Socket } from 'net';\n\nfunction sendAndReceive(socket: Socket, frames: Uint8Array[]): Promise<Uint8Array> {\n  return new Promise((resolve, reject) => {\n    const timeout = setTimeout(() => reject(new Error('timeout')), 10000);\n    const chunks: Buffer[] = [];\n    let drain: ReturnType<typeof setTimeout>;\n\n    const onData = (chunk: Buffer) => {\n      chunks.push(chunk);\n      clearTimeout(drain);\n      drain = setTimeout(() => {\n        clearTimeout(timeout);\n        socket.removeListener('data', onData);\n        resolve(Buffer.concat(chunks));\n      }, 200);\n    };\n\n    socket.on('data', onData);\n    for (const frame of frames) socket.write(Buffer.from(frame));\n  });\n}\n\nasync function readAttr(client: DlmsClient, socket: Socket, obj: DlmsObject, attr: number) {\n  let frames = client.read(obj, attr);\n  let resp = await sendAndReceive(socket, frames);\n  let result = client.getData(resp);\n  while (result.moreData !== 0) {\n    resp = await sendAndReceive(socket, client.receiverReady(result.moreData));\n    result = client.getData(resp);\n  }\n  client.updateValue(obj, attr, new Uint8Array(0));\n}\n```\n\n## Building From Source\n\nRequires [Emscripten](https://emscripten.org/docs/getting_started/downloads.html) for WASM compilation.\n\n```bash\nnpm run build        # wasm + typescript\nnpm run build:wasm   # wasm only\nnpm run build:ts     # typescript only\nnpm test             # run tests\n```\n\n## Licensing\n\nGPL-2.0. The WASM bundle includes [GuruxDLMS.c](https://github.com/Gurux/GuruxDLMS.c), also GPL-2.0.\n","readmeFilename":"README.md"}