{"_id":"@demian85/home-server","_rev":"1-daf56c800cf1c0f62ea56d03c543bfaf","name":"@demian85/home-server","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@demian85/home-server","version":"2.0.0","description":"Smart Home server","main":"src/index.js","engines":{"node":"12.x"},"repository":{"type":"git","url":"git+https://github.com/demian85/home-server.git"},"scripts":{"postinstall":"npm run build","build":"webpack -p --progress","start":"node src/index.js","dev-client":"webpack --progress --watch","dev-server":"nodemon src/index.js","dev":"concurrently -k -c 'green,magenta' 'npm:dev-client' 'npm:dev-server | pino-pretty'","lint":"eslint ./src","init:config":"node src/server/init.js","format":"prettier --write './src/**/*.{js,jsx,ts,tsx}'","test":"jest --forceExit"},"keywords":["sonoff","smart","home","server","esp8266","wemos","domotics","automation","shelly"],"author":{"name":"Demian Rodriguez"},"license":"ISC","dependencies":{"@babel/polyfill":"^7.8.7","body-parser":"^1.19.0","compression":"^1.7.4","express":"^4.17.1","express-basic-auth":"^1.2.0","feels":"^3.0.0","hbs":"^4.1.1","lodash":"^4.17.15","luxon":"^1.23.0","mqtt":"^3.0.0","prop-types":"^15.7.2","react":"^16.13.1","react-dom":"^16.13.1","react-json-pretty":"^2.2.0","react-router":"^4.3.1","react-router-dom":"^4.2.2","redis":"^2.8.0","request":"^2.88.2","solar-calc":"^1.1.0","winston":"^3.2.1"},"devDependencies":{"@babel/core":"^7.9.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@babel/preset-react":"^7.9.4","@types/react":"^16.9.34","@types/react-dom":"^16.9.7","@types/react-router-dom":"^4.3.5","@types/redis":"^2.8.22","babel-eslint":"^10.1.0","babel-jest":"^26.0.1","babel-loader":"^8.1.0","concurrently":"^5.2.0","copy-webpack-plugin":"^5.1.1","css-loader":"^3.5.3","dotenv":"^8.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","eslint-plugin-react":"^7.19.0","jest":"^26.0.1","mini-css-extract-plugin":"^0.9.0","nodemon":"^2.0.3","pino-pretty":"^4.0.0","prettier":"^2.0.5","style-loader":"^1.2.1","webpack":"^4.43.0","webpack-cli":"^3.3.11"},"jest":{"transform":{"^.+\\.js$":"babel-jest"}},"gitHead":"c5ceb3f582034ff2877a893746b568812fa077b6","bugs":{"url":"https://github.com/demian85/home-server/issues"},"homepage":"https://github.com/demian85/home-server#readme","_id":"@demian85/home-server@2.0.0","_nodeVersion":"12.17.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-D8pZVzCX1YbCWY4DRu4xlZatC/eoECW8scTrJAQhvpZIEiZ4MP6gL6PfQJGSEP2vwTy2u3akFQuMhYaegwy6fQ==","shasum":"64b85eaffaed04c8c44b0364333cb7d68d1f22cc","tarball":"https://registry.npmjs.org/@demian85/home-server/-/home-server-2.0.0.tgz","fileCount":113,"unpackedSize":440419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe57sqCRA9TVsSAnZWagAA81wP/iP9juAl7gBq5HMD6Su+\ngMUBQ+/wbl+jzrcNVgdXBeVgWhXgixICPErau0ytHYio2qtqSYTCiLMWAX9r\nlqKnOP7NxzALlAqFZZCgHSO7mjaAqF5aTFxE8SErgotUHiU7ZUvz1Bm2Qx6c\ncGljR0mwDrt3LwECPrq5JFViS4NJbtV3ddunlSCEy8WH2yrogVcqOmjLojv8\nMoQSoUORKvtsNmwX3erSFmEhB34V/fOGeEl6W+H7QrAtCL+T0muThxgA2N6O\nGDAkGoHcjxmSxU92YtqcIyhjRJ1KqtdpOV0eIhaz5auC2ZIA9Y9C1EoPKEJ9\nVfcEb/t7vOgPu5pbrOHubnRee17uTuT0pv+mcvV0Nd6Y1pQxyMkI5iwZoIPX\nobPtpvKLVNtN4bLAvTAyb7VibU9L8/1zY31IFG09Ys1/DxHtU6ByxnN2pb8k\nRrLvFMVAV4QYwanB6ylchyYwlfR2ftH2igBHbq36AShcugotOey6s8nOdv0u\nu2ku5a/4/PaBK7L0Vsq8dB/6FQNjiBRXxozkW/QR+YDm7nO7gh6CM9/6VOh/\nBdDYuQTsTv/MqOAlld/fEd6yvYq8/klNgXr6WElcKuetnpqDeC/ClQNiYnQC\n78J6FLWo4oN+MA0+zd27I8UKBDNAZ24rd/ihJaEEMXAJyVmazXQSKDNgS0bu\nGL9u\r\n=THwB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICrxId1wkUKOdA+EhYaaS1dzKZ7VMSgOvTC66IkwzfJ5AiACHSbXzhlXKZOvT93BlqdC76JkyPUr7qStKoKamAaQEw=="}]},"maintainers":[{"name":"demian85","email":"demian85@gmail.com"}],"_npmUser":{"name":"demian85","email":"demian85@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/home-server_2.0.0_1592245033680_0.9998714902198644"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-15T18:17:13.644Z","2.0.0":"2020-06-15T18:17:13.848Z","modified":"2022-04-05T03:43:35.622Z"},"maintainers":[{"name":"demian85","email":"demian85@gmail.com"}],"description":"Smart Home server","homepage":"https://github.com/demian85/home-server#readme","keywords":["sonoff","smart","home","server","esp8266","wemos","domotics","automation","shelly"],"repository":{"type":"git","url":"git+https://github.com/demian85/home-server.git"},"author":{"name":"Demian Rodriguez"},"bugs":{"url":"https://github.com/demian85/home-server/issues"},"license":"ISC","readme":"# home-server\n\nA custom server for managing appliances at home using ESP8266-based devices like [Sonoff](http://sonoff.itead.cc/en/) and [Wemos D1 Mini](https://wiki.wemos.cc/products:d1:d1_mini)\n\n_Screenshots_\n\n![Dashboard](./screenshot1.jpg)\n\n![Hardware setup](./hardware-setup1.jpg)\n\n## Motivation\n\nI bought a bunch of Sonoff devices and decided to upgrade their firmware to [Sonoff-Tasmota](https://github.com/arendst/Sonoff-Tasmota).\n\nBy replacing the stock firmware, I can have complete control over the device.\nSonoff-Tasmota uses MQTT as the underlying protocol for communication between a broker and the device.\n\nAfter using [MQTT Dash](https://play.google.com/store/apps/details?id=net.routix.mqttdash&hl=en) for some time, I decided to build a Progressive Web App.\n\n## Setup\n\nServer runs on a local Raspberry PI model 3 B+ which has the following services:\n\n- [Mosquitto MQTT Broker](https://mosquitto.org/)\n- [Redis server](https://redis.io/)\n\nI currently own 6 Sonoff devices, which are connected to the following appliances:\n\n- Patio lamp\n- Desk lamp\n- Room lamp\n- Room heater 1 (this one also reports values from its SI7021 temperature and humidity sensor).\n- Room heater 2\n- Wall socket\n\nI also have a bunch of sensors connected to a Wemos D1 Mini (flashed with the same firmware above) in my living room:\n\n- [DHT22/AM2301](https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf) temperature and humidity sensor\n- [HC SR501](https://components101.com/hc-sr501-pir-sensor) PIR motion sensor\n- [BMP280](https://components101.com/sensors/bmp180-atmospheric-pressure-sensor) temperature and atmospheric pressure sensor\n- [BH1750](https://www.mysensors.org/build/light-bh1750) light level sensor\n- Infrared receiver and remote control\n- RF transmitter and receiver\n\n## How it works\n\nAll devices establish a connection to the MQTT broker and report their state while also subscribing to a control topic, allowing you to switch them on/off.\n\nServer runs as a daemon and subscribes to all sensor topics. Some logic decides when to switch the room heater on/off.\n\nThe UI is built on React and consists of simple components that allow the user to switch the appliances on/off and view sensor, weather and derived data, like the \"real feel\" temperature.\n\nThe browser keeps a connection to the MQTT broker over a Websocket.\n\n## What's next?\n\nNot sure, but I recently started playing with electronics and found home-automation to be my new hobby.\n\nI'll keep experimenting with dev boards like Arduino, NodeMCU, ESP8266 and Sonoff devices. They are low cost devices that allows easy customization.\n\n### Possible next projects:\n\n- Automatic plant watering for my garden 🌻\n- OLED display screen showing sensor data 📺\n- Remote controled car 🚙\n","readmeFilename":"README.md"}