Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra switchs and domoticz #305

Closed
gajotnt opened this issue Mar 29, 2017 · 8 comments
Closed

Extra switchs and domoticz #305

gajotnt opened this issue Mar 29, 2017 · 8 comments
Labels
enhancement Type - Enhancement that will be worked on

Comments

@gajotnt
Copy link
Contributor

gajotnt commented Mar 29, 2017

Is it possible to when enabling a GPIO to function has a switch to add in the domoticz page the extra switch?
The sonoff basic has 4 extra GPIO, why not enable an option to when using those extra GPIO have extra IDX settings in domoticz setup page?

@arendst
Copy link
Owner

arendst commented Apr 1, 2017

Implemented in next release

@arendst arendst added the enhancement Type - Enhancement that will be worked on label Apr 1, 2017
@gajotnt
Copy link
Contributor Author

gajotnt commented Apr 3, 2017

I Love you! :D

arendst added a commit that referenced this issue Apr 3, 2017
4.1.2 20170403
* Rename Unrecognised command to Unknown command
* Remove all command lists
* Remove command SmartConfig (superseded by WifiConfig)
* Fix boot loop when selecting module Sonoff 4CH or Sonoff Touch on non
ESP8285 hardware
* Add optional support for Toshiba and Mitsubishi HVAC IR control (needs
updated IRanother  (#257)
* Add all configured switches to Domoticz Configuration web page (#305)
* Fix compile error when selecting WS2812 DMA (#313)
arendst added a commit that referenced this issue Apr 3, 2017
4.1.2 20170403
* Rename Unrecognised command to Unknown command
* Remove all command lists
* Remove command SmartConfig (superseded by WifiConfig)
* Fix boot loop when selecting module Sonoff 4CH or Sonoff Touch on non
ESP8285 hardware
* Add optional support for Toshiba and Mitsubishi HVAC IR control (needs
updated IRanother  (#83, #257)
* Add all configured switches to Domoticz Configuration web page (#305)
* Fix compile error when selecting WS2812 DMA (#313)
arendst added a commit that referenced this issue Apr 3, 2017
4.1.2 20170403
* Rename Unrecognised command to Unknown command
* Remove all command lists
* Remove command SmartConfig (superseded by WifiConfig)
* Fix boot loop when selecting module Sonoff 4CH or Sonoff Touch on non
ESP8285 hardware
* Add optional support for Toshiba and Mitsubishi HVAC IR control (needs
updated IRremote8266 library) (#83, #257)
* Add all configured switches to Domoticz Configuration web page (#305)
* Fix compile error when selecting WS2812 DMA (#313)
@gajotnt
Copy link
Contributor Author

gajotnt commented Apr 4, 2017

Got this partialy working :)
here is the console log:

14:22:50 MQTT: cmnd/sonoff/POWER1 = ON
14:22:50 MQTT: domoticz/in = {"idx":6,"nvalue":1,"svalue":""}
14:22:50 MQTT: stat/sonoff/RESULT = {"POWER":"ON"}
14:22:50 MQTT: stat/sonoff/POWER = ON
14:22:52 MQTT: cmnd/sonoff/POWER1 = OFF
14:22:52 MQTT: domoticz/in = {"idx":6,"nvalue":0,"svalue":""}
14:22:52 MQTT: stat/sonoff/RESULT = {"POWER":"OFF"}
14:22:52 MQTT: stat/sonoff/POWER = OFF
14:22:57 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"On"}
14:23:00 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"On"}
14:23:06 CMND: SwitchMode
14:23:06 MQTT: stat/sonoff/RESULT = {"SwitchMode1":0}
14:23:09 CMND: SwitchTopic
14:23:09 MQTT: stat/sonoff/RESULT = {"SwitchTopic":"sonoff"}

So i have a switch controling the relay (idx:6) and another switch controling idx:7, but it only turns it on, doesnt send the command to turn off, when it should turn it off, it sends the command to turn on again, is this normal behaviour? Maybe im doing something wrong
Switchmode 0
SwitchTopic 1

@arendst
Copy link
Owner

arendst commented Apr 4, 2017

Using switchtopic 1 is special as it sets the switchtopic the same as your sonoff's topic being in your case sonoff. Set switchtopic to anything different than 0 or 1 and it should work as expected.

@gajotnt
Copy link
Contributor Author

gajotnt commented Apr 4, 2017

Confirm working :D
was having some double toggles when using one of the serial gpio but remenbered i had to turn off serial logs.
Working great now :D
Were can i make a donation? :D

@gajotnt
Copy link
Contributor Author

gajotnt commented Apr 4, 2017

Arrrrghhhh when i have a wire connected to the TX or RX pin i keep getting switch triggers without doing anything, tought it was from the serial log but it isnt.

15:48:55 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:48:55 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:48:56 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:48:56 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:06 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:10 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:11 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:15 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:21 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:21 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:23 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:23 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:24 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:24 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:29 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}
15:49:29 MQTT: domoticz/in = {"command":"switchlight","idx":7,"switchcmd":"Toggle"}

Do i have to solder somekind of resistor somewere? :/

@arendst
Copy link
Owner

arendst commented Apr 4, 2017

You'll have to add pull up resistors as these gpios are set to serial communication. See other issues here how other people handled this.

@gajotnt
Copy link
Contributor Author

gajotnt commented Apr 4, 2017

Ok :) thanks :D

@gajotnt gajotnt closed this as completed Apr 4, 2017
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
4.1.2 20170403
* Rename Unrecognised command to Unknown command
* Remove all command lists
* Remove command SmartConfig (superseded by WifiConfig)
* Fix boot loop when selecting module Sonoff 4CH or Sonoff Touch on non
ESP8285 hardware
* Add optional support for Toshiba and Mitsubishi HVAC IR control (needs
updated IRanother  (arendst#257)
* Add all configured switches to Domoticz Configuration web page (arendst#305)
* Fix compile error when selecting WS2812 DMA (arendst#313)
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
4.1.2 20170403
* Rename Unrecognised command to Unknown command
* Remove all command lists
* Remove command SmartConfig (superseded by WifiConfig)
* Fix boot loop when selecting module Sonoff 4CH or Sonoff Touch on non
ESP8285 hardware
* Add optional support for Toshiba and Mitsubishi HVAC IR control (needs
updated IRanother  (arendst#83, arendst#257)
* Add all configured switches to Domoticz Configuration web page (arendst#305)
* Fix compile error when selecting WS2812 DMA (arendst#313)
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
4.1.2 20170403
* Rename Unrecognised command to Unknown command
* Remove all command lists
* Remove command SmartConfig (superseded by WifiConfig)
* Fix boot loop when selecting module Sonoff 4CH or Sonoff Touch on non
ESP8285 hardware
* Add optional support for Toshiba and Mitsubishi HVAC IR control (needs
updated IRremote8266 library) (arendst#83, arendst#257)
* Add all configured switches to Domoticz Configuration web page (arendst#305)
* Fix compile error when selecting WS2812 DMA (arendst#313)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on
Projects
None yet
Development

No branches or pull requests

2 participants