Great! Then you are very close, here are the steps:
(disclaimer: I’m not developer either, maybe there is easier way )
-
At least once compile succesfully with with Pilight, to pull ESPIlight library
-
find on disk OpenMQTTGateway\.pio\libdeps\Sonoff-RFBridge-Pilight\ESPiLight
(Sonoff-RFBridge-Pilight is the name of my build, from default_envs=) -
Download 6 files from https://github.com/puuu/ESPiLight/pull/53/files, then:
Replace:
- src/ESPiLight.cpp
- src/ESPiLight.h
- src/pilight/libs/pilight/protocols/protocol_header.h (or just add line: #include “433.92/nexus.h”)
- src/pilight/libs/pilight/protocols/protocol_init.h (or just add line: nexusInit(); )
Add:
my Sonoff_env.ini file:
[platformio]
default_envs = Sonoff-RFBridge-Pilight
[env:Sonoff-RFBridge-Pilight]
platform = ${com.esp8266_platform}
board = esp8285
lib_deps =
${com-esp.lib_deps}
${libraries.esppilight}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayPilight="Pilight"'
'-DGateway_Name="OMG_SonoffRFBridge_Pilight"'
'-DRF_RECEIVER_GPIO=4'
'-DRF_EMITTER_GPIO=5'
'-DLED_INFO=13'
'-DLED_INFO_ON=0'
board_build.flash_mode = dout
Then just compile and upload.
Personally I have removed all other protocols from protocol_header.h and protocol_init.h and left nexus only.
Second, seems DG-R8H are not very relliable with parameters and some of them were not visible, so I changed PULSE_TOLERANCE from 100 to 200 in nexus.c to make them work.
Good luck!