Page 1 of 1

Question homeseer script - PIR stuck on movement

Posted: Wed Nov 02, 2011 10:08 am
by Phaeton
After soldering a Jeelabs roomboard and installing the Jeenodes within homeseer I see the values appearing in Homeseer. for this purpose I use the 'lowpower' script which can be found in the filesection of this forum.

There's one issue I cannot work out. The status of the movmentsensor (PIR) keeps giving me the value '1=move'. Eventhough there is no movement anymore. This goes on for hours. When I use the roomboard sketch of JCW/Jeelabs This doesn't happen, the respons is immediate. In the 'low-power' sketch I changed the value for reseting the value back to 0 seconds to get immediate meassurings. So I guess the delay time isn't the issue that causes this error.

The 'normal (not 'low-power') sketch also works fine. So these two other sketches give the value '0-nomv'. When I use the lowpower-sketch, the value stays '1-move'. This happens in Homeseer and in the COM-port monitor of the Arduino software. When I restart the COM-port monitor, the value resets back to '0-nomv'.

When I look at the Jeelabs website I see that the Roomboard they sell now has a different PIR than when the sketch was made. I thought this might be the cause of the problem. A different way of reporting movement on the third pin-out? But when I start the com-port again the PIR status is '0-nomv', so I can probably rule this out?

My next guess is that because of the different PIR the sketch still has to be altered? I found some more informatie about this new PIR on the Jeelabs forum:http://forum.jeelabs.net/node/574, but I cannot find out what to change in the sketch. I'm thought maybe the Pull-UP part of the sketch, but that doesn't seem to work. Maybe thats because I'm a newby in this Jeenode thing, so thats not so weird :lol:

Can you help me on the way? Is the problem caused by the new PIR and do I have to change something? Maybe you can point me in the good direction?

Re: Question homeseer script - PIR stuck on movement

Posted: Wed Nov 02, 2011 9:53 pm
by Digit
Hi,

Could you send me the sketch, the exact one you uploaded to your JeeNode?
I have all the stuff here that's needed to see what's going wrong.

Just send it to jeenodes @ the domain name which can be found in the signature.
I'm busy so it can take a while (a few days)

Re: Question homeseer script - PIR stuck on movement

Posted: Thu Nov 03, 2011 8:52 pm
by Phaeton
A little update: i have the idea that the sketch interprets the values of the pir wrong. My jeenode was on all night. Continue line of '1-move'. When i past it, the monitor showed 'pir1' and the report was showing '0-nomove'. After leaving the house the jeenode reported '1-move'. Tonight the same thing. I passed, monitor shows '0-nomove' I leave the room: '1-move'. I can change the 'move' into 'nomove' and vice versa, but then the led3 port doesn't function correct.

Re: Question homeseer script - PIR stuck on movement

Posted: Thu Nov 03, 2011 10:57 pm
by Digit
Wait a minute... does your PIR have a potentiometer and also a jumper with 3 pins?
Connect the jumper the other way, IIRC this will invert the PIR signal from motion = low to motion = high (or vice versa).

Posted: Thu Nov 03, 2011 11:14 pm
by Phaeton
It does. I just tried, but this doesn't work. I check this with the description on the jeelabs forum mentioned above, this description doesn't mention it either. But i guess i should have tried this myself, it sounded so obviouse ;)

So i guess the solution should be in the sketch.

Re: Question homeseer script - PIR stuck on movement

Posted: Thu Nov 03, 2011 11:20 pm
by Digit
You've also seen this post on JC's weblog?
http://jeelabs.org/2010/08/30/new-pir-motion-sensor/
Especially the connection of the PIR to the Room Board.

But if you have Room Board v2, this one applies:
http://jeelabs.org/2010/11/28/meet-the- ... -board-v2/

Just to make sure all connections are done right...

Posted: Thu Nov 03, 2011 11:31 pm
by Phaeton
Yes i did, i checked this. I have the roomboard v2 and it is connected correctly. When i read the articles you point ou, i more and more think it has something to do with the output pin. If i remember correctly it's a low pin untill there's movement. Then it goes high. And this might be the difference between PIRv1 en my PIRv2?

The sketch manufacturing is from before the 'release' of PIRv2. Which could be a reason why the sketch isn't fully compatible.

Re: Question homeseer script - PIR stuck on movement

Posted: Thu Nov 03, 2011 11:37 pm
by Digit
I have a RBv1 with PIRv2 with the jumper on the 2 pins nearest to the corner of the pcb. That's what I'll use to test.
I need some time to get HS up and running with the "JeeNode for Homeseer" scripts again, it has been a long time since I used it. (new PC etc...)

Re: Question homeseer script - PIR stuck on movement

Posted: Thu Nov 03, 2011 11:46 pm
by Digit
One last note, easy to try:
On line 272 in the sketch you see:

Code: Select all

     payload.moved = pir.state();
Change this to

Code: Select all

     payload.moved = !pir.state();

Posted: Fri Nov 04, 2011 12:11 am
by Phaeton
You've got to be kidding me! :-D
One '!' and it seems to work. I'll do some more testing tomorrow, but for now thank you very much for your help so far.