torsdag 19 januari 2017

alarm_specific_methods.py

Today I've finished alarm_specifi_methods.py.

It only has two methods that should have the same name for any alarm-type. The first method receives the CAN data and has to parse it to a nice format. The other method extracts the right data given a sensor-adress. This sensor adress can be anything uniqe.

So when setting up an alarm:

1. you have to edit the details in user_data.txt:

email:xxx@xxx.xxx
mobile_phone:xxxxxxxxxx
wait_seconds_between_checks:0


2. then you create a txt-document for each data-value from the sensors:

sensor_address:Nod2,AN3
alarm_when:reach_threshhold
threshhold:00
action_1:email
email_content:PIR


3. The last thing is to edit alam_specific_methods.py. For this you need to know the basic system and python-language.

If a customer needs an alarm based on several sensor-values, alarm_specific_methods.py may need a class or global variables to keep track of data from other sensors.

If the hardware or communication protocols are different from what we use, CAN_communication.py and other files may need to change.

Tomorrow I will either focus on SMS, EMAIL, LOCAL SERVER to show data or trying to fix the broken part of the hardware. It depends on what the product owner wants.

Inga kommentarer:

Skicka en kommentar