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

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Wed Oct 01, 2014 10:36 pm

I have recently bought some more Status sockets and wanted to find the remote ID. I initially tried a looping bash script with no luck.

Dug out my SDR adapter and used the Pascal program by Redhawk which worked great after a bit of tweaking the SDR output.

Turns out my remote ID is 340009 - well outside the known range for Status remotes.

Just thought I'd add this in case anyone was struggling to find their remote code.

SideInfo
Posts: 4
Joined: Wed Oct 16, 2013 1:12 pm

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Thu Oct 02, 2014 6:52 pm

did you try pilight and pilight-learn? you just need good 433Mhz receiver - the cost is really low... I solve a lot of problems with pilight... now I am controling lights and blind - just "recorded" raw codes and used it for controlling...

cancunia
Posts: 21
Joined: Wed Dec 26, 2012 5:12 pm

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Tue Oct 14, 2014 2:53 pm

Maybe a daft question, if so apologies.

Is it possible to work at 868Mhz too?

koosman35
Posts: 1
Joined: Thu Oct 23, 2014 8:28 am

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sat Nov 01, 2014 4:53 pm

I get Runtime error 201 at $00402463
Am I missing something in my Pascal install?
Can someone maybe upload a compiled version of the remote pascal file?

Thanx

User avatar
ilovemipi
Posts: 152
Joined: Mon Dec 02, 2013 11:52 am
Location: UK + Cyprus
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Mon Nov 17, 2014 7:37 pm

koosman35 wrote:I get Runtime error 201 at $00402463
Am I missing something in my Pascal install?
Can someone maybe upload a compiled version of the remote pascal file?

Thanx
You have the wrong format of wav file. When I test some of my files from 12 months ago I get the same error. They were recorded at 96000Hz. If you record at 48000Hz the software will work fine.

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

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri Apr 10, 2015 9:35 am

I need some help. I have tried and tried but cant figure it out.
I have a relay that works great when using this remote. http://netram.co.za/1458-thickbox_defau ... ey-fob.jpg

But when I use pihat I am not able to pair it with a random code in learning mode.

What I need to know is what string is the remote's output. Is it a bunch of one's and zero's example 0110101110110001? If yes how long should it be? or is it a code example 5658 or 7895 or 1234?

I have had luck ad can use this method on 12V relay's but not with the 110/220V relay's I now have.

User avatar
ilovemipi
Posts: 152
Joined: Mon Dec 02, 2013 11:52 am
Location: UK + Cyprus
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri Apr 10, 2015 9:41 am

Meyertrix wrote:I need some help. I have tried and tried but cant figure it out.
I have a relay that works great when using this remote. http://netram.co.za/1458-thickbox_defau ... ey-fob.jpg

But when I use pihat I am not able to pair it with a random code in learning mode.

What I need to know is what string is the remote's output. Is it a bunch of one's and zero's example 0110101110110001? If yes how long should it be? or is it a code example 5658 or 7895 or 1234?

I have had luck ad can use this method on 12V relay's but not with the 110/220V relay's I now have.
PiHat sends binary 0's and 1's and works at 433Mhz. Are you trying to run it with a 315Mhz receiver as PiHat can't send at 315Mhz?

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

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri Apr 10, 2015 9:44 am

It is for 433mhz, the picture was just for illustration you get 2 types on those remotes 433 and 315

How many characters of 1's and 0's should I send?

User avatar
ilovemipi
Posts: 152
Joined: Mon Dec 02, 2013 11:52 am
Location: UK + Cyprus
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri Apr 10, 2015 10:41 am

Ok, we have several versions of the 220V 'learner' relays but most of them will program as Status sockets.

So if you have PiHat set up and from https://github.com/s7mx1/pihat try:

./pihat --brand=5 --repeats=50 --id=0 --channel=7 --state=1 when the relay is in learner mode.

You don't need to know what 0's and 1's are being sent as this is taken care of by PiHat.
Come back to us if you are still having problems.

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

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri Apr 10, 2015 10:44 am

Thanks,

Will give it a crack tonight. :P

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

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sat Apr 11, 2015 5:27 pm

Can anyone confirm that pihat works with the Raspberry Pi 2?

I've just switched my RPi for an RPi2 and it doesn't seem to want to send the signals with pihat.

I recompiled the binary to be sure.

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

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Sat Apr 11, 2015 10:16 pm

PiHAT doesn't work out of the box with the RPi2.

To get it to work you need to change

Line 30 of radio.c from:

Code: Select all

0x20000000  //base


to

Code: Select all

0x4F000000  //base
then build a new binary.

