Use Rpi as a switch

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
Koensk
Posts: 33
Joined: Friday 25 September 2015 9:23
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Use Rpi as a switch

Post by Koensk »

Hi all,

I'm a newby on this forum and was wondering the following:

I've got domiticz running on my Synology and it seems everything is working fine. I can see a the things happening on my Logitech Harmony remote and find that already a cool thing ;)
I would like to use domoticz to trigger a relay in my gate outside. This relay will function like a simple doorknob and it will open my gate.
In the past I managed to do this via one of my Rpi's, using the GPIO board. The Rpi was running as standalone pc with a website and via this website I was able to trigger the relay which was connected to the GPIO board.

I know it's possible to run Domoticz on a Rpi, but thats not what I want.
The Rpi will be sitting in an installation box outside my house near the gate.
I would like Domoticz (as it's running on my NAS) to find the Rpi in my wireless network and trigger it's GPIO board.
Would this be a possibility?

Otherwise the solution would be to buy a z-wave and use the Double Relay Switch 2x1.5kW from Fibaro to open my gate.

Thanks in advance and hope you understand my question

Koen
User avatar
blackdog65
Posts: 311
Joined: Tuesday 17 June 2014 18:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Norfolk, UK
Contact:

Re: Use Rpi as a switch

Post by blackdog65 »

Hi Koensk

If you run the raspberry as a slave with Domoticz installed, you should still be able to run your relay from the GPIO.
The "switch" on the raspi needs to be shared with the Master Domoticz on your Synology.

The gate switch will operate from the Synology will operate as if it was directly connected... just a small delay

I hope that's what you meant ;)
CubieTruck Master
RasPi slaves
Aeon Labs Z-Stick, multi sensor
Fibaro Dimmers, relays, Universal sensors
EQ3 MAX!
TKB Sockets
RFXCOM
LightwaveRF sockets, switches, relays, doorbell
MySensors
ESPEasy ESP8266-12E
Koensk
Posts: 33
Joined: Friday 25 September 2015 9:23
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Use Rpi as a switch

Post by Koensk »

Hi Blackdog,

Thx for your reply.
I can see in your signature you have yourself 2 Rpi's configured as a slave. Is there anywhere some kind of tutorial how to set this up?

Koen
User avatar
blackdog65
Posts: 311
Joined: Tuesday 17 June 2014 18:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Norfolk, UK
Contact:

Re: Use Rpi as a switch

Post by blackdog65 »

Hi Koen

Have a look at http://www.domoticz.com/wiki/Setting_up_Device_sharing
and http://www.domoticz.com/wiki/Setting_up_Device_sharing

They should cover most of what you need. I must add though, I find gpio a bit "Hit & miss" and the piface is a lot more reliable

Sean
CubieTruck Master
RasPi slaves
Aeon Labs Z-Stick, multi sensor
Fibaro Dimmers, relays, Universal sensors
EQ3 MAX!
TKB Sockets
RFXCOM
LightwaveRF sockets, switches, relays, doorbell
MySensors
ESPEasy ESP8266-12E
Koensk
Posts: 33
Joined: Friday 25 September 2015 9:23
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Use Rpi as a switch

Post by Koensk »

It used to work for a while, but I reinstalled some and changed configuration.
At this moment I'm trying to use my DS212 as Master which is running Domoticz 2.4017
and use a Rpi as slave which is running Domoticz 2.3530
I set everything as described in the wiki but the 2 cannot find/connect to each other.
Will the difference in Version be the issue? They both start with 2.*** so I doubt it.

Koen
jannl
Posts: 666
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Use Rpi as a switch

Post by jannl »

No compatibilty issues between the different Domoticz versions?
Koensk
Posts: 33
Joined: Friday 25 September 2015 9:23
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Use Rpi as a switch

Post by Koensk »

Maybe, but I read somewhere that the fist version number in this case is important. So 2.*** should work.
In the log of the master I get this:

2015-12-31 10:42:14.446 Incoming Domoticz connection from: ::ffff:192.168.0.9

But I think it should say that there is a TCP connection with 192.168.0.9 which is not the case.
jannl
Posts: 666
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Use Rpi as a switch

Post by jannl »

looks like an ipv6 connection. May be disable ipv6?
Koensk
Posts: 33
Joined: Friday 25 September 2015 9:23
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Use Rpi as a switch

Post by Koensk »

jannl wrote:looks like an ipv6 connection. May be disable ipv6?
How to do so Jan?

Verstuurd vanaf mijn XT1562 met Tapatalk
jannl
Posts: 666
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Use Rpi as a switch

Post by jannl »

Should be possible somewhere in the network settings.
I'm afraid you'll have to google
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest