Something completely different: SNMP to MySQL

I’m helping to maintain a fleet of about 50 printers in a charity distributed over about 30 locations in the city. Now, we wanted to know how much the individual printers are used to get some numbers for an effort to reduce the number of printers.

So, what is more self-evident then using SNMP to query the total page counter on a daily base – or better on an hourly base since the printers are switched off at this or that time and those we at least get sometimes valid data.

Typical monitoring tools like Cacti or Zabbix are very good in drawing nice graphs but not so good in delivering absolute numbers. So I decided to write something on my own: query some devices for some SNMP data points and store the results in a database. Which devices and which data points and which combinations? Everything in the database too.

I looked for a SNMP library, first in Python, then in Java – since I’m quite familiar with these languages – but everything I found was rather complicated to use. Then I looked for something in C# and found “SnmpSharpNet“. Still not that easy to use but easier then what I found in Python or Java.

For that reason I started coding the little tool in C#. And what I did is working very well now. Configuration and error-handling is not perfect yet, but it is working. Enough for today.

BTW: I switched developing the code between Microsoft Visual Studio 2013 (on Windows) and Xamarin Studio (on the Mac) and run the tool on Linux. Works without any problem. Very nice!

Something completely different: SNMP to MySQL weiterlesen

First ESP8266 Project: WiFi Power Switch


The ESP8266 boards (ESP-01, cmp.
) were lying on my desk for already some time. I never took the time to install the SDK on my Mac. Now I came around nodemcu ( and it is exactly what I was looking for since a while: Lua on a microcontroller. The idea behind is simple: When you are coding on a PC (or a Mac) and you have a rather small problem, a rather simple task to perform, you (or at least: I) would tend to use a scripting language. On a PC my first choice would be Python, other people prefer Perl or even Lua. On a microcontroller I also was faced those simple tasks (like toggling one bit based on an MQTT message) but never had a scripting language available. But here it is.

First ESP8266 Project: WiFi Power Switch weiterlesen