FallChallenge
Posts: 18
Joined: Wed Feb 01, 2012 2:28 pm
Contact: Website

Home automation with 433mhz and RPi

Fri Jan 29, 2016 4:10 pm

Hei guys,
I wanna show my last Internet of things project for Home Automation on RPi with 433mhz radio communication.
You can control 433 MHz RC power sockets, PIR, Door Sensors and much more with it.
I had a lot of 433mhz in my home, so I've decided to build something cool, easy to interact and start with. The system is pretty intuitive. The are a lot of cool features:
  • Multi-platform (Windows, Mac OS X, Linux).
    Intuitive API to build your own interface.
    Built-In Material design cards-based template.
    Real-time UI refresh.
    Detect Radio Frequency codes (433mhz).
    Generate Cards and assign it to your rooms.
    Control RC power sockets, PIR sensors, Door sensors and much more.
    Totally Open Source & Open Hardware.
Iot-433Mhz is built on top of Node.js and can be installed through npm. The UI follows the material design guidelines. Below a preview:

Image

Here the link to the repo:
https://github.com/roccomuso/iot-433mhz

Any feedback would be appreciated. Thanks! :)

FallChallenge
Posts: 18
Joined: Wed Feb 01, 2012 2:28 pm
Contact: Website

Re: Home automation with 433mhz and RPi

Sun Feb 07, 2016 6:46 pm

Now Telegram Bot and webHooks have been implemented. ;)

backmailingbox
Posts: 72
Joined: Tue Jan 19, 2016 2:30 pm

Re: Home automation with 433mhz and RPi

Tue Mar 22, 2016 12:08 pm

Hi I am interesting in same theme.... rpi + remote sockets (433 mhz)
I wanted to look on your source code...
but when I look to your sender I see that it is arduino source code
do you use arduino or rpi?

FallChallenge
Posts: 18
Joined: Wed Feb 01, 2012 2:28 pm
Contact: Website

Re: Home automation with 433mhz and RPi

Tue Mar 22, 2016 3:33 pm

Hi,

Actually the rpi gpio part needs to be completed.

The point is that no one recommend connecting radio modules to gpio, you'll have cpu overhead. That's why the arduino comes in play. The arduino microcontroller listen for any radio codes you might get...

backmailingbox
Posts: 72
Joined: Tue Jan 19, 2016 2:30 pm

Re: Home automation with 433mhz and RPi

Tue Mar 22, 2016 8:41 pm

did you try to send rf data from rpi? is there any problem?
Yes I try to receive data and I could see that there is a problem with cpu... ok
but send?

my sistuation is:
I try to switch on/off my remote power 220 V sockets from OBI shop.
I can catch the code from remote control.
I can see the protocol
Now I need to send data.
I am able to send data but it is not correct...
Did you try it?
Any experience about it?

FallChallenge
Posts: 18
Joined: Wed Feb 01, 2012 2:28 pm
Contact: Website

Re: Home automation with 433mhz and RPi

Tue Mar 22, 2016 8:53 pm

Are you asking me if i've tried RF data sending?

Of course I did. Using RPi and Arduino I can catch RF codes and replicate them.

User avatar
joan
Posts: 15085
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Home automation with 433mhz and RPi

Tue Mar 22, 2016 8:56 pm

backmailingbox wrote: ...
I can see the protocol
Now I need to send data.
I am able to send data but it is not correct...
...
If it's the normal Manchester encoded signal try http://abyz.co.uk/rpi/pigpio/examples.h ... on__433_py (Python) or http://abyz.co.uk/rpi/pigpio/examples.html#pdif2__433D (C).

backmailingbox
Posts: 72
Joined: Tue Jan 19, 2016 2:30 pm

Re: Home automation with 433mhz and RPi

Wed Mar 23, 2016 9:02 am

