New assignment to Air Freshener

January 02, 2016

new-assignment-to-air-freshener  Facebook  Twitter  Google +  

Few weeks ago i moved to a new place which is bigger than my previous lair. we're decided to install an alarm system and story started from there. actually i got nothing to steal even if a burglar break into my house he probably pity me and lay down some money on the table before leaving with full of tears.
An average alarm system starting from approx $350~400 in here. that's serious funds if we convert it to local currency. did a quick math with cons & pros and decided to build my own by using an arduino ethernet shield
First attempt After the release of wifi enabled ESP8266 dev boards, ethernet modules even arduino itself getting obsolete. before anybody say overkill to arduino+ethernet bundle for this scale of project, i would like to mention it's laying around since two years. anyway, i found an automatic air spray box and installed the pir sensor and arduino board on it which is took two hours. then created a simple sketch based on arduino's ethernet client samples and my growl like desktop notification software judith handled the rest of job. i assigned turret sound effects from the game portal just for fun and written a timer code to wake the whole apartment if got room activity after 00:00am.
False alarms Well, that was done in total 3 hours but not effective as i predicted. so next day i updated the sketch by adding an extra error correction feature. pir sensor should triggered at least 25ms in new version. that's worked but still got false alarms from nothing. researched almost everything, spent whole business day to figure out the problem and noticed the inactivity while wifi router rebooting. internet service provider's modem also supports 5ghz wifi which is causes signal interference like cell phones. i used a longer cable and put a distance between router and device and problem solved. at least for next 3 days.
Corrections & upgrades Everything looks good but still got minor lags between movement and notification at pc, in third version i removed all delays from sketch and used time based events. in the most recent code temperature and light sensor data sending in 3 seconds of interval and pir sensor activity pushing to server immediately. also prevent double notifications, i put 300ms delay to each motion event. you can check out the final version in devzone section.
if i purchase it, probably will costs me about $50~ but currently just taken my two business days. and i can tell it's definitely worth it based on last one week of usage. at least i can aware about who in which room while i'm working on my pc.
by the way will mention about the backend software in next entry with a crash-free version of it.

  Most popular entries

VR Experiences #1: Oculus Rift

The 80's childs are familiar with virtual reality term. we seen this subject in the action at johnny mnemonic, the lawnmowerman etc.if you're not living in a cave, probably should know the


Stealing sneakers from NIKE

as the whole crafty geeks knows, nike has a rvsp system via twitter. they


Bytecheleby at revision

Looks like our portable shell "Bytecheleby" still useful on scene. im started to enhance it by using my newest libraries and lots of new stuff. stay connected for latest releases


Pain and Suffer inside: Displaylink Adapter

as mentioned on my recent tweets, was looking for a low cost multi-display solution about couple weeks. gaming oriented gfx cards already


Entering system level command line

I get this trick from a sysadmin friend. it allows to enter system level shell access in Windows Vista and later versions. useful for bypass UAC and ntfs file permission issues.sc create SuperC