Question homeseer script - PIR stuck on movement

All about Arduino, Jeenode and other Clones (hardware & Software)

Moderator: Mdamen

Post Reply
User avatar
Phaeton
Advanced Member
Advanced Member
Posts: 573
Joined: Wed May 19, 2010 12:44 pm
Location: Wassenaar
Contact:

Question homeseer script - PIR stuck on movement

Post 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?
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Question homeseer script - PIR stuck on movement

Post 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)
User avatar
Phaeton
Advanced Member
Advanced Member
Posts: 573
Joined: Wed May 19, 2010 12:44 pm
Location: Wassenaar
Contact:

Re: Question homeseer script - PIR stuck on movement

Post 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.
groeten,
Harry
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Question homeseer script - PIR stuck on movement

Post 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).
User avatar
Phaeton
Advanced Member
Advanced Member
Posts: 573
Joined: Wed May 19, 2010 12:44 pm
Location: Wassenaar
Contact:

Post 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.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Question homeseer script - PIR stuck on movement

Post 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...
User avatar
Phaeton
Advanced Member
Advanced Member
Posts: 573
Joined: Wed May 19, 2010 12:44 pm
Location: Wassenaar
Contact:

Post 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.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Question homeseer script - PIR stuck on movement

Post 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...)
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Question homeseer script - PIR stuck on movement

Post 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();
User avatar
Phaeton
Advanced Member
Advanced Member
Posts: 573
Joined: Wed May 19, 2010 12:44 pm
Location: Wassenaar
Contact:

Post 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.
Post Reply

Return to “Raspberry, Arduino, Cubietruck and other clones Forum”