Code for controlling Energenie (and similar?) RF Remote Control Mains sockets.

PhilHornby

Senior Member
A 'library' (implemented as a ".basinc" #include file to allow control of Energenie (legacy) 433MHz Remote Mains Sockets.

(.basinc isn't allowed as an extension for attached files so you'll have to rename Energenie Radio.bas -> Energenie Radio.basinc.)

Also included is a test program that shows how to use it.

Minimally:

Code:
Symbol EnableRF = B.4 ;for example. Pin connected to 433MHz transmitter VCC connection
Symbol RFDataPin = B.5;Pin connected to 433MHz transmitter DATA connection
symbol RFRAMAddress = 103 ; Start address of a 24byte buffer

#Include "Energenie Radio.basinc"
setfreq M32
dirsb = %00110000
then use the Energenie_Socket_Control() macro to send the desired code. (For which symbols are defined in the #include file). The 20bit 'Controller Id' has to be set in the #include file. If the socket is put it into 'learn' mode, you can use your own code and the socket will learn it, on receipt of the 1st "ON" command.

This code came about as a result of discussions in this thread: http://www.picaxeforum.co.uk/showthread.php?28644-Picaxe-instruction-timing-repeatability

Acknowledgements to: hippy , inglewoodpete and Rick100 for their assistance.

Minimum circuit in next post - can only have 2 attachments per post :confused:
 

Attachments

Last edited:

PhilHornby

Senior Member
New version of control 'library'

I modified the code to produce timing pulses that were much closer in duration, to those produced by the Energenie Controller and PiMote.

I have now discovered that these are required by the newer Energenie sockets (the ones which will learn two controllers). Only the older sockets work with the original code.

Rename "Energenie Radio V2.bas" to "Energenie Radio.basinc" after download.
 

Attachments

Last edited:
Top