Page 1 of 1

Multiple light switches with a single GPIO 433 transmitter

Posted: Saturday 02 January 2016 14:31
by bvandenberg
Hi,

This is my first post here. I have the following 'problem'. Would be great if someone can help me out.

By combing the information in a couple of articles (see references) I managed to switch a "klikaanklikuit" unit with a 433Mhz transmitter like this:
Image

The transmitter is hooked up to GPIO pin 14 (Tx) on the Raspberry Pi that has Domoticz installed. I use WiringPi and some scripts (1) to control my klikaanklikuit unit.

Then in Domitcz I switch the lamp by configuring the 'On Action' and 'Off Action' of a Light Switch.
433Mhz Kaku.PNG
433Mhz Kaku.PNG (89.31 KiB) Viewed 6441 times
I was hoping to create multiple 'GPIO type Switches' in Domoticz. And then in theory they could all be switched by changing the script parameters like this:
script:///home/pi/wiringPi/examples/lights/./kaku A 1 on
script:///home/pi/wiringPi/examples/lights/./kaku A 2 on
script:///home/pi/wiringPi/examples/lights/./kaku A 3 on
script:///home/pi/wiringPi/examples/lights/./kaku A 4 on


The problem is that I can only create one GPIO switch that uses GPIO pin 14. If I add another then Domoticz responds with the following error:
Switch already exists.PNG
Switch already exists.PNG (19.08 KiB) Viewed 6441 times
Does anyone know if it's possible to bypass this error? I also tried adding a slave device, but that gives the same error.

Thanks in advance!

References
(1) http://weejewel.tweakblogs.net/blog/866 ... ry-pi.html
http://domoticz.com/wiki/GPIO
http://www.domoticz.com/forum/viewtopic ... bay#p47780
http://www.domoticz.com/forum/viewtopic ... 227#p27564

Re: Multiple light switches with a single GPIO 433 transmitt

Posted: Sunday 03 January 2016 15:10
by frankTP
Hi bvandenberg,

Mayby I do not understand your question completely, but let me try to contribute some. I happened to buy such receiver a few days ago as well. At first I followed the http://weejewel.tweakblogs.net/blog/866 ... ry-pi.html instructions . (That site also references a topic to add a webserver in front of this functionality, also fun to play with)
Yesterday I started playing with the weejewel scripts in combination with Domoticz. Your question set me to use the On/Off Action links. I read the GPIO info and I understood the GPIO in Domoticz is only to be used as standard input/output.
To switch your outputs no link to the GPIO is needed. In fact, I did not even identify the GPIO in the Hardware setup of Domoticz.
The only interface to the 'outside world' are the scripts you specify in the On/Off Action fields. Those scripts access the GPIO, but that is hidden for Domoticz. note; only signals can be sent, not received.
The hardware device I attached for the switches is one and the same Dummy device, doing nothing.
To trigger switching the outputs I added some timers, clicked the bulp on the Dashboard or used the mobile application.

So my advice; keep it simple. remove the GPIO definition unless you do something special with it (receiving a signal??). and have fun!

Re: Multiple light switches with a single GPIO 433 transmitt

Posted: Monday 04 January 2016 23:00
by bvandenberg
Hi Frank,
Thanks for pointing me in the right direction. I wasn't aware of the existence of dummy devices! Usings there in combination with the on/off scripts was exactly what I need. Thanks :D

Re: Multiple light switches with a single GPIO 433 transmitter

Posted: Friday 03 March 2017 14:56
by Nibble
Hello bvanderberg,

I'm trying to find the scripts used by weetjewel, because the dropbox link doesn't seem to work anymore.

Are you willing to share the script you are using of know a place where to find them?

Thanks!

//Edwin

Re: Multiple light switches with a single GPIO 433 transmitter

Posted: Friday 03 March 2017 15:10
by gerardvs
Looking for this? https://www.dropbox.com/s/uc1d4igaeviys ... s.zip?dl=1
Someone mentioned this later in the posts....

Re: Multiple light switches with a single GPIO 433 transmitter

Posted: Sunday 05 March 2017 11:07
by Nibble
Thanks al lot!

This was the one I was looking for!