Health Company: Day 22

It was fine until dinner…

It all went fine until… we went to the Burger place in 360 Mall after watching the “How to train your Dragon” IMAX movie which was Awesome btw 😀

Categories: Pictures | Tags: , , , | Leave a comment

SMS Power Failure Notification

We get frequent power failures at home due to ( our neighbor overloading his sockets and playing alot with electricity ) i setup this small system to notify me when power goes off and returns, unfortunetly i had this setup months back but due to a hardware failure i lost all settings.
Last night i decided its time to rebuild my setup again from scratch and this time document it 🙂

My Setup:
1-eeepc 900 netbook running Debian lenny

2-APC UPS 1000 with USB connection

3-Sony Ericsson K800i mobile ( Viva line ) with USB Cable



4-Gnokii

5-apcupsd

Step 1:
first step is to connect the mobile USB cable to the laptop & configure gnokii
These are the changes i made:

/etc/gnokiirc:
# For the Linux USB cables you will need one of the following settings (or
# similiar)
# port = /dev/ttyUSB0
# port = /dev/tts/USB0
port = /dev/ttyACM0
# the last one will work only with AT driver. The correct setting should be
# given in the dmesg output.

# mode use:
model = AT

# For Bluetooth and AT driver use the following setting
connection = serial


The rest is default.

/root/.gnokiirc

onfig : Linux, bluetooth connection
port = /dev/ttyUSB0
model = AT
connection = serial

To test the connection :

echo "TEST" | /usr/bin/gnokii --sendsms xxxxxxxx

Replace xxxxxxxx with your phone number

STEP 2: Configure apcupsd

Connect your UPS unit to the USB port on your laptop

edit /etc/default/apcupsd :

#set
ISCONFIGURED=yes

edit /etc/apcupsd/apcupsd.conf :

#set UPS Name
UPSNAME xxx

# UPSCABLE
# Defines the type of cable connecting the UPS to your computer.

UPSCABLE usb

UPSTYPE usb
DEVICE
# NOTE in USB TYPE DEVICE is left blank to auto detect

POLLTIME 60
# depends on your preference

the rest is default settings.
test the setup by disconnecting the main power from the UPS unit you should get a warning when the plug is removed and when its replaced back

STEP 3:Sending the SMS notifications

in /etc/apcupsd directory there are 4 small scripts that are used to send out notification emails : onbattery, offbattery, commok, commfailure
the first two are used for power failures and the latter two are for connectivity problems with the usb port.
you need to add one line to these scripts since they are all the same except for the message.

in this example i will take the offbattery script vi /etc/apcupsd/offbattery


#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when the
# UPS goes back on to the mains after a power failure.
# We send an email message to root to notify him.
#
SYSADMIN=root
APCUPSD_MAIL="mail"

HOSTNAME=`hostname`
MSG="$HOSTNAME Power has returned"
#
(
echo "Subject: $MSG"
echo " "
echo "$MSG"
echo " "
/sbin/apcaccess status
) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN

#Add the following line and replace xxxxxxxx with your number:

echo "$MSG `date`" | /usr/bin/gnokii --sendsms xxxxxxxx

exit 0

Repeat the test in STEP 2 by unplugging the main power cable or simply switching off the power source feeding the UPS you should get something like this :

#when power is off
UPS_NAME Power Failure !!! Sun Apr 11 03:10:41 AST 2010

#when power is restored:
UPS_NAME Power has returned Sun Apr 11 03:10:46 AST 2010

