{"version":3,"sources":["webpack:///./node_modules/copy-to-clipboard/index.js","webpack:///./src/assets/images/Advanced_User/Node-RED_OpenHAB_Projects_Trigger_Alarm_04.png","webpack:///./src/components/Advanced_User/Node-RED_and_MQTT/Projects/Alarm_Trigger/alarm-trigger.jsx","webpack:///./src/pages/Advanced_User/Node-RED_and_MQTT/Projects/Alarm_Trigger/index.jsx","webpack:///./node_modules/toggle-selection/index.js","webpack:///./node_modules/react-copy-to-clipboard/lib/index.js","webpack:///./src/assets/images/Advanced_User/Node-RED_OpenHAB_Projects_Trigger_Alarm_02.png","webpack:///./src/assets/images/Advanced_User/Node-RED_OpenHAB_Projects_Trigger_Alarm_01.gif","webpack:///./src/assets/images/Advanced_User/Node-RED_OpenHAB_Projects_Trigger_Alarm_03.png","webpack:///./node_modules/react-copy-to-clipboard/lib/Component.js"],"names":["deselectCurrent","clipboardToIE11Formatting","module","exports","text","options","debug","message","reselectPrevious","range","selection","mark","success","document","createRange","getSelection","createElement","textContent","style","all","position","top","clip","whiteSpace","webkitUserSelect","MozUserSelect","msUserSelect","userSelect","addEventListener","e","stopPropagation","format","preventDefault","clipboardData","console","warn","window","clearData","setData","onCopy","body","appendChild","selectNodeContents","addRange","execCommand","Error","err","error","copyKey","test","navigator","userAgent","replace","prompt","removeRange","removeAllRanges","removeChild","FTPServerFlow","state","valueserver","JSON","stringify","jsondataserver","copied","render","classes","this","props","Fragment","className","root","Paper","alt","src","AlarmTrigger","imgcard","setState","Button","variant","color","marginLeft","React","Component","withStyles","flexGrow","marginBottom","seodata","imgStyle","SEOHelmet","title","description","image","location","pathname","Typography","id","pills","pill","link","to","href","aria-hidden","height","version","viewBox","width","fillRule","d","UIOverview","OpenHabItem","OpenHabSitemap","previousTitle","previousLink","nextTitle","nextLink","rangeCount","active","activeElement","ranges","i","push","getRangeAt","tagName","toUpperCase","blur","type","forEach","focus","CopyToClipboard","Object","defineProperty","value","_react","_interopRequireDefault","_copyToClipboard","obj","__esModule","_typeof","Symbol","iterator","constructor","prototype","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","apply","_objectWithoutProperties","source","excluded","key","target","sourceKeys","length","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","call","_classCallCheck","instance","Constructor","TypeError","_defineProperties","descriptor","configurable","writable","_possibleConstructorReturn","self","_assertThisInitialized","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","ReferenceError","_setPrototypeOf","p","_defineProperty","_React$PureComponent","_getPrototypeOf2","_this","_len","arguments","args","Array","_key","concat","event","_this$props","children","elem","Children","only","result","onClick","protoProps","staticProps","subClass","superClass","create","_inherits","_this$props2","cloneElement","getOwnPropertyDescriptors","defineProperties","_objectSpread","PureComponent","undefined"],"mappings":"8FAEA,IAAIA,EAAkB,EAAQ,QAE1BC,EAA4B,CAC9B,aAAc,OACd,YAAa,MACb,QAAW,QA+GbC,EAAOC,QAtGP,SAAcC,EAAMC,GAClB,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAAU,EAETP,IACHA,EAAU,IAGZC,EAAQD,EAAQC,QAAS,EAEzB,IAiDE,GAhDAE,EAAmBR,IACnBS,EAAQI,SAASC,cACjBJ,EAAYG,SAASE,gBACrBJ,EAAOE,SAASG,cAAc,SACzBC,YAAcb,EAEnBO,EAAKO,MAAMC,IAAM,QAEjBR,EAAKO,MAAME,SAAW,QACtBT,EAAKO,MAAMG,IAAM,EACjBV,EAAKO,MAAMI,KAAO,mBAElBX,EAAKO,MAAMK,WAAa,MAExBZ,EAAKO,MAAMM,iBAAmB,OAC9Bb,EAAKO,MAAMO,cAAgB,OAC3Bd,EAAKO,MAAMQ,aAAe,OAC1Bf,EAAKO,MAAMS,WAAa,OACxBhB,EAAKiB,iBAAiB,QAAQ,SAAUC,GAGtC,GAFAA,EAAEC,kBAEEzB,EAAQ0B,OAGV,GAFAF,EAAEG,sBAE6B,IAApBH,EAAEI,cAA+B,CA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C,UAAUtE,GAAasE,UAAUtE,GAAK,GAE/CA,EAAI,EACNuB,EAAQY,GAAQ,GAAM5B,SAAQ,SAAU8B,GACtC4B,EAAgB3B,EAAQD,EAAKF,EAAOE,OAE7B3B,OAAOiF,0BAChBjF,OAAOkF,iBAAiBtD,EAAQ5B,OAAOiF,0BAA0BxD,IAEjEZ,EAAQY,GAAQ5B,SAAQ,SAAU8B,GAChC3B,OAAOC,eAAe2B,EAAQD,EAAK3B,OAAOqB,yBAAyBI,EAAQE,OAKjF,OAAOC,EA+KyCuD,CAAc,GAAIjJ,EAAO,CACnEsI,QAASvI,KAAKuI,gBAxHJhC,EAAkBF,EAAY1B,UAAW6D,GACrDC,GAAalC,EAAkBF,EAAaoC,GA4HzC3E,EA1D0B,CA2DjCI,EAAgB,QAAEiF,eAEpBlN,EAAQ6H,gBAAkBA,EAE1BwD,EAAgBxD,EAAiB,eAAgB,CAC/CzF,YAAQ+K,EACRjN,aAASiN,K","file":"component---src-pages-advanced-user-node-red-and-mqtt-projects-alarm-trigger-index-jsx-7566b6f8e4e4f5fa8be7.js","sourcesContent":["\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n};\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n\n if (!options) {\n options = {};\n }\n\n debug = options.debug || false;\n\n try {\n reselectPrevious = deselectCurrent();\n range = document.createRange();\n selection = document.getSelection();\n mark = document.createElement(\"span\");\n mark.textContent = text; // reset user styles for span element\n\n mark.style.all = \"unset\"; // prevents scrolling to the end of the page\n\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\"; // used to preserve spaces and line breaks\n\n mark.style.whiteSpace = \"pre\"; // do not inherit user-select (it may be `none`)\n\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function (e) {\n e.stopPropagation();\n\n if (options.format) {\n e.preventDefault();\n\n if (typeof e.clipboardData === \"undefined\") {\n // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"];\n window.clipboardData.setData(format, text);\n } else {\n // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n document.body.appendChild(mark);\n range.selectNodeContents(mark);\n selection.addRange(range);\n var successful = document.execCommand(\"copy\");\n\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;","module.exports = __webpack_public_path__ + \"static/Node-RED_OpenHAB_Projects_Trigger_Alarm_04-60bc1aad971197575e9a893037dce9c9.png\";","import React from 'react'\nimport PropTypes from 'prop-types'\n\nimport { withStyles } from '@material-ui/core/styles'\nimport Button from '@material-ui/core/Button'\nimport Paper from '@material-ui/core/Paper'\n\nimport { CopyToClipboard } from 'react-copy-to-clipboard'\nimport jsondataserver from './node-red-flow-alarm-trigger.json'\n\nimport AlarmTrigger from '../../../../../assets/images/Advanced_User/Node-RED_OpenHAB_Projects_Trigger_Alarm_02.png'\n\nconst styles = ({\n root: {\n flexGrow: 1,\n },\n imgcard: {\n marginBottom: '-0.4rem',\n }\n})\n\nclass FTPServerFlow extends React.Component {\n state = {\n valueserver: JSON.stringify(jsondataserver),\n copied: false,\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n
\n \n \"Node-RED\n \n
\n
\n this.setState({ copied: true })}>\n \n \n {this.state.copied ? Copied : null} \n

