Author Topic: GarageMote Kit  (Read 4935 times)

tomek

  • Newbie
  • *
  • Posts: 2
GarageMote Kit
« on: May 13, 2014, 08:34:09 PM »
Hello Fenix, or anybody experienced,

(First, I am sorry for my english if there will be any mistakes in the text below :) )

I'm interested in make own garage management using raspberryPi.
I have already read several times your manual about how to make it (home automation gateway), but some things are still not clear for me.
It may be caused because I am not a good and practised electrician :) but anyway, Im still interested.

Ok, I would like to ask you some questions before I order the "GarageMote Kit".

1.) I have garage for two cars, with two separated doors and motors.
     Is it possible to controll them only with 1 raspberry device or I need two, one for each door?

2.) My plastic belt is surrounded with metal strips (see picture below #1 and #2), so the question is: 
    Can I rotate both magnets into inner side to ensure that they will push off that metal strip out?  Will the sensors (open/close) works without any problems then?
    (Sorry, if my description was little bit complicated)

   picture #1
   http://imgur.com/a/8eCfZ#0

   picture #2
   http://imgur.com/a/8eCfZ#1


3.) Can you please also advise me, HOW can I or WHERE can I solder/connect rest two cables (white/orange) for door action into MY opener according to taken photo please? (picture below #3 and #4)
    (It would be better if you could highlight it with some color)

   picture #3
   http://imgur.com/a/8eCfZ#2

   picture #4 (disassembled)
   http://imgur.com/a/8eCfZ#3

4.) If I order the red one USB version of Moteino boards, will the pins needed for soldering with GarageMote board same as it was on photos with green one?
     Or simply..is there any difference about soldering/mouting/connecting pins ?


5.) What function has the light orange cable in top of Moteino board on this picture please?
     http://farm3.staticflickr.com/2870/10048258734_24ca874ba1_o.jpg

Thank you in advance guys!

Regards,

Tomas

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6059
  • Country: us
    • LowPowerLab
Re: GarageMote Kit
« Reply #1 on: May 13, 2014, 08:51:53 PM »
Let me try to answer these... I'm Felix by the way, but I like Fenix, sounds more like a city I lived in, but pretty cool ;)

1) Yes you can control as many as you want. But out of box my software only supports one, I gave that as an example, so you can make code changes and customize in any way you want.
2) Haven't seen that type of opener, it's up to you to improvise or use different sensors if hall effect sensors won't work. But those are probably the cheapest/easiest way to tell if a magnet is in position or not. Use your imagination to get around the difficulties.
3) See #2, i have no idea how your opener operates. US openers have a wall button that connects to the opener unit with 2 wires. The GarageMote kit has a relay which connects at the same 2 spots, basically a contact closure which is equivalent to pressing the button on the wall.
4) You could use the MoteinoUSB on the GarageMote, it's up to you, then you can power it with a USB mini cable, or still 2 wires on the GND+VIN headers
5) The orange and yellow wires connect the base moteino to the raspberry pi serial (TX,RX)

tomek

  • Newbie
  • *
  • Posts: 2
Re: GarageMote Kit
« Reply #2 on: May 14, 2014, 05:33:16 AM »
Thank you for your quick response!

Yes, Indeed Felix , Im sorry for that :)

Anyway, I apprechiate your help!

2.)
Yes you are right. I have realised that I should mount magnet directly on slider in rails, and distribute sensors so that one will be placed on the begin of rails and second will be placed at the end. (So easy? :D )

3.)
Meantime I have found detailed PDF manual for my opener, and there is also option how to controll door with switch placed on wall.
This should be very helpful for whoever has this kind of opener and needs to control it with raspberryPi.
On the opener's board there is connector named "PP" and it has in charge door actions -> this should be connected with relay on GarageMote board.
For more details, here is the link on manual:
http://www.linkcare.net/manuals//nice/Gate/SPINBUS_ISTSPINR3.pdf

5.)
Thanks, but I was asking on thin light orange cable at the top of picture, instead of wires at the bottom.
I meant that one which is on photo in top left side.

Regards,

Tomas
« Last Edit: May 14, 2014, 06:21:53 AM by tomek »

Noble7ven

  • Newbie
  • *
  • Posts: 10
Re: GarageMote Kit
« Reply #3 on: January 10, 2015, 11:26:37 PM »
Hi Felix!

