puuu / ESPiLight

ESPiLight - pilight 433.92 MHz protocols library for Arduino
GNU General Public License v3.0
110 stars 41 forks source link

Add nexus protocol #53

Closed enwi closed 3 years ago

enwi commented 3 years ago

This is the PR to try and fix #51

enwi commented 3 years ago

It is to note that this compiles fine, yet no sensor data is shown when using the Receive.ino example. So further investigation is needed

enwi commented 3 years ago

@piano-thomas If you want to try, this issue should be fixed now

piano-thomas commented 3 years ago

@piano-thomas If you want to try this issue should be fixed now

I will give it a go, and let you know if it works for me! Thanks in advance :)

puuu commented 3 years ago

Thank you for supporting ESPiLight!

As described in the README, new protocols and protocol changes should be introduced to pilight and will then be merged into ESPiLight.

So, I'm wondering if there is a difference between src/pilight/libs/pilight/protocols/433.92/nexus.c introduced and patched in this pull request and pilight/libs/pilight/protocols/433.92/nexus.c from pilight staging branch?

Unfortunately, the commits also includes a lot of style changes which makes a diff very noisy and difficult to read. The style changes are also the reason, why this build failed.

If I haven't overlooked something, the changes in the last commit relate to the values of minrawlen, maxrawlen, mingaplen and maxgaplen.

My comments are:

In the next branch, you will find the next commits for the master branch, I need to test them before merging. It also includes the latest changes from the pilight staging branch, including the nexus protocol. If possible, please test that this branch works with the Nexus device and let me know. Please read the README of how to build from source (you need to execute make in order to copy the pilight files).

enwi commented 3 years ago

I fixed the style, but I will also check the master branch

enwi commented 3 years ago

@puuu So when I make the next branch the nexus protocol is not included in src/pilight/libs/pilight/protocols/433.92

> ls src/pilight/libs/pilight/protocols/433.92
alecto_ws1700.c       arctech_switch_old.c  elro_400_switch.c     mumbi.c               secudo_smoke.c
alecto_ws1700.h       arctech_switch_old.h  elro_400_switch.h     mumbi.h               secudo_smoke.h
alecto_wsd17.c        auriol.c              elro_800_contact.c    ninjablocks_weather.c selectremote.c
alecto_wsd17.h        auriol.h              elro_800_contact.h    ninjablocks_weather.h selectremote.h
alecto_wx500.c        beamish_switch.c      elro_800_switch.c     pollin.c              silvercrest.c
alecto_wx500.h        beamish_switch.h      elro_800_switch.h     pollin.h              silvercrest.h
arctech_contact.c     clarus.c              eurodomest_switch.c   quigg_gt1000.c        tcm.c
arctech_contact.h     clarus.h              eurodomest_switch.h   quigg_gt1000.h        tcm.h
arctech_dimmer.c      cleverwatts.c         ev1527.c              quigg_gt7000.c        techlico_switch.c
arctech_dimmer.h      cleverwatts.h         ev1527.h              quigg_gt7000.h        techlico_switch.h
arctech_dusk.c        conrad_rsl_contact.c  heitech.c             quigg_gt9000.c        teknihall.c
arctech_dusk.h        conrad_rsl_contact.h  heitech.h             quigg_gt9000.h        teknihall.h
arctech_motion.c      conrad_rsl_switch.c   impuls.c              quigg_screen.c        tfa.c
arctech_motion.h      conrad_rsl_switch.h   impuls.h              quigg_screen.h        tfa.h
arctech_screen.c      daycom.c              iwds07.c              rc101.c               tfa2017.c
arctech_screen.h      daycom.h              iwds07.h              rc101.h               tfa2017.h
arctech_screen_old.c  ehome.c               kerui_d026.c          rsl366.c              tfa30.c
arctech_screen_old.h  ehome.h               kerui_d026.h          rsl366.h              tfa30.h
arctech_switch.c      elro_300_switch.c     logilink_switch.c     sc2262.c              x10.c
arctech_switch.h      elro_300_switch.h     logilink_switch.h     sc2262.h              x10.h
puuu commented 3 years ago

@enwi maybe you need to update the git submodule of pilight. make update will do it for you.

enwi commented 3 years ago

@puuu Regarding your comments on then *len

Here are mine:

So my proposal would be to add my changes for the *len variables to the next branch

enwi commented 3 years ago

make update

Ahh thanks for the note, I will try that. I thought I would not need to do anything else than make

enwi commented 3 years ago

@puuu make update does not seem to work for me

