Translate

Sunday, November 5, 2017

Rebuild my server

Since 2007, I had an IBM eServer machine (xSeries 342 rack) based on CentOS to take care of some services, like my private phone line, home automation, backup data and photo, streaming music, ecc.
After years of service, because a failure, is time to consider now to renew the server, HW and SW.

This article contains some notes about the transition between the old one and the new one.

Service needed


First of all here a list (not inclusive) of  the services the server need to provide:

  • VoIP PABX (Apkhnet)
    Based on Asterisk, only VoIP, no PSTN interface
  • Multiple Web host
  • Streaming of personal music collection (Squeezebox)
  • Streaming of personal video collection (Plex)
  • Backup data
  • Home Automation (X10)
  • CVS server
  • Jenkins
  • Docker
  • support for virtual servers
A separate mini server handle a VPN entry.

Hardware

Old server


The old server was a 3U IBM xSeries 342 rack server, based on two Intel Pentium III-S 1.13 GHz.
It was "old" at the time I bought it and put on service, now is definitively obsolete and it uses a lot of
energy.

New server

The new server is a System76 with Ubuntu 15.04.


The new machine should have these basic characteristics:
  • use much less than 270W power
  • capable to work in hot environment (the server is located in garage)
  • possibly less noise generator
  • capability of RAID
  • multiple HD management
  • at least 4 Gbyte RAM 
  • at least 1 TB HD 
Optionally
  • Double power supply
The server is not located in a "easy" environment.
During the winter the temperatures can be low, but that is not a big problem.
The big problem are the temperatures in summer.
The place is relatively isolated, so the variation is limited, however the temperatures can be over the 38 degrees Celsius in some cases.
Among the services run by the server, exists a temperature monitor capable to turn on an elliptical fan to help to cool the system and if the temperature continue to raise, shut down the machine.

Transition notes


After unpacking the new server and turned it on, the first thing noted was the noise !
Compared with the old IBM the noise is more high pitch and much less louder, also if during the bootstrap the machine "shows" what is capable of, simulating the take off of a F117 :)

The main doubt I had was about the transition from a 32 bit machine to a 64 bit machine.
The majority of the programs I used in the old server is available for both formats, however I had a couple of  services were I didn't have any clear information.
The two packages were heyu for my X10 home automation and the Logitech SqueezeBox server.

In the end it turned out quite easy.
I recompiled heyu from the scratch and is running happily on the 64 bit machine.
The SqueezeBox server exists only for 32 bit machines but with the appropriate libraries is running happily too.

Many other services exists natively in the Ubuntu repository and was only matter to install and configure them.

The main problem to solve remains now the setting for old Joomla 1.0 websites.
Joomla 1.0 needs PHP 5.2, the latest Ubuntu 15.04 LTS has PHP 6.x.
Due some incompatibilities the Joomla 1.0 websites are not working at all.


Tuesday, October 10, 2017

5V Solar Power Supply - testing system

In order to test the solar power supply without connecting the Raspberry (also because used to monitor the solar charger itself), here how I'm proceding.

Sunday, September 10, 2017

Working on Teirmilab

Here a step-by-step guide to work on git for the TeirmiLab project.
If you are new on git and github, read this article first

TheTeirmiLab project is on bitbucket public.
If somebody wants to join it to enhance the project would be nice if contact me.
Bitbucket has limited number of collaborators unless pay.
Let start from the link for the TeirmiLab bitbucket project :
https://bitbucket.org/account/user/hanixdiy/projects/TEIR

Clone TeirmiLab

Use git to clone the TeirmiLab project (see a specific repository in the project)
That's it !
On your directory, will exist a directory called TeirmiLab, containing the code.

Or better, just download a zip file from bitbucket.


Friday, May 12, 2017

Spam

Just a brief note for spammers.

Often I receive some comments on some articles of this blog.
Many of them are clearly just spam masked as comment.
I have zero tolerance for spam comments, as soon as I identify one I'm deleting it (if already published) or I can prevent the publication if I recognize it.
On this blog comments must be approved by me, they are NOT automatically published.

So, who wants to post spam here, will have hard time and my total contempt.
Don't bother to post spam.

Wednesday, May 10, 2017

Gnuplot on Raspberry Pi

gnuplot is a program capable to produce graphs starting from set of data.
Ideal to graphically represents sensor readings.

This article assumes to use Raspbian on a Raspberry Pi, specifically in my case the Raspbian version is the one used with Dexter for GrovePi.
Since GrovePi allows to easily connect sensors to the Raspberry, gnuplot is the perfect companion for that environment.

Installation


Simple, open a terminal and digit : sudo apt-get install gnuplot

That's it :)

Use