SirAvalon
Posts: 4
Joined: Mon Sep 24, 2012 6:49 am

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Mon Dec 07, 2015 9:14 am

Hi Guys,

I have attached the modified script for Conrad switches (thanks to Alvin) suitable for RPI2. The address of GPIO is changed in RPI 2 and the modification mentioned above is not enough (at least for Alvin's version), radio.h also needs modification.
Also the right address is 0x3F000000, not 0x4F000000.
In the attached file there are two versions of pihat: pihat is for RPI 2 and pihat2 is for RPI 1 (old one).

Cheers!
Attachments
pihatrpi2conrad.tar.gz
PiHAT for Conrad for RPI2
(15.42 KiB) Downloaded 126 times

User avatar
greatdane
Posts: 34
Joined: Mon Apr 30, 2012 7:58 pm
Location: Søndersø, Denmark
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Wed Mar 30, 2016 12:15 pm

For anyone interested:

I have successfully upgraded the Status RCS-K09 receivers to remember the configured address after power loss, simply by adding a 24LC16B EEPROM and a 22k resistor to the units.

The components, marked as U3 and R15, are originally missing from the PCB, but are easily added. See attached images.

If you decide to do try the same you are obviously doing so at your own risk. Remember, these operate at 230VAC without a transformer to shield from the mains.

Image
Image
Image
Image
Last edited by greatdane on Wed Mar 30, 2016 2:31 pm, edited 2 times in total.
Sand Bay, North Somerset, UK

User avatar
ilovemipi
Posts: 152
Joined: Mon Dec 02, 2013 11:52 am
Location: UK + Cyprus
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Wed Mar 30, 2016 12:24 pm

Nice work @greatdane.

We have quite a few power failures here so your mod might be quite useful for us.

User avatar
ilovemipi
Posts: 152
Joined: Mon Dec 02, 2013 11:52 am
Location: UK + Cyprus
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Wed Mar 30, 2016 12:57 pm

For the fully qualified individuals they also fit nicely into the Raspberry Pi modular cases.
Status Socket in a Pi Case 60kb.jpg
Status Socket in a Pi Case 60kb.jpg (36.57 KiB) Viewed 4159 times
@greatdane I can clearly see where the EEPROM goes but I can't see R15. I have had the magnifying glass out on the board. Is it marked on the reverse side as I have this screwed to the Pi case but I'm pretty sure it is only marked on one side.

Can you give us a clue where R15 is?

EDIT: I should have looked closer at your photos, R15 is clearly marked on the reverse side of the board.

User avatar
ilovemipi
Posts: 152
Joined: Mon Dec 02, 2013 11:52 am
Location: UK + Cyprus
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri May 13, 2016 5:01 pm

@greatdane my EEPROM's arrived today and I'm happy to say that despite my DREADFUL soldering skills the first Status socket now survives through a power failure.

Great hack and thanks again for posting.

User avatar
greatdane
Posts: 34
Joined: Mon Apr 30, 2012 7:58 pm
Location: Søndersø, Denmark
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri May 13, 2016 6:00 pm

Excellent. Happy it helped :)
Sand Bay, North Somerset, UK

User avatar
tony1tf
Posts: 53
Joined: Tue Jul 03, 2012 12:33 pm

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri Aug 02, 2019 2:33 pm

Hi @greatdane

I don't know whether you are still looking at this thread, but I wanted to thank you for the insight into the EEPROMs in the remote switches. I only recently found your reply, having being using the Pihat software to transmit to a Status remote control for years. I had seen that the EEPROM position was present in the switches, but I expected that different firmware might be needed. I just fitted a 24LC16B (got 6 from eBay for £7.48) and a 24K surface mount resistor (didn't have 22K, but I didn't expect that to matter), and the socket now remember the code. After power down/up it no longer flashes the LED - you have to have a long press on the button to get it to learn a new code.
Now finally, I can do a proper RPi based automation set up with these very cheap switches - I was always reluctant to use any more than one switch because of the code loss on mains loss.
The only remaining obstacle is that the power relay sometimes sticks on - have desoldered a stuck one, and cut the case off - cleaning the contacts gets it working again. I guess in a safety critical situation, I might have to put two in series - one which is always on, and only gets switched off if the normal one fails ON.

Tony

User avatar
greatdane
Posts: 34
Joined: Mon Apr 30, 2012 7:58 pm
Location: Søndersø, Denmark
Contact: Website

Re: PiHAT - Rasberry Pi Home Automation Transmitter

Fri Aug 02, 2019 10:19 pm

Excellent, Happy it helped and thanks for the heads-up :)
Sand Bay, North Somerset, UK

Return to “Automation, sensing and robotics”