Comments (4)
The protocol for the FIFO is defined here: https://github.com/sqall01/alertR/wiki/Protocol#protocol_schematics_fifo_sensor_sensoralert. There are also command lines to trigger an alert. But I think you already looked there.
In the scripts_example
directory inside the installation there is the file mac_address_whitelist.py which contains also an example how to write into a FIFO file directly (actually, now when I see this I do not know why I did not use the json module ... definitely have to change this).
When you would use the json module of python for this script it would look something like this:
import json
fifo_dict = dict()
fifo_dict["message"] = "sensoralert"
payload = dict()
payload["state"] = 1
payload["dataType"] = 0
payload["hasLatestData"] = False
payload["changeState"] = False
payload["hasOptionalData"] = True
optional_data = dict()
optional_data["message"] = "Something I want to tell someone."
payload["optionalData"] = optional_data
fifo_dict["payload"] = payload
with open("/your/fifo/file", 'w') as fifo_file:
fifo_file.write(json.dumps(fifo_dict))
Is this sufficient for now? Or do you have problems somewhere else?
Regarding the upload page. I actually thought about it. For example I thought about creating a subreddit alertr
for everyone who wants to post something alertr related like tutorials or cool setup ideas. Another idea I had was to create an AlertR misc github repository and anyone with something cool can add it there via a pull request. However, since no one seemed to be interested until now, I did not pursue it further. Personally I think the subreddit would be a better choice since it is like a internet forum software. What do you think?
Cheers
sqall
from alertr.
Hi,
I added new Developer Tutorials to the Tutorials list in the wiki. The tutorial showing how to write a script for a FIFO sensor is placed here
Since this should answer your question, I will close this issue. However, if you have any further questions or a suggestion on the question of my last post post feel free to open it again.
Cheers
sqall
from alertr.
from alertr.
Hey, just to let you know. I just created a subreddit where everyone can post there tutorials.
Cheers,
sqall
from alertr.
Related Issues (20)
- Server error after update to server 0.503 HOT 3
- Siren Timeout HOT 2
- Problem in config managerClientDatabase NameError: name 'updateServer' is not defined HOT 2
- SSLEOFError: EOF occurred in violation of protocol HOT 7
- Playing (no)sound from keypad to bluetooth speaker HOT 6
- Clear message history in the Android app HOT 2
- Error in dependency version check of installer HOT 1
- Missing files after server installation HOT 1
- Error in sensorClientRaspberryPi interrupt callback HOT 5
- What is the most simple way to activate/deactivate alertR time-controlled? HOT 6
- ManagerClientConsole cant find server HOT 5
- Best way to implement a door sensor HOT 8
- Feature request: allow the use of IMAP IDLE for push notifications HOT 2
- Feature request: installation and configuration assistants HOT 2
- Triggered alert before system active didnt gets triggered again HOT 5
- Problem with alertwebmobilemanager after update to 0.800 HOT 4
- ICalendar exit code 1 HOT 5
- PHP issues with Web Mobile manager HOT 7
- Temperature sensor don't go back to normal state after triggered HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alertr.