I'm a newbie to this website but having googled "Garage Door Opener App" I came across many websites/items showing me various ways of doing what I wanted. I wasn't at all interested in any of them until I came across your video on Youtube. (
) Thus your video has led me to your website and a future that looks promising for myself and any who stumble across your website.

I have a couple quick questions for you (or anyone who has completed this task and would like to help a newbie out ) on getting myself up and running with the GarageMote.

1. I am trying to compile a list of items I need to get going with this project and I would just like to verify them with you:
Raspberry Pi/Inside the home Location:
 - Raspberry Pi
 - AtxRaspi
 - Moteino ( Which model? )
   * Receiver *
 - Power button/switch

Garage Door Location:
 - Garage door and equipment
 - GarageMote Kit
 - Moteino ( Which model? )
   * Sender *

Various tools:
 - Ethernet cable ( I know is in the GarageMote Kit)
 - Soldering tools and equipment
 - Soda and some good tunes

Am I missing anything and if so could you please let me know where I am lacking?
I have seen your other posts/videos on a Home Automation series and would like to make sure I can easily expand into that in the future (If there are any adjustments to the Raspberry Pi Station/Location could you recommend those as well?)

I wish everyone all the best and would like to thank you for putting this stuff up for everyone to see!

Cheers,
Noble7ven

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6059
  • Country: us
    • LowPowerLab
Re: GarageMote Kit
« Reply #4 on: January 11, 2015, 09:57:25 AM »
@tomek - Sorry, I think I missed your last question. The light orange single wire at top left is the antenna for the receiving Motieno connected to the PI, it's a single wire that is only connected to the ANT pinhole on the Moteino.

@Noble7ven - The ATXRaspi is optional but nice to have so you can shutdown your Pi manually. You will need a button and optional LED for indication to go with it. I also have preselected a LED (power symbol green LED) momentary button with panel mount ring that is offered in the store if that is something you find convenient.

I would recommend Moteino+RFM69 868/915mhz for all your Moteinos (rx and tx), you can use that anywhere depending on your band (868 in EU, 915 elsewhere, just set your setting in the sketches). The hardware and software implementations are documented here:

http://lowpowerlab.com/blog/2013/10/02/raspberrypi-home-automation-gateway/
http://lowpowerlab.com/blog/2013/10/03/raspberrypi-home-automation-gateway-approach/
http://lowpowerlab.com/blog/2013/10/07/raspberrypi-home-automation-gateway-setup/
http://lowpowerlab.com/blog/2013/10/11/raspberrypi-home-automation-gateway-hardware-and-demo/

GarageMote kit is currently out of stock, I need to release a new GarageMote kit that will include magnets and more features, this should happen in the next few days. I think I will provide the 8-wire cable (cat5 ethernet) so you can solder your sensors and connect to the opener. It will also come with unipolar sensors that means they will trigger on ANY magnet pole. I think you got everything else correct.

Noble7ven

  • Newbie
  • *
  • Posts: 10
Re: GarageMote Kit
« Reply #5 on: January 26, 2015, 02:23:55 AM »
Hi Felix! and other LowPowerLabbers :)

I have a quick question for you.

I'm currently installing all the packages and goodies on the Raspberry Pi for my Garagemote.

However I have ran into a snag. I am getting caught up on the part where I put in my Raspberry Pi's address in another browser on another machine and testing to see if the "Warning Screen" for the SSL cert to come up but it will not. I've tried the following:
 1. I've tried reformatting my SD Card and going through the entire install process twice (Starting on http://lowpowerlab.com/blog/2013/10/07/raspberrypi-home-automation-gateway-setup/ ) and nothing :(
 2. I've set up a static IP on the Raspberry Pi itself and have "reserved" the Ip address for my raspberry pi on my router as well. - Still nothing :/

I'm at an impass and am looking for guidance. I know this is a vague question/plea for help but I'm wondering if you or anyone in this community has come across this problem? I'm still motivated and hopeful to get this resolved. :)

I greatly appreciate all the help!

Cheers
Noble7ven



Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6059
  • Country: us
    • LowPowerLab
Re: GarageMote Kit
« Reply #6 on: January 26, 2015, 08:56:01 AM »
If I understand this right, you cannot reach the Pi at all, so your browser times out, correct?
That means you can't resolve the Pi's address. Make sure your nginx service is running, and running on port 80 (it should be 80 from the setup).
Ping the Pi to make sure you can at least reach its IP address. Then you gotta make sure the webserver is running.
There's another part in the setup where you have to forward port 80 for external use from outside your own LAN, I think you don't have that issue or you're not there yet.