> ls src/pilight/libs/pilight/protocols/433.92
alecto_ws1700.c       arctech_switch_old.c  elro_400_switch.c     mumbi.c               secudo_smoke.c
alecto_ws1700.h       arctech_switch_old.h  elro_400_switch.h     mumbi.h               secudo_smoke.h
alecto_wsd17.c        auriol.c              elro_800_contact.c    ninjablocks_weather.c selectremote.c
alecto_wsd17.h        auriol.h              elro_800_contact.h    ninjablocks_weather.h selectremote.h
alecto_wx500.c        beamish_switch.c      elro_800_switch.c     pollin.c              silvercrest.c
alecto_wx500.h        beamish_switch.h      elro_800_switch.h     pollin.h              silvercrest.h
arctech_contact.c     clarus.c              eurodomest_switch.c   quigg_gt1000.c        tcm.c
arctech_contact.h     clarus.h              eurodomest_switch.h   quigg_gt1000.h        tcm.h
arctech_dimmer.c      cleverwatts.c         ev1527.c              quigg_gt7000.c        techlico_switch.c
arctech_dimmer.h      cleverwatts.h         ev1527.h              quigg_gt7000.h        techlico_switch.h
arctech_dusk.c        conrad_rsl_contact.c  heitech.c             quigg_gt9000.c        teknihall.c
arctech_dusk.h        conrad_rsl_contact.h  heitech.h             quigg_gt9000.h        teknihall.h
arctech_motion.c      conrad_rsl_switch.c   impuls.c              quigg_screen.c        tfa.c
arctech_motion.h      conrad_rsl_switch.h   impuls.h              quigg_screen.h        tfa.h
arctech_screen.c      daycom.c              iwds07.c              rc101.c               tfa2017.c
arctech_screen.h      daycom.h              iwds07.h              rc101.h               tfa2017.h
arctech_screen_old.c  ehome.c               kerui_d026.c          rsl366.c              tfa30.c
arctech_screen_old.h  ehome.h               kerui_d026.h          rsl366.h              tfa30.h
arctech_switch.c      elro_300_switch.c     logilink_switch.c     sc2262.c              x10.c
arctech_switch.h      elro_300_switch.h     logilink_switch.h     sc2262.h              x10.h

I will just update the submodule myself

enwi commented 3 years ago

I can confirm that now the nexus protocol is present:

> ls src/pilight/libs/pilight/protocols/433.92
alecto_ws1700.c       arctech_switch_old.h  elro_800_contact.c    nexus.h               selectremote.c
alecto_ws1700.h       auriol.c              elro_800_contact.h    ninjablocks_weather.c selectremote.h
alecto_wsd17.c        auriol.h              elro_800_switch.c     ninjablocks_weather.h silvercrest.c
alecto_wsd17.h        beamish_switch.c      elro_800_switch.h     pollin.c              silvercrest.h
alecto_wx500.c        beamish_switch.h      eurodomest_switch.c   pollin.h              smartwares_switch.c
alecto_wx500.h        clarus.c              eurodomest_switch.h   quigg_gt1000.c        smartwares_switch.h
arctech_contact.c     clarus.h              ev1527.c              quigg_gt1000.h        tcm.c
arctech_contact.h     cleverwatts.c         ev1527.h              quigg_gt7000.c        tcm.h
arctech_dimmer.c      cleverwatts.h         heitech.c             quigg_gt7000.h        techlico_switch.c
arctech_dimmer.h      conrad_rsl_contact.c  heitech.h             quigg_gt9000.c        techlico_switch.h
arctech_dusk.c        conrad_rsl_contact.h  impuls.c              quigg_gt9000.h        teknihall.c
arctech_dusk.h        conrad_rsl_switch.c   impuls.h              quigg_screen.c        teknihall.h
arctech_motion.c      conrad_rsl_switch.h   iwds07.c              quigg_screen.h        tfa.c
arctech_motion.h      daycom.c              iwds07.h              rc101.c               tfa.h
arctech_screen.c      daycom.h              kerui_d026.c          rc101.h               tfa2017.c
arctech_screen.h      ehome.c               kerui_d026.h          rsl366.c              tfa2017.h
arctech_screen_old.c  ehome.h               logilink_switch.c     rsl366.h              tfa30.c
arctech_screen_old.h  elro_300_switch.c     logilink_switch.h     sc2262.c              tfa30.h
arctech_switch.c      elro_300_switch.h     mumbi.c               sc2262.h              x10.c
arctech_switch.h      elro_400_switch.c     mumbi.h               secudo_smoke.c        x10.h
arctech_switch_old.c  elro_400_switch.h     nexus.c               secudo_smoke.h
puuu commented 3 years ago

@enwi are you using the latest version of the next branch? 1bff1dff55a911df8ea940a35152dbeed28ba713 is the last commit. 5dfbc5f44ad4b1f04e04195b8364ed8f39fc4e19 the commit of the pilight update.

enwi commented 3 years ago

@puuu Did not see that you pushed some stuff to next

puuu commented 3 years ago

@enwi Regarding your comments on then *len.

In principle you are right. But then it also should be updated within limitProtocols(). If commit (969ab14113f19859e43ce7bc4db69104b30833db) works for you, please fell free to make a pull request against the master branch.

enwi commented 3 years ago

@puuu Yup you are also right, otherwise it would use protocols that are not being used, so we can close this PR. So should I make a new one for master or next?

puuu commented 3 years ago

@puuu Did not see that you pushed some stuff to next

According to github, the next branch is currently 4 commits ahead of master.

@puuu Yup you are also right, otherwise it would use protocols that are not being used, so we can close this PR. So should I make a new one for master or next?

Against master! I may rebase next, please do not rely on it.

enwi commented 3 years ago

Ok great