{"_id":"@beckflorian/node-red-dashboard-2-ui-mainswitch","_rev":"1-391289f5f6f27fbb6330c969d87c97b7","name":"@beckflorian/node-red-dashboard-2-ui-mainswitch","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@beckflorian/node-red-dashboard-2-ui-mainswitch","version":"0.0.1","keywords":["node-red","node-red-dashboard-2","mainswitch","schedule","timer","switch","dashboard"],"author":{"url":"https://github.com/florianbeck","name":"Florian Beck"},"license":"Apache-2.0","_id":"@beckflorian/node-red-dashboard-2-ui-mainswitch@0.0.1","maintainers":[{"name":"beckflorian","email":"florian.beck@wangenkuesse.de"}],"contributors":[],"homepage":"https://github.com/beckflorian/ui-mainswitch#readme","bugs":{"url":"https://github.com/beckflorian/ui-mainswitch/issues"},"dist":{"shasum":"e32bb8f287bf9bf0a0e0038ff8fd70fa37e4f16c","tarball":"https://registry.npmjs.org/@beckflorian/node-red-dashboard-2-ui-mainswitch/-/node-red-dashboard-2-ui-mainswitch-0.0.1.tgz","fileCount":9,"integrity":"sha512-Bb0AcPRKiAGoS8vjLKBzYrXsrZ8PFS79L2t0071WOqEsfA6ocD2qmF/GxHvBPqMskkOblH8J4j0UIZad4gWWQw==","signatures":[{"sig":"MEYCIQCCL48mQeNsb48cZBZjmpapH9ns029vuVdP/lwl65OrgAIhAKv1WuG+/aavhqYrbu+Zj0ZzB8tyBbmbouHY5JT+idxj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75289},"engines":{"node":">=14"},"exports":{"import":"./resources/ui-mainswitch.esm.js","require":"./resources/ui-mainswitch.umd.js"},"gitHead":"c7b6681b83962980da210f0b72966623c2a100a4","scripts":{"dev":"NODE_ENV=development vite build --watch","lint":"npm run lint:js && npm run lint:package","build":"vite build","lint:js":"eslint --ext .js,.vue,.cjs,.mjs .","dev:prod":"vite build --watch","lint:fix":"npm run lint:js:fix && npm run lint:package:fix","build:dev":"NODE_ENV=development vite build","lint:js:fix":"yarn lint:js --fix","lint:package":"sort-package-json --check 'package.json'","lint:package:fix":"sort-package-json 'package.json'"},"_npmUser":{"name":"beckflorian","email":"florian.beck@wangenkuesse.de"},"node-red":{"nodes":{"ui-mainswitch":"nodes/ui-mainswitch.js"},"version":">=3.0.0"},"repository":{"url":"git+https://github.com/beckflorian/ui-mainswitch.git","type":"git"},"_npmVersion":"10.8.2","description":"Mainswitch","directories":{},"_nodeVersion":"20.17.0","dependencies":{"vue":"^3.3.8","vuex":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.13","eslint":"^8.53.0","eslint-plugin-n":"^16.3.1","eslint-plugin-vue":"^9.18.1","@vitejs/plugin-vue":"^4.5.0","eslint-plugin-import":"^2.29.0","eslint-config-standard":"^17.1.0","vite-plugin-css-injected-by-js":"^3.3.0"},"node-red-dashboard-2":{"version":"1.0.0","widgets":{"ui-mainswitch":{"output":"ui-mainswitch.umd.js","component":"UIMainswitch"}}},"_npmOperationalInternal":{"tmp":"tmp/node-red-dashboard-2-ui-mainswitch_0.0.1_1732892752933_0.9009875227376403","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@beckflorian/node-red-dashboard-2-ui-mainswitch","version":"0.0.2","description":"Mainswitch","keywords":["node-red","node-red-dashboard-2","mainswitch","schedule","timer","switch","dashboard"],"repository":{"type":"git","url":"git+https://github.com/beckflorian/ui-mainswitch.git"},"license":"Apache-2.0","author":{"name":"Florian Beck","url":"https://github.com/florianbeck"},"contributors":[],"exports":{"import":"./resources/ui-mainswitch.esm.js","require":"./resources/ui-mainswitch.umd.js"},"scripts":{"build":"vite build","build:dev":"NODE_ENV=development vite build","dev":"NODE_ENV=development vite build --watch","dev:prod":"vite build --watch","lint":"npm run lint:js && npm run lint:package","lint:fix":"npm run lint:js:fix && npm run lint:package:fix","lint:js":"eslint --ext .js,.vue,.cjs,.mjs .","lint:js:fix":"yarn lint:js --fix","lint:package":"sort-package-json --check 'package.json'","lint:package:fix":"sort-package-json 'package.json'"},"dependencies":{"vue":"^3.3.8","vuex":"^4.1.0"},"devDependencies":{"@vitejs/plugin-vue":"^4.5.0","eslint":"^8.53.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.29.0","eslint-plugin-n":"^16.3.1","eslint-plugin-vue":"^9.18.1","vite":"^5.0.13","vite-plugin-css-injected-by-js":"^3.3.0"},"engines":{"node":">=14"},"node-red":{"version":">=3.0.0","nodes":{"ui-mainswitch":"nodes/ui-mainswitch.js"}},"node-red-dashboard-2":{"version":"1.0.0","widgets":{"ui-mainswitch":{"output":"ui-mainswitch.umd.js","component":"UIMainswitch"}}},"_id":"@beckflorian/node-red-dashboard-2-ui-mainswitch@0.0.2","gitHead":"8fc1d6c3b0bd0aff90488c534619adee4df0a90f","bugs":{"url":"https://github.com/beckflorian/ui-mainswitch/issues"},"homepage":"https://github.com/beckflorian/ui-mainswitch#readme","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-xM1nC0fKppqSV/RTzSTEflJuLb3+ZId1OOnQhvwCE3HRwN1eYx0GX5oRCmUASJFLdMUMcQj/PpE1LcsSmA3pdA==","shasum":"a02fb33d794488bd4701323f7f765eaf957d9064","tarball":"https://registry.npmjs.org/@beckflorian/node-red-dashboard-2-ui-mainswitch/-/node-red-dashboard-2-ui-mainswitch-0.0.2.tgz","fileCount":9,"unpackedSize":75507,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmCKtxuo9AhyuNDjcowb5iY4SGB2Rx10i77PoYuJl8DAiEA1DARHptIk2fLraIMMGQIBNm80TJ9j8mbipuIYOCYzUs="}]},"_npmUser":{"name":"beckflorian","email":"florian.beck@wangenkuesse.de"},"directories":{},"maintainers":[{"name":"beckflorian","email":"florian.beck@wangenkuesse.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-red-dashboard-2-ui-mainswitch_0.0.2_1736102954526_0.9154743108667087"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-29T15:05:52.809Z","modified":"2025-01-05T18:49:14.892Z","0.0.1":"2024-11-29T15:05:53.201Z","0.0.2":"2025-01-05T18:49:14.716Z"},"bugs":{"url":"https://github.com/beckflorian/ui-mainswitch/issues"},"author":{"name":"Florian Beck","url":"https://github.com/florianbeck"},"license":"Apache-2.0","homepage":"https://github.com/beckflorian/ui-mainswitch#readme","keywords":["node-red","node-red-dashboard-2","mainswitch","schedule","timer","switch","dashboard"],"repository":{"type":"git","url":"git+https://github.com/beckflorian/ui-mainswitch.git"},"description":"Mainswitch","contributors":[],"maintainers":[{"name":"beckflorian","email":"florian.beck@wangenkuesse.de"}],"readme":"# 4-state-switch-node for node-red with integrated Dashboard 2.0 widget.\n\n### Inputs\n#### *MainSwitch*\n: payload (string [0..3, off, on, auto, countdown]) : set the 'state' of the MainSwitch.\n\n: *topic* (string) : empty/no topic.\n\n#### *Interval*\n: payload (string [0..28]) : set the 'interval' for the countdown in 29 steps (4 seconds to 72 hours).\n\n: *topic* (string) : 'interval'\n\n#### *Feedback*\n: payload (string [true, false, 0, 1, on, off, On, Off, ON, OFF]) : set the 'feedback' of your actuator. The background-color of the Feedback-Label changes according to this input.\n\n: *topic* (string) : set the topic in the editor.\n\n#### *AutoIn*\n: payload (string [true, false, 0, 1, on, off, On, Off, ON, OFF]) : set the 'autoInState' of the node. If 'mainSwitchState' is \"auto\" this will activate or inactivate the output.\n\n: *topic* (string) : set the topic in the editor.\n\n### Outputs\n#### *MainSwitch*\n: payload (string [true, false]) : output of MainSwitch.\n\n: *topic* (string) : empty/set the topic in the editor.\n\n### Details\n\n#### *The four states are:*\n- \"Off\": outputs \"false\".\n- \"On\": outputs \"true\".\n- \"Auto\": outputs \"true\" or \"false\" depending on the last \"autoIn\" input state and the integrated timer.\n- \"Countdown\": outputs \"true\". After a selectable time outputs \"false\".\n\n\n#### *Purpose:*\nThe switch is designed for integrating manual switching and auto-features e.g.\n- Switching the power of an audio amp depending on the state of the api of an audio device...\n- Switching pumps/valves of a swimmingpool or garden watering system depending on schedule, weather forecast or water level...\n\n\n#### *Features:*\nThe node/widget integrates some interesting features:\n- Display for feedback from the actuator.\n- \"autoIn\": input for an external signal to change the output, when the switch is on \"Auto\".\n- Integrated Timer to schedule events with starting time, duration and weekday selection, when the switch is on \"Auto\".\n- Integrated countdown to manually activate the output for a selectable time, independent from timer and autoIn.\n- Topics for \"autoIn\", \"Feedback\" and \"output\" are customizable.\n- Icon and Label for \"Feedback\"/\"Switchname\" is customizable.\n- Colors are customizable.\n- Language/Labels are customizable.\n\n#### *Data retention:*\nIt is recommended to set the contextStorage to \"localfilesystem\" in 'settings.js' if you want do keep the state of the switch and the events of the timer when stopping/restarting node-red.\n\n### Customizing the node in the editor\n\n#### *Name:*\nName of the node diplayed in the editor.\n\n#### *Group:*\nGroup the widget renders in the Dashboard 2.0\n\n#### *Size:*\nSize of the widget, if you use a grid layout.\n\n#### *Switch Label:*\nLabel for the switch. The color of this label changes with the state of the \"feedback\" input from your acuator.\n\n#### *Feedback Icon :*\nIcon for the switch label. The color of this label/icon changes with the state of the \"feedback\" input from your acuator.\n\n#### *Feddback Topic:*\nSpecify a topic for your feedback input. \"Feedback\" input accepts a boolean payload (true, false, 1, 0, On, Off...).\n\n#### *Auto Topic:*\nIf you specify an Auto Topic, the \"autoIn\" input is active. \"autoIn\" input accepts a boolean payload (true, false, 1, 0, On, Off...).\n\n#### *Auto Label:*\nLabel for \"autoIn\". The color of this label changes with the state of the \"autoIn\" input.\n\n#### *Output Topic:*\nIf you specify an output topic, the output messge will have this topic. Otherwise the topic is empty.\n\n#### *Colors:*\nIn the editor you can customize the color settings by declaring an json-object - complete or partial - like this:\n```\n{\n    \"expansionPanelTitle\":\"pink\",\n    \"mainSwitch\":[\n        \"red-darken-1\",\n        \"green-darken-1\",\n        \"blue-darken-1\",\n        \"black\",\"white\"\n    ],\n    \"mainSwitchAuto\":{\n        \"false\":{\n            \"false\":\"red-darken-1\",\n            \"true\":\"green-darken-1\",\n            \"null\":\"grey-darken-1\"\n        },\n        \"true\":{\n            \"false\":\"red-lighten-3\",\n            \" true\":\"green-lighten-3\",\n            \"null\":\"grey-lighten-2\"\n        }\n    },\n    \"autoIn\":{\n        \"false\":\"light-blue-lighten-3\",\n        \"true\":\"yellow-lighten-2\"\n    },\n    \"timerIn\":{\n        \"false\":\"light-blue-lighten-3\",\n        \"true\":\"yellow-lighten-2\"\n    },\n    \"feedback\":{\n        \"false\":\"red-darken-1\",\n        \"true\":\"green-darken-1\",\n        \"null\":\"grey-darken-1\"\n    },\n    \"countdown\":\"deep-purple\",\n    \"eventToolbar\":\"amber\",\n    \"slider\":\"amber\",\n    \"plus\":\"red\",\n    \"activeActive\":\"green\",\n    \"activeInactive\":\"red\"\n}\n```\n\n#### *Language:*\nIn the editor you can customize the language settings by declaring an json-object - complete or partial - like this:\n```\n{\n    \"events\":\"Events\",\n    \"start\":\"Start\",\n    \"duration\":\"Duration\",\n    \"actions\":\"Actions\",\n    \"active\":\"active\",\n    \"inactive\":\"inactive\",\n    \"activeLabel\":\"Active?\",\n    \"until\":\"until\",\n    \"off\":\"Off\",\n    \"auto\":\"Auto\",\n    \"dayLabels\":[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],\n    \"dayOrder\":[0,1,2,3,4,5,6],\n    \"newEvent\":\"New Event\",\n    \"editEvent\":\"Edit Event\",\n    \"cancel\":\"Cancel\",\n    \"ok\":\"OK\",\n    \"deleteConfirm\":\"Do you really want to delete this event?\",\n    \"noData\":\"No event yet...\"\n}\n```\n\n### Known Issues\nAfter Deploy a Browser Refresh is necessary.\n\n### References\n\n - [GitHub](https://github.com/beckflorian/ui-mainswitch) - the nodes github repository\n\n### Disclaimer:\nOf course, this software is completely opensource and offered with absolutely NO WARRANTY whatsoever offered or implied.\n\nIf you choose to set up your own control system for actuators, and your house burns to the ground, it's your problem, nothing to do with this software as there is no warranty whatsoever. Up to you to use it completely at your own risk. So YOU HAVE BEEN WARNED!\n","readmeFilename":"README.md"}