supla-espressif-esp + gate_module build

Post Reply
vlymar
Posts: 18
Joined: Mon May 28, 2018 5:22 am

Tue Nov 20, 2018 11:14 am

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.
lesny8
Posts: 175
Joined: Mon Dec 11, 2017 9:43 pm

Tue Nov 20, 2018 11:35 am

Change SUPLA_CHANNELTYPE_SENSORNO for this SUPLA_CHANNELTYPE_SENSORNC
User avatar
pzygmunt
Posts: 4372
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Tue Nov 20, 2018 12:02 pm

You can also inverse the logic in the cloud.
Attachments
inversed_logic.png
inversed_logic.png (86.79 KiB) Viewed 1112 times
vlymar
Posts: 18
Joined: Mon May 28, 2018 5:22 am

Tue Nov 20, 2018 12:11 pm

I have supla cloud 2.1.0 on raspberryPI.
vlymar
Posts: 18
Joined: Mon May 28, 2018 5:22 am

Tue Nov 20, 2018 12:52 pm

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. :(
lesny8
Posts: 175
Joined: Mon Dec 11, 2017 9:43 pm

Tue Nov 20, 2018 8:40 pm

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 ;)
vlymar
Posts: 18
Joined: Mon May 28, 2018 5:22 am

Wed Nov 21, 2018 7:25 am

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!
User avatar
Espablo
Posts: 1249
Joined: Wed Jun 29, 2016 5:04 pm
Location: Oświęcim
Contact:

Wed Nov 21, 2018 8:58 am

Do you have a pull-up resistor on this gpio?
Każde urządzenie elektryczne działa o wiele lepiej jeśli podłączysz je do prądu. :? :roll:
https://github.com/Espablo
vlymar
Posts: 18
Joined: Mon May 28, 2018 5:22 am

Wed Nov 21, 2018 3:31 pm

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.
Post Reply