detectino-core's People
detectino-core's Issues
When arming a tripped sensor, an alarm should start
Squelch events when they produce same sensor state
add events history
Provide events lists to check what happened when the user is away
- add a db-backed event list
- provide the need of ack for alarm events
- add information on who started the action, if applicable (ex: who armed the system?)
- display not ack'ed (alarm) events on the gui
- auto delete older (and ack'ed) events ?
Correctly handle scenarios when some partition cannot be armed
What to do when some scenario is run but some partition cannot be armed? just abort the entire transaction? Run what works and ignore the rest?
500 internal server error when running a scenario twice
may be related to #16
Runnin an Arming scenario when some sensor is tripped
Right now if arming is done on a tripped detector, the arm operation is refused.
[error] Not all sensors are idle, cannot arm!
is seen in the logs.
Find a better way to handle it or at least better report to the user.
Fix schema references in models relations
Improve phoenix endpoint configuration
....to allow connection from different IPs/hostnames
see :check_origin @https://hexdocs.pm/phoenix/Phoenix.Endpoint.html
Don't allow arming if some sensor is tripped
Maybe we should add a couple of options to a sensor to allow:
-
exclude the sensor if is tripped during arming
-
exclude the sensor if is tripped during arming but automatically include it when goes idle
complete sensor configuration gui
Add missing fields like balance type, thresholds, internal and so on.
See :sensor table and respective model for reference.
Reset/cancel of exit/entry timer in specific sequences
- exit timer must not be reset after expiration time, except after disarm
- exit timer must be cancelled and reset if disarmed while timer running
- entry timer must be cancelled if disarmed while timer running
- entry timer should be reset on a new alarm event: every new alarm event should respect the entry timer
- if an entry/exit timer is running, any other alarm event should be queued untile timer expiry
make users session timeout configurable
Disallow config changes while the system is armed
Arm stay immediate exit timer should be zero
With primeng 4.1.x datatable text clip is broken (and tooltips too)
Check when a fix is released upstream
See: https://forum.primefaces.org/viewtopic.php?f=45&t=52045
Handle :realtime event in :idle_arm status on partition fsm
this may happen when a partially armed partition has an internal sensor associated.
events from it may be ignored safely, since we don't care.
Display a better error un gui when arming is not possible
When arming is refused (because of tripped sensors), an 403 http error is returned.
gui should display a better error message.
Move ex_link_header from https://github.com/xadhoom/ex_link_header to released package
Shorten GUI errors cause by server response
When the server responds with http errors, the gui reports the javascript backtrace that's no useful at all.
leave only the http error, like "Error: 403 - Forbidden" and nothing more.
mute events from auto generated sensors
AUTO type sensor (discovered ones) when receive events will trigger a decode error.
this is just a warning, maybe we can mute it in order to not pollute logs
output workers does not respect delayed alarm
Running scenario 500 internal server error
Error: (FunctionClauseError) no function clause matching in DtCore.Monitor.Partition.arm/3
500 internal server error when disarming a sensor in realtime state
Request: POST /api/scenarios/1/run
** (exit) exited in: GenServer.call(#PID<0.2184.0>, {:disarm, "matteo"}, 5000)
** (EXIT) an exception was raised:
** (FunctionClauseError) no function clause matching in DtCore.Monitor.DetectorFsm.handle_event/4
(detectino) lib/dt_core/monitor/detector_fsm.ex:53: DtCore.Monitor.DetectorFsm.handle_event({:call, {#PID<0.2168.0>, #Reference<0.1264155481.2744123395.229176>}}, :disarm, :realtime, %{config: %DtCtx.Monitoring.Sensor{meta: #Ecto.Schema.Metadata<:loaded, "sensors">, address: "1", balance: "DEOL", enabled: true, entry_delay: true, exit_delay: true, full24h: false, id: 9, inserted_at: ~N[2017-09-03 18:20:00.372432], internal: true, name: "Sala Primo Piano", partitions: #Ecto.Association.NotLoaded, port: 1, tamp24h: false, th1: 400, th2: 490, th3: 550, th4: nil, updated_at: ~N[2017-09-06 20:14:31.441939]}, entry_timeout: 0, last_event: %DtCore.DetectorEv{address: "1", id: "5pcs3hsfacrakucl5ji9tfk66lm5j3qe", port: 1, type: :realtime}, receiver: #PID<0.2168.0>})
(stdlib) gen_statem.erl:1242: :gen_statem.call_state_function/5
(stdlib) gen_statem.erl:1012: :gen_statem.loop_event/6
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
2017-10-18 07:39:39.903 pid=<0.23557.2> [error] GenServer :sensors_controller terminating
Provide a notification of arming status progress
when arming partitions with delayed sensors we need to:
- provide an exit timer event
- push the exit timer event to the gui via channels
- show different icon status to mimic arming progress
- add a bell on the web gui to notify that arming is undergoing, maybe using web audio apis
Caveats: right now if we are different partitions with same sensors they may have different exit delays, we must find a way to deal with it.
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.