Code Monkey home page Code Monkey logo

labwatcher's People

Contributors

evillord666 avatar karataevdmitry avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

karataevdmitry

labwatcher's Issues

Override Jobs schedule

we have default Jobs schedule, but we should have a possibility to run job by another schedule

Add event to watch

Currently we should monitor following events:

  • network availability (wan or global network)
  • pc with shared store availability
  • ftp server availability

We should add this events only if time we watching them higher than time thrrshold (for every every ebvent type have to be own value)

Basic API

We should have following API

  • GET /api/spectrum/
  • GET /api/spectrum/{id}
  • first additional method - GET /api/spectrum/{id}/samples <- should list all files with dates of save
  • second additional method - GET /api/spectrum/{id}/samples/{sampleName}/spectrum

Add retry with timeout to send messages

Sometimes send notification via Telegram or e-mail fails we should make some retries with delay. I don't think that we should make it with an appsettings but we could use just a const

Add analyze of BaseLine value

if BaseLine value have same value for current and previous spectra we should Make Email and Telegram Notification about possible issues:

  • If HV was down previous spectrum[0] value should be equal prevSpectrum[0]
  • if velocity is down, we got decrease Signal/Noise Ratio

Add event watcher

  1. Watch event local network issue (gateway is unreachable)
  2. Watch event global network issue (mail server is unreachable)
  3. Add power supply instability issues

Add automatic autosave period calculation

Now we are using Threshold for determine if we saved last spectrum or not, but when we have series we could find time delta (TimeSpan) between spectrum save dates.
We should consider following pecularities:

  • spectra measurement could be paused for some time, therefore time delta between them could be more then usual threshold, if delta is big we should consider for this spectrum some Default Theshold (should be added to config)

Create minimalistic UI

We should create here minimalistic UI to authorize (login+logout) show list of indexed spectra and it samples && get them from Web

Add Job 4 save all spectra into NAS

We should add property IsActive to model and add a Job that transfer all inactive spectra (directory should be removed from shared folder) from Windows shared directory to NAS. We should select spectra that we measured 1 week ago and older and move them to NAS

Integrate telegram bot with group Notification about spectra save

Telegram bot should work in a following manner:

  1. Send message to a tg group about spectra were send via e-mail
  2. It should work parallel to e-mail notifier ->
    now iy looks like
    bool emailResult = await _mailNotifier.NotifySpectrumSavedAsync(dataToSend);
    // 
   bool tgResult await =  await _mailNotifier.NotifySpectrumSavedAsync(args); // here we should form list of args
  1. It has to use text depends on data analysis
    • if spectra.Count == 0 it should say about possible hardware poweorff (implicit sign)
    • it should compare current spectrum and previous:
         if (current[0] < previous[0] + delta)  // delta should be small
        {
              // possible HV supply was down
        }

Conditional SpectrumAutosave message formatting

We should change behaviour of making autosave method, because we have 1 method for every notify (ISpectrumReadyNotifier),
this task could be solved using very complicated and abstractive approach, but we don't need it. It is better to solve this task as simple as it possible. If array of spectrum is empty we should form another message for telegram only ():

На {datetime} не было получено ни одного спектра, косвенно это может говорить об одной из следующих проблем:
* сбой работы спектрометрического оборудования / отключение управляющего компьютера;
* длительное отключение электроэнергии превышающее время работы системы от АКБ ;
* отсутствие сети (отключение роутера/мобильной сети интернет)

The simplest way is just making:

if (specs.Any())
{
     // normal message
}
else 
{
    // make mentioned above message
}

Minimal set of features

At least we should have following features:

  • spectra indexation
  • sending freshest spectra via e-mail and make telegram notification

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.