High Availability Traefik for K8s (IngressRoute + Cert Manager + LetsEncrypt)

Here I share the recipe for how to setup High Availability Traefik Proxy (multiple instances) for Kubernetes with TLS certificates obtained from LetsEncrypt with help of Cert Manager.

Continue reading “High Availability Traefik for K8s (IngressRoute + Cert Manager + LetsEncrypt)”

Birdsong.report B1 Model Classification Quality

Here are some important notices about the classification quality of B1 model currently deployed at (birdsong.report)

I made per class classification quality analysis (don’t know why I did not do it before!) and the results are both impressive and distressing.
Continue reading “Birdsong.report B1 Model Classification Quality”

Anomaly detection system. Case study

The problem

There is a coldproof box with electronics (e.g. smart house control center).
We need to detect any environmental anomalies inside the box-case like overheating, coldproof failure or any other.

The plan

  1. The first thing to do is to gather some measurements data of normal system operation.
  2. Define a probabilistic model of normal operation.
  3. Continue reading “Anomaly detection system. Case study”

My bird song classifier

In this post I describe the neural network architecture that I try as a bird song classifier.

Intro

When I first came up with an idea of building a bird song classifier I started to google for the training dataset.
I found xeno-canto.org and the first thing that caught my attention was spectrograms.
spectorgram
(Sepctrogram is visual representation of how spectrum evolves through time. The vertical axis reflects frequency, the horizontal represents time. Bright pixels on the spectrogram indicate that for this particular time there is a signal of this particular frequency)

Well, spectrograms are ideal for visual pattern matching!
Why do I need to analyse sound when we have such expressive visual patterns of songs? That was my thoughts.
I decided to train neural net to classify spectrograms.

Continue reading “My bird song classifier”

Xeno Canto top 30 European birds

My current hobby is creation of Shazam like service for bird songs. I started with looking for a birds songs dataset. Fortunately there is a Xeno Canto site which is crowd-sourcing platform for building up bird songs and calls database.

I decided to start with classification of 30 most commonly recorded European birds.

Continue reading “Xeno Canto top 30 European birds”

RFc package: FetchClimate Client for R

Today my RFc package was accepted and published on CRAN.

With this package you can right now fetch the following environmental parameters

  • absolute air humidity
  • air temperature
  • elevation
  • diurnal temperature rate
  • frost days frequency
  • wed days frequency
  • potential evapotranspiration
  • precipitation rate
  • relative humidity
  • soil moisture
  • sunshine fraction
  • water vapour pressure
  • wind speed

The parameters above can be fetched for the point set of for the geo grid specified.

The original service providing data is collaborative project of Microsoft Research Cambridge and Information Technologies in Science lab where I currently work.

Kadamay KDM-6828A RTSP URL

While almost all sites with IP cam specifications say that Kadymay KDM-6828A RTSP URL must be
rtsp://IPADDRESS:554/ch0_0.h264
In my case the URL appeared to be
rtsp://IPADDRESS:554/user=cctv&password=cctv&channel=1&stream=0.sdp?real_stream–rtp-caching=100
for the HD stream and
rtsp://IPADDRESS:554/user=cctv&password=cctv&channel=1&stream=1.sdp?real_stream–rtp-caching=100
for the preview stream.
Note that I’ve set up separate user with login cctv and password cctv respectively. Use your credentials in the URL above.

Link-layer IDS for home and SOHO

Hi,

Today I got acquainted with recent years wi-fi penetration techniques (e.g. brutefrocing WPS pin). I realized that the strongest security measures at my home are set for WAN side at the Internet gateway. For years I considered my LAN absolutely safe. But WPA PSK with long random key-phrase turned out to be not enough.

Taking measures, after disabling WPS at my access point I decided to add lightweight intrusion detection for LAN (as setting up such heavy intrusion detection systems like Snort is overkill for my home environment. I think the same is true for most of the home and SOHO (small office home office) environments). Link layer seemed the most appropriate level to monitor as almost every intruder action will touch it.

I desired to monitor arp and IPv6 neighbourhood tables at my Internet gateway as primary goal for me is preventing the intruder from doing illegal actions using my connection.
To monitor the tables I wrote a script which notifies me upon unknown PC connects to my home LAN. It polls the tables comparing the records with known PCs MAC addresses.
The script is at github: https://github.com/dgrechka/LLIDS

Now I fill more safe =)
Deploy the script in your homes. Let’s control our networks =)

Toradex Oak sensors on FreeBSD

As the world moves toward the Internet of Things there are lots of cheap environmental sensors available at the market.
When it just started several years ago I spotted the Toradex company that sells embedded devices. I caught sight of the sensors series called Toradex Oak sensors. The Toradex supplied Microsoft Robotics Studio libraries for them which was right enough for my student project. So I ordered two.

Now I’m building the monitoring system for a summer house based on Raspberry PI. And these sensors made by Toradex suits well for gathering environmental data.
The official site provides a sample of using the sensors on linux. But I have a FreeBSD.
So I started to think about constructing a simple solution to gather the data on BSD.

The sensors identify themselves as HID devices. After short investigation I found that FreeBSD provides usbhidctl utility to communicate with HID. That looked promising as it did not require linux emulation. With a single command we are able to fetch all the immediate values from the sensor!

Another task was data storage engine. My colleague Eugene suggested me using collectd or statsd to organize storage. Both of them appeared to be able to store the data and to stream the data to remote host for further storage. I decided to use collecd as it is in C so my Rapberry PI box will have minimal package set.

Finally I ended up with the script that is invoked by collectd. The script enumerates HID USB devices, finds Toradex sensors, gets the values from them, applies proper units transformation and returns the data as the string compatible with collectd.

I share it here. So you can download it, modify and extend for your needs.

Open the post to access downloads.

Atmospheric pressure data archive

For those who want to practice some data processing skills and time series model fitting I publish the following archives:

2011 whole year atmospheric pressure archive
2012 whole year atmospheric pressure archive
2013 whole year atmospheric pressure archive

The files are compressed CSV. Each line of the files is one minute average of sensor measurements reporting the values every 5 seconds.

The sensor is located at 55.73080°N 37.42206°E at altitude 221m
I use Toradex OakP v1.2a sensor

The data is raw in a sense that it could contain gaps and slight time shifts.

Feel free to use it. Any acknowledgements are appreciated if you use the data in your research ;-)