{"_id":"@cgjgh/node-red-contrib-phidget22","_rev":"3-a28c022ff31f52504caea34ce800b5bb","name":"@cgjgh/node-red-contrib-phidget22","dist-tags":{"latest":"2.0.4"},"versions":{"2.0.2":{"name":"@cgjgh/node-red-contrib-phidget22","version":"2.0.2","keywords":["node-red","phidgets"],"author":{"name":"Michael Paradis"},"license":"MIT","_id":"@cgjgh/node-red-contrib-phidget22@2.0.2","maintainers":[{"name":"cgjgh","email":"cgjgh36926@gmail.com"}],"contributors":[{"name":"Kathy Camenzind"}],"dist":{"shasum":"9a561813f25d9f7613479be79aba13a96c8565f7","tarball":"https://registry.npmjs.org/@cgjgh/node-red-contrib-phidget22/-/node-red-contrib-phidget22-2.0.2.tgz","fileCount":37,"integrity":"sha512-EfXn6BDCcpUeynkS6gf/lhS6h71iYjyV29gIz2bHVrBMrWwUCyWpXROjaA9aaO2oyioDz7qYccotLlWMuuwdcw==","signatures":[{"sig":"MEUCIC2EwQzO8SbQCvLRE5djrhK03xMmdERTOm1CsPY/lWFMAiEAlpEwee0firEq80uLKaf8rzy2kutEhy8c99pofDuXSfs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":189132},"gitHead":"62be4a1ea0470a06f10dd11c1e5faa2df43dcb9d","scripts":{"build":"tsc --skipLibCheck && cpx './src/*.html' ./dist/ && cpx './static/**/*' ./dist/static/ && cpx './icons/**/*' ./dist/icons/","check":"npx prettier --check ./src/*","clean":"rm -rf ./dist","format":"npx prettier --write ./src/*","prepublish":"npm run check && npm run build"},"_npmUser":{"name":"cgjgh","email":"cgjgh36926@gmail.com"},"node-red":{"nodes":{"phidget22-ir":"./dist/phidget22-ir.js","phidget22-gps":"./dist/phidget22-gps.js","phidget22-hub":"./dist/phidget22-hub.js","phidget22-lcd":"./dist/phidget22-lcd.js","phidget22-rfid":"./dist/phidget22-rfid.js","phidget22-connect":"./dist/phidget22-connect.js","phidget22-dcmotor":"./dist/phidget22-dcmotor.js","phidget22-encoder":"./dist/phidget22-encoder.js","phidget22-rcservo":"./dist/phidget22-rcservo.js","phidget22-spatial":"./dist/phidget22-spatial.js","phidget22-stepper":"./dist/phidget22-stepper.js","phidget22-phsensor":"./dist/phidget22-phsensor.js","phidget22-bldcmotor":"./dist/phidget22-bldcmotor.js","phidget22-gyroscope":"./dist/phidget22-gyroscope.js","phidget22-dictionary":"./dist/phidget22-dictionary.js","phidget22-powerguard":"./dist/phidget22-powerguard.js","phidget22-lightsensor":"./dist/phidget22-lightsensor.js","phidget22-soundsensor":"./dist/phidget22-soundsensor.js","phidget22-currentinput":"./dist/phidget22-currentinput.js","phidget22-digitalinput":"./dist/phidget22-digitalinput.js","phidget22-magnetometer":"./dist/phidget22-magnetometer.js","phidget22-voltageinput":"./dist/phidget22-voltageinput.js","phidget22-accelerometer":"./dist/phidget22-accelerometer.js","phidget22-digitaloutput":"./dist/phidget22-digitaloutput.js","phidget22-voltageoutput":"./dist/phidget22-voltageoutput.js","phidget22-distancesensor":"./dist/phidget22-distancesensor.js","phidget22-humiditysensor":"./dist/phidget22-humiditysensor.js","phidget22-pressuresensor":"./dist/phidget22-pressuresensor.js","phidget22-capacitivetouch":"./dist/phidget22-capacitivetouch.js","phidget22-resistanceinput":"./dist/phidget22-resistanceinput.js","phidget22-frequencycounter":"./dist/phidget22-frequencycounter.js","phidget22-temperaturesensor":"./dist/phidget22-temperaturesensor.js","phidget22-voltageratioinput":"./dist/phidget22-voltageratioinput.js","phidget22-motorpositioncontroller":"./dist/phidget22-motorpositioncontroller.js"}},"_npmVersion":"10.2.4","description":"Provides access to input, output, and sensor channels from Phidgets devices.","directories":{},"_nodeVersion":"20.11.1","dependencies":{"phidget22-net":"^3.17.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"cpx":"^1.5.0","eslint":"^7.32.0","ts-node":"^10.9.1","prettier":"^2.8.7","typescript":"^5.0.4","@types/node":"^12.20.16","@types/node-red":"^1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/node-red-contrib-phidget22_2.0.2_1745699146165_0.005471790907662255","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@cgjgh/node-red-contrib-phidget22","version":"2.0.3","keywords":["node-red","phidgets"],"author":{"name":"Michael Paradis"},"license":"MIT","_id":"@cgjgh/node-red-contrib-phidget22@2.0.3","maintainers":[{"name":"cgjgh","email":"cgjgh36926@gmail.com"}],"contributors":[{"name":"Kathy Camenzind"}],"dist":{"shasum":"55400f9a25ee4662339447cdcf84779d75838553","tarball":"https://registry.npmjs.org/@cgjgh/node-red-contrib-phidget22/-/node-red-contrib-phidget22-2.0.3.tgz","fileCount":73,"integrity":"sha512-HwB+3jfR0P6O8b1LTYhO3tY1O8VTCLio0GIB9r7+r7JqqJy/VXV8O5tVxJBvd7QUD1Nv9Z3I5zS92okciM5wbA==","signatures":[{"sig":"MEUCIQDFjooQUVT6R8HyUtjhoNwaY22WWyLMvrWjhbnUvb5ObQIgHPL/mRaAkbL+gd4VxmFqTYg8lIksgfYmWNEwENPA4xc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1065289},"gitHead":"62be4a1ea0470a06f10dd11c1e5faa2df43dcb9d","scripts":{"build":"tsc --skipLibCheck && copyfiles -u 1 src/**/*.html dist/ && copyfiles static/** dist/static && copyfiles icons/** dist/icons","check":"npx prettier --check ./src/*","clean":"rm -rf ./dist","format":"npx prettier --write ./src/*","prepublish":"npm run check && npm run build"},"_npmUser":{"name":"cgjgh","email":"cgjgh36926@gmail.com"},"node-red":{"nodes":{"phidget22-ir":"./dist/phidget22-ir.js","phidget22-gps":"./dist/phidget22-gps.js","phidget22-hub":"./dist/phidget22-hub.js","phidget22-lcd":"./dist/phidget22-lcd.js","phidget22-rfid":"./dist/phidget22-rfid.js","phidget22-connect":"./dist/phidget22-connect.js","phidget22-dcmotor":"./dist/phidget22-dcmotor.js","phidget22-encoder":"./dist/phidget22-encoder.js","phidget22-rcservo":"./dist/phidget22-rcservo.js","phidget22-spatial":"./dist/phidget22-spatial.js","phidget22-stepper":"./dist/phidget22-stepper.js","phidget22-phsensor":"./dist/phidget22-phsensor.js","phidget22-bldcmotor":"./dist/phidget22-bldcmotor.js","phidget22-gyroscope":"./dist/phidget22-gyroscope.js","phidget22-dictionary":"./dist/phidget22-dictionary.js","phidget22-powerguard":"./dist/phidget22-powerguard.js","phidget22-lightsensor":"./dist/phidget22-lightsensor.js","phidget22-soundsensor":"./dist/phidget22-soundsensor.js","phidget22-currentinput":"./dist/phidget22-currentinput.js","phidget22-digitalinput":"./dist/phidget22-digitalinput.js","phidget22-magnetometer":"./dist/phidget22-magnetometer.js","phidget22-voltageinput":"./dist/phidget22-voltageinput.js","phidget22-accelerometer":"./dist/phidget22-accelerometer.js","phidget22-digitaloutput":"./dist/phidget22-digitaloutput.js","phidget22-voltageoutput":"./dist/phidget22-voltageoutput.js","phidget22-distancesensor":"./dist/phidget22-distancesensor.js","phidget22-humiditysensor":"./dist/phidget22-humiditysensor.js","phidget22-pressuresensor":"./dist/phidget22-pressuresensor.js","phidget22-capacitivetouch":"./dist/phidget22-capacitivetouch.js","phidget22-resistanceinput":"./dist/phidget22-resistanceinput.js","phidget22-frequencycounter":"./dist/phidget22-frequencycounter.js","phidget22-temperaturesensor":"./dist/phidget22-temperaturesensor.js","phidget22-voltageratioinput":"./dist/phidget22-voltageratioinput.js","phidget22-motorpositioncontroller":"./dist/phidget22-motorpositioncontroller.js"}},"_npmVersion":"10.2.4","description":"Provides access to input, output, and sensor channels from Phidgets devices.","directories":{},"_nodeVersion":"20.11.1","dependencies":{"phidget22-net":"^3.17.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.32.0","ts-node":"^10.9.1","prettier":"^2.8.7","copyfiles":"^2.4.1","typescript":"^5.0.4","@types/node":"^12.20.16","@types/node-red":"^1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/node-red-contrib-phidget22_2.0.3_1745718404342_0.6974719984886679","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@cgjgh/node-red-contrib-phidget22","version":"2.0.4","description":"Provides access to input, output, and sensor channels from Phidgets devices.","dependencies":{"phidget22-net":"^3.17.4"},"devDependencies":{"@types/node":"^12.20.16","@types/node-red":"^1.1.1","copyfiles":"^2.4.1","eslint":"^7.32.0","prettier":"^2.8.7","ts-node":"^10.9.1","typescript":"^5.0.4"},"keywords":["node-red","phidgets"],"scripts":{"build":"tsc --skipLibCheck && copyfiles -u 1 src/**/*.html dist/ && copyfiles static/** dist && copyfiles icons/** dist","clean":"rm -rf ./dist","check":"npx prettier --check ./src/*","format":"npx prettier --write ./src/*","prepublish":"npm run check && npm run build"},"author":{"name":"Michael Paradis"},"contributors":[{"name":"Kathy Camenzind"}],"license":"MIT","node-red":{"nodes":{"phidget22-connect":"./dist/phidget22-connect.js","phidget22-accelerometer":"./dist/phidget22-accelerometer.js","phidget22-bldcmotor":"./dist/phidget22-bldcmotor.js","phidget22-capacitivetouch":"./dist/phidget22-capacitivetouch.js","phidget22-currentinput":"./dist/phidget22-currentinput.js","phidget22-dcmotor":"./dist/phidget22-dcmotor.js","phidget22-dictionary":"./dist/phidget22-dictionary.js","phidget22-digitalinput":"./dist/phidget22-digitalinput.js","phidget22-digitaloutput":"./dist/phidget22-digitaloutput.js","phidget22-distancesensor":"./dist/phidget22-distancesensor.js","phidget22-encoder":"./dist/phidget22-encoder.js","phidget22-frequencycounter":"./dist/phidget22-frequencycounter.js","phidget22-gps":"./dist/phidget22-gps.js","phidget22-gyroscope":"./dist/phidget22-gyroscope.js","phidget22-hub":"./dist/phidget22-hub.js","phidget22-humiditysensor":"./dist/phidget22-humiditysensor.js","phidget22-ir":"./dist/phidget22-ir.js","phidget22-lcd":"./dist/phidget22-lcd.js","phidget22-lightsensor":"./dist/phidget22-lightsensor.js","phidget22-magnetometer":"./dist/phidget22-magnetometer.js","phidget22-motorpositioncontroller":"./dist/phidget22-motorpositioncontroller.js","phidget22-phsensor":"./dist/phidget22-phsensor.js","phidget22-powerguard":"./dist/phidget22-powerguard.js","phidget22-pressuresensor":"./dist/phidget22-pressuresensor.js","phidget22-rcservo":"./dist/phidget22-rcservo.js","phidget22-resistanceinput":"./dist/phidget22-resistanceinput.js","phidget22-rfid":"./dist/phidget22-rfid.js","phidget22-soundsensor":"./dist/phidget22-soundsensor.js","phidget22-spatial":"./dist/phidget22-spatial.js","phidget22-stepper":"./dist/phidget22-stepper.js","phidget22-temperaturesensor":"./dist/phidget22-temperaturesensor.js","phidget22-voltageinput":"./dist/phidget22-voltageinput.js","phidget22-voltageoutput":"./dist/phidget22-voltageoutput.js","phidget22-voltageratioinput":"./dist/phidget22-voltageratioinput.js"}},"publishConfig":{"access":"public"},"_id":"@cgjgh/node-red-contrib-phidget22@2.0.4","gitHead":"62be4a1ea0470a06f10dd11c1e5faa2df43dcb9d","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-wK4t246dmOCFHhN5GizWqoprAAtwdqj0KWmlLhH0kUG8K8qJO4r1EaoYkLRUqAd+AqZG3pcDBez1kHtiAM3OdA==","shasum":"abf1d0be62972b3ed3326905274a60b9261666ab","tarball":"https://registry.npmjs.org/@cgjgh/node-red-contrib-phidget22/-/node-red-contrib-phidget22-2.0.4.tgz","fileCount":73,"unpackedSize":1065276,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCUA/iKizvTX87m8ODFMP5yZU9S+pDaaPc03R52mCVnEgIhAKDPSqHuAS/DfR/xsbuYD9F3qhFnmPLAFr6R4qMUUG7D"}]},"_npmUser":{"name":"cgjgh","email":"cgjgh36926@gmail.com"},"directories":{},"maintainers":[{"name":"cgjgh","email":"cgjgh36926@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-red-contrib-phidget22_2.0.4_1745789462952_0.8711200119357381"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-26T20:25:46.041Z","modified":"2025-04-27T21:31:03.431Z","2.0.2":"2025-04-26T20:25:46.341Z","2.0.3":"2025-04-27T01:46:44.556Z","2.0.4":"2025-04-27T21:31:03.246Z"},"author":{"name":"Michael Paradis"},"license":"MIT","keywords":["node-red","phidgets"],"description":"Provides access to input, output, and sensor channels from Phidgets devices.","contributors":[{"name":"Kathy Camenzind"}],"maintainers":[{"name":"cgjgh","email":"cgjgh36926@gmail.com"}],"readme":"## Synopsis\r\n\r\nThis module will provide Node-RED access to Phidgets devices and controllers. Since this module uses the Phidget22 JavaScript libraries, you should use the [JavaScript API documentation](https://www.phidgets.com/?view=api&lang=JavaScript) to determine the names of methods, events and variables. Node-RED is not currently an officially supported IDE for Phidget22, although this module is managed by Phidgets Inc. employees. If you have any questions, bug reports, or recommendations for this module, please send them to mparadis@phidgets.com.\r\n\r\n## Start Network Server and Connect\r\n\r\nThe JavaScript version of the Phidget22 libraries only runs over the network, so you'll need to start an instance of the Phidget Network Server either on the same computer you're using Node-RED on, or another computer in the same network. In Windows and macOS, you can start the Network Server through the Phidget Control Panel, and in Linux it can be started through the command line. You can find full instructions on the [Network Server Documentation](https://www.phidgets.com/docs/Phidget_Network_Server) page.\r\n\r\nOnce your Phidget Network Server is up and running, you can open your Node-RED flow and use the **connect** node and specify a server hostname and port.\r\n\r\n## Node Configuration\r\n\r\nYou can double-click on a Phidget node to set some of the basic properties such as channel and serial number (-1 for any). You'll also be able to initialize many device-specific properties. If you initialize a property here, but later change it using a method during your flow, it won't change the initial configuration. This means the next time the flow starts, it will still set the property to what you've entered in this configuration pane.\r\n\r\nThe node has no way of knowing what specific Phidget device you'll try to open, so there may be properties in this panel that don't apply to your device. For example, when using the **TemperatureSensor** node with a TMP1000, the **Thermocouple Type** property won't do anything. You can see a complete list of functions, events, and enums supported by your device on the forementioned API page and selecting the device from the drop down menu.\r\n\r\nYou can also enable a debug mode here, which will print messages to the console when functions are successfully called.\r\n\r\n## Methods\r\n\r\nIn order to use a method from the API, you must pass a message into the node with a topic identical to the method name and a payload consisting of a JSON object that contains all parameters with naming that matches the API. For example, to use **setThermocoupleType(thermocoupleType)**, you need to construct a message like so:\r\n\r\n```\r\nmsg = {\r\n    \"topic\": \"setThermocoupleType\",\r\n    \"payload\": {\r\n        \"thermocoupleType\": 2\r\n    }\r\n}\r\n```\r\n\r\nIf theres a typo in the topic name, you'll get an \"Unsupported Message Topic\" error. If there's a typo in one of the variable names, you'll also get an error. You can click on the node ID in the debug window to highlight which node recieved the bad message.\r\n\r\nCurrently, only some of the \"get\" methods have been implemented in this module because for the majority of projects, it is not necessary to poll for properties since you can either get them from events, or you can have your program keep track of the ones you've set yourself. Eventually we plan to add the \"get\" methods to this module for completeness' sake.\r\n\r\n## Events\r\n\r\nWhenever an event triggers, the associated Phidget node will output a message with a topic equal to the event name in the API, and a payload consisting of a JSON object that contains all variables with naming that matches the API. For example, the **AccelerationChange** event for the Accelerometer node would look like this:\r\n\r\n```\r\nmsg = {\r\n    \"topic\": \"AccelerationChange\"\r\n    \"payload\": {\r\n        \"acceleration\": {\r\n            \"0\": 0.0256\r\n            \"1\": 0.001\r\n            \"2\": 1.0117\r\n        }\r\n        \"timestamp\": 62093\r\n    }\r\n```\r\n\r\nAll event handlers in this module are automatically and permanently enabled, so you may want to use a **switch** node to filter the messages by topic.\r\n","readmeFilename":"README.md"}