Page 6 of 9

Re: My home automation project / software

Posted: Wed Jul 27, 2011 9:14 pm
by airox
Oh the receiving part at the server is a simple JeeLink which I modified the software to receive from the nodes and print it like this on the serial port:

Code: Select all

OK NODE=3 SEQ=30417 ACK=1 LIGHT=52 MOTION=0 DOOR=1 TEMP=-254.30 BAT=0
OK NODE=2 SEQ=41890 ACK=0 LIGHT=95 MOTION=0 DOOR=1 MAILBOX=1 HUM=58 TEMP=26.60 BAT=0
OK NODE=4 SEQ=2073 ACK=1 LIGHT=159 MOTION=0 HUM=65 TEMP1=26.50 TEMP2=23.70 TEMP3=28.70 TEMP4=21.00 BAT=0

Re: My home automation project / software

Posted: Thu Jul 28, 2011 10:19 am
by wwolkers
Node3 is a bit cold..... :D

Posted: Sat Jul 30, 2011 12:51 am
by spierie
Hi Airox,

I've also been playing a lot with Jeenodes and bough quite some stuff from Niels at SK. Only using Domotiga as software package, pretty easy to learn and adjust. Just don't have the time to develop my own stuff.

Have you tested the PIR from Niels yet with a Jeenode?

Good find on the DHT11, the SHT11 is just too expensive. I get my DS18B20's from another source in China. Bought 20 of them for about $25 incl. shipping.

Keep up the good work!

Rgrds,
Michel(aka spierie).

Re: My home automation project / software

Posted: Sat Jul 30, 2011 2:12 pm
by airox
Michel,

The PIR sensors from Niels work nicely. Got three of them running right now and they are very nice. Range of detection is great too.

The downside of the DHT11 is that it isn't accurate (+/- 2 degrees and +/- 5% humidity)... but for monitoring the house it's OK for me. And if you add a DS18B20 sensor to it the combination is really nice.

If you like the products at SK a lot, they also have reed contact sensors which I bought as well for all the door open/close monitoring. Also very cheap.

Greetings,

Gijs

Re:

Posted: Sat Jul 30, 2011 9:46 pm
by Digit
spierie wrote:I get my DS18B20's from another source in China. Bought 20 of them for about $25 incl. shipping.
You can order free DS18B20 samples @ maxim here:
http://www.maxim-ic.com/datasheet/index ... /2812/t/or

I just ordered 10 * DS18B20+ :)

Re: My home automation project / software

Posted: Sat Jul 30, 2011 10:33 pm
by airox
Thanks for the tip Digit! Just ordered also a set of 10.

Re: My home automation project / software

Posted: Sat Jul 30, 2011 10:47 pm
by Digit
The amount of 10 requires a "Business Manager approval", but I managed to order 10 samples a couple of years ago (DS18S20 and DS2405), so maybe this will still work. We'll see!

Re: My home automation project / software

Posted: Mon Aug 01, 2011 9:22 pm
by airox
Michel,

At yourduino.com they also have the DHT22 which has more accuracy but is also a bit pricier.

Grt,

Gijs

Re: My home automation project / software

Posted: Tue Aug 02, 2011 12:49 am
by spierie
Thx Gijs, but that comes very close to the price of the SHT11, which is used on the original roomboard Jeenodes.

I'll have to think about that. On Samenkopen.net in the section of Niels there is a humidity sensor now as well, for about 2.50 euro.

Rgds,
Michel.

Re: My home automation project / software

Posted: Wed Aug 03, 2011 12:09 pm
by mishoboss
Hi Airox, I haven't been here a while and was curious what new have you done with your software. And I have to say I'm really impressed... again :-) Just still wondering why you keep it just for you, but that's your decision.