Once gnuplot is installed, is possible to open a terminal and digit the command gnuplot.
An interactive environment command line based will be available.
However the best way is to create a file containing the commands needed to generate a graph and have gplot reading that file to produce the graph as described in these instructions.

Data file


The file containing the data need to be in a specific format.

The time/date in the format of yyyy-mm-dd:hh-mm-ss (see the timefmt line in the command file), then the light value and (in this example) the voltage measured.
Each field is separated by a tab and each line ending with a newline (/r).

Example of data saved in the fhelper_datalogger.txt

# 2016-12-05:10-52-42 - Starting datalogger - time - light - volt 
2016-12-05:10-53-02 758 4.43
2016-12-05:10-53-24 758 4.43
2016-12-05:10-53-44 758 4.43
2016-12-05:10-54-05 758 4.43
..........................
..........................
..........................


Command file


Here an example of a gnuplot file (called testfile) used to display some information collected in the data file.
Specifically the goal is to create a graph showing the data stored in the second column of the file (light)
set title "fHelper light data vs. Time"
set datafile sep '\t'
set xlabel "Time"
set ylabel "Light"
set xdata time
set timefmt '%Y-%m-%d:%H:%M:%S'
set yrange [0:1000]
set style data line
set terminal png size 1500,800 enhanced font "Helvetica,20"
set output 'displight.png'
plot '/home/pi/Desktop/fhelper/fhelper_datalogger.txt' using 1:2
The file is taking a file called fhelper_datalogger.txt (located in the directory /home/pi/Desktop/fhelper) and will produce a file called displight.png.
The file will be saved in the same directory where this file exists and is executed.

To execute it just digit from the prompt : gnuplot testfile

Here a couple of examples of graphs obtained from the log file.
One shows the light reading and the other the voltage reading.
To obtain the voltage reading was enough to change a couple of lines from the command file.
Specifically I changed the Y axis range (0:1000 for light, 0:5 for Volt) and the plot command telling to use the first and third column in the file rather than the first and the second column (plot '/home/pi/Desktop/fhelper/fhelper_datalogger.txt' using 1:3)





Thursday, May 4, 2017

Grove Moisture Sensor bad design





Among many things, time ago I started to play with the Grove Pi system, for a fun project called fHelper, basically a sophisticated alarm to notify when a plant need water.






Roomba 5xx - repairing a power supply

Time ago I had a Roomba 560 with an Error 5.
The problem was the power supply used to charge the battery.



Time to try to fix it.

Tuesday, April 11, 2017

Roomba 5xx and Err 5 charging


Yeah OK, is just "another post about the Error 5 when charging a Roomba of 5th generation", but is just a note/reminder.
The official suggestion from iRobot is to check the battery contacts, the base contacts and relative Roomba contacts.
If all is OK, then try to change battery and if still not OK, send the unit to repair.

The first thing to do however is to measure the voltage of the power supply.
After repairing a Roomba (a 560 unit) and changing battery, after few days the Err 5 started to appear.
Measured the power supply : 19V

It MUST be at least 22 V !!
Changed the power supply with a new one, and Err 5 disappeared.

Of course is possible to have many other causes for the error, but I would say that in order to diagnose it, the sequence that did the trick for me is :

  • check the power supply. The Voltage measure must be at least of 22 V
    if OK
  • try to use a power stabilizer or at least a surge control
    if OK
  • check the battery contacts and clean up from oxide and dirt
    if OK
  • change the battery
If OK but still Err 5, well, it "could be" also a motherboard problem.

So it seems now I have a nice iRobot power supply to repair :)


Sunday, January 15, 2017

Energia and MSP430G2553

Recently I had a little bit more deep experience with Energia and the MSP430G2553.
Here some notes about this experience.

Tuesday, January 3, 2017

SmartPhone audio accessory

Some notes about some audio accessories for smartphone.

Hype Retro Walkie Talkie handset

This funny toy is shaped like a traditional-style ham radio microphone.
The idea is to "transform" the smartphone into an Ham radio. For example, used with Zello can facilitate to use it in a mobile environment or for who is nostalgic about it.

I tested it on the Samsung tablet but is not working with Zello.
However is working with other applications. This suggests that there are other differences other the 3.5 mm jack pinout.

Let's open it up


The quality of the gadget is of course very low. Beside, for 5$ really is not expected to be better.

The gadget

To open it there are just four Philips screws

The little board has a small amplifier based probably on  a LM386.



There are two push button and a trimmer for the ON/OFF and volume setting.
The small push button on the top is the one that is used to start the conversation.
The big push button on the side simply mute the speaker (IMHO wrong  choice since normally the PTT button is on the side on a normal/standard mike).

Operations


The idea is to plug the mike in the smartphone audio jack and turn it on.
After that the audio output is redirected to the small speaker and when pressing the PTT button, the mike is activated.