joan wrote: If it's the normal Manchester encoded signal try http://abyz.co.uk/rpi/pigpio/examples.h ... on__433_py (Python) or http://abyz.co.uk/rpi/pigpio/examples.html#pdif2__433D (C).
yes it is standard manchester encoding.
but is anybody here who was succesfull?
Because there is many web pages about this theme but many times it ends with arduino.
Is anybody here who was successfull with raspi?

I used as example cpp code in pi_switch from github.
It is not very complicated.
There are 3 protocols but no one looks like my.
I shorten this code and wrote it to C (not cpp)
I can now transmit rf signal.
I can see my rf signal in my rf sniffer in audicity
I can see that it is not same like it looks from original remote control.
So I should start to play with it, to modificate my coding...
But the main question is.... Is it good way?
Isn't there any problem?

User avatar
joan
Posts: 15085
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Home automation with 433mhz and RPi

Wed Mar 23, 2016 11:51 am

@backmailingbox

Both the examples I gave are for the Pi. They will be as accurate as an Arduino.

stevePIman
Posts: 24
Joined: Tue May 29, 2012 8:07 am

Re: Home automation with 433mhz and RPi

Wed Mar 23, 2016 2:44 pm

Hi,

I used the Pi and and Arduino to successfully control Maplin 433MHz sockets before. I'm trying to get this iot-433mhz working now because it looks neat. I am following this https://github.com/roccomuso/iot-433mhz

Clean install of Jessie on a Pi B+

Code: Select all

sudo apt-get update && sudo apt-get dist-upgrade.
sudo rpi-update.
sudo reboot.
Node is already installed in Jessie so:

Code: Select all

pi@raspberrypi:~ $ node -v
v0.10.29
I then tried installing the package but got many errors, I used:

Code: Select all

sudo npm install iot-433mhz -g --unsafe-perm
I tried the chown and installing from git too.

Typical errors:

Code: Select all

node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/pi/iot-433mhz/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:755:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:822:5)
node-pre-gyp ERR! System Linux 4.1.20+
node-pre-gyp ERR! command "node" "/home/pi/iot-433mhz/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/iot-433mhz/node_modules/serialport
node-pre-gyp ERR! node -v v0.10.29
node-pre-gyp ERR! node-pre-gyp -v v0.6.13
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp build --fallback-to-build --module=/home/pi/iot-433mhz/node_modules/serialport/build/Release/node-v11-linux-arm/serialport.node --module_name=serialport --module_path=/home/pi/iot-433mhz/node_modules/serialport/build/Release/node-v11-linux-arm' (1)
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! serialport@2.0.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.5 install script.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls serialport
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.1.20+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--unsafe-perm"
npm ERR! cwd /home/pi/iot-433mhz
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/iot-433mhz/npm-debug.log
n
Any ideas anybody?

backmailingbox
Posts: 72
Joined: Tue Jan 19, 2016 2:30 pm

Re: Home automation with 433mhz and RPi

Wed Mar 23, 2016 3:37 pm

can anybody show RASPBERRY PI source code example (c or python) of remote socket ON/OFFsignals?
source code which is really running and able to switch on/off remote sockets.

stevePIman
Posts: 24
Joined: Tue May 29, 2012 8:07 am

Re: Home automation with 433mhz and RPi

Wed Mar 23, 2016 4:21 pm

Solved my install issue:

Code: Select all

sudo npm install -g node-gyp
sudo npm install iot-433mhz -g --unsafe-perm
My runtime issue is now :

Code: Select all

pi@raspberrypi:~ $ sudo iot-433mhz

util.js:556
  ctor.prototype = Object.create(superCtor.prototype, {
                          ^
TypeError: Object prototype may only be an Object or null
    at Function.create (native)
    at Object.exports.inherits (util.js:556:27)
    at Object.<anonymous> (/usr/lib/node_modules/iot-433mhz/node_modules/nedb/lib/datastore.js:80:6)
    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 Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/lib/node_modules/iot-433mhz/node_modules/nedb/index.js:1:79)
I didn't create a config.json file. Where should it go? The example didn't look like json code.

Return to “Automation, sensing and robotics”