Noble7ven

  • Newbie
  • *
  • Posts: 10
Re: GarageMote Kit
« Reply #7 on: January 27, 2015, 01:01:29 AM »
Hi Felix, and my fellow LowPowerLabbers!

So update to the previous post. I was having trouble connecting to my Razzy Pi through another computer on my network to get to the SSL warning page. 
- I was able to ping the address of my Razzy pi
- Made sure the nginx service was running
- I was stuck on the "sudo service nginx restart" portion and was coming back with this error:
"Restarting nginx: nginx: [emerg] "worker_processes" directive is duplicate in /etc/nginx/nginx.conf:30"
However, I dug into the forums and found your Github repo with a working nginx.conf file and copied over its contents and was successful in moving on.

I'm currently on the "Raspberry Pi home automation gateway - Hardware and Demo page (page4) :D and am super excited, but have run into a small snag with the gateway.js file.

If I use the gateway.js material on the webpage itself, it will throw an error with the following:
pi@raspberrypi ~/moteino $ node gateway.js &
[2] 3088
pi@raspberrypi ~/moteino $
/home/pi/moteino/gateway.js:8
io.configure(function () {
   ^
TypeError: Object #<Server> has no method 'configure'
    at Object.<anonymous> (/home/pi/moteino/gateway.js:8:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

If I use the gateway.js output from the Github repo I get the following error:
pi@raspberrypi ~/moteino $ node gateway.js &
[2] 3091
pi@raspberrypi ~/moteino $
events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE
    at errnoException (net.js:904:11)
    at Server._listen2 (net.js:1042:14)
    at listen (net.js:1064:10)
    at Server.listen (net.js:1138:5)
    at Server.listen.Server.attach (/home/pi/moteino/node_modules/socket.io/lib/index.js:214:9)
    at new Server (/home/pi/moteino/node_modules/socket.io/lib/index.js:51:17)
    at Function.Server (/home/pi/moteino/node_modules/socket.io/lib/index.js:39:41)
    at Object.<anonymous> (/home/pi/moteino/gateway.js:1:93)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

I'm not sure how to proceed from this point and I don't want to do it as tired as I am (heck I didn't think I would get this far so I'm keeping positive :) ).

If you guys have some insight on how to correct this I would be very much obliged / thankful to hear from the more knowledgeable folks here :)

Cheers,
Noble7ven


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6059
  • Country: us
    • LowPowerLab
Re: GarageMote Kit
« Reply #8 on: January 28, 2015, 12:56:39 PM »
I've updated page-4 of the setup to use the correct configure (which was removed in socket.io at some point and replaced with io.use).
It's the same code used in the full gateway.js script.
The error you're getting is indicative of wrong socket.io version or some kind of versioning mismatch/conflict. I've not seen that error before but you need to make sure the versions of everything you installed are at least at the versions shown in the walkthrough. For this particular error I would check the versions of node and socket.io first.

ssmall

  • Full Member
  • ***
  • Posts: 141
  • Country: us
Re: GarageMote Kit
« Reply #9 on: January 28, 2015, 03:39:04 PM »
The Error: listen EADDRINUSE indicates another process is listening on the port.  I think it's 8080.  Make sure only one process at a time is listening on a given port.

Noble7ven

  • Newbie
  • *
  • Posts: 10
Re: GarageMote Kit
« Reply #10 on: January 29, 2015, 01:04:37 AM »
Hi Felix!, ssmall!, and my fellow friends,

Well I would like to tell you how much fun (and sometimes pain) I am having putting this awesome project together.

I have re-read the entire walk-through on how to put the GarageMote together and had missed in the beginning "http://lowpowerlab.com/blog/2013/10/07/raspberrypi-home-automation-gateway-setup/" with enabling the serial port for GPIO. I have now done that (I'm hitting myself for missing something like that) and have moved on.

As far as the errors I was getting and your recommended course of action:
 - First thing I did yesterday was learn how to make an image of a Razzy-Pi setup so I can start at a set point (I have messed up a couple times along the way and was tired from starting over) :)
 - I've updated the files (gateway.js) to the latest that you have supplied in the walk-through/last reply.
 - I have double checked the versions of all the programs listed and they are all at the same version with what you have documented.
 - I'm thinking I may have tried to start the nodes more than once hence why I was getting those errors in the first place. (I could def. be wrong though, just a guess)
 
**Should I have both nodes running at the same time (chat.js and gateway.js)?? Or does this fall in line with "ssmall's" comment about processes/ports and that they are clashing?
The Error: listen EADDRINUSE indicates another process is listening on the port.  I think it's 8080.  Make sure only one process at a time is listening on a given port.


 - On the 4th page of the tutorial for the gateway.js file there is a part where it states:
        // change "/dev/ttyAMA0" to whatever your Pi's GPIO serial port is
        var serial = new serialport.SerialPort("/dev/ttyAMA0", { baudrate : 115200, parser: serialport.parsers.readline("\n") });

**I'm lost on what the Pi's GPIO serial port is? I know I set the baudrate to 9600 with the minicom install so I'm confused as to why this part would be different? My gateway.js file still has the default "/dev/ttyAMAO" in it as I am awaiting clarification on what I should put in or just leave it.

 - I was however able to jump on to my Pi's Address, enter in the un:pw and see the following website!(I have assembled both moteino's but have not given them the sample code you have provided).
 I feel like I am pretty close! :) I cannot wait to get to the finished product with many thanks to yourself Felix and this awesome community you have fostered to grow.


