{"_id":"@applica-software-guru/drax-sdk","_rev":"6-083b798fcd23045e9156e0e898092ae9","name":"@applica-software-guru/drax-sdk","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.2":{"name":"@applica-software-guru/drax-sdk","version":"1.0.2","keywords":["drax","sdk","iot","platform","applica"],"author":{"name":"Giuseppe Disimino"},"license":"ISC","_id":"@applica-software-guru/drax-sdk@1.0.2","maintainers":[{"name":"mcolucci_applica","email":"marco.colucci@applica.guru"},{"name":"roberto.conterosito","email":"roberto.conterosito@applica.guru"},{"name":"bruno.fortunato","email":"bruno.fortunato@applica.guru"}],"homepage":"http://git clone git@bitbucket.org:applicaguru/drax-sdk-js#readme","bugs":{"url":"https://github.com/applica-of-things/drax-sdk/issues"},"dist":{"shasum":"bb354091aef5ebba1fcf026abfe3dfcd5036a5f9","tarball":"https://registry.npmjs.org/@applica-software-guru/drax-sdk/-/drax-sdk-1.0.2.tgz","fileCount":12,"integrity":"sha512-T78cg8MxpJlnHSyy+lBcOVZ7Ef7oPcwba8ndPn618HUr4QFSPuor00pq0wf87rFvX62EPA7a2MR7oEUXVJ2xDQ==","signatures":[{"sig":"MEQCIHwJgWjQsxwlK5r4aCjIOFCk8R1mhVQfevZcHqoZC4LAAiAnoUWm2TP7MrnROR6C/i2ubfZiVk0mWlUejXvyBLF2Ng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17155},"main":"drax.js","gitHead":"397dba0bf2da8403114765daca1f7ae314ed2451","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"roberto.conterosito","email":"roberto.conterosito@applica.guru"},"repository":{"url":"git+ssh://git@bitbucket.org/applicaguru/drax-sdk-js.git","type":"git"},"_npmVersion":"6.14.6","description":"This pakage this package allows interfacing to the Drax IoT platform (https://draxcloud.com/) To use this plugin you need to create a project on the platform. After project creation you must use API_KEY and API_SECRET of project to:  - publish state on no","directories":{"example":"example"},"_nodeVersion":"10.22.1","dependencies":{"axios":"^0.27.2","xmlrpc":"^1.3.2","amqplib":"^0.9.0","drax-ecdh":"^1.0.0","underscore":"^1.13.3"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/drax-sdk_1.0.2_1704985651895_0.8504091521863961","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@applica-software-guru/drax-sdk","version":"1.0.3","keywords":["drax","sdk","iot","platform","applica"],"author":{"name":"Giuseppe Disimino"},"license":"ISC","_id":"@applica-software-guru/drax-sdk@1.0.3","maintainers":[{"name":"mcolucci_applica","email":"marco.colucci@applica.guru"},{"name":"roberto.conterosito","email":"roberto.conterosito@applica.guru"},{"name":"bruno.fortunato","email":"bruno.fortunato@applica.guru"}],"homepage":"http://git clone git@bitbucket.org:applicaguru/drax-sdk-js#readme","bugs":{"url":"https://github.com/applica-of-things/drax-sdk/issues"},"dist":{"shasum":"e1e7d18e8f579adabcef61d390738123ce1ca355","tarball":"https://registry.npmjs.org/@applica-software-guru/drax-sdk/-/drax-sdk-1.0.3.tgz","fileCount":12,"integrity":"sha512-n2vzcjIu6wzj+up4Ooxk1azb9UwGUI669nxbhzYI3iHQutT1Dlk1Og6DaJnXqOj2zeHNgWDpLXZrnTGS3wdQhA==","signatures":[{"sig":"MEYCIQDMwxwtbb0d/YMGsA/ubISmInEkjW/QmecY4M1/zIBmzAIhAIR6JqMFmoZ6EgZUpFDwsoWr1G3AXNbdBriJ3w7qbMe7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17176},"main":"drax.js","gitHead":"aac036f71fad462ffd8ae705b8df7e02e1bfc389","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"roberto.conterosito","email":"roberto.conterosito@applica.guru"},"repository":{"url":"git+ssh://git@bitbucket.org/applicaguru/drax-sdk-js.git","type":"git"},"_npmVersion":"6.14.6","description":"This pakage this package allows interfacing to the Drax IoT platform (https://draxcloud.com/) To use this plugin you need to create a project on the platform. After project creation you must use API_KEY and API_SECRET of project to:  - publish state on no","directories":{"example":"example"},"_nodeVersion":"10.22.1","dependencies":{"axios":"^0.27.2","xmlrpc":"^1.3.2","amqplib":"^0.9.0","underscore":"^1.13.3","@applica-software-guru/drax-ecdh":"^1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/drax-sdk_1.0.3_1704991742271_0.6858067794836575","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@applica-software-guru/drax-sdk","version":"1.0.4","keywords":["drax","sdk","iot","platform","applica"],"author":{"name":"Giuseppe Disimino"},"license":"ISC","_id":"@applica-software-guru/drax-sdk@1.0.4","maintainers":[{"name":"mcolucci_applica","email":"marco.colucci@applica.guru"},{"name":"roberto.conterosito","email":"roberto.conterosito@applica.guru"},{"name":"bruno.fortunato","email":"bruno.fortunato@applica.guru"}],"homepage":"http://git clone git@bitbucket.org:applicaguru/drax-sdk-js#readme","bugs":{"url":"https://github.com/applica-of-things/drax-sdk/issues"},"dist":{"shasum":"efaaa853b8a920459e1f5fbc74030121b5a63dec","tarball":"https://registry.npmjs.org/@applica-software-guru/drax-sdk/-/drax-sdk-1.0.4.tgz","fileCount":12,"integrity":"sha512-PNZhN9xm7xAYAbY+JVXgO0N1uXQ/u7ei+OTIeXT1rrQMbRkZZ81THSM60N+wJYy+a7hVlPowgjDIR5NermkFTw==","signatures":[{"sig":"MEUCIHluvwEePeMiXEjeNjNT4QrUsBBT4hKEuBOika5QQkHrAiEAm57KFNE/Rf1TfwpJEdqyjYu+2QVzLdeK3pOb4ZE2zgk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17199},"main":"drax.js","gitHead":"856353e03a6ec94a1c19e4a99c8256d21d013e46","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"roberto.conterosito","email":"roberto.conterosito@applica.guru"},"repository":{"url":"git+ssh://git@bitbucket.org/applicaguru/drax-sdk-js.git","type":"git"},"_npmVersion":"6.14.6","description":"This pakage this package allows interfacing to the Drax IoT platform (https://draxcloud.com/) To use this plugin you need to create a project on the platform. After project creation you must use API_KEY and API_SECRET of project to:  - publish state on no","directories":{"example":"example"},"_nodeVersion":"10.22.1","dependencies":{"axios":"^0.27.2","xmlrpc":"^1.3.2","amqplib":"^0.9.0","underscore":"^1.13.3","@applica-software-guru/drax-ecdh":"^1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/drax-sdk_1.0.4_1705047633354_0.5261310942970874","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@applica-software-guru/drax-sdk","version":"1.0.5","keywords":["drax","sdk","iot","platform","applica"],"author":{"name":"Giuseppe Disimino"},"license":"ISC","_id":"@applica-software-guru/drax-sdk@1.0.5","maintainers":[{"name":"mcolucci_applica","email":"marco.colucci@applica.guru"},{"name":"roberto.conterosito","email":"roberto.conterosito@applica.guru"},{"name":"bruno.fortunato","email":"bruno.fortunato@applica.guru"}],"homepage":"http://git clone git@bitbucket.org:applicaguru/drax-sdk-js#readme","bugs":{"url":"https://github.com/applica-of-things/drax-sdk/issues"},"dist":{"shasum":"2db71ce4276f209091f8aabfac553bc5d1400f51","tarball":"https://registry.npmjs.org/@applica-software-guru/drax-sdk/-/drax-sdk-1.0.5.tgz","fileCount":12,"integrity":"sha512-9f3dRJt2nx1cuLfFdH1DYmGsD1BOKwOV+rMv78W/ww6V1JpR55HspazDt18h34QbNbkY8QuCKwJgAfbEDJZ7Hg==","signatures":[{"sig":"MEUCIDYUmAgk0RojLQjUo4GUJCR3qFFy0luT4mqLt3Rylsq+AiEArpAVpOmB50gFx3lZMmkilb8r0+bbnBdxbdk47Q/bOos=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17295},"main":"drax.js","gitHead":"bfb133a63f722d24e27a911c7189fe8276972ca1","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"roberto.conterosito","email":"roberto.conterosito@applica.guru"},"repository":{"url":"git+ssh://git@bitbucket.org/applicaguru/drax-sdk-js.git","type":"git"},"_npmVersion":"6.14.6","description":"This pakage this package allows interfacing to the Drax IoT platform (https://draxcloud.com/) To use this plugin you need to create a project on the platform. After project creation you must use API_KEY and API_SECRET of project to:  - publish state on no","directories":{"example":"example"},"_nodeVersion":"10.22.1","dependencies":{"axios":"^0.27.2","xmlrpc":"^1.3.2","amqplib":"^0.9.0","underscore":"^1.13.3","@applica-software-guru/drax-ecdh":"^1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/drax-sdk_1.0.5_1705047890521_0.7642320475430944","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@applica-software-guru/drax-sdk","version":"1.0.6","keywords":["drax","sdk","iot","platform","applica"],"author":{"name":"Giuseppe Disimino"},"license":"ISC","_id":"@applica-software-guru/drax-sdk@1.0.6","homepage":"http://git clone git@bitbucket.org:applicaguru/drax-sdk-js#readme","bugs":{"url":"https://github.com/applica-of-things/drax-sdk/issues"},"dist":{"shasum":"25040437da12aec0923ec7b8851f73b1d106093d","tarball":"https://registry.npmjs.org/@applica-software-guru/drax-sdk/-/drax-sdk-1.0.6.tgz","fileCount":12,"integrity":"sha512-SLyBE5AsjcBmB3jR6n7y+bDIDt2LqloT+xRa/m+7bMj3iKL7n5T5xYoTqgEiCdzNnnVfle8XP52+gJ101MmQTg==","signatures":[{"sig":"MEUCIQCqdXxyER4OCp+8DKXGZaONbcuyhNxfLRTy+0wueq+X7AIgBCdVpJJ/E6kIcg9rdXQdGuI50n4D0vBxv5ReJ8cZyQk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17376},"main":"drax.js","gitHead":"2f39b57966a3d930af4e42ed2ecbfe4a037b19aa","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"roberto.conterosito","email":"roberto.conterosito@applica.guru"},"repository":{"url":"git+ssh://git@bitbucket.org/applicaguru/drax-sdk-js.git","type":"git"},"_npmVersion":"6.14.6","description":"This pakage this package allows interfacing to the Drax IoT platform (https://draxcloud.com/) To use this plugin you need to create a project on the platform. After project creation you must use API_KEY and API_SECRET of project to:  - publish state on no","directories":{"example":"example"},"_nodeVersion":"10.22.1","dependencies":{"axios":"^0.27.2","xmlrpc":"^1.3.2","amqplib":"^0.9.0","underscore":"^1.13.3","@applica-software-guru/drax-ecdh":"^1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/drax-sdk_1.0.6_1719833676308_0.2500936037321351","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-01-11T15:07:31.787Z","modified":"2025-03-05T08:36:42.089Z","1.0.2":"2024-01-11T15:07:32.062Z","1.0.3":"2024-01-11T16:49:02.413Z","1.0.4":"2024-01-12T08:20:33.510Z","1.0.5":"2024-01-12T08:24:50.685Z","1.0.6":"2024-07-01T11:34:36.433Z"},"bugs":{"url":"https://github.com/applica-of-things/drax-sdk/issues"},"author":{"name":"Giuseppe Disimino"},"license":"ISC","homepage":"http://git clone git@bitbucket.org:applicaguru/drax-sdk-js#readme","keywords":["drax","sdk","iot","platform","applica"],"repository":{"url":"git+ssh://git@bitbucket.org/applicaguru/drax-sdk-js.git","type":"git"},"description":"This pakage this package allows interfacing to the Drax IoT platform (https://draxcloud.com/) To use this plugin you need to create a project on the platform. After project creation you must use API_KEY and API_SECRET of project to:  - publish state on no","maintainers":[{"email":"giuseppe.disimino@applica.guru","name":"giuseppe.disimino"},{"email":"bruno.fortunato@applica.guru","name":"bruno.fortunato"},{"email":"roberto.conterosito@applica.guru","name":"roberto.conterosito"},{"email":"marco.colucci@applica.guru","name":"mcolucci_applica"},{"email":"giovanni.petrosino@applica.guru","name":"giopetro.applica"}],"readme":"# drax-sdk\n\nThis package allows interfacing to the Drax IoT platform (https://draxcloud.com/)\nTo use this plugin you need to create a project on the platform. After project creation you must use API_KEY and API_SECRET of project to:\n\n- publish state on node;\n- listen the node configuration;\n\n### Installation\n\nTo install the package you need to run the following command:\n\n`$ npm install @applica-software-guru/drax-sdk`\n\n### Usage\n\nBefore use methods of sdk you need to do create a configuration file (config.json) with this structure:\n\n```javascript\n{\n    \"draxPublicKey\": \"DRAX_PUB_KEY\",\n    \"project\":{\n        \"id\": \"PROJECT_ID\",\n        \"apiKey\": \"PROJECT_API_KEY\",\n        \"apiSecret\": \"PROJECT_API_SECRET\"\n    },\n    \"keys\": [\n        {\n            \"nodeId\": \"NODE_ID\",\n            \"privateKey\": \"NODE_PRIVATE_KEY\"\n            \"publicKey\": \"NODE_PUBLIC_KEY\"\n        }\n\n    ]\n}\n```\n\nDRAX_PUB_KEY is the cloud public key for ECDH algorithm. Default is:\n\"bb099d6dce1a953c7c5d2380815ee02ea191b39206000000ceefb3c222b480459556ce440379cef89db0ccfc04000000\"\nPROJECT_ID, PROJECT_API_KEY, PROJECT_API_SECRET is the id of project you get after Project creation on Drax.\n\"keys\" is an array of private keys associated with nodes created on drax. After node creation, Drax return NODE_PUBLIC_KEY and NODE_PRIVATE_KEY. It needs to be stored in a Keystore.\n\n#### Example\n\n```javascript\nconst { Drax } = require(\"@applica-software-guru/drax-sdk\");\nconst { Keystore } = require(\"@applica-software-guru/drax-sdk/keystore\");\nconst config = require(\"./config.json\");\nconst { HTSensor } = require(\"./listeners/htsensor\");\nconst { Rele } = require(\"./listeners/rele\");\nconst { Trv } = require(\"./listeners/trv\");\nnew Keystore().instance().addConfig(config);\n\nvar params = {\n  host: null,\n  port: null,\n  vhost: null,\n  config,\n};\n\nvar trv = new Trv();\nvar rele = new Rele();\nvar htsensor = new HTSensor();\n\nvar listeners = [trv, rele, htsensor];\n\nvar drax = new Drax(params);\ndrax\n  .start()\n  .then(() => {\n    var state = { dato: \"Hello World!\" };\n    drax.setState(3393, \"homematicip:gateway:test\", state, false);\n\n    drax.addConfigurationListener(\"configurations/homematicip\", listeners);\n  })\n  .catch((e) => {});\n```\n\nTo create Drax object you need to load the correct parameters. The properties of the parameters are the following:\n\n| Parameter |          Description          |              Default |\n| :-------- | :---------------------------: | -------------------: |\n| host      | Is the address of AMQP broker | amqp://35.205.187.28 |\n| port      |      Port of AMQP broker      |                 5672 |\n| vhost     |     vhost of AMQP broker      |                  \"/\" |\n| config    |      configuration file       |                      |\n\n### Future improvements\n\nThe next release would have setConfiguration and StateLister.\n","readmeFilename":"README.md"}