I use DHT22 in my Arduino based 5 zone thermostat . These are little, nice and relatively cheap sensors. For little less than $10 you get pretty accurate temperature and humidity sensing and you can read this data up to 100 meters with a good TP cable (you can't do this with the much more expensive SHT15).

By the way, for all people that are looking for a good open source HA software, take a look at openHAB (http://openhab.org). It's still young, but very promising software that already has some very powerful skills.

Re: My home automation project / software

Posted: Mon Sep 05, 2011 1:18 pm
by airox
The JeeNodes are running perfectly these days. One jeenode per room (hallway, livingroom, kitchen, shed, outside, hallway upstairs and bathroom). Stable and not missing a thing :)

One thing I focused on was how to define rules. It was done in the database completely. So you edited your rules through the web interface. This was all nice but adding a new type of rule or an action took a bit of work. I added an intermediate layer in the code. So one can define rule providers. One being events defined in the database. I also made file based rule provider. Which just add rules to the ruleengine. Some simple examples to define rules through the file based rule provider:

Code: Select all

$rules[] = Rule::create(Rule::TYPE_MANUAL, 'Er is beweging buiten terwijl beveiliging aan is')
			->addTrigger(new Rule_Trigger_ValueBased(OUTSIDE_MOTION, '1'))
			->addCondition(new Rule_Statement_FlagBased(FLAG_SECURITY, 'aan'))
			->addActionOnTrue(new Rule_Action_Xtify('Er is beweging buiten'))
			->addActionOnTrue(new Rule_Action_StartScene(SCENE_LOG_PICS));

$rules[] = Rule::create(Rule::TYPE_MANUAL, 'Voordeur is lang open')
			->addCondition(new Rule_Statement_WatchExpressionHoldTime('dooropen', 180,Rule_Statement_WatchExpressionHoldTime::GREATER))
			->addCondition(new Rule_Statement_WatchExpressionHoldTime('dooropen', 245,Rule_Statement_WatchExpressionHoldTime::LESS))
			->addActionOnTrue(new Rule_Action_SayWithGoogle('The frontdoor is still open, don\'t you need to close it?

$rules[] = Rule::create(Rule::TYPE_MANUAL,'Er is post')
		->addTrigger(new Rule_Trigger_ValueBased(129,'1'))
		->addActionOnTrue(new Rule_Action_Xtify('Er is post!'))
		->addActionOnTrue(new Rule_Action_PlaySound('mailmanbeenhere.wav'))
		->addActionOnTrue(new Rule_Action_StartScene(SCENE_LOG_PICS));'));

This is far more flexible and allowed me to add a whole bunch of rule types without the need of updating all the web parts on it. This can be done later on. This whole refactoring of the code all began when I was thinking about the next step. I wanted a simple rule expression language for defining the rules. Why? Because when I got my voice recognition software in place I wanted to add a rule by just saying it. Stuff like this:

- Add a reminder on 6 o'clock saying "Please visit the grocery shop"
- Remind me when a tv show begins with the name Friends

So I decided to built a third rule provider. The domain specific language provider. It makes rules expressed as text runnable:

- If the hal and the woonkamer or the tuin has motion then take picture from "Camera tuin"
- If woonkamer button is pressed then turn off all lights except salontafel-lamp
- If spraakmodus is equal to off then brighten keuken keukentafel-lampen to 50% and keuken keukentafel-lampen

The same rule provider will hookup in the voice recognition someday. This is all working great. Some other small things during this code refactoring:
- Added support for delayed actions. Actions which will execute X seconds from when the rule was triggered.
- Trigger a rule when the distance between two mobile/location trackers is in some condition (near each other for example so I can let my GF know I'm heading towards her).
- Added support for when a certain value has a certain condition for some time (the frontdoor is open for too long).

And finally I bought myself a touchscreen PC! With zero moving parts in it (Passive cooled Atom processors and a SSD hard disk).
http://fotoboek.vandulmen.net/domotica/IMAG0308.jpg

I installed windows 7 on it and Google Chrome. The touch interface I'm still developing. It runs inside a google chrome fullscreen session. Which works perfectly. I also was amazed at how good the speech recognition is in Windows 7. I also found this neat little program called VoxCommando. It uses the speech recognition of windows 7 and enables you to configure custom commands to a certain command. Turning on and off my living room lights with this took my only 15 minutes of configuration! So I can now turn on/off lights just by saying it!!! In the next period I will add loads of commands to make it more valueable.

Greetings from the Netherlands, Arnhem!

Gijs

Re: My home automation project / software

Posted: Sun Sep 25, 2011 7:40 pm
by airox
Small update:

- Created an OOK relay with JeeNode hardware. I added decoders for the Flamingo FA15RF and FA12RF smoke alarms. I integrated these smoke alarms into the software. Now when a smoke alarm is going on my house will turn on all lights and start a sirene from the PC. This will also be the moment the software starts a full backup to a server outside of my home.
- Added a decoder for a wireless Byron doorbell (just for the fun, nothing practical from it yet).
- Location speech commands (my girlfriend can ask how many minutes it takes for me to get home from the last tracker position or can just ask where I am, which city).
- Value speech commands (all values will be told through the home when asked for them, so text to speech and speech to commands :-)
- Infrared speech commands (turn on TV and such by saying something)
- Ask the time and/or date by speech.
- Throw a dice by using speech ;-)

Still busy with the touchscreen interface.

A list of things I am thinking about (and maybe some other people have done stuff with this):
- DLNA media server plugin to view the cameras on DLNA capable devices and view log items.
- DLNA media plugin for the touchscreen interface to browse servers and play stuff on renderers.
- Better support for shoutcast streams (and other stream providers) to start and stop.
- Power monitoring per device support (probably with arduino and a AC current sensor clamp)

Re: My home automation project / software

Posted: Mon Sep 26, 2011 9:11 pm
by structor
airox where do you find the time. I also try to write my own software, but I am amazed by the speed of your project!

I've you could find some time, could you provide some details about your jeenode nodes?

Re: My home automation project / software

Posted: Mon Sep 26, 2011 10:56 pm
by airox
What would you like to know about the JeeNodes?

Setup is like this:

1x JeeNode with RFID RDM630.
1x JeeNode with Motion sensor, 2x DS18B20 and 1x LDR.
1x JeeNode with Motion sensor, LDR.
1x JeeNode with Motion sensor, 3x DS18B20, 1x DHT11.
1x JeeNode with Motion sensor, SHT11, 1x LDR (classic RoomNode from JeeLabs).
1x JeeNode with 2x Motion sensor, 1x DS18B20, 2x DHT11.
1x JeeNode with 433mhz receiver and transmitter (OOK relay).

Building the following:
1x JeeNode with RGB LED and Warm White LED strips.
1x JeeNode replacement for weather station (windspeed, winddirection, rainmeter, Rain Yes/No, Temp, Pressure, Humdity, UV and CO2 sensor, Ground temp, Lightning detector, Will this one ever finish? :-))
Expanding livingroom JeeNode with C02 sensor.
Expanding JeeNodes with current voltage clamps.
1x JeeNode replacement for RFXmeter.

Re: My home automation project / software

Posted: Tue Sep 27, 2011 8:49 am
by Jeffrey
Airox: Can you educate us about decoding rf devices?

I've always been told it's hard to trace/decode/control rf devices. I for instance have a Braun Triump electric toothbrush which communicates wireless to a the baseconsole. I want to recieve the transmission so my system knows that I'm going to bed or have just gotten up and do various things like turn the heating off and such. I know that it uses RF in the 8xx range, but have no clue how to recieve it.