\n
\n );\n }\n}\n\n\nFTPServerFlow.propTypes = {\n classes: PropTypes.object.isRequired,\n}\n\nexport default withStyles(styles)(FTPServerFlow)\n","import React from 'react'\nimport {Link} from 'gatsby'\n\nimport Paper from '@material-ui/core/Paper'\nimport Typography from '@material-ui/core/Typography'\n\nimport SEOHelmet from '../../../../../components/Layout/SEOHelmet'\nimport Footer from \"../../../../../components/Layout/footer\"\nimport BreadCrumbs from '../../../../../components/Layout/breadcrumbs/breadcrumbs'\nimport AlarmTriggerFlow from '../../../../../components/Advanced_User/Node-RED_and_MQTT/Projects/Alarm_Trigger/alarm-trigger'\n\nimport UIOverview from '../../../../../assets/images/Advanced_User/Node-RED_OpenHAB_Projects_Trigger_Alarm_01.gif'\nimport OpenHabItem from '../../../../../assets/images/Advanced_User/Node-RED_OpenHAB_Projects_Trigger_Alarm_03.png'\nimport OpenHabSitemap from '../../../../../assets/images/Advanced_User/Node-RED_OpenHAB_Projects_Trigger_Alarm_04.png'\n\nconst seodata = {\n title: 'Home Automation :: Triggered Alarm using Node-RED',\n description: 'You can use a Node-RED flow to set your trigger an Alarm on your IP camera start all programmed Alarm Actions manually.',\n image: '/images/Search/AU_SearchThumb_Node-RED.png'\n}\n\nconst imgStyle = {\n marginBottom: '-0.4rem',\n};\n\nexport default (props) => (\n \n \n \n Home Automation with Node-RED and OpenHAB\n \n
\n\n\n \n \n
    \n
  • Home Automation with Node-RED and OpenHAB
  • \n
      \n
    • Trigger an Alarm using Node-RED
    • \n
        \n
      • Push Alarm
      • \n
      \n
    • Bonus :: OpenHAB Integration
    • \n
    \n
