Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a sensor node with a panic button #2

Open
4 tasks
simoneengelbr opened this issue Jun 9, 2020 · 1 comment
Open
4 tasks

Create a sensor node with a panic button #2

simoneengelbr opened this issue Jun 9, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@simoneengelbr
Copy link
Member

simoneengelbr commented Jun 9, 2020

This issue is recommended for developers with minor experience with Arduino and software development. The issue will act as an introduction to the alarm setup and installation documentation.

Implement a sensor node with a panic button instead of a sensor. This way a panic button can be installed in the home independently of a control panel.

A panic button is installed on every control panel, and uses a breadboard. No sensor node uses a panic button at this time. Sensor nodes do, however, have a 'panic flag' value, it is just never updated. This sensor node will read a panic button instead of a sensor. The setup will include an Arduino UNO with a LoRa-shield, connected to a panic button at the A0 pin (in place of a sensor).

First the sensor node setup must be created:

  • Locate code used for panic button in the control panel files:
    • How to read the pin: link
    • When to read the pin and update panic status: link
  • Create code for new sensor node
    • Duplicate sensor node file of your choice
    • Add code used for panic button where it was in control panel code
    • Remove code used for sensor (sensor setup, sensor specific loop code, sensor specific loop code - indicated with comments)
    • Notice that both pin A0 and pin A1 are activated on setup. Only one is needed for the panic button, so remove A1. Then make sure to change which pin is read in the panicButton()-method, in the analogRead()-call.

If you have hardware available, now is a great time to test your implementation.

Then, documentation of the new sensor node must be added to the installation guide on the nwa website:

  • Create a fritzing-diagram of the new sensor node, inspired by the files used for a control panel and a sensor node:
    Fritzing-examples.zip
  • Website update: Changes need to be made in both the frontend and beckend of the website.
    • Go to site/backend/api/models/component_model.js and add a new sensor node with the needed parts. Draw inspiration from the control panel, as it already uses some of the parts you will need. This is used when generating parts list for the alarms/design page of the website. Make sure you add your new sensor node to the list at the bottom of the file.
    • To update the frontend, navigate around the alarms section of the website nwa-site.herokuapp.com/alarms to determine which changes need to be made.
    • Some descriptions will have to be updated to include this new sensor-less setup. These can be updated in site/frontend/public/locales/en/alarm_v1.json file.
    • Create a new site/frontend/src/Components file for your sensor node by copying an existing sensor node file. Change all sensor-specific information, inclusing diagrams and parts lists. Notice in AlarmSNLidar that AlarmSNBasic has a parameter that determines whether to include a breadboard. You will need to implement your own 'use' tab, as the existing text is sensor-specific
@simoneengelbr simoneengelbr added enhancement New feature or request good first issue Good for newcomers labels Jun 9, 2020
@github-actions
Copy link

github-actions bot commented Jun 9, 2020

Thank you for helping out the development of this project by placing your first issue. The team behind nwa will address its issues as soon as possible. Best regards, the developers.' first issue

@simoneengelbr simoneengelbr added issue draft Issue description incomplete and removed enhancement New feature or request good first issue Good for newcomers labels Jun 9, 2020
@simoneengelbr simoneengelbr changed the title Implement a panic button (sensor) node Implement a panic button sensor node Jun 9, 2020
@simoneengelbr simoneengelbr changed the title Implement a panic button sensor node Create a sensor node with a panic button Jun 11, 2020
@simoneengelbr simoneengelbr added enhancement New feature or request good first issue Good for newcomers and removed issue draft Issue description incomplete labels Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant