lowpowerlab / raspberrypi-gateway Goto Github PK
View Code? Open in Web Editor NEWRaspberryPi socket webserver for home automation
Home Page: http://lowpowerlab.com/gateway
License: Other
RaspberryPi socket webserver for home automation
Home Page: http://lowpowerlab.com/gateway
License: Other
Version as of this posting is 2.2.1.
Where should it be added to the root? Some installer directory with the unit file, rsyslog, and other similar configs??
Follow steps 1 and 2 for this repo.
https://docs.travis-ci.com/user/getting-started/
My PR already has a .travis.yml file.
It would be nice to have the ability to send SMS alerts to multiple recipients. See the PR for how I implemented this.
Interface with journald to retrieve a variable amount of logs. Default to 3 days of logs.
Version 1.8.0 as of this posting.
Send logs to /home/pi/gateway/logs/
Rather than load defaults we could ask the user for user/passwords and such
Blueprints could move or be deprecated
Felix, I have used the config npm module in the past to store configs similar to your settings.js One benifit to the module is it allows for a default config and a local config. Anything in the local config overrides things in the default config. This can make testing, & automated deployment a bit easier.
I was thinking of creating a PR to change up the settings.js to this module. One question I have is what format would you like the settings file to be in if such a conversion were to happen?
It supports JSON, CSON, YAML, JS files, and many others.
https://github.com/lorenwest/node-config/wiki/Configuration-Files
Hello felix..!
very much impressed about your work in home automation gateway. thank you..!
So, is it possible to connect different nodes to gateway by hard wiring them to the raspberry pi and get that integration for controlling into the dashboard provided. in other words is moteino is mandatory to use for this implementation or we can still use this integration without moteino and control them using the same interface..or read the status of the sensors on the same web interface...., if yes how to do it ..? are you planning to record same vdo for the concern i asked..!
eagerly waiting for your comment on the issue..!
thank you..!
Issue: When two SwitchMote's buttons are paired / sync'ed, the ACK messages for both events (when one changes) don't always make it back to the gateway properly, thus the gateway often misses the action from one switchMote, meaning that button can't be clicked from the gateway until it receives another ACK from that button. It's possible the two ACKs are being sent so close to each other, that the gateway only picks up one instead of both, or possibly some bug in the firmware that is not sending an ACK for a remotely (meaning paired) triggered status change.
In my case, I have two switch motes setup that are sync'ed in both directions to each other. A spare button on Mote-1 turns on and off the button+relay of Mote-2. The state of the spare button on Mote-1 also gets turned on and off when Mote-2 is controlled locally.
Here is another thought along those same lines, would it be possible to add a function to the switch mote's firmware (that can be triggered from the gateway) to poll the current status of all known switches without changing their states? That way the gateway could potentially be setup to poll a remote node at a regular interval (or manually) to make sure it knows their current states, which would be a potential workaround to my issue described above.
Brand new Raspian jessie lite install (2017-03-02).
sudo apt-get update && sudo apt-get install npm git
after cloning this git repo and running "npm install", the following errors result:
$ npm install
> [email protected] preinstall /home/pi/RaspberryPi-Gateway
>
npm WARN engine [email protected]: wanted: {"node":">= 4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN engine [email protected]: wanted: {"node":">= 0.12"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
/
> [email protected] install /home/pi/RaspberryPi-Gateway/node_modules/serialport
> node-pre-gyp install --fallback-to-build
/usr/bin/env: node: No such file or directory
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.50+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/RaspberryPi-Gateway
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/RaspberryPi-Gateway/npm-debug.log
npm ERR! not ok code 0
It would be helpful if the "releases" were tagged in git. This would allow users to clone the repository based on an exact set of files versus getting the latest.
Up for discussion whether it should be bundled in the main install script or separately.
If bundled we could prompt the user if they are using either of the two and conditionally install that part.
Ideally should give a visual overview of the software version along with all dependencies versions.
Install script is a great starting point, however I guess it is not complete
Running with Rpi 2 (Jessie), the UART is disabled by default on Jessie
see: https://hallard.me/enable-serial-port-on-raspberry-pi/
I also noticed sometimes UART is disabled in kernel. The enable it you need to check in /boot/config.txt the line enable_uart
Also, starting from line 76, the node folder is incorrect and should be redefined as
NODEDIR=$NODEDIR/node-v4.6.2-linux-armv6l
Otherwise the node is not really in the path
One more thing, the default baud speed for the gateway is:
#define SERIAL_BAUD 115200
whereas in the settings.json5 in this repo it defines 19200
Keep up the awesome work !!
gatewaysetup.sh uses curl to determine the latest github release:
https://github.com/LowPowerLab/RaspberryPi-Gateway/blob/master/.setup/gatewaysetup.sh#L129
If this script is run in an environment that does not already have curl installed, the script appears to complete but with a mostly empty gateway folder. This in turn causes nginx to give a forbidden error when trying to browse the site (because of a missing index file).
Only after scrolling back through the significant amount of output from the script does it become apparent what the real issue was. The script was unable to curl the latest release from github. It then tried to git pull a null value, which failed.
Perhaps the default installation of Raspbian includes curl, but for those of us who run in a different environment, adding this one-liner would be very helpful: sudo apt-get -y install curl
.
One could make a similar argument for grep and wget as well.
Another way to go about it is to put this at the top:
# Check to see if this script has access to all the commands it needs
for CMD in grep curl wget; do
type $CMD &> /dev/null
if [ $? -ne 0 ]; then
echo
echo "ERROR: The script cannot find the required command \"${CMD}\"."
echo
exit 1
fi
done
Just fail the script and let the end user manually fix the problem.
Thanks for a great product.
But luckily, if I insert sudo node-install -v 16.12.0
immediately after line 113 (sudo wget
....) and comment out sudo npm install -g npm
, it works. Seems the node module serialport doesn't yet play nice with latest nodejs.
The following commit from the RFM69 repo changes the Request Queue functionality to look for a keyword of "RQ" rather than "REQUESTQUEUE".
LowPowerLab/RFM69@f77011b
This breaks the request queue functionality in the Pi Gateway UI because a similar change was not made.
PR incoming...
hello felix..!
very much impressed with the work done. thank you..!
is it possible to connect the nodes without moteino >..? if yes how to integrate them in this dashboard to control and read statuses of various sensors.?
WebKit crashes when viewing Humidity graph on Weather node.
โ + โฅ + I
) and proceed to view page.DEVICES USED:
iPhone 6 - iOS 11.3rc - Safari
MacBook Pro (Mid-2012) - macOS 10.13.4
Safari - 11.1 (13605.1.33.1.2)
Safari Technology Preview - Release 52 (Safari 11.2, WebKit 13606.1.9.3.1)
Firefox - 59.0.2 (64-bit)
Chrome - Version 65.0.3325.181 (Official Build) (64-bit)
GATEWAY:
V. 8.10.0
MoteinoUSB-R6
RasperryPi 0w
OS: Raspbian 9.3 stretch
Kernel: armv6l Linux 4.9.80+
AFFECTING NODE:
Moteino-R6 / WeatherShield-R2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.