\n
\n \n \n Trigger an Alarm using Node-RED\n \n
\n \n The screenshot below shows the final UI that we are going to build using Node-RED and the Node-RED Dashboard. We want to build a button that can trigger an alarm on your IP Camera to be able to start all programmed Alarm Actions manually.\n \n
\n \n \"OpenHAB2\"\n \n
\n
\n \n We already built a component that will store the camera login in a global variable (if you haven't already, please import it into your Node-RED flow). We now just need a button to send the command to trigger an alarm in our Node-RED Dashboard.\n \n
\n \n Be aware: that this flow uses the MQTT protocol to publish and subscribe to messages. This allows you to integrate the flow into other software platforms like the OpenHAB Home Automation. But you will have to install a MQTT Broker on your system to be able to use it. Those MQTT entry and endpoints can be replaced by Link Nodes, if you don't only want to use the Node-RED dashboard to control your camera.\n \n
\n
\n \n \n Push Alarm\n \n
\n \n
\n \n \n Bonus :: OpenHAB Integration\n \n
\n \n Adding to the OpenHAB tutorial we are now going to consume the Node-RED flow in our OpenHAB 2 Basic UI.\n \n
\n \n \"OpenHAB2\"\n \n
\n
\n \n {`Switch PushAlarm (MDGeneralControlGroup) {mqtt=\">[mosquitto:openhab/alarm/pushalarm/triggered:command:ON:1],>[mosquitto:openhab/alarm/pushalarm/triggered:command:OFF:0]\"}`}
\n {`String PushAlarmState \"Push to Alarm [%s]\" (MDGeneralControlGroup) {mqtt=\"<[mosquitto:openhab/alarm/pushalarm:state:JSONPATH($.pushalarm)]\"}`}\n
\n
\n
\n \n \"OpenHAB2\"\n \n
\n
\n \n {`Switch item=PushAlarm label=\"Trigger Alarm\"`}
\n {`Text item=PushAlarmState`}\n
\n
\n
\n \n
\n);","module.exports = function () {\n var selection = document.getSelection();\n\n if (!selection.rangeCount) {\n return function () {};\n }\n\n var active = document.activeElement;\n var ranges = [];\n\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) {\n // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' && selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function (range) {\n selection.addRange(range);\n });\n }\n\n active && active.focus();\n };\n};","\"use strict\";\n\nvar _require = require('./Component'),\n CopyToClipboard = _require.CopyToClipboard;\n\nCopyToClipboard.CopyToClipboard = CopyToClipboard;\nmodule.exports = CopyToClipboard;","module.exports = __webpack_public_path__ + \"static/Node-RED_OpenHAB_Projects_Trigger_Alarm_02-f9fe7f98eb0d7226ef72baa181b22fa8.png\";","module.exports = __webpack_public_path__ + \"static/Node-RED_OpenHAB_Projects_Trigger_Alarm_01-b161a0465493a0e25488872d6f746592.gif\";","module.exports = __webpack_public_path__ + \"static/Node-RED_OpenHAB_Projects_Trigger_Alarm_03-8d112222ad31a06ff4b2e0ca31fe8b7f.png\";","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CopyToClipboard = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar CopyToClipboard = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(CopyToClipboard, _React$PureComponent);\n\n function CopyToClipboard() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, CopyToClipboard);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var _this$props = _this.props,\n text = _this$props.text,\n onCopy = _this$props.onCopy,\n children = _this$props.children,\n options = _this$props.options;\n\n var elem = _react[\"default\"].Children.only(children);\n\n var result = (0, _copyToClipboard[\"default\"])(text, options);\n\n if (onCopy) {\n onCopy(text, result);\n } // Bypass onClick if it was present\n\n\n if (elem && elem.props && typeof elem.props.onClick === 'function') {\n elem.props.onClick(event);\n }\n });\n\n return _this;\n }\n\n _createClass(CopyToClipboard, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n _text = _this$props2.text,\n _onCopy = _this$props2.onCopy,\n _options = _this$props2.options,\n children = _this$props2.children,\n props = _objectWithoutProperties(_this$props2, [\"text\", \"onCopy\", \"options\", \"children\"]);\n\n var elem = _react[\"default\"].Children.only(children);\n\n return _react[\"default\"].cloneElement(elem, _objectSpread({}, props, {\n onClick: this.onClick\n }));\n }\n }]);\n\n return CopyToClipboard;\n}(_react[\"default\"].PureComponent);\n\nexports.CopyToClipboard = CopyToClipboard;\n\n_defineProperty(CopyToClipboard, \"defaultProps\", {\n onCopy: undefined,\n options: undefined\n});"],"sourceRoot":""}