whitemagus
Posts: 1
Joined: Thu Mar 07, 2013 9:32 pm

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sun May 19, 2013 5:57 pm

Raspi GPIO 4 pin is also used for 1-wire devices. Is it possible to make it work on another GPIO pin ?

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sun May 19, 2013 9:43 pm

No, because GPIO 4 isn't a regular I/O pin it provides the clock signal which is controlled by pihat to generate the radio waves.
It maybe possible to attach a pre-built 433.92MHz TX board to a normal I/O pin but that would require modifying the pihat source code.

Richard S.

singularity
Posts: 1
Joined: Sat May 25, 2013 7:10 pm

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sat May 25, 2013 7:22 pm

Are AlvinAvR's Conrad remote modifications incorporated into s7mx1's git repository? I tried hekkenberg's commands to control a Maplin socket but pihat didn't like my usage of the command group=4.

ant_thomas
Posts: 115
Joined: Fri May 04, 2012 4:33 pm

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sat Jun 15, 2013 8:51 pm

Would it be possible to add LightwaveRF support to PiHAT?

It would hopefully mean no requiring the relatively expensive WiFi Link and just needing the switches themselves and being able to control them with PiHAT and the RPi.

There seems to be an Arduino library available - https://github.com/roberttidey/LightwaveRF

Hopefully this might help with making PiHAT work with Lightwave RF devices.

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Thu Jul 18, 2013 8:20 am

i've managed to use pihat with my 433mhz tx and it works just gotta work out why my 3rd status power socket isnt syncing but 1 and 2 work fine.

status (morrisons and amazon ones)
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Thu Jul 18, 2013 10:14 am

For the status remote that isn't syncing how far away is it from the transmitter??

Richard S.

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Thu Jul 18, 2013 12:03 pm

about 2M at best 2.5m away

problem is these status remotes don't remember the sync when power is switched off
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Thu Jul 18, 2013 1:05 pm

The receiver circuit inside the Status remote is pretty basic at best so there is a good possibility that it's not finely tuned into 433.92MHz, having said that 2 1/2 meters is quite a large working distance.
If you want to fine tune your Status receiver you need to open it up and pop out the circuit board to gain access to the tuning coil.
Inside the coil there is an aluminium core which you can adjust it's position with a screw driver this only needs to be turned in steps of 45 degrees since the frequency shift is small.
By trial an error it should be possible to finely tune the receiver, what you don't want to do is adjust the screw in real time unless a) you have a special non-metal ceramic trimmer tool because a metal screw driver would shift the frequency b) avoid getting electrocuted by holding the circuit board while you adjust tuning core.

Richard S.

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Tue Jul 30, 2013 10:39 am

i now have this working still need to get time to sort the remote code but hey ho.

i'm working on a web interface for this any jquery guru's able to assist
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Mon Aug 05, 2013 1:10 pm

redhawk wrote:I've made another update and this will be my last - http://pastebin.com/uB584ZUP
The pulse detection was changed it should be more reliable now, I've also added 2 different audio filters which can in some cases help to improve detection. :)

Today I knocked up a simple 433.92MHz RF receiver with nothing more than a BF199, a homemade 1.5T coil and some extra bits as bits go.
I managed to tune the receiver to my Status remote control and funnily enough I could also pick up the signals from my car key fob I guess this too works at 433.92MHz.
Then I tried pihat and I found the signal was really weak despite having a long antenna wire and only 50cm away from my receiver.
After some checking it turns out pihat was actually transmitting at a much higher frequency than 433.92MHz.
This is probably one of the reasons why I found the range poor using pihat while other people seem to be able to go through several floors.

Is there any way to tweak the code to lower the transmitter frequency down by a fraction??

Richard S.
Do you have the link for the up to date version i could actually do with this for my project to work out my remote id.
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Mon Aug 12, 2013 10:53 am

I've released my webpage for pi hat now :)
https://github.com/txt3rob/RPI-Control
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Thu Aug 15, 2013 12:14 pm