Cheers,
Noble7ven

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6059
  • Country: us
    • LowPowerLab
Re: GarageMote Kit
« Reply #11 on: January 29, 2015, 06:32:08 AM »
Noble7ven,
Looks like you're pretty close. This is a typical steep learning curve and it's nothing unusual, so hang tight.
The ttyAMA0 (ends in digit zero not in letter O) is the default serial port (RX TX pins) on the GPIO header of the Pi. I think in recent distributions it is enabled by default (in older ones it was reserved by the system console). Serial is asynchronous meaning there are only 2 wires and no clock, so both ends communicating have to "agree" on the rate of speed at which data is moving. So if you open the port at 115200 it means the Pi serial port expects the data to come in at a rate of 115200 bits per second from the Moteino. You have to connect the Pi TX to Moteino's RX and vice versa. I think if you leave the settings as the given defaults in my scripts it should work as long as you have your ttyAMA0 port available/enabled.
Also, only 1 process can use 1 serial port at 1 time, meaning you can have as many running scripts as you want but only 1 can tie up/reserve the serial port. If reserve it, then try to reserve it again it will throw an error. For your purposes you should only have the gateway.js running. The chat.js was for learning how the whole stack works. I guess you could run both if you really wanted but the end goal is to have the gateway running and that needs the gateway.js script.
The minicom install is just another program that can use the serial port, useful to test that you are getting data from the Moteino.

Noble7ven

  • Newbie
  • *
  • Posts: 10
Re: GarageMote Kit
« Reply #12 on: January 30, 2015, 01:17:03 AM »
Hi Felix and fellow friends!

Thanks for replying so quickly to all my previous questions/posts.
After reading your last post tonight Felix, I had decided to rock and roll with the programming of the Moteino's tonight but my motivation was quickly ebbed. I delved into the posts/forum topics to see if I can find a step-by-step tutorial on how to program these bad boys but couldn't find anything that I could comprehend.

I have read the README.MD file and see that I need to do a few things to get each Moteino up and running but I'm still lost in the sauce on how to upload the codes/firmware onto the Moteino's themselves. If I'm reading the sites right, it is only a few more steps until these puppies are singing with send and receive traffic!
Uploading the codes/firmware
 - Can I upload the codes/firmware wirelessly? -OR-
 - Would I need an FTDI cable and/or AVR programmer with a program to do it?

 - Would you recommend uploading the codes/firmware to the Moteino's on another device other than the Razzy Pi?

I know to some these questions may seem silly to the veterans here but I'm a noob/learner in the process. I will be kicking myself if I don't ask questions so I would like to say that really am thankful for any and all the help provided to me. :)
Still staying positive though and I am enjoying the learning process that is involved with this project.

Cheers,
Noble7ven

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6059
  • Country: us
    • LowPowerLab
Re: GarageMote Kit
« Reply #13 on: January 30, 2015, 08:56:53 AM »
Please see this page and the programming section to get you started: http://lowpowerlab.com/moteino/

Noble7ven

  • Newbie
  • *
  • Posts: 10
Re: GarageMote Kit
« Reply #14 on: February 08, 2015, 06:03:17 PM »
Hi fellow low power labbers,

I've finally received the ftdi adapter. I have set up my libraries according to the install page from adafruit.

Here are the libraries in the folder. No dashes all underscores.


I do get this error when trying to verify/uploading to the moteino.


Not sure where to go from here.

Cheers,
Noble7ven