Page 1 of 1

supla-espressif-esp + gate_module build

Posted: Tue Nov 20, 2018 11:14 am
by vlymar
Good afternoon, I want to assemble esp-12 (8266) firmware for gate control (gate-module) I need inversion for sensor inputs (NO), tell me where I can change this in the source code, thanks in advance and sorry for the stupid questions. I understand this needs to be changed in this file: https://github.com/SUPLA/supla-espressi ... e_module.c, and after doing #. / Build.sh gate_module.

Re: supla-espressif-esp + gate_module build

Posted: Tue Nov 20, 2018 11:35 am
by lesny8
Change SUPLA_CHANNELTYPE_SENSORNO for this SUPLA_CHANNELTYPE_SENSORNC

Re: supla-espressif-esp + gate_module build

Posted: Tue Nov 20, 2018 12:02 pm
by pzygmunt
You can also inverse the logic in the cloud.

Re: supla-espressif-esp + gate_module build

Posted: Tue Nov 20, 2018 12:11 pm
by vlymar
I have supla cloud 2.1.0 on raspberryPI.

Re: supla-espressif-esp + gate_module build

Posted: Tue Nov 20, 2018 12:52 pm
by vlymar
lesny8 wrote:
Tue Nov 20, 2018 11:35 am
Change SUPLA_CHANNELTYPE_SENSORNO for this SUPLA_CHANNELTYPE_SENSORNC
Thanks, compiled, sensors became NC! But as before, on the standard firmware, Sersoras do not react to the closure at all, but the relays work, maybe this is due to esp-12 and you need to fix something else in the firmware? Thank. :(

Re: supla-espressif-esp + gate_module build

Posted: Tue Nov 20, 2018 8:40 pm
by lesny8
For me, this change works properly. Sensors react. When I close the circuit the icon changes, when I open the circuit the icon also changes.
Where do you check it?
In the Cloud there is a temporary delay when the channel changes state.
In the application on the phone the change is immediate.
If it works for NO, then it must work for NC.
This is the simplest change ;)

Re: supla-espressif-esp + gate_module build

Posted: Wed Nov 21, 2018 7:25 am
by vlymar
Yes, everything works on other firmware, but for some reason this is not NO, not NC is not. I check the status on the smartphone as always. If this works for you on ESP-12, then I will look for a problem in myself. Thank you very much!

Re: supla-espressif-esp + gate_module build

Posted: Wed Nov 21, 2018 8:58 am
by Espablo
Do you have a pull-up resistor on this gpio?

Re: supla-espressif-esp + gate_module build

Posted: Wed Nov 21, 2018 3:31 pm
by vlymar
Espablo wrote:
Wed Nov 21, 2018 8:58 am
Do you have a pull-up resistor on this gpio?
Yes, there are no questions to the connection diagram.