Do you have the link for the up to date version i could actually do with this for my project to work out my remote id.
Hi, sorry for the late reply, the source code can be downloaded again from http://pastebin.com/39jBCjzL
It should compile using Borland Turbo Pascal 6, 7 or Free Pascal Win32 and DOS32 target (it may compile on the Raspberry Pi but I wouldn't recommend it).

If you would prefer a pre-compiled binary let me know in private message.

Richard S.

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Thu Aug 15, 2013 2:00 pm

any one interested in my project i've added sms support!
possible twitter at a later date may be!
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

abcd
Posts: 1
Joined: Sat Aug 25, 2012 11:59 am

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Mon Aug 19, 2013 9:48 am

Has anyone tried with HE322B Home Easy sockets?
still struggling to use PiHat to control my HE322 sockets.
If you were successful in using HE322s then please post the values of brand, id and channel.

Bluesmokywater
Posts: 1
Joined: Fri Oct 25, 2013 6:34 am

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri Oct 25, 2013 6:45 am

redhawk wrote:
Do you have the link for the up to date version i could actually do with this for my project to work out my remote id.
Hi, sorry for the late reply, the source code can be downloaded again from http://pastebin.com/39jBCjzL
It should compile using Borland Turbo Pascal 6, 7 or Free Pascal Win32 and DOS32 target (it may compile on the Raspberry Pi but I wouldn't recommend it).

If you would prefer a pre-compiled binary let me know in private message.

Richard S.
Really good work Richard ;) , I will try this with a garage remote. Where has the Audio File to be located, that the script will work? Is there a downloadlink for the compiled one? I have to record a whole sequence and cut it before I´m using it, is this right? br Dan

jets
Posts: 58
Joined: Mon May 06, 2013 9:40 am

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Tue Nov 12, 2013 8:19 am

I thought I went through this whole thread, but I still cannot figure out what to do differently, if I am using external transmitter, like this:
http://www.ebay.co.uk/itm/RF-Transmitte ... 1038612257

As I am using 1-wire, I think I cannot use just GPIO Pin 4, right? And anyway, it would probably not give me the range I need. Or could the 1-wire work as an antenna? Well, the length is really too long for the wave length of 433Mhz.

It also appears that Finnish Johdoton products are compatible with Nexia/Nexa-products. Guess they are just rebranded here.

Any help?

And btw, I am really surprised about the Pihat project, positively of course, but I wonder how come I never before stumbled across this! Well.. better late than never..

Maybe OP&Co should put this as well to Instructables.com :D

Trune
Posts: 2
Joined: Wed Nov 13, 2013 6:42 pm

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Wed Nov 13, 2013 10:44 pm

Hi All,

I have some silver crest remote controls similar to those mentioned above.
I am having trouble capturing the codes from it though, i have tried a number of methods.
I purchased a cheap transmitter / receiver from ebay and connected it up.

I have tried using the most recent version of PiLight and previous versions (433.92-Raspberry-Pi)
I have also tried RFSniffer from here; https://github.com/ninjablocks/433Utils

But nothing seems to be working.

The closest i have got is using an old build of PiLight (433.92-Raspberry-Pi) which gives me this info (although i believe it to not be complete, its also inconsistent.
Start
Elro
ID: 31
House: 1
On/Off: Off
Elro
ID: 31
House: 1
On/Off: Off
Elro
ID: 20
House: 29
On/Off: Off
Elro
ID: 20
House: 29
On/Off: Off
Elro
ID: 8
House: 5
On/Off: Off
Elro
ID: 30
House: 2
On/Off: Off
Elro
ID: 31
House: 1
On/Off: Off


If i use the script i found on here forums to look at the gpio port while i press a remote button of the 433mhz transmitter, it does cause a change in the state of the gpio from 0 to 1 a number of time. So it does appear my receiver which i have connected up to the Pi to attempt to capture the codes is working.

Does anyone have any advice as to the reasons why the various bits of software which allow rfsniffing don't seem to be picking up my remote?

Thanks in advance.

CurlyMo
Posts: 9
Joined: Sun Sep 02, 2012 6:25 pm

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Thu Nov 14, 2013 8:13 pm

All problems with receiving are due to almost all users using the wrong receiver. Check the http://wiki.pilight.org for more information of different types of receivers and their quality.

Also, please ask help on http://www.pilight.org regarding pilight. Threads like these can give the false impression that pilight is to blame, whilst is 99% of the cases are due to this wrong receiver.

Trune
Posts: 2
Joined: Wed Nov 13, 2013 6:42 pm

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sat Nov 16, 2013 6:14 pm

Hi,
Thanks for the reply.
I wasn't blaming plight or anything else, just looking for tips on getting what probably is the wrong kit working.
Fundamentally its the wrong kit, as my receiver is 5v. But with 3.3v i do seem to get data back in raw forms.

I installed the development branch of pilight just now and managed to capture raw codes, so it does seem to be working. I can then transmit those raw codes to turn my sockets on and off.

jets
Posts: 58
Joined: Mon May 06, 2013 9:40 am

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sat Nov 16, 2013 6:36 pm

jets wrote:I thought I went through this whole thread, but I still cannot figure out what to do differently, if I am using external transmitter, like this:
http://www.ebay.co.uk/itm/RF-Transmitte ... 1038612257

As I am using 1-wire, I think I cannot use just GPIO Pin 4, right? And anyway, it would probably not give me the range I need. Or could the 1-wire work as an antenna? Well, the length is really too long for the wave length of 433Mhz.
Does anyone know how to use Pihat with external transmitter? I cannot use the pin 4..

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sat Nov 16, 2013 8:35 pm

Does anyone know how to use Pihat with external transmitter? I cannot use the pin 4..
Actually I believe you can still use GPIO 4 the Pihat program simply turns the RF modulation on or off (OOK) which to a TX board would appear as data on or data off.
Mixing 2 transmitters with similar frequencies can cause birdie noise but since these digital receivers have such a low data rate they're only interested in the presence of a signal vs no signal I don't see this being a problem.

Richard S.

jets
Posts: 58
Joined: Mon May 06, 2013 9:40 am

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sat Nov 16, 2013 9:18 pm

redhawk wrote:
Does anyone know how to use Pihat with external transmitter? I cannot use the pin 4..
Actually I believe you can still use GPIO 4 the Pihat program simply turns the RF modulation on or off (OOK) which to a TX board would appear as data on or data off.
Mixing 2 transmitters with similar frequencies can cause birdie noise but since these digital receivers have such a low data rate they're only interested in the presence of a signal vs no signal I don't see this being a problem.

Richard S.
Hmm. So what are you saying? I could use the pin 4 and do all in "normal Pihat way"?

I believe I should use the external transmitter, as it gives more range and reliability. The use will be for an autonomous application that is located in a remote cabin, which is off-grid and has only wind mill and solar panels.

carlvk
Posts: 31
Joined: Tue Jun 19, 2012 7:43 am

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Tue Dec 10, 2013 12:46 pm

hekkenberg wrote:@alvinAvR

I bought a remote controlled socket from Maplins http://www.maplin.co.uk/remote-controll ... set-531547 Product Code: N78KA to achieve pretty much the same what everyone else is trying to achieve. Not knowing exactly how these remotes/sockets exactly work I spent ages trying various things that people have suggested. I had no clue about how these things work but having read this thread I know a hell of a lot more then I did before!

I opened up the remote (not socket) and noticed that the chip on the circuit board was also an SC5262S. Loaded with that I downloaded your coding and put the FM radio on and listened to the Raspberry PI transmit as well as the remote control. They both sounded identical (using your Conrad code).

I couldn't get it working initially but I had to put the raspberry PI near the remote socket (5cm) to make it work as I didn't had a wire attached. I can confirm that your coding for the Conrad works brilliantly with the Maplin remote controlled sockets.

For anyone trying to achieve the same thing, I misunderstood the pihat documentation with the groups. On the back of the remote socket there are two dials you can adjust. The top dial relates to the GROUP and the bottom relates to the CHANNEL that pihat refer to.

For example if you have the top dial set to 3 and the bottom to 1 then you pihat command/parameter would be:

Turn it on:
pihat -b c --channel=1 --state=1 --group=3

Turn it off:
pihat -b c --channel=1 --state=0 --group=3

I bought a remote and 1x socket for testing but you can buy a single for £7.99 (product code N77KA).

I am interested in getting a SAW filter and if there are a number of other people wanting the same SAW filter from UK Farnell (http://uk.farnell.com/epcos/b39431b3710 ... 1B3710U410) to achieve the same or similar thing why don't we all chip in together, good economies of scale.

Rick
I was trying to get these sockets working
but all i get is this;
[email protected] ~/pihat $ sudo ./pihat -b c --channel=1 --state=1 --group=3
Usage: pihat [OPTION...]
Try `pihat --help' or `pihat --usage' for more information.
[email protected] ~/pihat $

If i remove the group I get this;
[email protected] ~/pihat $ sudo ./pihat -b c --channel=1 --state=1
Tune to 144.64 MHz
[email protected] ~/pihat $

if I try a completely different example I get this;
[email protected] ~/pihat $ sudo ./pihat --brand=5 --id=1 --channel=1 --state=1
Tune to 144.64 MHz
0000000000000000000110010
[email protected] ~/pihat $
but of course my sockets don't work

any help gratefully received
Thanks Carlvk
Carlvk
Pi killer

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Wed Dec 11, 2013 11:07 am

where possible i would suggest the status sockets as i have them working with my home automation script perfectly.
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

Meyertrix
Posts: 14
Joined: Tue Dec 10, 2013 8:16 am

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Thu Dec 19, 2013 10:34 am

Hi can anyone tell me how I would execute the sudo ./pihat --id=0 --channel=1 --state=0 cmd from within index.html?

I have so far.

Code: Select all

<html>
<head>
<meta c
</head>


<?php
if (isset($_POST['Relay1OPEN']))
{
exec??????????
}
if (isset($_POST['Relay2OPEN']))
{
exec??????????
}
?>
<form method="post">
<button name="Relay1OPEN">Relay1</button>&nbsp;
<button name="Relay2OPEN">Relay2</button><br>



</form>
</html>

Return to “Automation, sensing and robotics”