Maker Pro
Maker Pro

Automatic Lighting with Raspberry PI

Damcios2509

Jun 13, 2016
1
Joined
Jun 13, 2016
Messages
1
Hi guys,

I was thinking about making the lights in my appartement work on either wireless or
wired but controllable from a raspberry pi.
From what I can gather, my lights are all on a single circuit, so I can't just place one switch
and make it do the work.
I don't want to do for a full make-over as the appartement is only two years old, and
I'd like to keep the budget relativelly low if possible.

I was thinking of using something like this :
http://www.conrad.com/ce/en/product...-W-Max-range-open-field-25-m?ref=searchDetail
But I have no idea if it would be doable to open the controllers, change the manual switch to an electronic one and
place them all somewhere in a box.
Or maybe it would be better to switch the wall switches to electronic ones.

I'm looking for general ideas, afterwards I'll work out a project and post it as well.
Any ideas or suggestions ?
 

donkey

Feb 26, 2011
1,301
Joined
Feb 26, 2011
Messages
1,301
there are options available check out mysensors.org to get started and hopefully from there they can direct you to the right user end software for the pi
 

Mark2019

Jul 7, 2019
14
Joined
Jul 7, 2019
Messages
14
Hi guys,

I was thinking about making the lights in my apartment work on either wireless or
wired but controllable from a raspberry pi.
From what I can gather, my lights are all on a single circuit, so I can't just place one switch
and make it do the work.
I don't want to do for a full make-over as the apartment is only two years old, and
I'd like to keep the budget relatively low if possible.

I was thinking of using something like this :
But I have no idea if it would be doable to open the controllers, change the manual switch to an electronic one and
place them all somewhere in a box.
Or maybe it would be better to switch the wall switches to electronic ones.

I'm looking for general ideas, afterwards I'll work out a project and post it as well.
Any ideas or suggestions ?


Hi
You ideally want to decide where you are going to switch this from If you want all the lights on then you are looking at doing this from the consumer unit in which case you use Rs485 protocol

I'm assuming you want to still use the RPI although you can also do this via ESP8266 , ordinary arduino although Im not 100% sure of how stable this is

How ever taking the above points into account you then need to decide on the following

Network connection type , wireless , power line , hardwired via cat5 , Zigbee or other

Conversion from one protocol to another TCP-IP To Rs232 to RS485 I would think in your case

Type of hardware required for interfacing
Safety systems , battery back up what do you do in event of power going down start up sequence etc etc

Back up systems , UPS battery , etc

Controller interface

This might be mobile phone , web interface , Infra red remote , LCD touch screen , desktop / tablet application

1:
Software your going to use
Android
Java
C++/C
QT
Python
Encryption if any although that could be entirely your own

Here is one such example you can view on face book that I've been experimenting with for demonstration purposes using UDP , Serial ports , Arduino Uno simply to drive leds I could change this to independent relays , Triacs if you prefer solid state

I could also add to this or change this to PWM for lighting dimming sequences similar to DALI Lighting protocol

Or You could implement that yourself on RPI

You can watch the video from this address below

Unfortunately for some unknown reason there does not seem to be facility to upload videos directly for you or I could make this very interesting and write a full blown article this too

Alas I am awaiting on one of your site managers eedam or similar to contact me with reference to writing such articles with suitable mutually agreeable arrangements although I have left a few message so far

Never the less here is the outline of what ive been experimenting with myself

I have done similar with Bluetooth modules , Android , Java with Arduino as well which really does work well and is reliable

https://www.facebook.com/mark.harrington.142892/videos/2374239349488740/

From RS232 and then you only need add RS485 conversion module

Here is the rest of the code you can play with
**** Here is this code at git hub ******

https://github.com/markh2016/QTBinaryCounter.git

This is the code for the Arduino
Right at the bottom of this comment is address for code at github for the UDP Receiver

There are also two photo's for those who would like to try this out showing connections connections to Arduino

byte byteRead;

void setup()
{
DDRD = B11110000 ; // make all upper nibble port d Outputs
DDRC= B00001111 ;

Serial.begin(9600);

}

void outPorts(byte val)
{
byte lowNibble = 0x00 ;
byte hiNibble = 0x00 ;
lowNibble = val & 0x0F ;
hiNibble = val & 0XF0 ;
PORTD = hiNibble ;
PORTC = lowNibble ;

}

void loop()

{
if (Serial.available() > 0) {
// read the incoming byte:
byteRead = Serial.parseInt();
outPorts(byteRead) ;
}
}
The address for the code at github for the udp client as below

https://github.com/markh2016/udpclient.git


I've included layouts for this simple project plus schematic for you to experiment with


 

Attachments

  • 20190720_002121.jpg
    20190720_002121.jpg
    229.2 KB · Views: 1
  • 20190720_002149.jpg
    20190720_002149.jpg
    315.4 KB · Views: 1
  • schematic.png
    schematic.png
    128.5 KB · Views: 1
Last edited:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,886
Joined
Jun 21, 2012
Messages
4,886
Yet another "drive by" poster looking for a quick answer. Not finding one, off to another forum perhaps...
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,886
Joined
Jun 21, 2012
Messages
4,886
Does this get an better than this lol
Oh, yeah. Some of them hang around, ask questions but obviously pay no attention to our replies, and never explain just WTF they are really trying to DO. It is sometimes really difficult to distinguish this activity from trolling, but either one can best be handled by refusing to reply, the sooner the better, and moving on to more productive thread dialogs.
 

davenn

Moderator
Sep 5, 2009
14,263
Joined
Sep 5, 2009
Messages
14,263
Does this get an better than this lol


Just some advice, Mark, in noting you have done this several times.
Before you post, check the date of the last post, in this thread 20 June 2016

As a generalisation, if the last post is more than around 10 - 12 months old or older, don't bother responding :)
this thread was started just over 3 years ago


Dave
 
Top