as you see from above i spent the whole night fixing this thing ( Don’t do this at home unless u have no work next morning 😛

The use of the above setup is not limited to Power failures, you can do anything you need to be alerted about using gnokii previously i used it to notify me when a download is completed.. please don’t hesitate sharing any good ideas using sms notifications.

NOTE:SMS Charges may be applied depending on your carrier and plan

Categories: Pictures | Tags: , , , , , | 4 Comments

Health Company: Day 21, 6 more to go.

I’m approaching the last week of my Healthy Diet Subscription, after this month ( 28 Days ) i will run another Blood test to compare results.

Last weekend was a disaster.. Chaos .. Total Destruction.. BR. ICECREAM CAKE Ahhhhh

Enough Drama.. here is Today’s Menu and food enjoy :

Categories: Pictures | Tags: , , | 2 Comments

Health Company: Days 18,19 & 20

Day 18:

image
image

Day 19: Friday, Father’s House.. i stuck with the plan until lunch time then….. you don’t want to know 🙂
Sorry No images Friday

image

Day 20: Saturday:
Again going to Fathers house.. God have Mercy on me and give me the will to resist mom’s delicious cooking…

image

Categories: Pictures | Leave a comment

Health Company: Day 17

* I LOVE CHOCOLATE *

The Menu, The Box & The Meal..

The Good, The Bad and the Ugly 😛

Categories: Pictures | Tags: , , , | 2 Comments

Health Company: Day 16

Thank you HC Driver now i’m getting the meals earlier than before +10 HC Driver



Cheat: i had some pieces of home made coffee chocolate in the morning..

Categories: Pictures | Leave a comment

Health Company: Day 15

Sorry didn’t get a pic for dinner & i had to bite the snack before posting it 😛



Categories: Pictures | Tags: , , | Leave a comment

AOU Excellent students ceremony

Today was the annual ceremony for the excellent students @ AOU where they gather all students and their families and present them with special certificates for their good work. the Ceremony was planned to start at 10:00am but for some unforeseen reasons it started just before 12. One brave parent stood up and picked up the mic and said ” Salam 3alaikom, we are invited here to this ceremony but it seems the administration made a mistake in the timing it was supposed to be 11PM ” Lol i liked that he was speaking for all of us. The hall was too small for the amount of ppl invited some couldn’t find a seat even.

there where some speeches some where short others …well i’m not sure how long but i remember playing 2 games and finishing them and the speech was still there.. maybe i’m a super fast player..

anyway end of the day i got my certificate and thats the important part 😀

Categories: Pictures | Leave a comment

Health Company: Day 14

After a weekend of semi messing up the diet i’m back on schedule

Here is the menu for today :
Breakfast: Croque madame.
Snack:Exotic fruit salad

Lunch: Cannelloni with Spinach white & Tomato sauce, Rocket & white mushroom Salad
Snack: Apple – Tart

Dinner: Foccacia, Tomato, Cheese, basil,Black olive, Olive Oil & Real prawn cocktail
Snack: 2 small fatayer Labneh & Skim Milk.

Today is my appointment with the Dr to see how well did i do this week stay tuned for the results 🙂

Categories: Pictures | Tags: , , | Leave a comment

Health Company: Day 12 / Day13

Day 12:

Due to Some Technical difficulties on Friday i couldn’t take pictures or post the menu Soryyyyyy.
Here we Go :

Breakfast: Hommos Balila, Olive Oil, Fresh Mint, White Pita Bread.
Snack: Whole Fruit

Lunch: Chicken breast in spinach & Feta sauce with Mixed vegetable Salad
Snack: Yummy Chocolate Muffin

Dinner: Roast chicken with Caramelized lemon & Italian Sald
Snack: 2 small lahem Bi Ajin & Fruit Yogurt

NOTE: i did not entirely stick to the diet on this day i kinda gave my self a break at dinner.

Day 13:

Day-13

Breakfast: Mushroom & Zucchini Omelette
Snack: Whole Fruit

Lunch: Pesto fish kebab & Tomato basil salad with Beatroot and corn salad
Snack: Rice and Milk pudding with Orange and vanilla

Dinner: Open club sandwich with Mixed lettuce and Papaya salad
Snack: 2 small Fatayer Cheese and a small juice pack.

Categories: food, Pictures | Tags: , , | Leave a comment