{"_id":"node-red-contrib-onvif-nodes","_rev":"17-263713ce62c35b4527438402c0c78d1d","name":"node-red-contrib-onvif-nodes","dist-tags":{"beta":"0.0.1-beta.15","latest":"0.0.1-beta.16"},"versions":{"0.0.1-beta.1":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.1","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"0.6.0"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js"}},"_id":"node-red-contrib-onvif-nodes@0.0.1-beta.1","_shasum":"98df35f2903b0d21e8bf6c6784e68c5e985286f0","_resolved":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","scripts":{},"_npmVersion":"3.5.2","_nodeVersion":"8.10.0","_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"dist":{"shasum":"98df35f2903b0d21e8bf6c6784e68c5e985286f0","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.1.tgz","integrity":"sha512-4IlTxTPRZck3uom8OH4pnjPan4dQb+esBXUBziJ9hfnGnD8OG3iWreM6iATG7DPoK4XSSugM450C/Z0ftZ7Ing==","fileCount":40,"unpackedSize":553089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfYXzCRA9TVsSAnZWagAAgWUP/A5moyQB6y9SsqZdwdSJ\nGGydMh4qPMzc+n7cYu8//E5s2R13bWO1FJ+lVmrL0+aOMkjNsrdDJukf/EyN\nw6eFtKGDFaIn0SM988k8showFrfsQl9JsihiGii9CvEh3T6RF6ABDday31tv\n9Vm2UgNofRT3dhf4E+h4RT7Y2YKHaJSo52NgLEzsnVuh5KFwkW8Du0IvGZvo\nF+KQkL1HmRagqdbwtyK1GYjrf+MR7M4nVHU3QDV17staDzfAQyrEIW98Gy2E\noekfA4Sz4o6XFf9o+MPEdIAb+Tw32PNvkWPnPDw/8rPQxXOt26gQYIdIjmdE\nNdRz66clQYkcQldbz/RTYVXxDBJiQwQ3TWlW3m6ljn/WjwnLE5dV7NIKjbmI\nlJnfFVMWwH8Mr28uBFStu3A/M9Xm3BqswAvBfijMFfRnD6AZgsbB3x8h2mDQ\nhTdiPWxMY9+psqpz9rKGy9XLIwxxEA9xBSS8e6HIjXo6Ji6mvKf1N9K8eJX9\n7WkilgEF4wPpV1lWzaoM8ADGevFowvj6NRASfnlh33wK57SHlDJpA09I+e5+\nBXug02EM/BVG20z1AZqPlvzgT+fpyvEL/XrLpsn5ffHoKKT0TfTd9cXZe+FA\njj8hV78l3ZpEnQNArrgEPA5gabxnj5mkAByKjGlv9lRyOftyACqEt8tr+91T\nYD1a\r\n=t27W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD06GFMyj5PvMf8krPDZbBNz79Rp+8q6xiZoVVQKG8bgwIhALRGa1Oonhk45sk7xfmojWjxEZvfOpudZGKhhpNxpnV8"}]},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.1_1551730162410_0.8145089275385671"},"_hasShrinkwrap":false},"0.0.1-beta.2":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.2","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"0.6.0"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION.  API WILL BE CHANGED SOON !!!**\n\n**SEE THIS [DISCUSSION](https://discourse.nodered.org/t/onvif-camera-control/6888) ON THE NODE-RED FORUM FOR LATEST INFORMATION**\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red):\n```\nnpm install node-red-contrib-onvif-nodes\n```\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  \n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).\n   \nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address, which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  In all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/master/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Media node\n\n![Media flow](/images/onvif_media_flow.png)\n\n```\n[{\"id\":\"41130dca.f01204\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"79ca9bc.80f4d64\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":750,\"y\":2960,\"wires\":[[\"a8e34d78.b80c9\"]]},{\"id\":\"a5cf5b1e.255618\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":2960,\"wires\":[[\"9f4118d.cb407e8\"]]},{\"id\":\"cef67b6f.230d58\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":3000,\"wires\":[[\"444cc0c.70f884\"]]},{\"id\":\"444cc0c.70f884\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3000,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"a2d3b4c2.d1ad68\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":3040,\"wires\":[[\"88d83e40.33ec\"]]},{\"id\":\"88d83e40.33ec\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3040,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"77a5cab9.aad1d4\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":3100,\"wires\":[[\"6aedd93c.97b488\"]]},{\"id\":\"6aedd93c.97b488\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3100,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"7d1da405.821bfc\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":3780,\"wires\":[[\"efb276c.20e7388\"]]},{\"id\":\"efb276c.20e7388\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3780,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"1708d2e3.e5610d\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":190,\"y\":3280,\"wires\":[[\"8ecd4b06.a04018\"]]},{\"id\":\"8ecd4b06.a04018\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3280,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"cb4f1589.6a0cd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":3320,\"wires\":[[\"f74d8d50.abc8c\"]]},{\"id\":\"f74d8d50.abc8c\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3320,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"1c0612c3.159d8d\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":190,\"y\":3520,\"wires\":[[\"e7af7b4e.d91b68\"]]},{\"id\":\"e7af7b4e.d91b68\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3520,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"89a8c96a.3c6118\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":190,\"y\":3380,\"wires\":[[\"b552c221.2141f\"]]},{\"id\":\"b552c221.2141f\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3380,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"eccc43f2.12145\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":3420,\"wires\":[[\"c09a13e7.cb21e\"]]},{\"id\":\"c09a13e7.cb21e\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3420,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"cd54693.51e1298\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":3460,\"wires\":[[\"ccd110fd.d5038\"]]},{\"id\":\"ccd110fd.d5038\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3460,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"a8e34d78.b80c9\",\"type\":\"debug\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":940,\"y\":2960,\"wires\":[]},{\"id\":\"57b52e88.1c37f\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":3140,\"wires\":[[\"51327b4b.97ffb4\"]]},{\"id\":\"51327b4b.97ffb4\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3140,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"8807a2f3.6a1a\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":3180,\"wires\":[[\"c00bf744.976818\"]]},{\"id\":\"c00bf744.976818\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3180,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"75b34347.982acc\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":3560,\"wires\":[[\"4abb4b36.f9e624\"]]},{\"id\":\"4abb4b36.f9e624\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3560,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"16f421.30236be\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot URI\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":190,\"y\":3660,\"wires\":[[\"4688f15b.8c7d2\"]]},{\"id\":\"4688f15b.8c7d2\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSnapshotUri\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3660,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"cc4a2484.19f118\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get OSD's\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":160,\"y\":3720,\"wires\":[[\"7ddd1bea.6a9844\"]]},{\"id\":\"7ddd1bea.6a9844\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getOSDs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3720,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"9f4118d.cb407e8\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2960,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"109bb607.4858ca\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":3820,\"wires\":[[\"ab6668f4.8be638\"]]},{\"id\":\"ab6668f4.8be638\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3820,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"f645ee6b.ea2e6\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":3860,\"wires\":[[\"3b575ff6.6f156\"]]},{\"id\":\"3b575ff6.6f156\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_user_profile1\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3860,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"f3564f.1ef0a9b\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":3620,\"wires\":[[\"a5855f9e.ad26a\"]]},{\"id\":\"a5855f9e.ad26a\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSnapshot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3620,\"wires\":[[\"41130dca.f01204\"]]},{\"id\":\"ec4354f1.867598\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":3220,\"wires\":[[\"b883bfc9.250b6\"]]},{\"id\":\"b883bfc9.250b6\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":3220,\"wires\":[[]]},{\"id\":\"79ca9bc.80f4d64\",\"type\":\"onvif_device_config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"Camera keuken\"}]\n```\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's credentials (username/password) should be again specified in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"5756138c.5e3fac\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":890,\"y\":2560,\"wires\":[[\"7346f703.240908\"]]},{\"id\":\"7346f703.240908\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"\",\"stream\":\"\",\"x\":1090,\"y\":2560,\"wires\":[[\"fb09de66.f5ec2\"]]},{\"id\":\"fb09de66.f5ec2\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1270,\"y\":2560,\"wires\":[]}]\n```\n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Snapshot Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing a snapshot image from the camera (as a Buffer).\n\n***TODO screenshot***\n\nThe resolution of the image depends on the **profile** specified in the node's config screen.  For example if value *'1_def_profile2'* is set for my Panasonic camera, the snapshot image will be a JPEG of resolution 640x480.  Indeed in the output of the *Device Node*, the resolution of every available profile will be visible:\n![Snapshot debug](/images/onvif_snapshot_debug.png)\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nCAUTION: Some devices don't offer zooming functionality, which is why they have only PT control.  Currently it is not possible to get the status/configuration from those devices.  See this [issue](https://github.com/agsh/onvif/issues/103) for tracking the status of this problem.\n\n## TODOs\n+ Check why zoom in/out doesn't work on a Panasonic camera.\n+ Implement rtsp streaming.\n+ Implement entire API of [node-onvif](https://github.com/futomi/node-onvif).\n+ Solve authentication errors when flow is (re)deployed.\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.2","_shasum":"34b104a08b991648ec93b9a4df8c91c897d7ee27","_resolved":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","scripts":{},"_npmVersion":"3.5.2","_nodeVersion":"8.10.0","_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"dist":{"shasum":"34b104a08b991648ec93b9a4df8c91c897d7ee27","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.2.tgz","integrity":"sha512-hMnaWhWM9PHW4saWY4/LobmZ+LxU9i7386ugkmkmzszJAFAG0cmAAf8gJupOwRDRkU6dQM0nyKwCuVZF3nDIsg==","fileCount":43,"unpackedSize":633505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfiKvCRA9TVsSAnZWagAA7O8P/jP86OhJroCWJfe7Zmcp\n4TzSILzvqonK7LX0ijEWLvhdRvtnKPA1PHjLUYi5z+rA86b/kXqVn8TBcZ5L\n9Ql8n1YwrQXkPwKJZHHtEzilFE9/yA/oFmnFhoMhBoFVxYQHfYjssXNw6Wwl\ndD/S1DmGIfW0bv1UqM+IGluYG0EU/euNqqfO18nHZaG0zed/WJ1RtCIWSV8n\nVlIPfJsVDQIDKLfoXtkf6BpdhwVtGk9pO439EE9R1KMYdZ/r2PVgs50Z29rJ\nkPaCY/lnM/n1f23NzVMZ5NYEOBr60Wq+eEnUi3akXcV9okZwtl0um45w/n0i\nYog/EcDVuyeVqDQ2HozzO7JDWsluAZku2olNiag1m/QZoBqwpZ0idcfnvY+/\nyXoKd7bx7ZDkYKfCAp7X2fa3Tp898MG5WRHszj0oJJVdojT1a9yr20xoBaNq\nB314PtkH/ONcUfpyeLLp4nC/HKNqkOqJc2Tatyyh1jZ13KOo7dYX5+EIve5s\nlCEoPLPjp4sW6MsUzdXJ2WLdi4eX/0TABT1epN6BM/EKWhlLvU/05fn//sJu\njgO8t2vBitxdhZHNGGMXcUWVn0RZijTEesyFvoGmsvwOorfCIl2GI86IYG9o\nLy4xQOXV3uK8FQPqEQeGbYF9pfS4JwLgYPf42qXJ9l9UGTBbnYTlX8S1g3is\n0qbq\r\n=0wYU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9PFZw5jJ6+5F6s75b3jUhSdjJdOoXFUo8FFokns5TtAIhAPiJXhjx3ronzI71ao/LUCigcGMwDi+9XwLZnAVlncKs"}]},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.2_1551770286754_0.012384045256736531"},"_hasShrinkwrap":false},"0.0.1-beta.3":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.3","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"0.6.0"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION.  API WILL BE CHANGED SOON !!!**\n\n**SEE THIS [DISCUSSION](https://discourse.nodered.org/t/onvif-camera-control/6888) ON THE NODE-RED FORUM FOR LATEST INFORMATION**\n\n***TODO: Discuss which error should be visualised in the node status...***\n\n***TODO: Check whether the credentials are safe within config node (in cam instance), or can all nodes access them??***\n\n***TODO: Discuss how we can have user friendly config screens, to get a usable set of nodes (without needing great tools like ONVIF Device Manager.***\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red):\n```\nnpm install node-red-contrib-onvif-nodes\n```\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  \n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).\n   \nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address, which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device.  When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nInstead of specifying the required information (resolution ...) every time, that information will be specified in a profile.  Afterwards you only have to specify the profile name.\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Snasphot images\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's credentials (username/password) should be again specified in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"5756138c.5e3fac\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":890,\"y\":2560,\"wires\":[[\"7346f703.240908\"]]},{\"id\":\"7346f703.240908\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"\",\"stream\":\"\",\"x\":1090,\"y\":2560,\"wires\":[[\"fb09de66.f5ec2\"]]},{\"id\":\"fb09de66.f5ec2\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1270,\"y\":2560,\"wires\":[]}]\n```\n\nThe resolution of the image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node (NOT FUNCTIONAL YET !!!)\nThis node allows to listen to all the events registered by the device.  The node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives:\n\n![Events flow](/images/onvif_events.png)\n\n```\n[{\"id\":\"7ea5e0c3.4d741\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":910,\"y\":860,\"wires\":[[\"378b6778.87ee38\"]]},{\"id\":\"378b6778.87ee38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":860,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"e7a5c111.16471\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":910,\"y\":900,\"wires\":[[\"1830bf3.8165041\"]]},{\"id\":\"1830bf3.8165041\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":900,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"b0958785.83ca18\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":1580,\"y\":860,\"wires\":[]},{\"id\":\"82df60a3.e2b02\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":930,\"y\":940,\"wires\":[[\"cd2a67b4.251db8\"]]},{\"id\":\"cd2a67b4.251db8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":940,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"9b6039a9.8ed2a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":960,\"y\":980,\"wires\":[[\"fad5135e.3a95\"]]},{\"id\":\"fad5135e.3a95\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":980,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"9199d036.ef115\",\"type\":\"onvif-events\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":1410,\"y\":860,\"wires\":[[\"b0958785.83ca18\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n***TODO: Get event service capabilities results in \"method not found\" ***\n\n***TODO: Start listening aborts the entire flow with error: You should create pull-point subscription first! (see https://github.com/agsh/onvif/issues/76)***\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.3","_shasum":"8f93d2d76799ffb91fafc06b358c8363affa1df2","_resolved":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","scripts":{},"_npmVersion":"3.5.2","_nodeVersion":"8.10.0","_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"dist":{"shasum":"8f93d2d76799ffb91fafc06b358c8363affa1df2","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.3.tgz","integrity":"sha512-fm4tah2foyMwQ2OZUPCrTBu/CnUlML2mIOwVBtiava9EOzX/RIwUlsy0cNhQiNDh9fEV2KcCXIgMra/Zm/qOsw==","fileCount":50,"unpackedSize":760632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchaCsCRA9TVsSAnZWagAA3HUQAIwmV70jSwrQCjf4OAFp\nTF7OpFnVTzk17UCWoti8QXPgCWhDM/7qlAXHr9BJ1O3r5K6KE0WhTR+K2uve\nlYhKlRDmdtlhesZZlMu7FDxZVpmJXuCitKN2oLl6hc99E5A/1qO2wjocTW5a\nNVYOaaygNSrpH+SWjNkyzowx0hADG7+oMja3iW2b8dJxvAvsIVxmIROnq6pb\nYPKspwHmN63mACXznsdbJyFD5/MkU2+OboaXd8obJNk82kUE1I3OSRY1zc+5\n4VPcJS5t0qyqWE3+zAbG+BnCvQU69lc72M2wFFA/nE60c1KGYl68zbUM4K8J\nuwn396i9xk+DK+lA8uNBCkTLT3NMEKQP969UjoQlE50AtE9WDmBGL4ze06C0\nwJCX0U1J7fzA1VM3jUdHqMNPz5CxBN8PDNhw0ZX51sNfAnS+1W9NaJSUkzyl\n9Uu90CTcXvIVXWAtROU7IGmNvvYFS30OzS4JrD2BM89L5c7jhM334sIJlhMQ\nqRqTvhbW6D7UEh18zMyTONEVGTmz9oSAMXSa6DwbYYbri9wRnv9F5khiqfvS\nNgNS+sxDq14CzkK+zgmwRHjU6IQdrMcO4I0rQJAaw7XUIM4cw1c38RpSN8Ve\nyZNaPwJfPpKFDLd+it3ZD15Jza5wl91KvhED/7aj2j9AC2kEvU/p89/pRLtf\nDcWx\r\n=uHAd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDx4mLHWoqkc74qGr9fweLTmyWQn76QF5VCxLFB1IkDSAiBsrXgP+52YSwydqCTLwMjPeNvl2RAX680NoAq0zkQXOA=="}]},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.3_1552261291314_0.4400913883452384"},"_hasShrinkwrap":false},"0.0.1-beta.4":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.4","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"0.6.0"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION.  API WILL BE CHANGED SOON !!!**\n\n**SEE THIS [DISCUSSION](https://discourse.nodered.org/t/onvif-camera-control/6888) ON THE NODE-RED FORUM FOR LATEST INFORMATION**\n\n***TODO: Discuss which error should be visualised in the node status...***\n\n***TODO: Check whether the credentials are safe within config node (in cam instance), or can all nodes access them??***\n\n***TODO: Discuss how we can have user friendly config screens, to get a usable set of nodes (without needing great tools like ONVIF Device Manager.***\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red):\n```\nnpm install node-red-contrib-onvif-nodes\n```\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\n\nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address, which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device:\n+ IP address: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nInstead of specifying the required information (resolution ...) every time, that information will be specified in a profile.  Afterwards you only have to specify the profile name.\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Snasphot images\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's credentials (username/password) should be again specified in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"5756138c.5e3fac\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":890,\"y\":2560,\"wires\":[[\"7346f703.240908\"]]},{\"id\":\"7346f703.240908\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"\",\"stream\":\"\",\"x\":1090,\"y\":2560,\"wires\":[[\"fb09de66.f5ec2\"]]},{\"id\":\"fb09de66.f5ec2\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1270,\"y\":2560,\"wires\":[]}]\n```\n\nThe resolution of the image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node (NOT FUNCTIONAL YET !!!)\nThis node allows to listen to all the events registered by the device.  The node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives:\n\n![Events flow](/images/onvif_events.png)\n\n```\n[{\"id\":\"7ea5e0c3.4d741\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":910,\"y\":860,\"wires\":[[\"378b6778.87ee38\"]]},{\"id\":\"378b6778.87ee38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":860,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"e7a5c111.16471\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":910,\"y\":900,\"wires\":[[\"1830bf3.8165041\"]]},{\"id\":\"1830bf3.8165041\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":900,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"b0958785.83ca18\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":1580,\"y\":860,\"wires\":[]},{\"id\":\"82df60a3.e2b02\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":930,\"y\":940,\"wires\":[[\"cd2a67b4.251db8\"]]},{\"id\":\"cd2a67b4.251db8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":940,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"9b6039a9.8ed2a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":960,\"y\":980,\"wires\":[[\"fad5135e.3a95\"]]},{\"id\":\"fad5135e.3a95\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":980,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"9199d036.ef115\",\"type\":\"onvif-events\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":1410,\"y\":860,\"wires\":[[\"b0958785.83ca18\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n***TODO: Get event service capabilities results in \"method not found\" ***\n\n***TODO: Start listening aborts the entire flow with error: You should create pull-point subscription first! (see https://github.com/agsh/onvif/issues/76)***\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.4","_shasum":"edb924782d84c4842482cde163021028e18d55f0","_resolved":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","scripts":{},"_npmVersion":"3.5.2","_nodeVersion":"8.10.0","_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"dist":{"shasum":"edb924782d84c4842482cde163021028e18d55f0","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.4.tgz","integrity":"sha512-eIghrXhBKJAz1UsXYKW5AqCX1cdfrOFBZrE45Tf84cHUJhDW59L4XPqxujL20f1DaggtHgTuiWl9QTxPeQrlhg==","fileCount":50,"unpackedSize":761556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcht9pCRA9TVsSAnZWagAASlMP/jzsoTc7pBt5BjQU9Yjg\n/zTJH4bFMQJdYxOOjdAWsMflB7kPJLGQ8Lnr5GFyV49TZK9BJ5NMH3NKTWtw\nDeCmNIrRhgDYR9EMt5y/wyQXNOyKZYbHIvu2zvx8vInypw4S6n35vvnmg3Ln\neFB2apN8ZW+F4h23teAi2GCsFtWa6RH45z6+DqMs2+BvhXwGTwIiXCFt7wN0\nMXjAWXVanwJ8093zGdXWkbyFwlBzkj78rwKdxKyiJ5mm8iahnTpfwvPNW1Sk\nUzLWGlw+xrnXRz7B0EtibzNS7J+5VW/jRgcfOCCLayJlgZUrxvm98UBx70zz\nLt/Dbnb4/n3UhENIIh7J2025KmIrfKMRz5n+b01tWagpnzAKqEP1w346Z0yB\nCOKCFs2xu3XgpvSDl94XnfL2qx4gCWOiPbLXGZFehi5+lG71rfbGasEvsQkV\nr1gVBWCkt3n3h9qqPXai4D+zNNx7OvMmM3drMtOdsoAMU0aU7OweansuY+fu\ncpj9xE6oJyBXyjj+qi7oNS4WXuDQglV3rPfZT5SmAsGw6PzVJM52H3rwn4cj\nZYeLoCYjlWmrKI7TadnWiBlA2UZksMtYkVH1d8qcZydcR1di8d3xN+W1zIYV\n1OfDjoCQUMerKAEOn7jnKfSk+NG1azuw0Fuoy8tyLNEsVd1ClxOqHhhYhijs\nC6jZ\r\n=V3ld\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWe2qujeHt4IknT9nU4mYsHX6pjBIxDMOYdtzuKwsErAiEA3K0bwVHCV3Oka6eREo8vuslA7KqC99C1i+v6ffVLpeo="}]},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.4_1552342888783_0.4517088192164711"},"_hasShrinkwrap":false},"0.0.1-beta.5":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.5","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"0.6.0"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION.  API WILL BE CHANGED SOON !!!**\n\n**SEE THIS [DISCUSSION](https://discourse.nodered.org/t/onvif-camera-control/6888) ON THE NODE-RED FORUM FOR LATEST INFORMATION**\n\n***TODO: Discuss which error should be visualised in the node status...***\n\n***TODO: Check whether the credentials are safe within config node (in cam instance), or can all nodes access them??***\n\n***TODO: Discuss how we can have user friendly config screens, to get a usable set of nodes (without needing great tools like ONVIF Device Manager.***\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red):\n```\nnpm install node-red-contrib-onvif-nodes\n```\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\n\nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address, which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device:\n+ IP address: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nEvery Onvif device will contain a series of default media profiles.  Every profile contains following data:\n+ A unique name.\n+ A unique token which will only be used internally by these Onvif nodes (based on the name, the nodes will lookup the token automatically).\n+ The configuration for all available media services (audio, video, ptz ...). \n\nFor example the *'getProfiles'* action (in the example flow below) will return all available media profiles in my Onvif device:\n\n![Get media profiles](/images/onvif_get_profiles.png)\n\nWhen having a look e.g. at the details of the video encoding configuration, you will see a JPEG of resultion 320x240:\n\n![Example profile](/images/onvif_example_profile.png)\n\nSuch a profile names need to be specified for most media actions.  So instead of having to repeat the information over and over again, the Onvif device will use the information from the specified profile.  For example when a snapshot as JPEG with resolution 320x240 is needed, you only need to specify the profile name *'JPEG_320x240'* ...\n\nFollowing example flow shows how to view and manipulate profiles:\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n***TODO: Not possible yet to create an entire new profile, incl. configurations.***\n\n### Snapshot images\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's credentials (username/password) should be again specified in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"5756138c.5e3fac\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":890,\"y\":2560,\"wires\":[[\"7346f703.240908\"]]},{\"id\":\"7346f703.240908\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"\",\"stream\":\"\",\"x\":1090,\"y\":2560,\"wires\":[[\"fb09de66.f5ec2\"]]},{\"id\":\"fb09de66.f5ec2\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1270,\"y\":2560,\"wires\":[]}]\n```\n\nThe resolution of the image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node (NOT FUNCTIONAL YET !!!)\nThis node allows to listen to all the events registered by the device.  The node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives:\n\n![Events flow](/images/onvif_events.png)\n\n```\n[{\"id\":\"7ea5e0c3.4d741\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":910,\"y\":860,\"wires\":[[\"378b6778.87ee38\"]]},{\"id\":\"378b6778.87ee38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":860,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"e7a5c111.16471\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":910,\"y\":900,\"wires\":[[\"1830bf3.8165041\"]]},{\"id\":\"1830bf3.8165041\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":900,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"b0958785.83ca18\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":1580,\"y\":860,\"wires\":[]},{\"id\":\"82df60a3.e2b02\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":930,\"y\":940,\"wires\":[[\"cd2a67b4.251db8\"]]},{\"id\":\"cd2a67b4.251db8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":940,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"9b6039a9.8ed2a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":960,\"y\":980,\"wires\":[[\"fad5135e.3a95\"]]},{\"id\":\"fad5135e.3a95\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":980,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"9199d036.ef115\",\"type\":\"onvif-events\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":1410,\"y\":860,\"wires\":[[\"b0958785.83ca18\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n***TODO: Get event service capabilities results in \"method not found\" ***\n\n***TODO: Start listening aborts the entire flow with error: You should create pull-point subscription first! (see https://github.com/agsh/onvif/issues/76)***\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.5","_shasum":"b1539eca0ba574be3321d0f3ec1efd3aefcda50b","_resolved":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","scripts":{},"_npmVersion":"3.5.2","_nodeVersion":"8.10.0","_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"dist":{"shasum":"b1539eca0ba574be3321d0f3ec1efd3aefcda50b","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.5.tgz","integrity":"sha512-nHCmLGOZsJFHBS7uHv6s+GCouvXi1cI+vXHvbES7X5U0U6JTeKHdCYJ7x4yFdd4DvWSvq+B4pPDCgemdWlvu9Q==","fileCount":52,"unpackedSize":807475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciCL0CRA9TVsSAnZWagAAaYAP/iSwsfm1ziyZbg++Sscs\nhb+j0a8kURXr4oBGd5peWr8PIbJkuCxlxaDEd/4FuXco5lcYwb0tyCMm1H5o\nu2/yI1XqwqyMBlihOPcFA+u7paw1+PYhSFW848ONLxvIJeeu5Wuk1IEclqtX\nCcwsdS1yepXvJr3Z4ssBfD9tskemzBzug4xkQ3OIfFRJNu0znlXlabRa4cuO\nWYHd+/8FFZjx8++z/8cSFgSm7pztWFWb7fCJyJZ0Y0aAfu+LX9CmaS2UPj6T\nyG5jZu17lVO083RpIS6QHDqWzr7waMZcnmTJ+DfVOTZj3BDkJS5J2Q1+k9wq\nqKsQCfKuzzvFiyzgl6xNoELaGJMQUcejd6Gc6HRa0K4kQ0TeqvWlMGUt4/2+\nW1IMhIV3n/h1XU9wlBLszHX0G2pq+iAi/bCmuPFDCHCmKMhzFrniikUr+aFP\nCcdCRbrj8BmQCiTsBQo6QIdodQm5J3Oyp/vY/Z08q50h66om1ZnDxI4PcCCf\npMid653TsDxSOdjXDcZoxKNh3llZaoQuE2JN25E8l+X39tILVJxPOGbkEGUX\nx5gPl8fsk/V5ErdKEZpRm7RfaIsqfUyPpWbsCNIHCc0Tlcn9Ny1ygTPyI1xp\ntkh3P+QgdPfGMLJIm/sYkiCpJN6kYVEYsqp/v430WAfQ/mdULedsHsRSeBoc\nyWLl\r\n=Fso6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRNbrVsgTLg7iwiI2LTneB0WYw3AQv5OhBmOTqTiz8ZwIhAMjWT850Jt4dWQu4vNl4+jNcoOykRhbF2IAsU4vKN2oL"}]},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.5_1552425715312_0.2761993100908706"},"_hasShrinkwrap":false},"0.0.1-beta.6":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.6","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"0.6.0"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION.  API WILL BE CHANGED SOON !!!**\n\n**SEE THIS [DISCUSSION](https://discourse.nodered.org/t/onvif-camera-control/6888) ON THE NODE-RED FORUM FOR LATEST INFORMATION**\n\n***TODO: Discuss which error should be visualised in the node status...***\n\n***TODO: Check whether the credentials are safe within config node (in cam instance), or can all nodes access them??***\n\n***TODO: Discuss how we can have user friendly config screens, to get a usable set of nodes (without needing great tools like ONVIF Device Manager.***\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red):\n```\nnpm install node-red-contrib-onvif-nodes\n```\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\n\nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address (and the port number), which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device:\n+ IP address: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n+ Port: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.  If no port number visible, use port ```80``` by default.\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nEvery Onvif device will contain a series of default media profiles.  Every profile contains following data:\n+ A unique name.\n+ A unique token which will only be used internally by these Onvif nodes (based on the name, the nodes will lookup the token automatically).\n+ The configuration for all available media services (audio, video, ptz ...). \n\nFor example the *'getProfiles'* action (in the example flow below) will return all available media profiles in my Onvif device:\n\n![Get media profiles](/images/onvif_get_profiles.png)\n\nWhen having a look e.g. at the details of the video encoding configuration, you will see a JPEG of resultion 320x240:\n\n![Example profile](/images/onvif_example_profile.png)\n\nSuch a profile names need to be specified for most media actions.  So instead of having to repeat the information over and over again, the Onvif device will use the information from the specified profile.  For example when a snapshot as JPEG with resolution 320x240 is needed, you only need to specify the profile name *'JPEG_320x240'* ...\n\nFollowing example flow shows how to view and manipulate profiles:\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n***TODO: Not possible yet to create an entire new profile, incl. configurations.***\n\n### Snapshot images\n\nRemark: to be able to run the example flow, some manual interventions are required:\n+ The node-red-contrib-image-output should be installed, to show the snapshot image in the flow editor.\n+ Select an available profile from your Onvif device via the 'search' icon!  Indeed the resolution of the snapshot image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n+ In the first flow the username and password (of the Onvif config node) should be repeated in the httprequest node.\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's **credentials** (username/password) should be repeated in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"907621a9.98d79\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1430,\"y\":100,\"wires\":[[\"ddb99a63.98e938\"]]},{\"id\":\"7074982e.851308\",\"type\":\"image\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"width\":200,\"x\":1820,\"y\":100,\"wires\":[]},{\"id\":\"ddb99a63.98e938\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"JPEG_320x240\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":1630,\"y\":100,\"wires\":[[\"7074982e.851308\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"port\":\"80\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node (NOT FUNCTIONAL YET !!!)\nThis node allows to listen to all the events registered by the device.  The node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives:\n\n![Events flow](/images/onvif_events.png)\n\n```\n[{\"id\":\"7ea5e0c3.4d741\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":910,\"y\":860,\"wires\":[[\"378b6778.87ee38\"]]},{\"id\":\"378b6778.87ee38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":860,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"e7a5c111.16471\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":910,\"y\":900,\"wires\":[[\"1830bf3.8165041\"]]},{\"id\":\"1830bf3.8165041\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":900,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"b0958785.83ca18\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":1580,\"y\":860,\"wires\":[]},{\"id\":\"82df60a3.e2b02\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":930,\"y\":940,\"wires\":[[\"cd2a67b4.251db8\"]]},{\"id\":\"cd2a67b4.251db8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":940,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"9b6039a9.8ed2a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":960,\"y\":980,\"wires\":[[\"fad5135e.3a95\"]]},{\"id\":\"fad5135e.3a95\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1220,\"y\":980,\"wires\":[[\"9199d036.ef115\"]]},{\"id\":\"9199d036.ef115\",\"type\":\"onvif-events\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":1410,\"y\":860,\"wires\":[[\"b0958785.83ca18\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n***TODO: Get event service capabilities results in \"method not found\" ***\n\n***TODO: Start listening aborts the entire flow with error: You should create pull-point subscription first! (see https://github.com/agsh/onvif/issues/76)***\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.6","_shasum":"bdda382f2a67c62d7908d02c811197ab46573ba6","_resolved":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","scripts":{},"_npmVersion":"3.5.2","_nodeVersion":"8.10.0","_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"dist":{"shasum":"bdda382f2a67c62d7908d02c811197ab46573ba6","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.6.tgz","integrity":"sha512-EeJoWQo5MI472QgYM+jmTh7UsoftonpGA0VGmHXEmDPbnjS0ACoi0zq/pID0RUNSEvwJx/K9bFQMsIkCuakgrA==","fileCount":52,"unpackedSize":809423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcitImCRA9TVsSAnZWagAAZH4P/RTYPipNy+MbT2G2GwEX\nP40cR21jrOBFNC9M10BLjEpWeJ0qu9vJkSqfe/v+jgP0eq2mP/Z80X46sHMb\nG7A5PfiOSgYhLDRtNtQ1AHvaFytfDW4A12CVannqJU1DTLCmuvkv7UZVpvFs\nySDcrd2tHBBVErhusGfpCAyi0x2L+c5hOBRSy2nEkRaq095gpUTyvnsM84Yp\ndl3zqiySa28SRQAzqIPFjcdEVUbklNWo6FSCV6DL1y4TlJB7xmvsPg2HKCea\nJ5swehdhcUG+RqpD70aG1tulg26jy3C2U61LMGe6qPERS6MkJ4L8bnXr2tC4\naYDtm5mClOrv/n3CBKSwqswbde5wV/6EPVaaBhnmgCUC5RBRmvyv8D2naon2\n3YSpE8bEHaU4QBCe4s2b4tq3rUNF7+/PrixMj9edMZd1cck4Qec/fM6kJ1ro\n7LvY/70q7x8JBy0HPwaTRLr4Swt4l5yvrfPWvXOPldJONKAF/31KptlVqakG\n/Oci/ZZAb7tgvIjwkKTUb6L6IJMj2DdlvTMlYIxtEFjeyAN5Gm2QyjBy0Phw\nOOOcHZR4fVD1kFpMlkOZ2s0z9/D7lq1U6XuaFPpvZUsKK6KFJX2hLP52ujBb\nHpZF3wdN4+kJmmIgyThAuDuKJxaKgrK2jmYUbRqegx4U0oZWmIDkhBRC+Lcv\nbDjQ\r\n=Ogjp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMH+Vsc/ALZk2KxVcWrhNoLmPFxv1otpGEyV6DyAXXhQIhAJrua6GqnZK1lUqRQtd4WIsEKGMsHc1urfgF3LLZM+dr"}]},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.6_1552601637722_0.2054710525021557"},"_hasShrinkwrap":false},"0.0.1-beta.7":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.7","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"git://github.com/agsh/onvif.git"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION.  API WILL BE CHANGED SOON !!!**\n\n**SEE THIS [DISCUSSION](https://discourse.nodered.org/t/onvif-camera-control/6888) ON THE NODE-RED FORUM FOR LATEST INFORMATION**\n\n***TODO: Discuss which error should be visualised in the node status...***\n\n***TODO: Check whether the credentials are safe within config node (in cam instance), or can all nodes access them??***\n\n***TODO: Discuss how we can have user friendly config screens, to get a usable set of nodes (without needing great tools like ONVIF Device Manager.***\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red):\n```\nnpm install node-red-contrib-onvif-nodes@0.0.1-beta.7\n```\n\n## Support my Node-RED developments\n\nPlease buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...\n\n<a href=\"https://www.buymeacoffee.com/bartbutenaers\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy my wife a coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\n\nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address (and the port number), which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device:\n+ IP address: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n+ Port: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.  If no port number visible, use port ```80``` by default.\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nEvery Onvif device will contain a series of default media profiles.  Every profile contains following data:\n+ A unique name.\n+ A unique token which will only be used internally by these Onvif nodes (based on the name, the nodes will lookup the token automatically).\n+ The configuration for all available media services (audio, video, ptz ...). \n\nFor example the *'getProfiles'* action (in the example flow below) will return all available media profiles in my Onvif device:\n\n![Get media profiles](/images/onvif_get_profiles.png)\n\nWhen having a look e.g. at the details of the video encoding configuration, you will see a JPEG of resultion 320x240:\n\n![Example profile](/images/onvif_example_profile.png)\n\nSuch a profile names need to be specified for most media actions.  So instead of having to repeat the information over and over again, the Onvif device will use the information from the specified profile.  For example when a snapshot as JPEG with resolution 320x240 is needed, you only need to specify the profile name *'JPEG_320x240'* ...\n\nFollowing example flow shows how to view and manipulate profiles:\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n***TODO: Not possible yet to create an entire new profile, incl. configurations.***\n\n### Snapshot images\n\nRemark: to be able to run the example flow, some manual interventions are required:\n+ The node-red-contrib-image-output should be installed, to show the snapshot image in the flow editor.\n+ Select an available profile from your Onvif device via the 'search' icon!  Indeed the resolution of the snapshot image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n+ In the first flow the username and password (of the Onvif config node) should be repeated in the httprequest node.\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's **credentials** (username/password) should be repeated in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"907621a9.98d79\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1430,\"y\":100,\"wires\":[[\"ddb99a63.98e938\"]]},{\"id\":\"7074982e.851308\",\"type\":\"image\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"width\":200,\"x\":1820,\"y\":100,\"wires\":[]},{\"id\":\"ddb99a63.98e938\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"JPEG_320x240\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":1630,\"y\":100,\"wires\":[[\"7074982e.851308\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"port\":\"80\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node\nThis node allows to listen to all the events pushed by the device.  Depending on the device, different events can be pushed to the clients that are listening:\n+ Motion detection\n+ Face detection\n+ CPU percentage\n+ ...\n\nCAUTION: You need to enable those events once **manually** (via the web interface of your camera), because that is not part of the Onvif protocol!  For example the web interface of my Hikvision camera:\n\n![Hikvision web interface](https://user-images.githubusercontent.com/14224149/77230188-b6883b00-6b92-11ea-8ac4-cbcf8d1c2c42.png)\n\nThe node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives.  When the node is listening, every event (pushed by the Onvif device toward the Node-RED flow) will be converted to an output message:\n\n![Event pushing](https://user-images.githubusercontent.com/14224149/77230650-00beeb80-6b96-11ea-925c-8ba27a59d6fa.png)\n\n![Event flow](https://user-images.githubusercontent.com/14224149/77230064-ec78ef80-6b91-11ea-97d8-7c267ac863ff.png)\n\n```\n[{\"id\":\"748f5110.c57f7\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1020,\"wires\":[[\"12ad9448.0899fc\"]]},{\"id\":\"12ad9448.0899fc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1020,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"801f0dd.3e0b3f\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1060,\"wires\":[[\"b7dc815b.29f4a\"]]},{\"id\":\"b7dc815b.29f4a\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1060,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"2774034b.91102c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":1140,\"wires\":[[\"e59923ee.4db8d\"]]},{\"id\":\"e59923ee.4db8d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1140,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"120e35a2.b4da5a\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":1100,\"wires\":[[\"2c1017b7.e2e448\"]]},{\"id\":\"2c1017b7.e2e448\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1100,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"a8f7752e.2998f8\",\"type\":\"onvif-events\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"action\":\"\",\"x\":670,\"y\":1020,\"wires\":[[\"61d49191.38fb9\"]]},{\"id\":\"61d49191.38fb9\",\"type\":\"switch\",\"z\":\"b3db206e.b7139\",\"name\":\"Topic ProcessorUsage\",\"property\":\"topic\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"eq\",\"v\":\"Monitoring/ProcessorUsage\",\"vt\":\"str\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":1,\"x\":880,\"y\":1020,\"wires\":[[\"9d4463a2.1d43d\"]]},{\"id\":\"9d4463a2.1d43d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"Get value\",\"rules\":[{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"data.value\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1080,\"y\":1020,\"wires\":[[\"97abe077.30ed\"]]},{\"id\":\"97abe077.30ed\",\"type\":\"ui_chart\",\"z\":\"b3db206e.b7139\",\"name\":\"Camera CPU %\",\"group\":\"22787703.a0e968\",\"order\":2,\"width\":0,\"height\":0,\"label\":\"Camera CPU %\",\"chartType\":\"line\",\"legend\":\"false\",\"xformat\":\"HH:mm:ss\",\"interpolate\":\"linear\",\"nodata\":\"\",\"dot\":false,\"ymin\":\"0\",\"ymax\":\"110\",\"removeOlder\":1,\"removeOlderPoints\":\"50\",\"removeOlderUnit\":\"3600\",\"cutout\":0,\"useOneColor\":false,\"colors\":[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#2ca02c\",\"#98df8a\",\"#d62728\",\"#ff9896\",\"#9467bd\",\"#c5b0d5\"],\"useOldStyle\":false,\"outputs\":1,\"x\":1260,\"y\":1020,\"wires\":[[]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"},{\"id\":\"22787703.a0e968\",\"type\":\"ui_group\",\"z\":\"\",\"name\":\"Web push notifications\",\"tab\":\"80f0e178.bbf4a\",\"disp\":true,\"width\":\"6\",\"collapse\":false},{\"id\":\"80f0e178.bbf4a\",\"type\":\"ui_tab\",\"z\":\"\",\"name\":\"Home\",\"icon\":\"dashboard\",\"order\":1,\"disabled\":false,\"hidden\":false}]\n```\nThe above flow will display the camera's CPU usage in the Node-RED dashboard:\n\n![CPU usage](https://user-images.githubusercontent.com/14224149/77230208-ea636080-6b92-11ea-9a3c-f7e753023b24.png)\n\nRemarks: \n+ As soon as the node is listening for events, the node status will change from *\"connected\"* to *\"listening\"*.\n+ Onvif devices can support 3 types of event transport mechanisms, but currently this node only supports *pull-point* events.  In fact this is not a real push mechanism, which uses polling behind the scenes ...\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.7","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-d+N65pLVIVwb4DFNsEBCjiUZwM3/21IRcoBTdV3HO9B1SP5nqFJSugqGDeA3qzlH+d6+uMmxhAPu/brb60WbCw==","shasum":"28e54348bdafcf3a6778317180428f0b59de83dc","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.7.tgz","fileCount":52,"unpackedSize":822341,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJednxDCRA9TVsSAnZWagAArHwP/jtGeEmw1J7mZmfYJ4kg\npJ/ZePX0EZUfyuaZBoTtLPdsTlJl5z0+TtNq9vx3mv1H/jyw87W2h6bz3xGV\nZYaIYGhAlNCdCQwq8IDblpznLk042dAQZ7E/kkhWh+Ex4RoZkoCnhmMVyeNF\ngULMeh/PPjuMO57rtQyMnB9UU3PtE/fl/qtcVVyVdv/z6NWlPD/fPDC3o/wJ\ngHyjcBl2j/YyeXmOre6rj8bnU0vxjzP0ql7NBEvFlrm9OLAAJgLrGduYyVNu\nO91tgL3gu1FksmSTa/08YxqhvlwaHpM4XVmp7k3q3iQFuuizBHxPVrA/PplQ\nnzcJY8eM61v2hOCKKSZYeQmanjU6u6ymgKJTu+ABEZf1eH5PBFxlgEcU7/uh\nGtwFeWhB/7TzOtLpucg7Vzf9g7cOKGwNpXj0Iozumk0ehsfP1oUIFriBhKWE\na0VkGTqeaURE78uK+iqq202SVL2YMqlcNkSkT2rt1kf9OpPtmv5J+04xzvuL\nXqxN76/QKlcuhugkPAvGqmPXpNb/uMeQF7r3Lobxu7IlqBWPPGSm0xzIJ23P\nPVtn1dbG8cRjg1XRYTua4pyf6VbpM3C6XxPAW/aZtcNjlZLMovw9DohzriZw\n7RO9RlWtLfbFW2aHqflQYOkESV4i/1c5iF8k5mBDlEoaVv6B8xwbfW3RNqYR\nEVhn\r\n=Q818\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJA/fOfiN0XI8PbZzefkQk4b6/2sXsXPVs5GpO8CqMhAiAPKjCEDB7RRz/fH9wrf+G8lw7vsuRY16YkbKruRe7qhw=="}]},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.7_1584823363346_0.012525164974825476"},"_hasShrinkwrap":false},"0.0.1-beta.8":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.8","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"git://github.com/agsh/onvif.git","request":">= 2.88.2"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION.  API WILL BE CHANGED SOON !!!**\n\n**SEE THIS [DISCUSSION](https://discourse.nodered.org/t/onvif-camera-control/6888) ON THE NODE-RED FORUM FOR LATEST INFORMATION**\n\n***TODO: Discuss which error should be visualised in the node status...***\n\n***TODO: Check whether the credentials are safe within config node (in cam instance), or can all nodes access them??***\n\n***TODO: Discuss how we can have user friendly config screens, to get a usable set of nodes (without needing great tools like ONVIF Device Manager.***\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red):\n```\nnpm install node-red-contrib-onvif-nodes@0.0.1-beta.7\n```\n\n## Support my Node-RED developments\n\nPlease buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...\n\n<a href=\"https://www.buymeacoffee.com/bartbutenaers\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy my wife a coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\n\nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address (and the port number), which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device:\n+ IP address: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n+ Port: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.  If no port number visible, use port ```80``` by default.\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Imaging node\nThis node offers functionality to configure imaging specific properties.\n\nThe following example flow shows how to read and set those properties:\n\n![imaging get and set](https://user-images.githubusercontent.com/14224149/77259002-a0f03f80-6c7e-11ea-8b72-7fbc2f155b4d.png)\n```\n[{\"id\":\"7af75a72.95fca4\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1600,\"wires\":[[\"57608e7d.d0012\"]]},{\"id\":\"3f04f383.92106c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1600,\"wires\":[[\"58099d05.b3bd54\"]]},{\"id\":\"57608e7d.d0012\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1600,\"wires\":[]},{\"id\":\"58099d05.b3bd54\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getImagingSettings\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1600,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"802207fe.5bec58\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1660,\"wires\":[[\"7692be04.f17cc\"]]},{\"id\":\"7692be04.f17cc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"brightness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"colorSaturation\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"contrast\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"sharpness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1660,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\n+ The action ***getImagingSettings*** gets the current imaging setting values:\n\n   ![current imaging settings](https://user-images.githubusercontent.com/14224149/77259082-50c5ad00-6c7f-11ea-8805-a9f428f89429.png)\n   \n+ The action ***getImagingSettings*** allows to set (one or more) new imaging setting values, via\n   + ```msg.brightness```\n   + ```msg.colorSaturation```\n   + ```msg.sharpness```\n   + ```msg.contrast```\n   \nYet another flow to demonstrate how to update those values via user gestures (e.g. inject buttons in the flow editor):\n\n![set imaging settings](https://user-images.githubusercontent.com/14224149/77259182-18729e80-6c80-11ea-8d6b-f912c1330156.png)\n```\n[{\"id\":\"1517f507.2f887b\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":1760,\"wires\":[[\"d3662621.dc4228\"]]},{\"id\":\"66f4ba6d.1e5d64\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1800,\"wires\":[[\"23a1fdf0.ed8632\"]]},{\"id\":\"d3662621.dc4228\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness + 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness += 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action     = \\\"setImagingSettings\\\";\\nmsg.brightness = brightness;\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1760,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"23a1fdf0.ed8632\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness - 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness -= 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action = \\\"setImagingSettings\\\";\\nmsg.brightness = brightness;\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1800,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2792ce4a.dc8d92\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness minimum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1840,\"wires\":[[\"c31d8781.1c3c38\"]]},{\"id\":\"fa76b70c.16ff68\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness maximum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":320,\"y\":1880,\"wires\":[[\"2e3afa6a.088556\"]]},{\"id\":\"c31d8781.1c3c38\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"brightness\",\"pt\":\"msg\",\"to\":\"1\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1840,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2e3afa6a.088556\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"brightness\",\"pt\":\"msg\",\"to\":\"100\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1880,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"20bd08d5.3e1068\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1760,\"wires\":[[\"417ef964.918e88\"]]},{\"id\":\"417ef964.918e88\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1760,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nEvery Onvif device will contain a series of default media profiles.  Every profile contains following data:\n+ A unique name.\n+ A unique token which will only be used internally by these Onvif nodes (based on the name, the nodes will lookup the token automatically).\n+ The configuration for all available media services (audio, video, ptz ...). \n\nFor example the *'getProfiles'* action (in the example flow below) will return all available media profiles in my Onvif device:\n\n![Get media profiles](/images/onvif_get_profiles.png)\n\nWhen having a look e.g. at the details of the video encoding configuration, you will see a JPEG of resultion 320x240:\n\n![Example profile](/images/onvif_example_profile.png)\n\nSuch a profile names need to be specified for most media actions.  So instead of having to repeat the information over and over again, the Onvif device will use the information from the specified profile.  For example when a snapshot as JPEG with resolution 320x240 is needed, you only need to specify the profile name *'JPEG_320x240'* ...\n\nFollowing example flow shows how to view and manipulate profiles:\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n***TODO: Not possible yet to create an entire new profile, incl. configurations.***\n\n### Snapshot images\n\nRemark: to be able to run the example flow, some manual interventions are required:\n+ The node-red-contrib-image-output should be installed, to show the snapshot image in the flow editor.\n+ Select an available profile from your Onvif device via the 'search' icon!  Indeed the resolution of the snapshot image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n+ In the first flow the username and password (of the Onvif config node) should be repeated in the httprequest node.\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's **credentials** (username/password) should be repeated in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"907621a9.98d79\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1430,\"y\":100,\"wires\":[[\"ddb99a63.98e938\"]]},{\"id\":\"7074982e.851308\",\"type\":\"image\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"width\":200,\"x\":1820,\"y\":100,\"wires\":[]},{\"id\":\"ddb99a63.98e938\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"JPEG_320x240\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":1630,\"y\":100,\"wires\":[[\"7074982e.851308\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"port\":\"80\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node\nThis node allows to listen to all the events pushed by the device.  Depending on the device, different events can be pushed to the clients that are listening:\n+ Motion detection\n+ Face detection\n+ CPU percentage\n+ ...\n\nThe more embedded electronics your camera contains (e.g. PIR sensor, microphone, external I/O input, ...), the more events might be available:\n\n![Camera events](https://user-images.githubusercontent.com/14224149/77259583-b4050e80-6c82-11ea-85d6-e8fb0a23c836.png)\n\nCAUTION: You need to enable those events once **manually** (via the web interface of your camera), because that is not part of the Onvif protocol!  For example the web interface of my Hikvision camera:\n\n![Hikvision web interface](https://user-images.githubusercontent.com/14224149/77230188-b6883b00-6b92-11ea-8ac4-cbcf8d1c2c42.png)\n\nThe node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives.  When the node is listening, every event (pushed by the Onvif device toward the Node-RED flow) will be converted to an output message:\n\n![Event flow](https://user-images.githubusercontent.com/14224149/77230064-ec78ef80-6b91-11ea-97d8-7c267ac863ff.png)\n\n```\n[{\"id\":\"748f5110.c57f7\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1020,\"wires\":[[\"12ad9448.0899fc\"]]},{\"id\":\"12ad9448.0899fc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1020,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"801f0dd.3e0b3f\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1060,\"wires\":[[\"b7dc815b.29f4a\"]]},{\"id\":\"b7dc815b.29f4a\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1060,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"2774034b.91102c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":1140,\"wires\":[[\"e59923ee.4db8d\"]]},{\"id\":\"e59923ee.4db8d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1140,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"120e35a2.b4da5a\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":1100,\"wires\":[[\"2c1017b7.e2e448\"]]},{\"id\":\"2c1017b7.e2e448\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1100,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"a8f7752e.2998f8\",\"type\":\"onvif-events\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"action\":\"\",\"x\":670,\"y\":1020,\"wires\":[[\"61d49191.38fb9\"]]},{\"id\":\"61d49191.38fb9\",\"type\":\"switch\",\"z\":\"b3db206e.b7139\",\"name\":\"Topic ProcessorUsage\",\"property\":\"topic\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"eq\",\"v\":\"Monitoring/ProcessorUsage\",\"vt\":\"str\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":1,\"x\":880,\"y\":1020,\"wires\":[[\"9d4463a2.1d43d\"]]},{\"id\":\"9d4463a2.1d43d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"Get value\",\"rules\":[{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"data.value\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1080,\"y\":1020,\"wires\":[[\"97abe077.30ed\"]]},{\"id\":\"97abe077.30ed\",\"type\":\"ui_chart\",\"z\":\"b3db206e.b7139\",\"name\":\"Camera CPU %\",\"group\":\"22787703.a0e968\",\"order\":2,\"width\":0,\"height\":0,\"label\":\"Camera CPU %\",\"chartType\":\"line\",\"legend\":\"false\",\"xformat\":\"HH:mm:ss\",\"interpolate\":\"linear\",\"nodata\":\"\",\"dot\":false,\"ymin\":\"0\",\"ymax\":\"110\",\"removeOlder\":1,\"removeOlderPoints\":\"50\",\"removeOlderUnit\":\"3600\",\"cutout\":0,\"useOneColor\":false,\"colors\":[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#2ca02c\",\"#98df8a\",\"#d62728\",\"#ff9896\",\"#9467bd\",\"#c5b0d5\"],\"useOldStyle\":false,\"outputs\":1,\"x\":1260,\"y\":1020,\"wires\":[[]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"},{\"id\":\"22787703.a0e968\",\"type\":\"ui_group\",\"z\":\"\",\"name\":\"Web push notifications\",\"tab\":\"80f0e178.bbf4a\",\"disp\":true,\"width\":\"6\",\"collapse\":false},{\"id\":\"80f0e178.bbf4a\",\"type\":\"ui_tab\",\"z\":\"\",\"name\":\"Home\",\"icon\":\"dashboard\",\"order\":1,\"disabled\":false,\"hidden\":false}]\n```\nThe above flow will display the camera's CPU usage in the Node-RED dashboard:\n\n![CPU usage](https://user-images.githubusercontent.com/14224149/77230208-ea636080-6b92-11ea-9a3c-f7e753023b24.png)\n\nRemarks: \n+ As soon as the node is listening for events, the node status will change from *\"connected\"* to *\"listening\"*.\n+ Onvif devices can support 3 types of event transport mechanisms, but currently this node only supports *pull-point* events.  In fact this is not a real push mechanism, which uses polling behind the scenes ...\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.8","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-GhFXV62bM99HAeWx/iowtweyFIP4TEnx9x1MZMakHN1PiN2SBWTtRnM62UwB91ys9hZvqJYQopS7quzZexDQBw==","shasum":"2a1713382c076906efc6554977586f18e0ae6280","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.8.tgz","fileCount":52,"unpackedSize":831608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJed+FqCRA9TVsSAnZWagAA3yQP/iLTEPna9+tqb8Cp9NwQ\nr9yWWw+bEyQYfdbPYpw26QKKE+ciJmp3ChE0hrvTw6UbMvSnTOi77uCzLBA2\nw47tcG94rRIRd32prfl+G5gYOwbKlfAEbrpzcOpKgkMWCdPKw0ZRbEKTFV7j\ngbwS8Yno9jc4T2U4z8oczN6+xhnN4z1WuX6plU28BxgSw65N+AfazgdYr1ir\nOXC2eVXZ88ig7uhWKBtzSrY7CvWWNCQIjsfdfvBqyczocsNFzxFPk8JdefD9\no0AumAWo8xRse6NTxJuQNQDSk+t7q4L4ubNonskAwe3C+Bzf8wp97E0cJIgQ\necR7P1eoQUk5BjHAvoB6fXvXYcqmkYfuHMDruB9ElsxdVTTKF27fWnlz1G9G\nZN/YY4AQDOBpHuOMcKCkKcAJqT/Lcbacz27D57aCsXXRa9XRdZgeh79NCMLr\ng1GPfb8umrBKNpZ5VY+4gZzRTLa8j32D+ZG3XOKbU6Q76KuNC0m0H3qSLFFm\n7qE9XtlSXC9WIUgp1EiiuMe7nq9pmJ8W82AMIPGrMQQ1iJhIt+5toakfdHvr\niVbcRyYV/8mIQZuHHBLiY6YwvgaBNj4u/WVIAhurTWRIigSKzzNscZaoSHVF\n/LbN5ob6RQdMC+5Ht7mYi5XVjnqbDLkewYdAtiy/3b2mnNyhhieFP6JGmzdY\nJH1H\r\n=yfdk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIErFGIYFvAPO0rmx+3wNi4HiLctegAzUAIt9fP/d437wAiEAlIdBfjeIakEr7ngOVyEzGAi/IflRDJNDEvsz/2gOWSY="}]},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.8_1584914794060_0.8752882934731705"},"_hasShrinkwrap":false},"0.0.1-beta.9":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.9","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"git://github.com/agsh/onvif.git","request":">= 2.88.2"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION.  API WILL BE CHANGED SOON !!!**\n\n**SEE THIS [DISCUSSION](https://discourse.nodered.org/t/onvif-camera-control/6888) ON THE NODE-RED FORUM FOR LATEST INFORMATION**\n\n***TODO: Discuss which error should be visualised in the node status...***\n\n***TODO: Check whether the credentials are safe within config node (in cam instance), or can all nodes access them??***\n\n***TODO: Discuss how we can have user friendly config screens, to get a usable set of nodes (without needing great tools like ONVIF Device Manager.***\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red):\n```\nnpm install node-red-contrib-onvif-nodes@0.0.1-beta.7\n```\n\n## Support my Node-RED developments\n\nPlease buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...\n\n<a href=\"https://www.buymeacoffee.com/bartbutenaers\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy my wife a coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\n\nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address (and the port number), which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device:\n+ IP address: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n+ Port: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.  If no port number visible, use port ```80``` by default.\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Imaging node\nThis node offers functionality to configure imaging specific properties.\n\nThe following example flow shows how to read and set those properties:\n\n![imaging get and set](https://user-images.githubusercontent.com/14224149/77259002-a0f03f80-6c7e-11ea-8b72-7fbc2f155b4d.png)\n```\n[{\"id\":\"7af75a72.95fca4\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1600,\"wires\":[[\"57608e7d.d0012\"]]},{\"id\":\"3f04f383.92106c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1600,\"wires\":[[\"58099d05.b3bd54\"]]},{\"id\":\"57608e7d.d0012\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1600,\"wires\":[]},{\"id\":\"58099d05.b3bd54\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getImagingSettings\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1600,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"802207fe.5bec58\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1660,\"wires\":[[\"7692be04.f17cc\"]]},{\"id\":\"7692be04.f17cc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.colorSaturation\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.contrast\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.sharpness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1660,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\n+ The action ***getImagingSettings*** gets the current imaging setting values:\n\n   ![current imaging settings](https://user-images.githubusercontent.com/14224149/77259082-50c5ad00-6c7f-11ea-8805-a9f428f89429.png)\n   \n+ The action ***getImagingSettings*** allows to set (one or more) new imaging setting values, via\n   + ```msg.payload.backlightCompensation```\n   + ```msg.payload.brightness```\n   + ```msg.payload.colorSaturation```\n   + ```msg.payload.contrast```\n   + ```msg.payload.exposure```\n   + ```msg.payload.focus```\n   + ```msg.payload.irCutFilter```   \n   + ```msg.payload.sharpness```   \n   + ```msg.payload.wideDynamicRange```    \n   + ```msg.payload.whiteBalance```    \n   + ```msg.payload.focus```    \n   + ```msg.payload.extension```   \n   \nYet another flow to demonstrate how to update those values via user gestures (e.g. inject buttons in the flow editor):\n\n![set imaging settings](https://user-images.githubusercontent.com/14224149/77259182-18729e80-6c80-11ea-8d6b-f912c1330156.png)\n```\n[{\"id\":\"1517f507.2f887b\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":1760,\"wires\":[[\"d3662621.dc4228\"]]},{\"id\":\"66f4ba6d.1e5d64\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1800,\"wires\":[[\"23a1fdf0.ed8632\"]]},{\"id\":\"d3662621.dc4228\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness + 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness += 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action     = \\\"setImagingSettings\\\";\\nmsg.payload.brightness = brightness;\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1760,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"23a1fdf0.ed8632\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness - 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness -= 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action = \\\"setImagingSettings\\\";\\nmsg.payload.brightness = brightness;\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1800,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2792ce4a.dc8d92\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness minimum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1840,\"wires\":[[\"c31d8781.1c3c38\"]]},{\"id\":\"fa76b70c.16ff68\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness maximum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":320,\"y\":1880,\"wires\":[[\"2e3afa6a.088556\"]]},{\"id\":\"c31d8781.1c3c38\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"1\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1840,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2e3afa6a.088556\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"100\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1880,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"20bd08d5.3e1068\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1760,\"wires\":[[\"417ef964.918e88\"]]},{\"id\":\"417ef964.918e88\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1760,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\nWhen setting new values, only the updated values should be specified (according to the Onvif standard).  However some brands of camera's seem to require that all values are specified.  In that case it might be useful to get the current values first, and then replace some of the values:\n\n![Replace values](https://user-images.githubusercontent.com/14224149/77587599-86210380-6ee8-11ea-82cc-ffbe82a840e7.png)\n```\n[{\"id\":\"42d10b09.364e44\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"getImagingSettings\",\"x\":580,\"y\":2580,\"wires\":[[\"24dd1d48.864802\"]]},{\"id\":\"c07c06d7.31a128\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2580,\"wires\":[[\"42d10b09.364e44\"]]},{\"id\":\"24dd1d48.864802\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"50\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":780,\"y\":2580,\"wires\":[[\"8a81824a.7443e\"]]},{\"id\":\"8a81824a.7443e\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":980,\"y\":2580,\"wires\":[[]]},{\"id\":\"c66da2da.59a64\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Get the original settings\",\"info\":\"\",\"x\":580,\"y\":2540,\"wires\":[]},{\"id\":\"2a0a537c.1457bc\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Replace one or more settings\",\"info\":\"\",\"x\":900,\"y\":2540,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\nP.S. The latter flow might be optimized e.g. by caching the current values in flow memory...\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nEvery Onvif device will contain a series of default media profiles.  Every profile contains following data:\n+ A unique name.\n+ A unique token which will only be used internally by these Onvif nodes (based on the name, the nodes will lookup the token automatically).\n+ The configuration for all available media services (audio, video, ptz ...). \n\nFor example the *'getProfiles'* action (in the example flow below) will return all available media profiles in my Onvif device:\n\n![Get media profiles](/images/onvif_get_profiles.png)\n\nWhen having a look e.g. at the details of the video encoding configuration, you will see a JPEG of resultion 320x240:\n\n![Example profile](/images/onvif_example_profile.png)\n\nSuch a profile names need to be specified for most media actions.  So instead of having to repeat the information over and over again, the Onvif device will use the information from the specified profile.  For example when a snapshot as JPEG with resolution 320x240 is needed, you only need to specify the profile name *'JPEG_320x240'* ...\n\nFollowing example flow shows how to view and manipulate profiles:\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n***TODO: Not possible yet to create an entire new profile, incl. configurations.***\n\n### Snapshot images\n\nRemark: to be able to run the example flow, some manual interventions are required:\n+ The node-red-contrib-image-output should be installed, to show the snapshot image in the flow editor.\n+ Select an available profile from your Onvif device via the 'search' icon!  Indeed the resolution of the snapshot image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n+ In the first flow the username and password (of the Onvif config node) should be repeated in the httprequest node.\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's **credentials** (username/password) should be repeated in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"907621a9.98d79\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1430,\"y\":100,\"wires\":[[\"ddb99a63.98e938\"]]},{\"id\":\"7074982e.851308\",\"type\":\"image\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"width\":200,\"x\":1820,\"y\":100,\"wires\":[]},{\"id\":\"ddb99a63.98e938\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"JPEG_320x240\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":1630,\"y\":100,\"wires\":[[\"7074982e.851308\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"port\":\"80\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node\nThis node allows to listen to all the events pushed by the device.  Depending on the device, different events can be pushed to the clients that are listening:\n+ Motion detection\n+ Face detection\n+ CPU percentage\n+ ...\n\nThe more embedded electronics your camera contains (e.g. PIR sensor, microphone, external I/O input, ...), the more events might be available:\n\n![Camera events](https://user-images.githubusercontent.com/14224149/77259583-b4050e80-6c82-11ea-85d6-e8fb0a23c836.png)\n\nCAUTION: You need to enable those events once **manually** (via the web interface of your camera), because that is not part of the Onvif protocol!  For example the web interface of my Hikvision camera:\n\n![Hikvision web interface](https://user-images.githubusercontent.com/14224149/77230188-b6883b00-6b92-11ea-8ac4-cbcf8d1c2c42.png)\n\nThe node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives.  When the node is listening, every event (pushed by the Onvif device toward the Node-RED flow) will be converted to an output message:\n\n![Event flow](https://user-images.githubusercontent.com/14224149/77230064-ec78ef80-6b91-11ea-97d8-7c267ac863ff.png)\n\n```\n[{\"id\":\"748f5110.c57f7\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1020,\"wires\":[[\"12ad9448.0899fc\"]]},{\"id\":\"12ad9448.0899fc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1020,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"801f0dd.3e0b3f\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1060,\"wires\":[[\"b7dc815b.29f4a\"]]},{\"id\":\"b7dc815b.29f4a\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1060,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"2774034b.91102c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":1140,\"wires\":[[\"e59923ee.4db8d\"]]},{\"id\":\"e59923ee.4db8d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1140,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"120e35a2.b4da5a\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":1100,\"wires\":[[\"2c1017b7.e2e448\"]]},{\"id\":\"2c1017b7.e2e448\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1100,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"a8f7752e.2998f8\",\"type\":\"onvif-events\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"action\":\"\",\"x\":670,\"y\":1020,\"wires\":[[\"61d49191.38fb9\"]]},{\"id\":\"61d49191.38fb9\",\"type\":\"switch\",\"z\":\"b3db206e.b7139\",\"name\":\"Topic ProcessorUsage\",\"property\":\"topic\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"eq\",\"v\":\"Monitoring/ProcessorUsage\",\"vt\":\"str\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":1,\"x\":880,\"y\":1020,\"wires\":[[\"9d4463a2.1d43d\"]]},{\"id\":\"9d4463a2.1d43d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"Get value\",\"rules\":[{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"data.value\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1080,\"y\":1020,\"wires\":[[\"97abe077.30ed\"]]},{\"id\":\"97abe077.30ed\",\"type\":\"ui_chart\",\"z\":\"b3db206e.b7139\",\"name\":\"Camera CPU %\",\"group\":\"22787703.a0e968\",\"order\":2,\"width\":0,\"height\":0,\"label\":\"Camera CPU %\",\"chartType\":\"line\",\"legend\":\"false\",\"xformat\":\"HH:mm:ss\",\"interpolate\":\"linear\",\"nodata\":\"\",\"dot\":false,\"ymin\":\"0\",\"ymax\":\"110\",\"removeOlder\":1,\"removeOlderPoints\":\"50\",\"removeOlderUnit\":\"3600\",\"cutout\":0,\"useOneColor\":false,\"colors\":[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#2ca02c\",\"#98df8a\",\"#d62728\",\"#ff9896\",\"#9467bd\",\"#c5b0d5\"],\"useOldStyle\":false,\"outputs\":1,\"x\":1260,\"y\":1020,\"wires\":[[]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"},{\"id\":\"22787703.a0e968\",\"type\":\"ui_group\",\"z\":\"\",\"name\":\"Web push notifications\",\"tab\":\"80f0e178.bbf4a\",\"disp\":true,\"width\":\"6\",\"collapse\":false},{\"id\":\"80f0e178.bbf4a\",\"type\":\"ui_tab\",\"z\":\"\",\"name\":\"Home\",\"icon\":\"dashboard\",\"order\":1,\"disabled\":false,\"hidden\":false}]\n```\nThe above flow will display the camera's CPU usage in the Node-RED dashboard:\n\n![CPU usage](https://user-images.githubusercontent.com/14224149/77230208-ea636080-6b92-11ea-9a3c-f7e753023b24.png)\n\nThe following action values can be passed:\n+ ***start***: Start listening for events pushed by the Onvif device towards the Node-RED flow.\n+ ***stop***: Stop listening for events pushed by the Onvif device towards the Node-RED flow.\n+ **getEventServiceCapabilities***:  to determine if your camera supports pull point listeners.\n\n   ![Event service capabilities](https://user-images.githubusercontent.com/14224149/77260980-6ccf4b80-6c8b-11ea-857b-d4fd6171e883.png)\n   \n   The WSPullPointSupport should be ```true```, otherwise your camera doesn't support pull-point events!\n\n+ ***getEventProperties***: to determine which events your camera can push.  For example for my Hikvision camera:\n\n   ![image](https://user-images.githubusercontent.com/14224149/77261021-b91a8b80-6c8b-11ea-964f-a52c39c17f63.png)\n\nRemarks: \n+ As soon as the node is listening for events, the node status will change from *\"connected\"* to *\"listening\"*.\n+ Onvif devices can support 3 types of event transport mechanisms, but currently this node only supports *pull-point* events.  In fact this is not a real push mechanism, which uses polling behind the scenes ...\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.9","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-s3SXGdxSI1EhK0b68dEIvZhSZxnVaeA9iWGnO5fKTm445s7VrfU+qgB6mKxeXUP45DoHFvOopzUnTDXmMNf1Sg==","shasum":"c2047bd8bb11d373fc20b22366ecf0e4c2659712","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.9.tgz","fileCount":52,"unpackedSize":834515,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJee88GCRA9TVsSAnZWagAAluMP/jJ5aTUM3nAPHHWWH1nz\n6TwgSDFOX6C58m8oUlxQ6z904smSKxHI71+g8VQ5KDkIoWCautcWEqyEGzqn\ncC7nvYcukgrHes4mQdEf6c3jNVG7JQe5We99Wh4L5y6pfDzofI3mLttfuWo1\nulB4p24TLSUo1bN4g8+hXaNmrV5zf8C+ZoEqy8QDImUaMBKP18MUZ17gyp2H\na376kAtX0WLJXWRwSalH3DXe0h+eJVsW7HXhz18aeCnUyw9EapyA6KYsXeU6\na+A5S0mdlot3is4rPYzU8UPehQ0SuzMvsY3EKYfGMm7DexQk3wwPQdbkXeSE\n4bW3eQWPCWhD6FKutpJqck5NA3V90MwUwTFeDToKMwSQQQTnsiDmilRgK4tE\n8vDsjo+NmInJE5wuNfReQqLwD6cLne1l5emrDlf3mBNmaBgu3nYqO8njW+rB\n9GA4fc9KOVH2g9WcSC0gmXLgApih8KHH51q5Ty+8b+py3Pcmwbr91E+vv0N5\ntypXBb7JZsOw4gBD54nI8UGA5/W/oYCdrMW5ltLZv5767pb8G4WIj0vyiE0W\nyfdegxhkRcFYtQ01BUWMF8t6YLQi+v0zdizuaO0O7zwsp/iykzUFPiGXccUI\nIdQi4e8DsGbhfy4RyaL05VlOzgMHl7a9KC7LXfIzD9Li/Qn0PFeJtXqs+f2Y\nxLly\r\n=C+QU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFTXENSfiA6TvLFxZKTGkhStsiATbQAh3BaYPxpIX30gIgMJAbf5t8hzmee+/cB9k2a/coA5NL7ptnj0KMWQyYp5Q="}]},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.9_1585172229890_0.5000494988754822"},"_hasShrinkwrap":false},"0.0.1-beta.10":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.10","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"git+https://github.com/agsh/onvif.git","request":">= 2.88.2"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION  !!!**\n\n*Update 28-11-2020: I get frequently the question why I haven't published these nodes on NPM yet.*\n\n*Well the answer is very simple: a lack of free time...*\n\n*Our friend @SuperNinja73 has been so kind to perform a large series of tests (see [test results](https://discourse.nodered.org/t/node-red-contrib-onvif-nodes-beta-test/33722/2?u=bartbutenaers)).*\n\n*Based on these test result, I concluded that the comera profile configuration via these nodes is not user friendly.*\n\n*But I don't have the time to develop and maintain an entire Onvif device manager inside Node-RED.*\n\n*To solve this I would like to generate automatically a user interface based on the [onvif.xsd](https://www.onvif.org/onvif/ver10/schema/onvif.xsd) file.*\n\n*I have compared some libraries, but at the end I [agreed](https://discourse.nodered.org/t/editor-based-on-xsd/33965/11?u=bartbutenaers) with Nick to implement this functionality in the Node-RED JSON editor.*\n\n*Because then it can be reused by other node developers.*\n\n*However it seems the JSON schema specification is rather large, so it is a hell of a job to implement this in my very limited time.*\n\n*That is why it is all taking so long ...*\n\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red), to install this node directly from my Github repository:\n```\nnpm install bartbutenaers/node-red-contrib-onvif-nodes\n```\nNote: the beta version on NPM is obsolete, so don't use it!!!  And ***git*** needs to be installed, otherwise the above command won't work!\n\n## Support my Node-RED developments\n\nPlease buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...\n\n<a href=\"https://www.buymeacoffee.com/bartbutenaers\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy my wife a coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\n\nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address (and the port number), which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device:\n+ IP address: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n+ Port: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.  If no port number visible, use port ```80``` by default.\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Imaging node\nThis node offers functionality to configure imaging specific properties.\n\nThe following example flow shows how to read and set those properties:\n\n![imaging get and set](https://user-images.githubusercontent.com/14224149/77259002-a0f03f80-6c7e-11ea-8b72-7fbc2f155b4d.png)\n```\n[{\"id\":\"7af75a72.95fca4\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1600,\"wires\":[[\"57608e7d.d0012\"]]},{\"id\":\"3f04f383.92106c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1600,\"wires\":[[\"58099d05.b3bd54\"]]},{\"id\":\"57608e7d.d0012\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1600,\"wires\":[]},{\"id\":\"58099d05.b3bd54\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getImagingSettings\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1600,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"802207fe.5bec58\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1660,\"wires\":[[\"7692be04.f17cc\"]]},{\"id\":\"7692be04.f17cc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.colorSaturation\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.contrast\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.sharpness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1660,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\n+ The action ***getImagingSettings*** gets the current imaging setting values:\n\n   ![current imaging settings](https://user-images.githubusercontent.com/14224149/77259082-50c5ad00-6c7f-11ea-8805-a9f428f89429.png)\n   \n+ The action ***getImagingSettings*** allows to set (one or more) new imaging setting values, via\n   + ```msg.payload.backlightCompensation```\n   + ```msg.payload.brightness```\n   + ```msg.payload.colorSaturation```\n   + ```msg.payload.contrast```\n   + ```msg.payload.exposure```\n   + ```msg.payload.focus```\n   + ```msg.payload.irCutFilter```   \n   + ```msg.payload.sharpness```   \n   + ```msg.payload.wideDynamicRange```    \n   + ```msg.payload.whiteBalance```    \n   + ```msg.payload.focus```    \n   + ```msg.payload.extension```   \n   \nYet another flow to demonstrate how to update those values via user gestures (e.g. inject buttons in the flow editor):\n\n![set imaging settings](https://user-images.githubusercontent.com/14224149/77259182-18729e80-6c80-11ea-8d6b-f912c1330156.png)\n```\n[{\"id\":\"1517f507.2f887b\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":1760,\"wires\":[[\"d3662621.dc4228\"]]},{\"id\":\"66f4ba6d.1e5d64\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1800,\"wires\":[[\"23a1fdf0.ed8632\"]]},{\"id\":\"d3662621.dc4228\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness + 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness += 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action     = \\\"setImagingSettings\\\";\\nmsg.payload = {\\n    brightness: brightness\\n}\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1760,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"23a1fdf0.ed8632\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness - 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness -= 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action = \\\"setImagingSettings\\\";\\nmsg.payload = {\\n    brightness: brightness\\n};\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1800,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2792ce4a.dc8d92\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness minimum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1840,\"wires\":[[\"c31d8781.1c3c38\"]]},{\"id\":\"fa76b70c.16ff68\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness maximum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":320,\"y\":1880,\"wires\":[[\"2e3afa6a.088556\"]]},{\"id\":\"c31d8781.1c3c38\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"1\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1840,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2e3afa6a.088556\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"100\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1880,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"20bd08d5.3e1068\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1760,\"wires\":[[\"417ef964.918e88\"]]},{\"id\":\"417ef964.918e88\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1760,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\nWhen setting new values, only the updated values should be specified (according to the Onvif standard).  However some brands of camera's seem to require that all values are specified.  In that case it might be useful to get the current values first, and then replace some of the values:\n\n![Replace values](https://user-images.githubusercontent.com/14224149/77587599-86210380-6ee8-11ea-82cc-ffbe82a840e7.png)\n```\n[{\"id\":\"42d10b09.364e44\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"getImagingSettings\",\"x\":580,\"y\":2580,\"wires\":[[\"24dd1d48.864802\"]]},{\"id\":\"c07c06d7.31a128\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2580,\"wires\":[[\"42d10b09.364e44\"]]},{\"id\":\"24dd1d48.864802\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"50\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":780,\"y\":2580,\"wires\":[[\"8a81824a.7443e\"]]},{\"id\":\"8a81824a.7443e\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":980,\"y\":2580,\"wires\":[[]]},{\"id\":\"c66da2da.59a64\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Get the original settings\",\"info\":\"\",\"x\":580,\"y\":2540,\"wires\":[]},{\"id\":\"2a0a537c.1457bc\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Replace one or more settings\",\"info\":\"\",\"x\":900,\"y\":2540,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\nP.S. The latter flow might be optimized e.g. by caching the current values in flow memory...\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nEvery Onvif device will contain a series of default media profiles.  Every profile contains following data:\n+ A unique name.\n+ A unique token which will only be used internally by these Onvif nodes (based on the name, the nodes will lookup the token automatically).\n+ The configuration for all available media services (audio, video, ptz ...). \n\nFor example the *'getProfiles'* action (in the example flow below) will return all available media profiles in my Onvif device:\n\n![Get media profiles](/images/onvif_get_profiles.png)\n\nWhen having a look e.g. at the details of the video encoding configuration, you will see a JPEG of resultion 320x240:\n\n![Example profile](/images/onvif_example_profile.png)\n\nSuch a profile names need to be specified for most media actions.  So instead of having to repeat the information over and over again, the Onvif device will use the information from the specified profile.  For example when a snapshot as JPEG with resolution 320x240 is needed, you only need to specify the profile name *'JPEG_320x240'* ...\n\nFollowing example flow shows how to view and manipulate profiles:\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n***TODO: Not possible yet to create an entire new profile, incl. configurations.***\n\n### Snapshot images\n\nRemark: to be able to run the example flow, some manual interventions are required:\n+ The node-red-contrib-image-output should be installed, to show the snapshot image in the flow editor.\n+ Select an available profile from your Onvif device via the 'search' icon!  Indeed the resolution of the snapshot image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n+ In the first flow the username and password (of the Onvif config node) should be repeated in the httprequest node.\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's **credentials** (username/password) should be repeated in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"907621a9.98d79\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1430,\"y\":100,\"wires\":[[\"ddb99a63.98e938\"]]},{\"id\":\"7074982e.851308\",\"type\":\"image\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"width\":200,\"x\":1820,\"y\":100,\"wires\":[]},{\"id\":\"ddb99a63.98e938\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"JPEG_320x240\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":1630,\"y\":100,\"wires\":[[\"7074982e.851308\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"port\":\"80\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node\nThis node allows to listen to all the events pushed by the device.  Depending on the device, different events can be pushed to the clients that are listening:\n+ Motion detection\n+ Face detection\n+ CPU percentage\n+ ...\n\nThe more embedded electronics your camera contains (e.g. PIR sensor, microphone, external I/O input, ...), the more events might be available:\n\n![Camera events](https://user-images.githubusercontent.com/14224149/77259583-b4050e80-6c82-11ea-85d6-e8fb0a23c836.png)\n\nCAUTION: You need to enable those events once **manually** (via the web interface of your camera), because that is not part of the Onvif protocol!  For example the web interface of my Hikvision camera:\n\n![Hikvision web interface](https://user-images.githubusercontent.com/14224149/77230188-b6883b00-6b92-11ea-8ac4-cbcf8d1c2c42.png)\n\nThe node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives.  When the node is listening, every event (pushed by the Onvif device toward the Node-RED flow) will be converted to an output message:\n\n![Event flow](https://user-images.githubusercontent.com/14224149/77230064-ec78ef80-6b91-11ea-97d8-7c267ac863ff.png)\n\n```\n[{\"id\":\"748f5110.c57f7\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1020,\"wires\":[[\"12ad9448.0899fc\"]]},{\"id\":\"12ad9448.0899fc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1020,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"801f0dd.3e0b3f\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1060,\"wires\":[[\"b7dc815b.29f4a\"]]},{\"id\":\"b7dc815b.29f4a\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1060,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"2774034b.91102c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":1140,\"wires\":[[\"e59923ee.4db8d\"]]},{\"id\":\"e59923ee.4db8d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1140,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"120e35a2.b4da5a\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":1100,\"wires\":[[\"2c1017b7.e2e448\"]]},{\"id\":\"2c1017b7.e2e448\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1100,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"a8f7752e.2998f8\",\"type\":\"onvif-events\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"action\":\"\",\"x\":670,\"y\":1020,\"wires\":[[\"61d49191.38fb9\"]]},{\"id\":\"61d49191.38fb9\",\"type\":\"switch\",\"z\":\"b3db206e.b7139\",\"name\":\"Topic ProcessorUsage\",\"property\":\"topic\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"eq\",\"v\":\"Monitoring/ProcessorUsage\",\"vt\":\"str\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":1,\"x\":880,\"y\":1020,\"wires\":[[\"9d4463a2.1d43d\"]]},{\"id\":\"9d4463a2.1d43d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"Get value\",\"rules\":[{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"data.value\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1080,\"y\":1020,\"wires\":[[\"97abe077.30ed\"]]},{\"id\":\"97abe077.30ed\",\"type\":\"ui_chart\",\"z\":\"b3db206e.b7139\",\"name\":\"Camera CPU %\",\"group\":\"22787703.a0e968\",\"order\":2,\"width\":0,\"height\":0,\"label\":\"Camera CPU %\",\"chartType\":\"line\",\"legend\":\"false\",\"xformat\":\"HH:mm:ss\",\"interpolate\":\"linear\",\"nodata\":\"\",\"dot\":false,\"ymin\":\"0\",\"ymax\":\"110\",\"removeOlder\":1,\"removeOlderPoints\":\"50\",\"removeOlderUnit\":\"3600\",\"cutout\":0,\"useOneColor\":false,\"colors\":[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#2ca02c\",\"#98df8a\",\"#d62728\",\"#ff9896\",\"#9467bd\",\"#c5b0d5\"],\"useOldStyle\":false,\"outputs\":1,\"x\":1260,\"y\":1020,\"wires\":[[]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"},{\"id\":\"22787703.a0e968\",\"type\":\"ui_group\",\"z\":\"\",\"name\":\"Web push notifications\",\"tab\":\"80f0e178.bbf4a\",\"disp\":true,\"width\":\"6\",\"collapse\":false},{\"id\":\"80f0e178.bbf4a\",\"type\":\"ui_tab\",\"z\":\"\",\"name\":\"Home\",\"icon\":\"dashboard\",\"order\":1,\"disabled\":false,\"hidden\":false}]\n```\nThe above flow will display the camera's CPU usage in the Node-RED dashboard:\n\n![CPU usage](https://user-images.githubusercontent.com/14224149/77230208-ea636080-6b92-11ea-9a3c-f7e753023b24.png)\n\nThe following action values can be passed:\n+ ***start***: Start listening for events pushed by the Onvif device towards the Node-RED flow.\n+ ***stop***: Stop listening for events pushed by the Onvif device towards the Node-RED flow.\n+ **getEventServiceCapabilities***:  to determine if your camera supports pull point listeners.\n\n   ![Event service capabilities](https://user-images.githubusercontent.com/14224149/77260980-6ccf4b80-6c8b-11ea-857b-d4fd6171e883.png)\n   \n   The WSPullPointSupport should be ```true```, otherwise your camera doesn't support pull-point events!\n\n+ ***getEventProperties***: to determine which events your camera can push.  For example for my Hikvision camera:\n\n   ![image](https://user-images.githubusercontent.com/14224149/77261021-b91a8b80-6c8b-11ea-964f-a52c39c17f63.png)\n\nRemarks: \n+ As soon as the node is listening for events, the node status will change from *\"connected\"* to *\"listening\"*.\n+ Onvif devices can support 3 types of event transport mechanisms, but currently this node only supports *pull-point* events.  In fact this is not a real push mechanism, which uses polling behind the scenes ...\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.10","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-5Rvw1zm0NYfnnp+pHmoIUJWffv3mdPBsXRdPPaJsSycTaefeA3X7ZoMEBsuvsRMYHrTG83FN4ZixPFbHZUXk5g==","shasum":"5fc30418686ae4343c44b5649878645ce6491092","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.10.tgz","fileCount":52,"unpackedSize":835785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf285RCRA9TVsSAnZWagAALzYP+wb4EedsRleuvNOo5Gp7\nUqy0KQXeyoly4zMrahC+t2KkN1Liwo9SnuXUvzT/cvLvmrdBi//pHbdBKGzt\n90116GNbYvpse8+XUR5EUbWOWjcGCt4S02VIGnEr00YAiDHQb2/rS0BMTLbH\nfSqtXJURVV9/bp0U62+BujPczB0u4NJK8iekALmxu3GOKp5nj3jL5awlY96A\nHGes8q0wVSpYYLk+h3TtfQ53HkbiuGVBMkA5BJ855Q54u9TV4azcU5QbOttY\nDaRzlUUno7Sgzq1hqwM2TI8BTlDmWOeco4Ck7S0nnjnXH1FXNYtFtswTM61V\nLfloD36HxPBjWjcgYG5XcqWoYKGTOvAeF0J9TX83RS552vgFvh8PU3NN/Yeu\noKdXpTQyZV0OgqgfNs152p2uyxrae/LnjHGMpNjiqVh7SnBozlv5J7yMQkzr\nhU3mRw0aH3SVPmC6JLimNGSHfA3k0dDmg0wCCL1y3insJh4uzVvBEXIvXR0Y\nijTCtQ17dYBszPHvMIxiM10B6dFCOAAQbb1kGZ4mU6SQrGzAIj/kMvw1Tug+\ndNR1p8HfSXxe4hJ5kxL1ZZjrsUXL0NyjORJKM/9URxNUBAsA6KEJCW1wMe+9\nC6gUT8LvhJ7rAmTx30PjuPB9OwVntuBsLjLWyeiHML8fUcUKWunBI0/C5fGg\nKSvI\r\n=kEei\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICy19jPp1UvlYqbUD2TgbPeqqCbzJgfk7+EDKa2+ERHTAiB7jZv7Aoo2imBe79e89nG8RQInbooTIWVgsR2UnZghSw=="}]},"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.10_1608240721188_0.5265584116251201"},"_hasShrinkwrap":false},"0.0.1-beta.11":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.11","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"git+https://github.com/agsh/onvif.git","request":">= 2.88.2"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.11","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-PcwPbBxTaE9L1gZdTj15g/iP4m8Xk8nklZOSnRgwySCO6Qc/L+jy3s9rmBzXTDgug3GrD9J41UKSl7ojiaZPVQ==","shasum":"c3211c41d5acafd78c8139b978383eac25f85d87","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.11.tgz","fileCount":52,"unpackedSize":835785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf29G1CRA9TVsSAnZWagAA8V4P/2DPgee1KXeFRsPL2KvB\nTNP1RR1qOYiuO08e/jXNxuniXnz6v9HFhKs2HvZgyBFtaLwJJOP61JYBb7/e\nSNnuwkneD8ChHi1qz72hnMdHmIf65Q8qMkWPuCc3Tn1CLCaZie3U5l7IbfkS\n00RbakXXw8pK8d4UzxOc8MwXWr6C2jLlMySStJ8dVWQNGvDokW3fKtENUH6v\nhM2OgoU03csBIB5WkIXrjAki5jhoMa0W8RdEy300Qe5/fxnXR1913MVgcWP1\nG6c1LlVuuolxGgtppVLIckoEGvDGiddGlQrcqL3wSl3npmod34cmJhyEMr9w\nJ0vevJ4K8jBjA8FmK/VFnQrg+WDmCHR2/gYQ9+DwDPPGXAYa1KNrrb4qgnk9\neblQA2ePG6ExEQGKPS7mx5dKC5Y9kn/4T30SsktU6rbanqYLfVQ2wouYl8Ws\nBgHCBWiPjiavF1ocB4YZVGtJwE5DrJPqp15ohO/znxJl2uWUwcLSzLFl/fc1\nV3XnzrneSUQQjptc/0Zpq5nPdjxmiqvWVB/8W5WK9/LvOHmLLlzkfMUnWKx7\nS2gyNbXb1O1rUFvspjdmsxnLpminBQ4Yx5hDWNdo4+++QeBlekllK6bRDGOz\nSBYD/i5R3/E7Cq25wuKqY6qulzPwyq7Dd3Xwcb7sWU7mPHBcuzF3Qg9Qo8s6\nmOB3\r\n=MSL/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICPnj8i8LIpygeR1n4Uu9I7Jp4EUeKD99E/023WPTfJvAiBfKaxI2Rh0czueCM+eGC21Api2yvhA0UE0vRCZxOf4Gg=="}]},"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.11_1608241588708_0.5897353133068695"},"_hasShrinkwrap":false},"0.0.1-beta.12":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.12","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"git+https://github.com/agsh/onvif.git","request":">= 2.88.2"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.12","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-sOhEKca73mrazSDkjqpez59+NHXNVNsD9eEDJroDlpTOVyDpYfByQFFRgOi73d4zI69Wg3aUjZ5HpeIEKfUQJg==","shasum":"b097fb448abf504664bfaba0e136f3a09dd05fb5","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.12.tgz","fileCount":52,"unpackedSize":835785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf29OzCRA9TVsSAnZWagAAdagP/0VCZ7DwFc1AqnAT9GMu\nzbLG7BEjsCPlS8xqCBO6o+YQvcK9LxBVJqM/PXhZMOMiLijDHzZDK6AygbBO\nElcjOUUfgGTP6LAje3ej2BRcT6OsLxYh5oDgHMSOpPE+HFaV1qYg/5z/1PtM\nRggzIn+9nRsuoo1ADwPSohsBzuSIh321zkSEyGCmGahVuklRIwJmuBGNu7Xc\nfEOBnfMdYgNB9u/s7aXHc3I6EVHPQacrYYpJQS8zub56TKNIF+RIXUGDaMIe\nc0zHjxmEE+dDmIk3qMsLpTxwoL+wvc27DdX6I9nRGH3sjpQpBfVGFygL8fF0\nTyrM6264LohoX3LBasqo0A3UZWHG8HGRHPXHI3veFSt9hvUh1T0B1sguCXCJ\nf5EDFdSBnFhVSjBXvx96vaBhpFrW34jKynAQSin2jfKU6I+Ela90Dlcvp/kb\nGs13LNcOu4fZ1A6CGeYQ514rWdNtL2YiWkejO6ibH4T52ndkMmtqXg/Idw7t\nHxJN8GYz2l84//ncQQNarH3XdYWRqsM5ZdPnQqiq4VXpo+qYnz6+ebjH9LCw\n7JOUEH2CpjeDuAGG6OZiy/Lv78sJKAyUJrEcVu1ztIbtDv5oq91K0QvJZ0wI\neXC4ScjRB326T7k+mRsqCWbRTx2zt1fGdlBaU23WlEkB6YBMceA+uCYZofVC\n+Sml\r\n=QiLl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBF3z8C0FjdUyGYJUFRRN7UJj06XPdLz4Y+DwAJb0gx4AiEAq1Mbrd4r+VuqyqYVW79tcECaQosL9eQMI+qTtgJwA9c="}]},"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.12_1608242098675_0.5290919689331761"},"_hasShrinkwrap":false},"0.0.1-beta.13":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.13","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"^0.6.3","request":">= 2.88.2"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION  !!!**\n\n*Update 28-11-2020: I get frequently the question why I haven't published these nodes on NPM yet.*\n\n*Well the answer is very simple: a lack of free time...*\n\n*Our friend @SuperNinja73 has been so kind to perform a large series of tests (see [test results](https://discourse.nodered.org/t/node-red-contrib-onvif-nodes-beta-test/33722/2?u=bartbutenaers)).*\n\n*Based on these test result, I concluded that the comera profile configuration via these nodes is not user friendly.*\n\n*But I don't have the time to develop and maintain an entire Onvif device manager inside Node-RED.*\n\n*To solve this I would like to generate automatically a user interface based on the [onvif.xsd](https://www.onvif.org/onvif/ver10/schema/onvif.xsd) file.*\n\n*I have compared some libraries, but at the end I [agreed](https://discourse.nodered.org/t/editor-based-on-xsd/33965/11?u=bartbutenaers) with Nick to implement this functionality in the Node-RED JSON editor.*\n\n*Because then it can be reused by other node developers.*\n\n*However it seems the JSON schema specification is rather large, so it is a hell of a job to implement this in my very limited time.*\n\n*That is why it is all taking so long ...*\n\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red), to install this node directly from my Github repository:\n```\nnpm install bartbutenaers/node-red-contrib-onvif-nodes\n```\nNote: the beta version on NPM is obsolete, so don't use it!!!  And ***git*** needs to be installed, otherwise the above command won't work!\n\n## Support my Node-RED developments\n\nPlease buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...\n\n<a href=\"https://www.buymeacoffee.com/bartbutenaers\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy my wife a coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\n\nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address (and the port number), which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device:\n+ IP address: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n+ Port: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.  If no port number visible, use port ```80``` by default.\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Imaging node\nThis node offers functionality to configure imaging specific properties.\n\nThe following example flow shows how to read and set those properties:\n\n![imaging get and set](https://user-images.githubusercontent.com/14224149/77259002-a0f03f80-6c7e-11ea-8b72-7fbc2f155b4d.png)\n```\n[{\"id\":\"7af75a72.95fca4\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1600,\"wires\":[[\"57608e7d.d0012\"]]},{\"id\":\"3f04f383.92106c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1600,\"wires\":[[\"58099d05.b3bd54\"]]},{\"id\":\"57608e7d.d0012\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1600,\"wires\":[]},{\"id\":\"58099d05.b3bd54\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getImagingSettings\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1600,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"802207fe.5bec58\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1660,\"wires\":[[\"7692be04.f17cc\"]]},{\"id\":\"7692be04.f17cc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.colorSaturation\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.contrast\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.sharpness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1660,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\n+ The action ***getImagingSettings*** gets the current imaging setting values:\n\n   ![current imaging settings](https://user-images.githubusercontent.com/14224149/77259082-50c5ad00-6c7f-11ea-8805-a9f428f89429.png)\n   \n+ The action ***getImagingSettings*** allows to set (one or more) new imaging setting values, via\n   + ```msg.payload.backlightCompensation```\n   + ```msg.payload.brightness```\n   + ```msg.payload.colorSaturation```\n   + ```msg.payload.contrast```\n   + ```msg.payload.exposure```\n   + ```msg.payload.focus```\n   + ```msg.payload.irCutFilter```   \n   + ```msg.payload.sharpness```   \n   + ```msg.payload.wideDynamicRange```    \n   + ```msg.payload.whiteBalance```    \n   + ```msg.payload.focus```    \n   + ```msg.payload.extension```   \n   \nYet another flow to demonstrate how to update those values via user gestures (e.g. inject buttons in the flow editor):\n\n![set imaging settings](https://user-images.githubusercontent.com/14224149/77259182-18729e80-6c80-11ea-8d6b-f912c1330156.png)\n```\n[{\"id\":\"1517f507.2f887b\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":1760,\"wires\":[[\"d3662621.dc4228\"]]},{\"id\":\"66f4ba6d.1e5d64\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1800,\"wires\":[[\"23a1fdf0.ed8632\"]]},{\"id\":\"d3662621.dc4228\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness + 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness += 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action     = \\\"setImagingSettings\\\";\\nmsg.payload = {\\n    brightness: brightness\\n}\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1760,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"23a1fdf0.ed8632\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness - 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness -= 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action = \\\"setImagingSettings\\\";\\nmsg.payload = {\\n    brightness: brightness\\n};\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1800,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2792ce4a.dc8d92\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness minimum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1840,\"wires\":[[\"c31d8781.1c3c38\"]]},{\"id\":\"fa76b70c.16ff68\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness maximum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":320,\"y\":1880,\"wires\":[[\"2e3afa6a.088556\"]]},{\"id\":\"c31d8781.1c3c38\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"1\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1840,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2e3afa6a.088556\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"100\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1880,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"20bd08d5.3e1068\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1760,\"wires\":[[\"417ef964.918e88\"]]},{\"id\":\"417ef964.918e88\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1760,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\nWhen setting new values, only the updated values should be specified (according to the Onvif standard).  However some brands of camera's seem to require that all values are specified.  In that case it might be useful to get the current values first, and then replace some of the values:\n\n![Replace values](https://user-images.githubusercontent.com/14224149/77587599-86210380-6ee8-11ea-82cc-ffbe82a840e7.png)\n```\n[{\"id\":\"42d10b09.364e44\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"getImagingSettings\",\"x\":580,\"y\":2580,\"wires\":[[\"24dd1d48.864802\"]]},{\"id\":\"c07c06d7.31a128\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2580,\"wires\":[[\"42d10b09.364e44\"]]},{\"id\":\"24dd1d48.864802\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"50\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":780,\"y\":2580,\"wires\":[[\"8a81824a.7443e\"]]},{\"id\":\"8a81824a.7443e\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":980,\"y\":2580,\"wires\":[[]]},{\"id\":\"c66da2da.59a64\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Get the original settings\",\"info\":\"\",\"x\":580,\"y\":2540,\"wires\":[]},{\"id\":\"2a0a537c.1457bc\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Replace one or more settings\",\"info\":\"\",\"x\":900,\"y\":2540,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\nP.S. The latter flow might be optimized e.g. by caching the current values in flow memory...\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nEvery Onvif device will contain a series of default media profiles.  Every profile contains following data:\n+ A unique name.\n+ A unique token which will only be used internally by these Onvif nodes (based on the name, the nodes will lookup the token automatically).\n+ The configuration for all available media services (audio, video, ptz ...). \n\nFor example the *'getProfiles'* action (in the example flow below) will return all available media profiles in my Onvif device:\n\n![Get media profiles](/images/onvif_get_profiles.png)\n\nWhen having a look e.g. at the details of the video encoding configuration, you will see a JPEG of resultion 320x240:\n\n![Example profile](/images/onvif_example_profile.png)\n\nSuch a profile names need to be specified for most media actions.  So instead of having to repeat the information over and over again, the Onvif device will use the information from the specified profile.  For example when a snapshot as JPEG with resolution 320x240 is needed, you only need to specify the profile name *'JPEG_320x240'* ...\n\nFollowing example flow shows how to view and manipulate profiles:\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n***TODO: Not possible yet to create an entire new profile, incl. configurations.***\n\n### Snapshot images\n\nRemark: to be able to run the example flow, some manual interventions are required:\n+ The node-red-contrib-image-output should be installed, to show the snapshot image in the flow editor.\n+ Select an available profile from your Onvif device via the 'search' icon!  Indeed the resolution of the snapshot image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n+ In the first flow the username and password (of the Onvif config node) should be repeated in the httprequest node.\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's **credentials** (username/password) should be repeated in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"907621a9.98d79\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1430,\"y\":100,\"wires\":[[\"ddb99a63.98e938\"]]},{\"id\":\"7074982e.851308\",\"type\":\"image\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"width\":200,\"x\":1820,\"y\":100,\"wires\":[]},{\"id\":\"ddb99a63.98e938\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"JPEG_320x240\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":1630,\"y\":100,\"wires\":[[\"7074982e.851308\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"port\":\"80\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node\nThis node allows to listen to all the events pushed by the device.  Depending on the device, different events can be pushed to the clients that are listening:\n+ Motion detection\n+ Face detection\n+ CPU percentage\n+ ...\n\nThe more embedded electronics your camera contains (e.g. PIR sensor, microphone, external I/O input, ...), the more events might be available:\n\n![Camera events](https://user-images.githubusercontent.com/14224149/77259583-b4050e80-6c82-11ea-85d6-e8fb0a23c836.png)\n\nCAUTION: You need to enable those events once **manually** (via the web interface of your camera), because that is not part of the Onvif protocol!  For example the web interface of my Hikvision camera:\n\n![Hikvision web interface](https://user-images.githubusercontent.com/14224149/77230188-b6883b00-6b92-11ea-8ac4-cbcf8d1c2c42.png)\n\nThe node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives.  When the node is listening, every event (pushed by the Onvif device toward the Node-RED flow) will be converted to an output message:\n\n![Event flow](https://user-images.githubusercontent.com/14224149/77230064-ec78ef80-6b91-11ea-97d8-7c267ac863ff.png)\n\n```\n[{\"id\":\"748f5110.c57f7\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1020,\"wires\":[[\"12ad9448.0899fc\"]]},{\"id\":\"12ad9448.0899fc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1020,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"801f0dd.3e0b3f\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1060,\"wires\":[[\"b7dc815b.29f4a\"]]},{\"id\":\"b7dc815b.29f4a\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1060,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"2774034b.91102c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":1140,\"wires\":[[\"e59923ee.4db8d\"]]},{\"id\":\"e59923ee.4db8d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1140,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"120e35a2.b4da5a\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":1100,\"wires\":[[\"2c1017b7.e2e448\"]]},{\"id\":\"2c1017b7.e2e448\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1100,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"a8f7752e.2998f8\",\"type\":\"onvif-events\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"action\":\"\",\"x\":670,\"y\":1020,\"wires\":[[\"61d49191.38fb9\"]]},{\"id\":\"61d49191.38fb9\",\"type\":\"switch\",\"z\":\"b3db206e.b7139\",\"name\":\"Topic ProcessorUsage\",\"property\":\"topic\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"eq\",\"v\":\"Monitoring/ProcessorUsage\",\"vt\":\"str\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":1,\"x\":880,\"y\":1020,\"wires\":[[\"9d4463a2.1d43d\"]]},{\"id\":\"9d4463a2.1d43d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"Get value\",\"rules\":[{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"data.value\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1080,\"y\":1020,\"wires\":[[\"97abe077.30ed\"]]},{\"id\":\"97abe077.30ed\",\"type\":\"ui_chart\",\"z\":\"b3db206e.b7139\",\"name\":\"Camera CPU %\",\"group\":\"22787703.a0e968\",\"order\":2,\"width\":0,\"height\":0,\"label\":\"Camera CPU %\",\"chartType\":\"line\",\"legend\":\"false\",\"xformat\":\"HH:mm:ss\",\"interpolate\":\"linear\",\"nodata\":\"\",\"dot\":false,\"ymin\":\"0\",\"ymax\":\"110\",\"removeOlder\":1,\"removeOlderPoints\":\"50\",\"removeOlderUnit\":\"3600\",\"cutout\":0,\"useOneColor\":false,\"colors\":[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#2ca02c\",\"#98df8a\",\"#d62728\",\"#ff9896\",\"#9467bd\",\"#c5b0d5\"],\"useOldStyle\":false,\"outputs\":1,\"x\":1260,\"y\":1020,\"wires\":[[]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"},{\"id\":\"22787703.a0e968\",\"type\":\"ui_group\",\"z\":\"\",\"name\":\"Web push notifications\",\"tab\":\"80f0e178.bbf4a\",\"disp\":true,\"width\":\"6\",\"collapse\":false},{\"id\":\"80f0e178.bbf4a\",\"type\":\"ui_tab\",\"z\":\"\",\"name\":\"Home\",\"icon\":\"dashboard\",\"order\":1,\"disabled\":false,\"hidden\":false}]\n```\nThe above flow will display the camera's CPU usage in the Node-RED dashboard:\n\n![CPU usage](https://user-images.githubusercontent.com/14224149/77230208-ea636080-6b92-11ea-9a3c-f7e753023b24.png)\n\nThe following action values can be passed:\n+ ***start***: Start listening for events pushed by the Onvif device towards the Node-RED flow.\n+ ***stop***: Stop listening for events pushed by the Onvif device towards the Node-RED flow.\n+ **getEventServiceCapabilities***:  to determine if your camera supports pull point listeners.\n\n   ![Event service capabilities](https://user-images.githubusercontent.com/14224149/77260980-6ccf4b80-6c8b-11ea-857b-d4fd6171e883.png)\n   \n   The WSPullPointSupport should be ```true```, otherwise your camera doesn't support pull-point events!\n\n+ ***getEventProperties***: to determine which events your camera can push.  For example for my Hikvision camera:\n\n   ![image](https://user-images.githubusercontent.com/14224149/77261021-b91a8b80-6c8b-11ea-964f-a52c39c17f63.png)\n\nRemarks: \n+ As soon as the node is listening for events, the node status will change from *\"connected\"* to *\"listening\"*.\n+ Onvif devices can support 3 types of event transport mechanisms, but currently this node only supports *pull-point* events.  In fact this is not a real push mechanism, which uses polling behind the scenes ...\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.13","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-8sXceplo2VoK8iKeDk/F5QREZkcjC/sJZuzoNrETY0lwSq8n96o/w+0T11mjHxiOus8n2jKUdy66P1FvEA2LXA==","shasum":"c7a0a59112f715faec2abe4a1dc0970c7727d9d5","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.13.tgz","fileCount":52,"unpackedSize":835758,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf42meCRA9TVsSAnZWagAAVLkP/2H9NBHbGgnVl7pP571o\nz//bHr6jN1W0AxthTCapyof1TCl2sam8XPEWlMQ1zUCpjEvLfQapnRMDdCgk\nsm/qAfX0kxeZkZfZaqJEi0txh1TCp7Kk5hqpuGOqx7pLxUo1gy+V/P3KRrUM\nsVlbsoc47D/EAmz1BxRMBb6BVXmmrWYKROtsmSuM+UOeRHYYD2mHLVADhC3I\ntjbRyw9nDHkUAcn6N6ioFZOUY6otX762NgIhOqrdVnIOveUqgQth54QMUj5u\nugsST+JBDQU+4DmTuxFnGfeVlWsSTOM3R1jc2lqc4Ej9HwBVJDgfwA2WcMtH\ndAYgyFkseauikB7BCNajO4D/lfGLGdtiinMXVtpfHkjt28GJ8L6QE2Fe/o04\nJzgHSeTGi6mMtLXdPXaK4p0KyDIRsA4f6MlKc4GXgXuACp2BOGoNfFkBXf4o\npJGhe4+2HnAb2w2LaJ0L9s7P38rxzzdwd5QVUjTN9FHJaOGLo4F0eJc39/sX\nw2qgGKSm+vAkVknjWxDnUkwJ5euW6sBM5O0QcGoEP5v6HCh0iWbgrL9MEU37\nAicaqseRCSOAr/wbDpKmvop1t0Gx3NaW1AZRmlcX9qlSvRrNFxCXsSM7/+ld\nnTFOb0OzwLOvz/hnbzj32zaLiNFo1OJDq4KkEI5f6D174s4AT7C9uc7AxR0d\nuDIJ\r\n=Zs60\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi32Os1WUPHfZuTu7D+ZC+gTozMhJZDPom+ml/qdDVsgIgMBPRr0c9RryWgoSgH8SNKJUoRYgNmnanNPfAZ5mwyzA="}]},"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.13_1608739230144_0.3389782600186091"},"_hasShrinkwrap":false},"0.0.1-beta.14":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.14","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"^0.6.3","request":">= 2.88.2"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.14","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-fRdjJ+/VpNO/HxAq2dgb+nPNT/hsXPqz39+vlPjiWUnBp9uOX5dgPm3zTqJuqr0g9DS/eEavToVdvG0uuKrbCg==","shasum":"2d6fba7ec600977bc3120407dcb5e73062e56108","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.14.tgz","fileCount":52,"unpackedSize":835758,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf43JACRA9TVsSAnZWagAAWckP/0gZGZTrMYetfZZN0FhC\nos/fOwk82v1U0N5hi2mnwW25p9zMluRNbpSe4LrddBL2DKFNN1+8rsnMatPL\nk7ztLhCYJA4YEFzjnGUH9xuvVGQzc1chouJB+4SB6kMh7TZfowviy8YF8A5r\nNU4WQMUnj7y4o8RCmuJIsM6Jpc+MSYv8HTzmij3y5f8XKTnBftaoD57j8Z1c\nwLFoyXzW9OYQSFQkzyfZ3MV5XL1TUTa2ToVyvS7HIkh1SBH4b7z0RY4IUwWf\n6pMVTlUQJkD/0VN5lk8RirjiA2lhnPONDyQ8WbrRbVPctmK5MdvHROICRCtD\nzY2tQ63eUSqFP/RNFSm/mRLduFHIB8IoQPJzCdLf1Hl+yGWBS57nhigxUDuS\n+3Rr1k7ar8+ynYcrSVDjpbZsw3OmS1K2dNFDRqQK+M07d7WFD2gg0vqd9vMA\nxrvuotRMNZoIPKMPjE6yMspi3XgXfhdvN/UKANwlltwnGz0gOu93gmHcXx0U\nJAl+G4ufNTOO47ZZfmSqVPKtKLRwuN2OIoblMHHAy2lwjA+ut2Y7cNnaluSB\ne5nzR0hJUgljssqHvpD98cGE/rh/MCAxDpPANBjLBMaD6CxKaKpu4A9WUIKN\nPJl8l/SvxFdyByKthGChpzYwP8Yd4jLv9za2gTngiv1O8KvnQw70mLfSBJr+\nECfY\r\n=4gAM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEa8ArrEqyL4PKB8PpQMuw7ZIYEJJf9ihjnm5loIRZ58AiBKQpEzNLNc/q5M5tajvdorOXCgF5aPc1Z/1vuIszg2Xg=="}]},"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.14_1608741440053_0.3936774422316387"},"_hasShrinkwrap":false},"0.0.1-beta.15":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.15","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"0.6.5","request":">= 2.88.2"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/tarball/master","readme":"# node-red-contrib-onvif-nodes\nNode Red nodes for communicating with OnVif compliant IP devices\n\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION  !!!**\n\n*Update 28-11-2020: I get frequently the question why I haven't published these nodes on NPM yet.*\n\n*Well the answer is very simple: a lack of free time...*\n\n*Our friend @SuperNinja73 has been so kind to perform a large series of tests (see [test results](https://discourse.nodered.org/t/node-red-contrib-onvif-nodes-beta-test/33722/2?u=bartbutenaers)).*\n\n*Based on these test result, I concluded that the comera profile configuration via these nodes is not user friendly.*\n\n*But I don't have the time to develop and maintain an entire Onvif device manager inside Node-RED.*\n\n*To solve this I would like to generate automatically a user interface based on the [onvif.xsd](https://www.onvif.org/onvif/ver10/schema/onvif.xsd) file.*\n\n*I have compared some libraries, but at the end I [agreed](https://discourse.nodered.org/t/editor-based-on-xsd/33965/11?u=bartbutenaers) with Nick to implement this functionality in the Node-RED JSON editor.*\n\n*Because then it can be reused by other node developers.*\n\n*However it seems the JSON schema specification is rather large, so it is a hell of a job to implement this in my very limited time.*\n\n*That is why it is all taking so long ...*\n\n\n## Install\nRun the following npm command in your Node-RED user directory (typically ~/.node-red), to install the latest beta version of this node:\n```\nnpm install node-red-contrib-onvif-nodes@0.0.1-beta.15\n```\nSee the [releases](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/releases) page for an overview of what has changed per release.\n\n## Support my Node-RED developments\n\nPlease buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...\n\n<a href=\"https://www.buymeacoffee.com/bartbutenaers\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy my wife a coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n\n## Onvif basics\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\n\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \n\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\n\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\n+ Device discovery\n+ Device management\n+ Media configuration\n+ Real time viewing\n+ Event handling\n+ PTZ camera control\n+ ...\n\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\n+ Profile G: functionalities of video storage, recording, ...\n+ Profile Q: functionalities of device discovery, ...\n+ ...\n\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\n\n## Missing functionality and problems\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\n\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\n\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\n\nOr if you have programming skills, you might create two pull requests instead.\n\n## Discovery node\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\n\n![Broadcast flow](/images/onvif_discovery_flow.png)\n\n```\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\n```\n\nThe Discovery node has following settings:\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\n\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\n\nFor every discovered OnVif compliant device, following data will be generated in the output message:\n\n![Broadcast debug](/images/onvif_discovery_debug.png)\n\nThe ***'XAddrs'*** field contains the IP address (and the port number), which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \n\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\n\n![Broadcast status](/images/onvif_discovery_status.png)\n\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\n\n## Config node\nThe config node contains all information required to connect to an Onvif device:\n+ IP address (or hostname): Specify either the IP address or the host (domain) name of the Onvif device.  When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\n+ Port: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.  If no port number visible, use port ```80``` by default.\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\n\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\n\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\n\n![Onvif config](/images/onvif_config_node.png)\n\nThe config node will handle all communication with the Onvif device:\n\n![Config node communication](/images/onvif_config_comm.png)\n\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\n\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\n\n## Imaging node\nThis node offers functionality to configure imaging specific properties.\n\nThe following example flow shows how to read and set those properties:\n\n![imaging get and set](https://user-images.githubusercontent.com/14224149/77259002-a0f03f80-6c7e-11ea-8b72-7fbc2f155b4d.png)\n```\n[{\"id\":\"7af75a72.95fca4\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1600,\"wires\":[[\"57608e7d.d0012\"]]},{\"id\":\"3f04f383.92106c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1600,\"wires\":[[\"58099d05.b3bd54\"]]},{\"id\":\"57608e7d.d0012\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1600,\"wires\":[]},{\"id\":\"58099d05.b3bd54\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getImagingSettings\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1600,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"802207fe.5bec58\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1660,\"wires\":[[\"7692be04.f17cc\"]]},{\"id\":\"7692be04.f17cc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.colorSaturation\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.contrast\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.sharpness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1660,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\n+ The action ***getImagingSettings*** gets the current imaging setting values:\n\n   ![current imaging settings](https://user-images.githubusercontent.com/14224149/77259082-50c5ad00-6c7f-11ea-8805-a9f428f89429.png)\n   \n+ The action ***getImagingSettings*** allows to set (one or more) new imaging setting values, via\n   + ```msg.payload.backlightCompensation```\n   + ```msg.payload.brightness```\n   + ```msg.payload.colorSaturation```\n   + ```msg.payload.contrast```\n   + ```msg.payload.exposure```\n   + ```msg.payload.focus```\n   + ```msg.payload.irCutFilter```   \n   + ```msg.payload.sharpness```   \n   + ```msg.payload.wideDynamicRange```    \n   + ```msg.payload.whiteBalance```    \n   + ```msg.payload.focus```    \n   + ```msg.payload.extension```   \n   \nYet another flow to demonstrate how to update those values via user gestures (e.g. inject buttons in the flow editor):\n\n![set imaging settings](https://user-images.githubusercontent.com/14224149/77259182-18729e80-6c80-11ea-8d6b-f912c1330156.png)\n```\n[{\"id\":\"1517f507.2f887b\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":1760,\"wires\":[[\"d3662621.dc4228\"]]},{\"id\":\"66f4ba6d.1e5d64\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1800,\"wires\":[[\"23a1fdf0.ed8632\"]]},{\"id\":\"d3662621.dc4228\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness + 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness += 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action     = \\\"setImagingSettings\\\";\\nmsg.payload = {\\n    brightness: brightness\\n}\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1760,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"23a1fdf0.ed8632\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness - 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness -= 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action = \\\"setImagingSettings\\\";\\nmsg.payload = {\\n    brightness: brightness\\n};\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1800,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2792ce4a.dc8d92\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness minimum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1840,\"wires\":[[\"c31d8781.1c3c38\"]]},{\"id\":\"fa76b70c.16ff68\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness maximum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":320,\"y\":1880,\"wires\":[[\"2e3afa6a.088556\"]]},{\"id\":\"c31d8781.1c3c38\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"1\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1840,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2e3afa6a.088556\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"100\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1880,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"20bd08d5.3e1068\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1760,\"wires\":[[\"417ef964.918e88\"]]},{\"id\":\"417ef964.918e88\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1760,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\nWhen setting new values, only the updated values should be specified (according to the Onvif standard).  However some brands of camera's seem to require that all values are specified.  In that case it might be useful to get the current values first, and then replace some of the values:\n\n![Replace values](https://user-images.githubusercontent.com/14224149/77587599-86210380-6ee8-11ea-82cc-ffbe82a840e7.png)\n```\n[{\"id\":\"42d10b09.364e44\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"getImagingSettings\",\"x\":580,\"y\":2580,\"wires\":[[\"24dd1d48.864802\"]]},{\"id\":\"c07c06d7.31a128\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2580,\"wires\":[[\"42d10b09.364e44\"]]},{\"id\":\"24dd1d48.864802\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"50\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":780,\"y\":2580,\"wires\":[[\"8a81824a.7443e\"]]},{\"id\":\"8a81824a.7443e\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":980,\"y\":2580,\"wires\":[[]]},{\"id\":\"c66da2da.59a64\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Get the original settings\",\"info\":\"\",\"x\":580,\"y\":2540,\"wires\":[]},{\"id\":\"2a0a537c.1457bc\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Replace one or more settings\",\"info\":\"\",\"x\":900,\"y\":2540,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\n```\n\nP.S. The latter flow might be optimized e.g. by caching the current values in flow memory...\n\n## Media node\nThis node offers functionality about all kind of media, like audio/video/images.\n\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\n\n***TODO: action 'get OSDs' results in Method not found exception.***\n\n### Audio media\n\n![Audio media flow](/images/onvif_media_audio.png)\n\n```\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Video media\n\n![Video media flow](/images/onvif_media_video.png)\n\n```\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Stream URLs\n\n![Stream URLs flow](/images/onvif_media_streamurl.png)\n\n```\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\n\n### Media profiles\nEvery Onvif device will contain a series of default media profiles.  Every profile contains following data:\n+ A unique name.\n+ A unique token which will only be used internally by these Onvif nodes (based on the name, the nodes will lookup the token automatically).\n+ The configuration for all available media services (audio, video, ptz ...). \n\nFor example the *'getProfiles'* action (in the example flow below) will return all available media profiles in my Onvif device:\n\n![Get media profiles](/images/onvif_get_profiles.png)\n\nWhen having a look e.g. at the details of the video encoding configuration, you will see a JPEG of resultion 320x240:\n\n![Example profile](/images/onvif_example_profile.png)\n\nSuch a profile names need to be specified for most media actions.  So instead of having to repeat the information over and over again, the Onvif device will use the information from the specified profile.  For example when a snapshot as JPEG with resolution 320x240 is needed, you only need to specify the profile name *'JPEG_320x240'* ...\n\nFollowing example flow shows how to view and manipulate profiles:\n\t\n![Video media flow](/images/onvif_media_profiles.png)\n\n```\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n***TODO: Not possible yet to create an entire new profile, incl. configurations.***\n\n### Snapshot images\n\nRemark: to be able to run the example flow, some manual interventions are required:\n+ The node-red-contrib-image-output should be installed, to show the snapshot image in the flow editor.\n+ Select an available profile from your Onvif device via the 'search' icon!  Indeed the resolution of the snapshot image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \n+ In the first flow the username and password (of the Onvif config node) should be repeated in the httprequest node.\n\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\n\n![Media snapshot](/images/onvif_media_snapshot_http.png)\n\n```\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\n```\n\nHowever the flow will become complex and the device's **credentials** (username/password) should be repeated in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\n\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\n\n```\n[{\"id\":\"907621a9.98d79\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1430,\"y\":100,\"wires\":[[\"ddb99a63.98e938\"]]},{\"id\":\"7074982e.851308\",\"type\":\"image\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"width\":200,\"x\":1820,\"y\":100,\"wires\":[]},{\"id\":\"ddb99a63.98e938\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"JPEG_320x240\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":1630,\"y\":100,\"wires\":[[\"7074982e.851308\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"port\":\"80\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Device Node\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\n\n+ ***Device information***: brand, type, ...\n+ ***Hostname***: host name\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\n+ ***Services***: all services offered by the device.\n+ ***Capabilities***: all capabilities offered by the device.\n+ ***Scopes***: all scopes offered by the device.\n+ ***Service capabilities***: all service capabilities offered by the device.\n+ ***Reboot***: reboot the device remotely.\n+ ***Reconnect***: reconnect to the device again.\n\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\n\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\n\n![Device](/images/onvif_device.png)\n\n```\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n## Event Node\nThis node allows to listen to all the events pushed by the device.  Depending on the device, different events can be pushed to the clients that are listening:\n+ Motion detection\n+ Face detection\n+ CPU percentage\n+ ...\n\nThe more embedded electronics your camera contains (e.g. PIR sensor, microphone, external I/O input, ...), the more events might be available:\n\n![Camera events](https://user-images.githubusercontent.com/14224149/77259583-b4050e80-6c82-11ea-85d6-e8fb0a23c836.png)\n\nCAUTION: You need to enable those events once **manually** (via the web interface of your camera), because that is not part of the Onvif protocol!  For example the web interface of my Hikvision camera:\n\n![Hikvision web interface](https://user-images.githubusercontent.com/14224149/77230188-b6883b00-6b92-11ea-8ac4-cbcf8d1c2c42.png)\n\nThe node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives.  When the node is listening, every event (pushed by the Onvif device toward the Node-RED flow) will be converted to an output message:\n\n![Event flow](https://user-images.githubusercontent.com/14224149/77230064-ec78ef80-6b91-11ea-97d8-7c267ac863ff.png)\n\n```\n[{\"id\":\"748f5110.c57f7\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1020,\"wires\":[[\"12ad9448.0899fc\"]]},{\"id\":\"12ad9448.0899fc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1020,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"801f0dd.3e0b3f\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1060,\"wires\":[[\"b7dc815b.29f4a\"]]},{\"id\":\"b7dc815b.29f4a\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1060,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"2774034b.91102c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":1140,\"wires\":[[\"e59923ee.4db8d\"]]},{\"id\":\"e59923ee.4db8d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1140,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"120e35a2.b4da5a\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":1100,\"wires\":[[\"2c1017b7.e2e448\"]]},{\"id\":\"2c1017b7.e2e448\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1100,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"a8f7752e.2998f8\",\"type\":\"onvif-events\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"action\":\"\",\"x\":670,\"y\":1020,\"wires\":[[\"61d49191.38fb9\"]]},{\"id\":\"61d49191.38fb9\",\"type\":\"switch\",\"z\":\"b3db206e.b7139\",\"name\":\"Topic ProcessorUsage\",\"property\":\"topic\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"eq\",\"v\":\"Monitoring/ProcessorUsage\",\"vt\":\"str\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":1,\"x\":880,\"y\":1020,\"wires\":[[\"9d4463a2.1d43d\"]]},{\"id\":\"9d4463a2.1d43d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"Get value\",\"rules\":[{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"data.value\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1080,\"y\":1020,\"wires\":[[\"97abe077.30ed\"]]},{\"id\":\"97abe077.30ed\",\"type\":\"ui_chart\",\"z\":\"b3db206e.b7139\",\"name\":\"Camera CPU %\",\"group\":\"22787703.a0e968\",\"order\":2,\"width\":0,\"height\":0,\"label\":\"Camera CPU %\",\"chartType\":\"line\",\"legend\":\"false\",\"xformat\":\"HH:mm:ss\",\"interpolate\":\"linear\",\"nodata\":\"\",\"dot\":false,\"ymin\":\"0\",\"ymax\":\"110\",\"removeOlder\":1,\"removeOlderPoints\":\"50\",\"removeOlderUnit\":\"3600\",\"cutout\":0,\"useOneColor\":false,\"colors\":[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#2ca02c\",\"#98df8a\",\"#d62728\",\"#ff9896\",\"#9467bd\",\"#c5b0d5\"],\"useOldStyle\":false,\"outputs\":1,\"x\":1260,\"y\":1020,\"wires\":[[]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"},{\"id\":\"22787703.a0e968\",\"type\":\"ui_group\",\"z\":\"\",\"name\":\"Web push notifications\",\"tab\":\"80f0e178.bbf4a\",\"disp\":true,\"width\":\"6\",\"collapse\":false},{\"id\":\"80f0e178.bbf4a\",\"type\":\"ui_tab\",\"z\":\"\",\"name\":\"Home\",\"icon\":\"dashboard\",\"order\":1,\"disabled\":false,\"hidden\":false}]\n```\nThe above flow will display the camera's CPU usage in the Node-RED dashboard:\n\n![CPU usage](https://user-images.githubusercontent.com/14224149/77230208-ea636080-6b92-11ea-9a3c-f7e753023b24.png)\n\nThe following action values can be passed:\n+ ***start***: Start listening for events pushed by the Onvif device towards the Node-RED flow.\n+ ***stop***: Stop listening for events pushed by the Onvif device towards the Node-RED flow.\n+ **getEventServiceCapabilities***:  to determine if your camera supports pull point listeners.\n\n   ![Event service capabilities](https://user-images.githubusercontent.com/14224149/77260980-6ccf4b80-6c8b-11ea-857b-d4fd6171e883.png)\n   \n   The WSPullPointSupport should be ```true```, otherwise your camera doesn't support pull-point events!\n\n+ ***getEventProperties***: to determine which events your camera can push.  For example for my Hikvision camera:\n\n   ![image](https://user-images.githubusercontent.com/14224149/77261021-b91a8b80-6c8b-11ea-964f-a52c39c17f63.png)\n\nRemarks: \n+ As soon as the node is listening for events, the node status will change from *\"connected\"* to *\"listening\"*.\n+ Onvif devices can support 3 types of event transport mechanisms, but currently this node only supports *pull-point* events.  In fact this is not a real push mechanism, which uses polling behind the scenes ...\n\n## PTZ Node\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\n\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\n\n### Moving the camera\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\n\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\n\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\n\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\n\n![PTZ flow](/images/onvif_ptz_flow.png)\n\n```\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Home position\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\n\n![PTZ home](/images/onvif_ptz_home.png)\n\n```\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\n### Pre-programmed positions\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\n\n![PTZ preset](/images/onvif_ptz_preset.png)\n\n```\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \n\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\n\n### Get PTZ information\nA lot of information can be requested from the PTZ node:\n+ Minimum and maximum pan/tilt positions.\n+ Minimum and maximum zoom factors.\n+ Number of available preset positions.\n+ ...\n\n![PTZ info](/images/onvif_ptz_info.png)\n\n```\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\n```\n","readmeFilename":"README.md","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.15","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-0eYg4htNCUuWFT8tDzXfauANnHYJ7Lgb4eInhkjTGrOETYJUfEwRRuKfSmYk354BXEm5Wy0LbVfqJuP6ALVpvA==","shasum":"d06e6c483b1589a5f88bdecc4ee1c2095a029819","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.15.tgz","fileCount":52,"unpackedSize":843939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPahtCRA9TVsSAnZWagAARCwP/RjNJ2zn4B3QvzBg/rDl\nGlq+9kmoDYYfkM22DDde8Flvhe7k6Ngjwwh37c53yQIKaSjkRmu+zG+syQJI\nLFIMf9MHW5xLHiJkB7H08yhIZMdgUQd3SNPkbbgvJmFTx+yXUOpcWzY8iRpl\n84/kDSz8gwGpRsYmtZA/1jdoVSYfjNnBGABAoVaTROi+FGRrVR5khao+dXeL\n4DPOV3aMmHPcJxQNUQco1FUL19DqH28awyIB+3rFGBsJLD718s4mBXgDlnh6\n+OMHhm4C8RM8MTeHxA0qhwdFCIJnrztayiRgi+iKb1zV4R1js2FvgCd1LwQo\nts37QU6mnBTIWm6+gnaOcYEXuAu/RuMvaNv0crcATScP45jk1OHwtMI6E8ZO\nkqKP+dPNLrEc3/db+YM0AplyADdmF1LVks2vpRFdezAWGHpulYVcE2yOOhIE\nzQdcWSBPSt50qILObrD46ej8fMWyrFaZJYvRNBX021eiEsMELLFJf64rd2xK\ne4dKG7l7aVuuQ6Qoaaai0lTG5hpZjNbGbq0Zk3Yo8PPuTGiEHMPeJXIZpaID\nu9iSwyqSFZRG8SzVlbNSQ29JozPrhCABs3ZZFsj6D5Cv2pHiKj0jHhfq5MBZ\nkwkwqapsP7adr5LExfhonoUL1vVpt9Ngsg/OvxIl0yLFVyl+fteAanBdiBoq\nvbpz\r\n=Hfqa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZhwUqiiowqFjNaQtzB5fUjh2F6fFMf15vc5zS/znYegIhAJU2GUtyKtuLuxIQj7AqlG3ILAOqGEHDsSa11BxdMKSc"}]},"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.15_1631430765433_0.1573593158276234"},"_hasShrinkwrap":false},"0.0.1-beta.16":{"name":"node-red-contrib-onvif-nodes","version":"0.0.1-beta.16","description":"Node Red nodes for communicating with OnVif compliant IP devices","dependencies":{"onvif":"0.6.5","request":">= 2.88.2"},"author":{"name":"Bart Butenaers"},"license":"Apache-2.0","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"node-red":{"nodes":{"onvif-config":"onvif_config.js","onvif-device":"onvif_device.js","onvif-discovery":"onvif_discovery.js","onvif-imaging":"onvif_imaging.js","onvif-media":"onvif_media.js","onvif-ptz":"onvif_ptz.js","onvif-recording":"onvif_recording.js","onvif-events":"onvif_events.js"}},"_resolved":"","_integrity":"","_from":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git","_id":"node-red-contrib-onvif-nodes@0.0.1-beta.16","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-QtmtYncsnZEAXn0ouV2vh4KzcRgE8+iMAiRsqZAG0e4pGME3uAXput/tYhMjodj4BvmynCYgOCZ1n77y0i6uHg==","shasum":"ae584f0020e483016b5cc5a2effc45d89cd1dd91","tarball":"https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.16.tgz","fileCount":48,"unpackedSize":844852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh21ByCRA9TVsSAnZWagAA4BwP/AxEk0uwkNKI0UI5VaVf\nJKCSy7eFBpKqlsN6hTSZg64fY3E5Osxn12WZoOyxwRPvUAh37Ldl8i7dv2NZ\nK5mHVYHayI0kiLrPAinjkEfKopiW2gzgWUCeqdKnnsO7ZvdGbx4F6TfzrQNH\n47W0NN0avFxXU0bHSfMIiTMdlQL0kd6H/Y3nn15I/phn2pN86bLZPLC6e1cA\n/V/LxAd9AeSr853Z7fbxhGxrUwr1PpTeJu2MGh1eWB+K3Ie0k9QbJpcbBtj9\nP6fE5X4KsLqyklelIJsEXBorvO98W4UGbrzsbzjBY3ZYUb5TSsdFYkT6K0/W\nfkrFzjH9+CqZTxBPWMTI6P//E8fNwFAJI7hwKyI8t9dS0NgCqdUqqHwph+LS\nfLLNewUlimVDiwzBMIM7LE73IPaaYKFC0hDPhjYR1wZazt61b+xRz1+l0SSM\nvMTEn1crST9ZKGdANr1trIkUeFZJy+fEFtYVMQZPkoVSw8Mlh+h52+uNa+6i\nfEnlV4j4vI25IM8AXPHG5xce9FU8tKZW6X67wVx35+ufeKMHPZkIG8rB+Fb9\nnkQc7sFfHrxh3BaBT9rtbIl47BkhcqLIRe+PQKog4kuu5F1XSxX+0jGM9Uxd\nN2l8QbJAnP96+mfHBXmUglNKCWtiUqPuMxG4vAADxtpF2HFidfCdV+r9wtSv\ncki1\r\n=Uaqf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDG5/nRUkXRtj/hETaIrIU1E+YWERKokaCtziQwXz6I2AIhANtrICu7So3qanKRaxWhw3Lzc6l7M6d1/fucVFD5lwr4"}]},"_npmUser":{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"},"directories":{},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-red-contrib-onvif-nodes_0.0.1-beta.16_1636587999888_0.7163225882798581"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-04T20:09:22.410Z","0.0.1-beta.1":"2019-03-04T20:09:22.604Z","modified":"2022-05-11T03:43:26.267Z","0.0.1-beta.2":"2019-03-05T07:18:07.024Z","0.0.1-beta.3":"2019-03-10T23:41:31.630Z","0.0.1-beta.4":"2019-03-11T22:21:28.928Z","0.0.1-beta.5":"2019-03-12T21:21:55.570Z","0.0.1-beta.6":"2019-03-14T22:13:57.841Z","0.0.1-beta.7":"2020-03-21T20:42:43.567Z","0.0.1-beta.8":"2020-03-22T22:06:34.330Z","0.0.1-beta.9":"2020-03-25T21:37:10.192Z","0.0.1-beta.10":"2020-12-17T21:32:01.416Z","0.0.1-beta.11":"2020-12-17T21:46:28.889Z","0.0.1-beta.12":"2020-12-17T21:54:58.838Z","0.0.1-beta.13":"2020-12-23T16:00:30.285Z","0.0.1-beta.14":"2020-12-23T16:37:20.253Z","0.0.1-beta.15":"2021-09-12T07:12:45.642Z","0.0.1-beta.16":"2021-11-10T23:46:40.188Z"},"maintainers":[{"name":"bartbutenaers","email":"bart.butenaers@gmail.com"}],"description":"Node Red nodes for communicating with OnVif compliant IP devices","homepage":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes","keywords":["onvif","ip","camera","snapshot","ptz","rtsp","stream","surveillance"],"repository":{"type":"git","url":"git+https://github.com/bartbutenaers/node-red-contrib-onvif-nodes.git"},"author":{"name":"Bart Butenaers"},"bugs":{"url":"https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues"},"license":"Apache-2.0","readme":"# node-red-contrib-onvif-nodes\r\nNode Red nodes for communicating with OnVif compliant IP devices\r\n\r\n**THIS IS AN EXPERIMENTAL NODE-RED CONTRIBUTION  !!!**\r\n\r\n*Update 28-11-2020: I get frequently the question why I haven't published these nodes on NPM yet.*\r\n\r\n*Well the answer is very simple: a lack of free time...*\r\n\r\n*Our friend @SuperNinja73 has been so kind to perform a large series of tests (see [test results](https://discourse.nodered.org/t/node-red-contrib-onvif-nodes-beta-test/33722/2?u=bartbutenaers)).*\r\n\r\n*Based on these test result, I concluded that the comera profile configuration via these nodes is not user friendly.*\r\n\r\n*But I don't have the time to develop and maintain an entire Onvif device manager inside Node-RED.*\r\n\r\n*To solve this I would like to generate automatically a user interface based on the [onvif.xsd](https://www.onvif.org/onvif/ver10/schema/onvif.xsd) file.*\r\n\r\n*I have compared some libraries, but at the end I [agreed](https://discourse.nodered.org/t/editor-based-on-xsd/33965/11?u=bartbutenaers) with Nick to implement this functionality in the Node-RED JSON editor.*\r\n\r\n*Because then it can be reused by other node developers.*\r\n\r\n*However it seems the JSON schema specification is rather large, so it is a hell of a job to implement this in my very limited time.*\r\n\r\n*That is why it is all taking so long ...*\r\n\r\n\r\n## Install\r\nRun the following npm command in your Node-RED user directory (typically ~/.node-red), to install the latest beta version of this node:\r\n```\r\nnpm install node-red-contrib-onvif-nodes@0.0.1-beta.16\r\n```\r\nSee the [releases](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/releases) page for an overview of what has changed per release.\r\n\r\n## Support my Node-RED developments\r\n\r\nPlease buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...\r\n\r\n<a href=\"https://www.buymeacoffee.com/bartbutenaers\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy my wife a coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\r\n\r\n## Onvif basics\r\nThe Open Network Video Interface Forum is an open standard interface to communicate with IP devices on a network.   This standard has become very popular, and therefore lots of manufacturers offer Onvif-compliant IP devices.\r\n\r\nAll IP devices have their ***own API***, which consists out of a large set of URL's to control the device (to get a snapshot image, to turn the camera left ...).  The disadvantage is that you have to learn all the API's of each camera that you buy, which means that it is not easy to replace a camera by another type (since you always will have to update your Node-Red flow). \r\n\r\nThe Onvif standard has been created to solve this issue.  Each Onvif compliant device offers the ***same API*** to control the device, which means that device type X can easily be replaced by device type Y.\r\n\r\nOnvif devices can offer multiple (web) services, for all kind of functionalities:\r\n+ Device discovery\r\n+ Device management\r\n+ Media configuration\r\n+ Real time viewing\r\n+ Event handling\r\n+ PTZ camera control\r\n+ ...\r\n\r\nNot all Onvif devices offer all those services, since this the device's Onvif ***version*** determines which services are available.  However the Onvif version number is not as important as the Onvif ***profile***.  A number of Onvif profiles are available, which determine which functionality each service offers:\r\n+ Profile S: functionalities of IP video systems, such as video and audio streaming, PTZ controls, ...\r\n+ Profile C: functionalities of IP access control systems, such as door control, event handling, ...\r\n+ Profile G: functionalities of video storage, recording, ...\r\n+ Profile Q: functionalities of device discovery, ...\r\n+ ...\r\n\r\nYou can find [here](https://www.onvif.org/wp-content/uploads/2018/05/ONVIF_Profile_Feature_overview_v2-1.pdf) which profile is required to fit your needs.  Conclusion is that not all Onvif devices will offer the functionality that you might need!\r\n\r\n## Missing functionality and problems\r\nThis Node-Red node is build on top of the [onvif](https://github.com/agsh/onvif) library, which is a profile S and Profile G implementation.  So this Node-Red node is absolutely no full implementation of the entire Onvif standard!\r\n\r\nMoreover not all device manufacturers implement the Onvif standard correctly.  In that case you might not be able to fully control your devices using these nodes.\r\n\r\nMost of the Onvif logic is developed in the library I use underneath.  So to get new functionality or to get a problem fixed, the fastest way to get it done is following these steps:\r\n1. Create a new issue [here](https://github.com/agsh/onvif/issues) to ask your Onvif related question in the onvif library.  This step is **not** required when you have a Node-RED specific question!\r\n2. As soon as step 1 is implemented, create a new issue [here](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues) and then I can finish your change in this Node-Red node.\r\n\r\nOr if you have programming skills, you might create two pull requests instead.\r\n\r\n## Discovery node\r\nTo search the network for Onvif-compliant devices, the Discovery node can be used.  When this node is triggered (by means of an input message), it will send an OnVif broadcast to all the devices on the network.  All OnVif compliant devices will respond to this, and they will be listed in the output message `msg.payload`:\r\n\r\n![Broadcast flow](/images/onvif_discovery_flow.png)\r\n\r\n```\r\n[{\"id\":\"a19788d1.afaf98\",\"type\":\"onvif-discovery\",\"z\":\"50df184.124f2e8\",\"name\":\"\",\"timeout\":5,\"separate\":true,\"x\":500,\"y\":480,\"wires\":[[\"ed0cc23.44c014\"]]},{\"id\":\"be6e8353.f7716\",\"type\":\"inject\",\"z\":\"50df184.124f2e8\",\"name\":\"Start searching\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":280,\"y\":480,\"wires\":[[\"a19788d1.afaf98\"]]},{\"id\":\"ed0cc23.44c014\",\"type\":\"debug\",\"z\":\"50df184.124f2e8\",\"name\":\"Onvif devices\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":700,\"y\":480,\"wires\":[]}]\r\n```\r\n\r\nThe Discovery node has following settings:\r\n+ The ***timeout*** time is by default 5 seconds, which means that the node will wait 5 seconds for all devices to respond. In normal circumstances all responses will arrive within 3 seconds.  However when some devices are not detected, it might be useful to increase the timeout time.  That way slower devices will have more time to respond to the broadcast signal.\r\n\r\n+ The checkbox ***'Separate output message for each device'*** allow to control the output messages:\r\n   + When enabled, a separate output message will be generated for each OnVif compliant device.  As soon as an Onvif device has responded, an output message will be generated immediately.  However the node will continue waiting for other Onvif devices to respond, until the timeout time has been reached.\r\n   + When disabled, a single output message will be generated (containing an array of all available OnVif devices).  This message will only appear after the timeout time, to allow all Onvif devices to respond.\r\n\r\nFor every discovered OnVif compliant device, following data will be generated in the output message:\r\n\r\n![Broadcast debug](/images/onvif_discovery_debug.png)\r\n\r\nThe ***'XAddrs'*** field contains the IP address (and the port number), which will be used to configure the Onvif device in Node-Red!  *Indeed you will have to create an Onvif device config node for every Onvif device that you have discovered.*  \r\n\r\nDuring discovery the node status will be *'discovering'*.  But once the timeout has passed, the discovery process is *'completed'* and the number of discovered devices will be displayed:\r\n\r\n![Broadcast status](/images/onvif_discovery_status.png)\r\n\r\nAs long as the discovery process is active, no second discovery process can be started (via the same Discovery node).\r\n\r\n## Config node\r\nThe config node contains all information required to connect to an Onvif device:\r\n+ IP address (or hostname): Specify either the IP address or the host (domain) name of the Onvif device.  When you don't know the IP address of your Onvif nodes, please see the Discovery node above.\r\n+ Port: When you don't know the IP address of your Onvif nodes, please see the Discovery node above.  If no port number visible, use port ```80``` by default.\r\n+ Username: Optional but highly advised to secure your camera by username/password credentials.\r\n+ Password: Optional but highly advised to secure your camera by username/password credentials.\r\n\r\n***TODO: Add a search box that starts a discovery, and from which users can select an IP address of an Onvif device.***\r\n\r\nIn all other Onvif nodes (Media, PTZ ...), these device config nodes can be selected (in the dropdown) to send Onvif commands to the device:\r\n\r\n![Onvif config](/images/onvif_config_node.png)\r\n\r\nThe config node will handle all communication with the Onvif device:\r\n\r\n![Config node communication](/images/onvif_config_comm.png)\r\n\r\nSince all Onvif nodes (of the same Onvif device) share the same config node, that config node will load the required data only once from the Onvif device.  This caching mechanism reduces the communication between Node-RED and the Onvif device.\r\n\r\nCAUTION: the IP addres of the Onvif device should not be changed by your DHCP server (e.g. inside your router), otherwise the Onvif device won't be accessible anymore afterwards.\r\n\r\n## Imaging node\r\nThis node offers functionality to configure imaging specific properties.\r\n\r\nThe following example flow shows how to read and set those properties:\r\n\r\n![imaging get and set](https://user-images.githubusercontent.com/14224149/77259002-a0f03f80-6c7e-11ea-8b72-7fbc2f155b4d.png)\r\n```\r\n[{\"id\":\"7af75a72.95fca4\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1600,\"wires\":[[\"57608e7d.d0012\"]]},{\"id\":\"3f04f383.92106c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1600,\"wires\":[[\"58099d05.b3bd54\"]]},{\"id\":\"57608e7d.d0012\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1600,\"wires\":[]},{\"id\":\"58099d05.b3bd54\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getImagingSettings\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1600,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"802207fe.5bec58\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1660,\"wires\":[[\"7692be04.f17cc\"]]},{\"id\":\"7692be04.f17cc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.colorSaturation\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.contrast\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"payload.sharpness\",\"pt\":\"msg\",\"to\":\"60\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1660,\"wires\":[[\"7af75a72.95fca4\"]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\r\n```\r\n\r\n+ The action ***getImagingSettings*** gets the current imaging setting values:\r\n\r\n   ![current imaging settings](https://user-images.githubusercontent.com/14224149/77259082-50c5ad00-6c7f-11ea-8805-a9f428f89429.png)\r\n   \r\n+ The action ***getImagingSettings*** allows to set (one or more) new imaging setting values, via\r\n   + ```msg.payload.backlightCompensation```\r\n   + ```msg.payload.brightness```\r\n   + ```msg.payload.colorSaturation```\r\n   + ```msg.payload.contrast```\r\n   + ```msg.payload.exposure```\r\n   + ```msg.payload.focus```\r\n   + ```msg.payload.irCutFilter```   \r\n   + ```msg.payload.sharpness```   \r\n   + ```msg.payload.wideDynamicRange```    \r\n   + ```msg.payload.whiteBalance```    \r\n   + ```msg.payload.focus```    \r\n   + ```msg.payload.extension```   \r\n   \r\nYet another flow to demonstrate how to update those values via user gestures (e.g. inject buttons in the flow editor):\r\n\r\n![set imaging settings](https://user-images.githubusercontent.com/14224149/77259182-18729e80-6c80-11ea-8d6b-f912c1330156.png)\r\n```\r\n[{\"id\":\"1517f507.2f887b\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":1760,\"wires\":[[\"d3662621.dc4228\"]]},{\"id\":\"66f4ba6d.1e5d64\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1800,\"wires\":[[\"23a1fdf0.ed8632\"]]},{\"id\":\"d3662621.dc4228\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness + 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness += 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action     = \\\"setImagingSettings\\\";\\nmsg.payload = {\\n    brightness: brightness\\n}\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1760,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"23a1fdf0.ed8632\",\"type\":\"function\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness - 5\",\"func\":\"// Start default on a brightness value of 50\\nvar brightness = flow.get(\\\"brightness\\\") || 50;\\n\\nbrightness -= 5;\\n\\nflow.set(\\\"brightness\\\", brightness);\\n\\nmsg.action = \\\"setImagingSettings\\\";\\nmsg.payload = {\\n    brightness: brightness\\n};\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":540,\"y\":1800,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2792ce4a.dc8d92\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness minimum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":310,\"y\":1840,\"wires\":[[\"c31d8781.1c3c38\"]]},{\"id\":\"fa76b70c.16ff68\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Brightness maximum\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":320,\"y\":1880,\"wires\":[[\"2e3afa6a.088556\"]]},{\"id\":\"c31d8781.1c3c38\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"1\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1840,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"2e3afa6a.088556\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"100\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":540,\"y\":1880,\"wires\":[[\"20bd08d5.3e1068\"]]},{\"id\":\"20bd08d5.3e1068\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":760,\"y\":1760,\"wires\":[[\"417ef964.918e88\"]]},{\"id\":\"417ef964.918e88\",\"type\":\"debug\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":950,\"y\":1760,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\r\n```\r\nWhen setting new values, only the updated values should be specified (according to the Onvif standard).  However some brands of camera's seem to require that all values are specified.  In that case it might be useful to get the current values first, and then replace some of the values:\r\n\r\n![Replace values](https://user-images.githubusercontent.com/14224149/77587599-86210380-6ee8-11ea-82cc-ffbe82a840e7.png)\r\n```\r\n[{\"id\":\"42d10b09.364e44\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"getImagingSettings\",\"x\":580,\"y\":2580,\"wires\":[[\"24dd1d48.864802\"]]},{\"id\":\"c07c06d7.31a128\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Set imaging settings\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2580,\"wires\":[[\"42d10b09.364e44\"]]},{\"id\":\"24dd1d48.864802\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setImagingSettings\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"{}\",\"tot\":\"json\"},{\"t\":\"set\",\"p\":\"payload.brightness\",\"pt\":\"msg\",\"to\":\"50\",\"tot\":\"num\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":780,\"y\":2580,\"wires\":[[\"8a81824a.7443e\"]]},{\"id\":\"8a81824a.7443e\",\"type\":\"onvif-imaging\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"profile\":\"\",\"action\":\"\",\"x\":980,\"y\":2580,\"wires\":[[]]},{\"id\":\"c66da2da.59a64\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Get the original settings\",\"info\":\"\",\"x\":580,\"y\":2540,\"wires\":[]},{\"id\":\"2a0a537c.1457bc\",\"type\":\"comment\",\"z\":\"b3db206e.b7139\",\"name\":\"Replace one or more settings\",\"info\":\"\",\"x\":900,\"y\":2540,\"wires\":[]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"}]\r\n```\r\n\r\nP.S. The latter flow might be optimized e.g. by caching the current values in flow memory...\r\n\r\n## Media node\r\nThis node offers functionality about all kind of media, like audio/video/images.\r\n\r\n***TODO: action 'reconnect' results in TypeError: Cannot read property 'call' of undefined.***\r\n\r\n***TODO: action 'get OSDs' results in Method not found exception.***\r\n\r\n### Audio media\r\n\r\n![Audio media flow](/images/onvif_media_audio.png)\r\n\r\n```\r\n[{\"id\":\"9e153ee9.48599\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio outputs\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2580,\"wires\":[[\"28bffb9c.327f64\"]]},{\"id\":\"28bffb9c.327f64\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputs\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2580,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"ed3a82b7.32feb\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2462,\"wires\":[[\"2778fdc6.d45322\"]]},{\"id\":\"2778fdc6.d45322\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2462,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3fda29eb.f08d36\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2502,\"wires\":[[\"64a7d4f8.a5713c\"]]},{\"id\":\"64a7d4f8.a5713c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2502,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"4d4b782d.2005b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2542,\"wires\":[[\"96c9bf7e.b344d\"]]},{\"id\":\"96c9bf7e.b344d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2542,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"3f98ea7e.33d2a6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get audio output configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2620,\"wires\":[[\"3a66ad61.76ac62\"]]},{\"id\":\"3a66ad61.76ac62\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getAudioOutputConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2620,\"wires\":[[\"2e3b7d54.e13c82\"]]},{\"id\":\"dff49691.20aad8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1070,\"y\":2460,\"wires\":[]},{\"id\":\"2e3b7d54.e13c82\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":871,\"y\":2460,\"wires\":[[\"dff49691.20aad8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n\r\n### Video media\r\n\r\n![Video media flow](/images/onvif_media_video.png)\r\n\r\n```\r\n[{\"id\":\"b8b92f3c.51354\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2140,\"wires\":[[\"5a666ad3.2952e4\"]]},{\"id\":\"5a666ad3.2952e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2140,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"2fce045f.1f784c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video sources\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":290,\"y\":2300,\"wires\":[[\"dd47df99.1a3fe\"]]},{\"id\":\"dd47df99.1a3fe\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSources\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2300,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"916154c8.408b88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video source configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2340,\"wires\":[[\"7b07286e.c802d8\"]]},{\"id\":\"7b07286e.c802d8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoSourceConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2340,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"5739570a.eb8348\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":330,\"y\":2180,\"wires\":[[\"cb58f5b1.958fc8\"]]},{\"id\":\"cb58f5b1.958fc8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfiguration\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2180,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"a27a367c.953b48\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2220,\"wires\":[[\"b5a68b86.701138\"]]},{\"id\":\"b5a68b86.701138\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2220,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"73c056c.612d7a8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set video encoder configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":350,\"y\":2262,\"wires\":[[\"57ccd383.b4791c\"]]},{\"id\":\"57ccd383.b4791c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setVideoEncoderConfigurationOptions\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"videoEncoderConfigToken\",\"pt\":\"msg\",\"to\":\"1_user_conf3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":620,\"y\":2262,\"wires\":[[\"63aa701b.8c9d9\"]]},{\"id\":\"1bc43860.0842c8\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1030,\"y\":2140,\"wires\":[]},{\"id\":\"63aa701b.8c9d9\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":831,\"y\":2140,\"wires\":[[\"1bc43860.0842c8\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n\r\n### Stream URLs\r\n\r\n![Stream URLs flow](/images/onvif_media_streamurl.png)\r\n\r\n```\r\n[{\"id\":\"25868d80.b669b2\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get UDP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":1980,\"wires\":[[\"519a78b1.ab8f98\"]]},{\"id\":\"34d26bbc.6f7464\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get HTTP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2020,\"wires\":[[\"5b572094.ac46c\"]]},{\"id\":\"5b572094.ac46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"HTTP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2020,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"ad234b85.9f4ba8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get RTSP stream URL\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":300,\"y\":2060,\"wires\":[[\"8b9e80fc.49837\"]]},{\"id\":\"8b9e80fc.49837\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"RTSP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":2060,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"44d1df3f.62193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1049,\"y\":1980,\"wires\":[]},{\"id\":\"519a78b1.ab8f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStreamUri\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"protocol\",\"pt\":\"msg\",\"to\":\"UDP\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"1_def_profile3\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":629,\"y\":1980,\"wires\":[[\"d02bb043.673cf\"]]},{\"id\":\"d02bb043.673cf\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"\",\"stream\":\"\",\"x\":850,\"y\":1980,\"wires\":[[\"44d1df3f.62193\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n\r\nThe RTSP url can be used to setup a real-time-streaming-protocol with the camera.  In this Node-RED [discussion](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/47?u=bartbutenaers), you can find my flow to decode an RTSP stream in Node-RED to a continious stream of images (after you have installed FFmpeg).\r\n\r\n### Media profiles\r\nEvery Onvif device will contain a series of default media profiles.  Every profile contains following data:\r\n+ A unique name.\r\n+ A unique token which will only be used internally by these Onvif nodes (based on the name, the nodes will lookup the token automatically).\r\n+ The configuration for all available media services (audio, video, ptz ...). \r\n\r\nFor example the *'getProfiles'* action (in the example flow below) will return all available media profiles in my Onvif device:\r\n\r\n![Get media profiles](/images/onvif_get_profiles.png)\r\n\r\nWhen having a look e.g. at the details of the video encoding configuration, you will see a JPEG of resultion 320x240:\r\n\r\n![Example profile](/images/onvif_example_profile.png)\r\n\r\nSuch a profile names need to be specified for most media actions.  So instead of having to repeat the information over and over again, the Onvif device will use the information from the specified profile.  For example when a snapshot as JPEG with resolution 320x240 is needed, you only need to specify the profile name *'JPEG_320x240'* ...\r\n\r\nFollowing example flow shows how to view and manipulate profiles:\r\n\t\r\n![Video media flow](/images/onvif_media_profiles.png)\r\n\r\n```\r\n[{\"id\":\"3e1bb7ba.4aea98\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get profiles\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2900,\"wires\":[[\"3ef210b5.e10dc\"]]},{\"id\":\"3ef210b5.e10dc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getProfiles\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2900,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"78adef9.6574c1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Create profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2940,\"wires\":[[\"51f16c10.71d124\"]]},{\"id\":\"51f16c10.71d124\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"createProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileToken\",\"pt\":\"msg\",\"to\":\"testToken\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2940,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"f41a1d44.ceef1\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Delete profile\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":2980,\"wires\":[[\"2888251b.9d850a\"]]},{\"id\":\"2888251b.9d850a\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"deleteProfile\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"profileName\",\"pt\":\"msg\",\"to\":\"myProfile\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":520,\"y\":2980,\"wires\":[[\"c0548e0f.c2176\"]]},{\"id\":\"6782c13e.298af\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":970,\"y\":2900,\"wires\":[]},{\"id\":\"c0548e0f.c2176\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":771,\"y\":2900,\"wires\":[[\"6782c13e.298af\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n\r\n***TODO: Not possible yet to create an entire new profile, incl. configurations.***\r\n\r\n### Snapshot images\r\n\r\nRemark: to be able to run the example flow, some manual interventions are required:\r\n+ The node-red-contrib-image-output should be installed, to show the snapshot image in the flow editor.\r\n+ Select an available profile from your Onvif device via the 'search' icon!  Indeed the resolution of the snapshot image depends on the **profile** specified in the node's config screen, e.g. there might be a profile that offers JPEGs with resolution 640x480. \r\n+ In the first flow the username and password (of the Onvif config node) should be repeated in the httprequest node.\r\n\r\nThe action ***getSnapshotUri*** returns the URL that can be used for retrieving a snapshot image from the camera.  That URL could be passed to a HttpRequest node to fetch the snapshot image:\r\n\r\n![Media snapshot](/images/onvif_media_snapshot_http.png)\r\n\r\n```\r\n[{\"id\":\"ed82ed59.593e6\",\"type\":\"http request\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"method\":\"GET\",\"ret\":\"bin\",\"url\":\"\",\"tls\":\"\",\"x\":1170,\"y\":2820,\"wires\":[[\"50246c7e.8dabd4\"]]},{\"id\":\"50246c7e.8dabd4\",\"type\":\"image\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"width\":200,\"x\":1350,\"y\":2820,\"wires\":[]},{\"id\":\"f8779ce3.3f67\",\"type\":\"onvifmedia\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"deviceConfig\":\"\",\"profileToken\":\"\",\"profileName\":\"\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshotUri\",\"protocol\":\"\",\"stream\":\"\",\"x\":810,\"y\":2820,\"wires\":[[\"a734ba31.f75d78\"]]},{\"id\":\"6ac5b6bb.1d3bd8\",\"type\":\"inject\",\"z\":\"bb2edfc9.1718a\",\"name\":\"Get snapshot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":630,\"y\":2820,\"wires\":[[\"f8779ce3.3f67\"]]},{\"id\":\"a734ba31.f75d78\",\"type\":\"change\",\"z\":\"bb2edfc9.1718a\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"url\",\"pt\":\"msg\",\"to\":\"payload.uri\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":990,\"y\":2820,\"wires\":[[\"ed82ed59.593e6\"]]}]\r\n```\r\n\r\nHowever the flow will become complex and the device's **credentials** (username/password) should be repeated in the httprequest node.  Therefore action ***getSnapshot*** has been added to execute all these steps in a single operation:\r\n\r\n![Media snapshot short](/images/onvif_media_snapshot_short.png)\r\n\r\n```\r\n[{\"id\":\"907621a9.98d79\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get snapshot image\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1430,\"y\":100,\"wires\":[[\"ddb99a63.98e938\"]]},{\"id\":\"7074982e.851308\",\"type\":\"image\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"width\":200,\"x\":1820,\"y\":100,\"wires\":[]},{\"id\":\"ddb99a63.98e938\",\"type\":\"onvif-media\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profileToken\":\"\",\"profileName\":\"JPEG_320x240\",\"videoEncoderConfigToken\":\"\",\"videoEncoderConfigName\":\"\",\"videoEncoderConfigEncoding\":\"\",\"action\":\"getSnapshot\",\"protocol\":\"HTTP\",\"stream\":\"RTP-Unicast\",\"x\":1630,\"y\":100,\"wires\":[[\"7074982e.851308\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"port\":\"80\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n\r\n## Device Node\r\nWhen this node is triggered (by means of an input message), it will generate an output message `msg.payload` containing information about that device:\r\n\r\n+ ***Device information***: brand, type, ...\r\n+ ***Hostname***: host name\r\n+ ***System date and time***: clock of the camera.  This is the only information that is available without authorization (although I experienced that some camera's return a Not Authorized).\r\n+ ***Services***: all services offered by the device.\r\n+ ***Capabilities***: all capabilities offered by the device.\r\n+ ***Scopes***: all scopes offered by the device.\r\n+ ***Service capabilities***: all service capabilities offered by the device.\r\n+ ***Reboot***: reboot the device remotely.\r\n+ ***Reconnect***: reconnect to the device again.\r\n\r\n***TODO Reconnect fails for my Panasonic (unauthorized), because getSystemDateTime is called underneath.  Normally getSystemDateTime is the only Onvif functionality that shouldn't require credentials ...***\r\n\r\nWhen no action has been specified in the node's config screen, the action needs to be defined in the ```msg.action``` of the input message:\r\n\r\n![Device](/images/onvif_device.png)\r\n\r\n```\r\n[{\"id\":\"bacb880f.853a88\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get device information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1520,\"wires\":[[\"90cf9e45.fef83\"]]},{\"id\":\"90cf9e45.fef83\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getDeviceInformation\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1520,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c17d3b0c.763f78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get services\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1640,\"wires\":[[\"b2189543.3cbc28\"]]},{\"id\":\"b2189543.3cbc28\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServices\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1640,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d710fda6.e8aae\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get system datetime\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1600,\"wires\":[[\"cc3c9656.8496a8\"]]},{\"id\":\"cc3c9656.8496a8\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getSystemDateAndTime\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1600,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"a744dbdf.67e6c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1680,\"wires\":[[\"5d9e78c8.149b38\"]]},{\"id\":\"5d9e78c8.149b38\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1680,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"c4b35b2e.3088b8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get scopes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":230,\"y\":1720,\"wires\":[[\"65b4227b.29ca5c\"]]},{\"id\":\"65b4227b.29ca5c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getScopes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1720,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"d86390ea.9497c\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"System reboot\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":240,\"y\":1760,\"wires\":[[\"b977019e.b468\"]]},{\"id\":\"b977019e.b468\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"systemReboot\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1760,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"b42d91a3.9ce6\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":260,\"y\":1800,\"wires\":[[\"54209451.26faec\"]]},{\"id\":\"54209451.26faec\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1800,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"43651b47.8d7824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get hostname information\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":270,\"y\":1560,\"wires\":[[\"d49b6d87.e936d\"]]},{\"id\":\"d49b6d87.e936d\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getHostname\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1560,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"6227d5ec.51a9ec\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Reconnect to device\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":250,\"y\":1840,\"wires\":[[\"c24552ea.311e3\"]]},{\"id\":\"c24552ea.311e3\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"reconnect\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":500,\"y\":1840,\"wires\":[[\"569d0223.dcc0cc\"]]},{\"id\":\"569d0223.dcc0cc\",\"type\":\"onvif-device\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"action\":\"\",\"x\":730,\"y\":1520,\"wires\":[[\"7c39ee64.2d193\"]]},{\"id\":\"7c39ee64.2d193\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"x\":890,\"y\":1520,\"wires\":[]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n\r\n## Event Node\r\nThis node allows to listen to all the events pushed by the device.  Depending on the device, different events can be pushed to the clients that are listening:\r\n+ Motion detection\r\n+ Face detection\r\n+ CPU percentage\r\n+ ...\r\n\r\nThe more embedded electronics your camera contains (e.g. PIR sensor, microphone, external I/O input, ...), the more events might be available:\r\n\r\n![Camera events](https://user-images.githubusercontent.com/14224149/77259583-b4050e80-6c82-11ea-85d6-e8fb0a23c836.png)\r\n\r\nCAUTION: You need to enable those events once **manually** (via the web interface of your camera), because that is not part of the Onvif protocol!  For example the web interface of my Hikvision camera:\r\n\r\n![Hikvision web interface](https://user-images.githubusercontent.com/14224149/77230188-b6883b00-6b92-11ea-8ac4-cbcf8d1c2c42.png)\r\n\r\nThe node will start listening to events when ```msg.action=start``` arrives and stops listening when ```msg.action=stop``` arrives.  When the node is listening, every event (pushed by the Onvif device toward the Node-RED flow) will be converted to an output message:\r\n\r\n![Event flow](https://user-images.githubusercontent.com/14224149/77230064-ec78ef80-6b91-11ea-97d8-7c267ac863ff.png)\r\n\r\n```\r\n[{\"id\":\"748f5110.c57f7\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Start listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1020,\"wires\":[[\"12ad9448.0899fc\"]]},{\"id\":\"12ad9448.0899fc\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"start\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1020,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"801f0dd.3e0b3f\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Stop listening\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":150,\"y\":1060,\"wires\":[[\"b7dc815b.29f4a\"]]},{\"id\":\"b7dc815b.29f4a\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1060,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"2774034b.91102c\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event properties\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":170,\"y\":1140,\"wires\":[[\"e59923ee.4db8d\"]]},{\"id\":\"e59923ee.4db8d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventProperties\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1140,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"120e35a2.b4da5a\",\"type\":\"inject\",\"z\":\"b3db206e.b7139\",\"name\":\"Get event service capabilities\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":1100,\"wires\":[[\"2c1017b7.e2e448\"]]},{\"id\":\"2c1017b7.e2e448\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getEventServiceCapabilities\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":460,\"y\":1100,\"wires\":[[\"a8f7752e.2998f8\"]]},{\"id\":\"a8f7752e.2998f8\",\"type\":\"onvif-events\",\"z\":\"b3db206e.b7139\",\"name\":\"\",\"deviceConfig\":\"c6b46a46.8067f8\",\"action\":\"\",\"x\":670,\"y\":1020,\"wires\":[[\"61d49191.38fb9\"]]},{\"id\":\"61d49191.38fb9\",\"type\":\"switch\",\"z\":\"b3db206e.b7139\",\"name\":\"Topic ProcessorUsage\",\"property\":\"topic\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"eq\",\"v\":\"Monitoring/ProcessorUsage\",\"vt\":\"str\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":1,\"x\":880,\"y\":1020,\"wires\":[[\"9d4463a2.1d43d\"]]},{\"id\":\"9d4463a2.1d43d\",\"type\":\"change\",\"z\":\"b3db206e.b7139\",\"name\":\"Get value\",\"rules\":[{\"t\":\"set\",\"p\":\"payload\",\"pt\":\"msg\",\"to\":\"data.value\",\"tot\":\"msg\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1080,\"y\":1020,\"wires\":[[\"97abe077.30ed\"]]},{\"id\":\"97abe077.30ed\",\"type\":\"ui_chart\",\"z\":\"b3db206e.b7139\",\"name\":\"Camera CPU %\",\"group\":\"22787703.a0e968\",\"order\":2,\"width\":0,\"height\":0,\"label\":\"Camera CPU %\",\"chartType\":\"line\",\"legend\":\"false\",\"xformat\":\"HH:mm:ss\",\"interpolate\":\"linear\",\"nodata\":\"\",\"dot\":false,\"ymin\":\"0\",\"ymax\":\"110\",\"removeOlder\":1,\"removeOlderPoints\":\"50\",\"removeOlderUnit\":\"3600\",\"cutout\":0,\"useOneColor\":false,\"colors\":[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#2ca02c\",\"#98df8a\",\"#d62728\",\"#ff9896\",\"#9467bd\",\"#c5b0d5\"],\"useOldStyle\":false,\"outputs\":1,\"x\":1260,\"y\":1020,\"wires\":[[]]},{\"id\":\"c6b46a46.8067f8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.174\",\"port\":\"80\",\"name\":\"Hikvision\"},{\"id\":\"22787703.a0e968\",\"type\":\"ui_group\",\"z\":\"\",\"name\":\"Web push notifications\",\"tab\":\"80f0e178.bbf4a\",\"disp\":true,\"width\":\"6\",\"collapse\":false},{\"id\":\"80f0e178.bbf4a\",\"type\":\"ui_tab\",\"z\":\"\",\"name\":\"Home\",\"icon\":\"dashboard\",\"order\":1,\"disabled\":false,\"hidden\":false}]\r\n```\r\nThe above flow will display the camera's CPU usage in the Node-RED dashboard:\r\n\r\n![CPU usage](https://user-images.githubusercontent.com/14224149/77230208-ea636080-6b92-11ea-9a3c-f7e753023b24.png)\r\n\r\nThe following action values can be passed:\r\n+ ***start***: Start listening for events pushed by the Onvif device towards the Node-RED flow.\r\n+ ***stop***: Stop listening for events pushed by the Onvif device towards the Node-RED flow.\r\n+ **getEventServiceCapabilities***:  to determine if your camera supports pull point listeners.\r\n\r\n   ![Event service capabilities](https://user-images.githubusercontent.com/14224149/77260980-6ccf4b80-6c8b-11ea-857b-d4fd6171e883.png)\r\n   \r\n   The WSPullPointSupport should be ```true```, otherwise your camera doesn't support pull-point events!\r\n\r\n+ ***getEventProperties***: to determine which events your camera can push.  For example for my Hikvision camera:\r\n\r\n   ![image](https://user-images.githubusercontent.com/14224149/77261021-b91a8b80-6c8b-11ea-964f-a52c39c17f63.png)\r\n\r\nRemarks: \r\n+ As soon as the node is listening for events, the node status will change from *\"connected\"* to *\"listening\"*.\r\n+ Onvif devices can support 3 types of event transport mechanisms, but currently this node only supports *pull-point* events.  In fact this is not a real push mechanism, which uses polling behind the scenes ...\r\n\r\n## PTZ Node\r\nThis node allows the OnVif device to be PTZ controlled (Pan/Tilt/Zoom), but also offers a home position and multiple preset positions.  Of course this is only possible when the camera hardware supports PTZ.\r\n\r\n***TODO: For cameras without zoom (i.e. only PT) like mine, the getStatus gives an error (so I cannot determine the current PTZ location.  See https://github.com/agsh/onvif/issues/103 for which I have to create a pull request.***\r\n\r\n### Moving the camera\r\nAn PTZ camera can be remotely controlled to change the direction (vertical and horizontal) and zoom (in and out):\r\n+ `Pan`: Move the camera to the *left* (value between -1.0 and 0.0) or *right* (value between 0.0 and 1.0).\r\n+ `Tilt`: Move the camera *down* (value between -1.0 and 0.0) or *up* (value between 0.0 and 1.0).\r\n+ `Zoom`: Zoom the camera *out* (value between -1.0 and 0.0) or *in* (value between 0.0 and 1.0).\r\n\r\nThe higher the (absolute) values, the faster the movement will be executed.  This means that the motor will turn faster.\r\n\r\nThose 3 values can also be set via the input message, when the value is `0` in the node's config screen.  The input message fields are respectively `msg.pan`, `msg.tilt` and `msg.zoom`.\r\n\r\nAn extra `Time` option can be specified, which is the time interval (in seconds) that the movement will be applied.  For example a tilt value of *-0.5* with time *2*, means that the device will move down at half speed during 2 seconds.\r\n\r\n![PTZ flow](/images/onvif_ptz_flow.png)\r\n\r\n```\r\n[{\"id\":\"8bbc7b61.cb4188\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Right\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":260,\"wires\":[[\"a6e564c.fde6698\"]]},{\"id\":\"d5281b45.ea95c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Left\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":300,\"wires\":[[\"86b893d2.4f029\"]]},{\"id\":\"cee5bb21.150338\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom in\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":340,\"wires\":[[\"467c1396.0ea46c\"]]},{\"id\":\"643c2f21.4f1dc\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Zoom out\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1340,\"y\":380,\"wires\":[[\"e58c624a.ab789\"]]},{\"id\":\"a6e564c.fde6698\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":260,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"86b893d2.4f029\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"pan_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":300,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"467c1396.0ea46c\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":340,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"e58c624a.ab789\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"zoom_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":380,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"412839c6.6f0b78\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Stop\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":420,\"wires\":[[\"a0cfe609.370f98\"]]},{\"id\":\"a0cfe609.370f98\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"stop\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"stopPanTilt\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"},{\"t\":\"set\",\"p\":\"stopZoom\",\"pt\":\"msg\",\"to\":\"true\",\"tot\":\"bool\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":420,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"d5076069.ec979\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Up\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":180,\"wires\":[[\"2a43b711.797118\"]]},{\"id\":\"77155c06.44ac04\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Down\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1330,\"y\":220,\"wires\":[[\"5ada4b2.f1145b4\"]]},{\"id\":\"2a43b711.797118\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":180,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"5ada4b2.f1145b4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"tilt_speed\",\"pt\":\"msg\",\"to\":\"-0.5\",\"tot\":\"num\"},{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"continuousMove\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1540,\"y\":220,\"wires\":[[\"a11d9175.e42f\"]]},{\"id\":\"1e729e64.1ac1c2\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":1990,\"y\":180,\"wires\":[]},{\"id\":\"a11d9175.e42f\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1798,\"y\":180,\"wires\":[[\"1e729e64.1ac1c2\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n\r\n### Home position\r\nA PTZ camera has a home position, where it will be positioned when nobody is manually controlling the camera.  You can use the PTZ control to move the camera to a certain position, and then you **'set'** the home position.  After the home position has been set, you can again use PTZ control to move the camera around.  But when you press the **'goto home position'**, the camera will automatically go back to the home position that you have set earlier.\r\n\r\n![PTZ home](/images/onvif_ptz_home.png)\r\n\r\n```\r\n[{\"id\":\"326d2b12.c82824\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":180,\"wires\":[[\"fb20eab3.8f6e08\"]]},{\"id\":\"fb20eab3.8f6e08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":180,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"5ad9fb27.cde234\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set home position\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1530,\"y\":220,\"wires\":[[\"ca5af8d7.7d1858\"]]},{\"id\":\"ca5af8d7.7d1858\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setHomePosition\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":1760,\"y\":220,\"wires\":[[\"ef9555d.c18a2a8\"]]},{\"id\":\"6f2a191d.95af58\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2170,\"y\":180,\"wires\":[]},{\"id\":\"ef9555d.c18a2a8\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":1978,\"y\":180,\"wires\":[[\"6f2a191d.95af58\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n\r\n### Pre-programmed positions\r\nWhile a PTZ camera has only a single home position, it will also have multiple preset positions.  The number of preset positions available depends on the device manufacturer.\r\n\r\n![PTZ preset](/images/onvif_ptz_preset.png)\r\n\r\n```\r\n[{\"id\":\"3860ac52.e39594\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get presets\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1790,\"y\":80,\"wires\":[[\"982f2ad5.2d9c08\"]]},{\"id\":\"982f2ad5.2d9c08\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getPresets\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":80,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"f7f04caf.8744\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"945a0df7.765ea\"]]},{\"id\":\"945a0df7.765ea\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":120,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"414c78cd.e3c7c8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":200,\"wires\":[[\"677fe0f0.05929\"]]},{\"id\":\"677fe0f0.05929\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":200,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"7d1c3cb6.e252e4\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"first\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":280,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"cf9fb5ac.2929f8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'first' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":280,\"wires\":[[\"7d1c3cb6.e252e4\"]]},{\"id\":\"eabc7f84.63e97\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":80,\"wires\":[]},{\"id\":\"29cb85ae.8c89ca\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":80,\"wires\":[[\"eabc7f84.63e97\"]]},{\"id\":\"c882fdef.c80fa\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"setPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":160,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"617bb836.79ada8\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Set 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":160,\"wires\":[[\"c882fdef.c80fa\"]]},{\"id\":\"96127480.40b808\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Remove 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1820,\"y\":240,\"wires\":[[\"ce53fe72.a63f5\"]]},{\"id\":\"ce53fe72.a63f5\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"removePreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":240,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"1897b282.93917d\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Goto 'second' preset\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1810,\"y\":320,\"wires\":[[\"53cde90a.bfcf48\"]]},{\"id\":\"53cde90a.bfcf48\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"gotoPreset\",\"tot\":\"str\"},{\"t\":\"set\",\"p\":\"presetName\",\"pt\":\"msg\",\"to\":\"second\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2060,\"y\":320,\"wires\":[[\"29cb85ae.8c89ca\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n\r\nYou could for example set a separate preset position for every of the 3 doors in your room. And afterwards the Node-RED flow could repeat looping over all 3 preset positions, so the camera would be repositioned in time. \r\n\r\nRemark: the Onvif protocol will generate a *token* to unique identify your preset position.  To avoid that every Node-RED flow needs to store all the tokens, this node will do the mapping between the tokens and the unique names (that you could choose yourself).\r\n\r\n### Get PTZ information\r\nA lot of information can be requested from the PTZ node:\r\n+ Minimum and maximum pan/tilt positions.\r\n+ Minimum and maximum zoom factors.\r\n+ Number of available preset positions.\r\n+ ...\r\n\r\n![PTZ info](/images/onvif_ptz_info.png)\r\n\r\n```\r\n[{\"id\":\"2d9d8551.c0018a\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get nodes\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":120,\"wires\":[[\"207254a6.890ccc\"]]},{\"id\":\"207254a6.890ccc\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getNodes\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":120,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9aedef2e.69825\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configurations\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1830,\"y\":160,\"wires\":[[\"be886408.707d68\"]]},{\"id\":\"be886408.707d68\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurations\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":160,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"f6c561a5.4b2bd\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get configuration options\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1850,\"y\":200,\"wires\":[[\"7ab75a66.7a4044\"]]},{\"id\":\"7ab75a66.7a4044\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getConfigurationOptions\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":200,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"9ba5ac30.13fde\",\"type\":\"inject\",\"z\":\"26dbe156.c7049e\",\"name\":\"Get status\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":1800,\"y\":240,\"wires\":[[\"e2a06007.832d6\"]]},{\"id\":\"e2a06007.832d6\",\"type\":\"change\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"rules\":[{\"t\":\"set\",\"p\":\"action\",\"pt\":\"msg\",\"to\":\"getStatus\",\"tot\":\"str\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":2080,\"y\":240,\"wires\":[[\"eaa9238d.ffd3b\"]]},{\"id\":\"c4f1111f.4570a\",\"type\":\"debug\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"x\":2490,\"y\":120,\"wires\":[]},{\"id\":\"eaa9238d.ffd3b\",\"type\":\"onvif-ptz\",\"z\":\"26dbe156.c7049e\",\"name\":\"\",\"deviceConfig\":\"e6c78b2e.fe4dc8\",\"profile\":\"1_def_profile3\",\"action\":\"\",\"panSpeed\":0,\"tiltSpeed\":0,\"zoomSpeed\":0,\"panPosition\":0,\"tiltPosition\":0,\"zoomPosition\":0,\"panTranslation\":0,\"tiltTranslation\":0,\"zoomTranslation\":0,\"time\":1,\"preset\":\"\",\"presetName\":\"\",\"stopPanTilt\":true,\"stopZoom\":true,\"configurationToken\":\"\",\"x\":2298,\"y\":120,\"wires\":[[\"c4f1111f.4570a\"]]},{\"id\":\"e6c78b2e.fe4dc8\",\"type\":\"onvif-config\",\"z\":\"\",\"xaddress\":\"192.168.1.200\",\"name\":\"MyCamKitchen\"}]\r\n```\r\n","readmeFilename":"README.md"}