22 October, 2016

rtl_433: simple daemon and tools

Last time I wrote about simple awk script that prints the latest values collected from rtl_433 application. I was pretty much satisfied with this "quick and dirty" solution until recently, when I needed to use the data from two different projects...
Right. It is time for simple daemon solution that will collect the data in format that makes it easy to be used from different clients. And here is my code:


#!/usr/bin/awk -f
BEGIN{
  FS=","
  cmd="rtl_433 -F csv -q -p 24 2> /dev/null"

  # Get csv column labels and count
  cmd | getline; csvNF= NF;  header=$0;

  while( cmd | getline){
    if (NF==csvNF){

      if ($2=="Proove") sensor=$3+$14
      else sensor=$3$4

      fn= "/dev/shm/rtl_"sensor
      print $0 > fn; close(fn);

      if (($5!="OK") && ($5!="")) {
        fn= "/dev/shm/rtl-BAT"
        print $0 >> fn; close(fn);
      }
    }
  }
}

20 May, 2016

Synology DS216j + DSM6.0 - first impression


Finally! I bought myself a NAS.
How, did I end up with it since I consider 2-bay NAS as pointless exercise? (I thing that RAID0 is just looking for trouble and RAID1 is too inefficient with respect to provided redundant storage)

So, I was looking for something that is at least 4-bay version (so I can use RAID5 on it)... and they are, of course, considerably more expensive. Looking around, how things change with time, I got the impression that 4 years later I will not want to keep the current hardware since it will be completely outdated. So it will be waste of money to use proper NAS for simple storage + some extra features (I do not mind to have some "Dropbox-like" feature, media center etc.. ) needs[1].

Then again, after long revision of the budget and my needs, I decided to go with 1-bay solution!?! 

Unfortunately, the reviews on the Net for the available 1-bay hardware I found, ware just too disappointing to bare with. And this is how I ended up with using the 2-bay DS216j with single disk.

19 March, 2016

NITECORE Digicharger D4 LCD Display Universal Smart Charger


Ok, let me have my say about this battery charger. Pretty much all reviews are more than positive and yes - it is a good charger (with some concerns). But is it really "the most advanced" charger as it states in its own manual?

Let me start with the overwhelming advantages:
  • It charges almost any usual battery on the market (I will exclude NiZn batteries since they are rather unusual anyway), just to mention them: Li-ion / IMR / LiFePO4: 26650, 22650, 18650, 17670, 18490, 17500, 18350, 16340 (RCR123), 14500, 10440, Ni-MH / Ni-Cd: AA, AAA, AAAA, C.
  • Independent slots - monitors and charges independently (but only 2 charging circuits, see further below)
  • Battery type is automatically detected + different charge modes (Constant Current (CC), Constant Voltage (CV), -dV/dt).
  • Low current charging mode for small capacity batteries (that is what convinced me to buy it)
  • Attempts to charge fully discharged batteries.
  • Hard time limit to charge - max 20 hours per battery - then it supposed to stop.
  • Option to use 12V adapter.

At that point, it is pretty convincing that we are talking about rather decent battery charger. But here is what I think it is missing (or I am missing compared to some older chargers I have mentioned before IPC-1 and CM-410).

07 March, 2016

rtl_433: simple text monitoring panel

There is this really nice rtl_433 "application using librtlsdr to decode the temperature from a wireless temperature sensor (433.92MHz)"  https://github.com/merbanan/rtl_433 which does exactly what is says. 

I just thought that I can write a simple script that will keep showing only the latest decoded data.
As one can see in the example output, further below, some of the sensors sends the data 3 times and if you have couple of them the data starts to get a bit difficult to read. With a small awk script (tailored for my needs) I can get this simple output that contains only the interesting data and few colors to prettify it:

===================================================================================
|        Time         |               Name             |  ID  |  Temp |   %  | Bat
===================================================================================
| 2016-03-07 10:26:19 | Gym - WT450                    |   61 |   5.4 |  84% | OK
| 2016-03-07 10:26:13 | Outdoor - Nexus                |   92 |   1.5 |  90% | OK
| 2016-03-07 10:25:51 | Indoor  - WT450                |  131 |  20.1 |  27% | OK
| 2016-03-07 10:25:45 | Outdoor - WT450                |  151 |   2.0 |  94% | OK
| 2016-03-07 10:25:37 | Ventilation - Nexus            | 1281 |  17.8 |   0% | OK
===================================================================================

23 January, 2016

BTY AAA1350, rechargeable NiMH batteries - first and last impression

Right, since they were not that expensive, I somehow did not make the effort to search on the net for reviews, so I ended up with a pack of BTY AAA1350 rechargeable batteries. From the packaging, they went straight in the charger for evaluation - first discharge with 100 mA, then fully charging them with 200 mA current.

The results are more than disappointing. I should have run the TEST mode of the charger, which should have reported the capacity upon discharge, but this value is usually less that the value during the charging. Anyway the numbers are so bad that this does not matter. One battery stores 78 mAh which essentially means it is completely death. The other three were about 270 mAh which actually fits the reports from other discussions on the net.