Multiple GPIO and Domoticz IDX settings

643 views
Skip to first unread message

Ruben Tavares

unread,
Mar 28, 2017, 11:36:17 AM3/28/17
to SonoffUsers

Didint want to hijack the post about external switches because i think my question is a little diferent. Here it goes:

Since the sonoff basic has so many GPIO, why (at least at first glance) isnt it possible to attibute a domoticz IDX to each GPIO? That would be great.

For example

GPIO 04 would control the Relay
GPIO 03 would control Bedside Sonoff
GPIO 01 would control Sonoff S20


This way from the door wall switch one could control several sonoffs in that room (this is one example) it could also be used to switch off the entire house when exiting home. So many uses for this extra funcionality.

Maybe it can be done using the comand line, been reading on that, but find it a little confusing on how to set a topic for each GPIO. Would be so much easier if when enabling a GPIO on the Module parameters it would enable extra Domoticz IDX 

David Lang

unread,
Mar 28, 2017, 2:37:41 PM3/28/17
to Ruben Tavares, SonoffUsers
you would do this by attaching multiple switches to the sonoff and then
configuring domoticz to send instructions to the other devices when it sees a
switch being closed.

David Lang

On Tue, 28 Mar 2017, Ruben Tavares wrote:

> Didint want to hijack the post about external switches because i think my
> question is a little diferent. Here it goes:
>
> Since the sonoff basic has so many GPIO, why (at least at first glance)
> isnt it possible to attibute a domoticz IDX to each GPIO? That would be
> great.
>
> For example
>
> GPIO 04 would control the Relay
> GPIO 03 would control Bedside Sonoff
> GPIO 01 would control Sonoff S20
>
> <https://lh3.googleusercontent.com/-WQ5Hp31aXQs/WNqAjwVg0II/AAAAAAABfLI/jolIE3_g2ikzV0ZyeuGPRMZe5qTxAtIVgCLcB/s1600/transferir.jpg>

Ruben Tavares

unread,
Mar 28, 2017, 5:40:11 PM3/28/17
to SonoffUsers
Yes that's it, starting to understand the commands that enable that. Already got 2 IDX working.

Maybe this could be more straightforward, when adding a switch in the domoticz menu should appear the extra switches, just dreaming hehehe.

This is by far the best firmware I have tried :)
Thanks for all the great work :D

Pascal

unread,
Mar 29, 2017, 1:31:53 AM3/29/17
to SonoffUsers
I use a couple Sonoff's basic as below.
They replace all KaKu/CoCo switches I had. I use the KaKu 433Mhz remote switches for simply to turn the Sonoff's.

The limit is your creativity and stability of Domoticz.Domoticz getting so much information from al the Sonoff's that he sometimes no longer understands. The only option is than Reboot the Pi, and thats not so nice.


The AM2301 I use automatically to turn the heaters on and off. But for that, you can also use a contact.

I hope Tasmota expanded in the future with e a water level gauge or rain gauge, there are so many "fun" Arduino extensions that might work perfectly on a Sonoff with Tasmota.

On all the relay extension boards I have replaced the 5 volt relay for 3 volt!


Sonoff_template.h

 

  { "Sonoff Basic",    // Sonoff Basic (ESP8266)

     GPIO_KEY1,        // GPIO00 Button

     GPIO_USER,        // GPIO01 Serial RXD and Optional sensor

     0,                // GPIO02

     GPIO_USER,        // GPIO03 Serial TXD and Optional sensor

     GPIO_USER,        // GPIO04 Optional sensor

     GPIO_USER,        // GPIO05 Optional sensor

     0,                // GPIO06 (SD_CLK   Flash)

     0,                // GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)

     0,                // GPIO08 (SD_DATA1 Flash QIO/DIO)

     0,                // GPIO09 (SD_DATA2 Flash QIO)

     0,                // GPIO10 (SD_DATA3 Flash QIO)

     0,                // GPIO11 (SD_CMD   Flash)

     GPIO_REL1,        // GPIO12 Red Led and Relay (0 = Off, 1 = On)

     GPIO_LED1_INV,    // GPIO13 Green Led (0 = On, 1 = Off)

     GPIO_USER,        // GPIO14 Optional sensor

     0, 0

  },




I Like this one :-)

Sonoff Pow for the washing machine, that I only want to measure not want to switch.
Relay brought out to turn a lamp on and off. And a jumper instead of the Relay.
The remaining GPIO are also useful, but I do not need them there.




Reply all
Reply to author
Forward
0 new messages