Well pump shutoff! please help! 2 moteinos and odroid c1 (raspberry pi like)

Started by djash40, April 04, 2015, 02:20:06 PM

djash40

I have scoured the internet and have found all sorts of stuff like:
http://homeautomation.proboards.com/thread/7/raspberry-rfm69-sensor-node-gateway
http://github.com/abouillot/HomeAutomation/tree/master/piGateway
as well as others.
I have an odroid-c1 and two usb moteinos and would like to set up a wireless gateway on the odroid. The odroid is similar to a raspberry pi. For some reason I'm having trouble tying this all together. I find it hard to believe that I need 3 arduinos one with an Ethernet shield in order to make this happen. I already have 3 boards. Two moteinos and an odroid. Can someone help me or point me in the right direction to tie this all together?
I want to use openhab as a gatway with mqtt. Control a well pump with a solid state relay to shut off pump if I get a leak. Eventually I'l like to expand upon the home automation but I just can't seem to get it going. I have the odroid setup with linux and mqtt broker working fine. I hope to have the moteino, odroid. mqtt broker and openhab all on the odroid as gateway. I'm a little frustrated and perhaps over my head into this. Please help!   

Felix

Hey there,
I'm afraid I can't advise much as far as mqtt. I'm preparing to release a GUI for the Moteino Framework that will allow easy control of Moteino based nodes. It's just taking longer than I thought and I'm still working on it. Maybe others can help you with mqtt if they have more experience.
Best,
-Felix

sumnerboy

Hi - I do something similar to this. I have openHAB/mosquitto running on my home server (Ubuntu) and then have an Uno clone with built-in ethernet connected to a Moteino which acts as my gateway. There is a simple sketch on the Uno clone which 'speaks' to the Moteino over I2C and translates the RF packets to MQTT publishes (over ethernet).

The gateway Moteino has a sketch which listens for RF packets from remote Moteino nodes and sends them over I2C to the Uno.

The sensor Moteinos then just send out simple RF packets, i.e. they know nothing about the MQTT network.

Links to my sketches below if you are interested. Note, these are only uni-directional - i.e. the sensor nodes send sensor readings, but I can't send messages the other way to switch relays or the like. All sensor nodes are running off batteries so I don't want to leave them 'powered up' waiting for messages from the gateway.

UNO SKETCH
https://github.com/sumnerboy12/hardwicke/tree/master/sensornet_gateway

GATEWAY MOTEINO SKETCH
https://github.com/sumnerboy12/hardwicke/tree/master/sensornet_rfbridge

SENSOR NODE SKETCHS
https://github.com/sumnerboy12/hardwicke/tree/master/sensornet_rfnode_gate
https://github.com/sumnerboy12/hardwicke/tree/master/sensornet_rfnode_weather