TTGO T-Beam and OpenMQTTGateway?

Hi Everybody! New to Open MQTTGateway. I have have a Lora board without display,433 Mhz (http://www.lilygo.cn/claprod_view.aspx?TypeId=62&Id=1281&FId=t28:62:28). In upload section it is not listed as avaliable.
Does anyone know if there is a way to install the gateway on this device ? Any tips appreciated

Hi @hakha4,

there is a prebuilt ttgo-t-beam BLE gateway binary on the web upload page, if that is what you are looking for

For rtl_433_ESP reception I would assume the board to be compatible as well, but it would currently need a custom environment set-up in Platformio.

Which kind of gateway are you interested in with your TTGO T-Beam?

Hi
Thank’s for reply. My primary goal with the gateway is to send/recieve rf and ir and integrate with Homeassistant. I found the upload for prebuilt `ttgo-t-beam BLE gateway and managed to install it but this don’t include rf/ir I believe? I’ve read/googled information about the gateway but I must say that I’m a bit lost what to do next. What to install ? Hardware? Is there information how to somewhere?
Thank in advance
Best regards

It really depends what kind of RF, as stated above, if your RF devices are rtl_433 compatible I think it should be possible to have the TTGO T-Beam as such a gateway as is on the hardware side, if RF/RF2 protocols are required (really depending on the devices you want to receive/control) you would need to connect RF receiver and transmitter as described at

Similarly with IR at

To see what your possible devices require this pages, especially with its link to the compatibility website, should be helpful

The RF and IR should be possible to combine on the one TTGO T-Beam, but it will require a manual environment definition to combine the two.

I’ve read doc’s you recommended but not sure howto.
How do I enable RF/IR in gateway? Should I compile from source and just remove ‘#’ from RF and IR option in source code and that’s it ?
Regarding IR I understand that I need to hook up a transciever but how do I know what pins gateway is sending/listening on ?
Sorry for being so confused but I really appreciate your help

Yes, you would have to compile from source, creating a custom environment with the board definitions taken from the current TTGO T-Beam BLE environment, but the module replaced with the IR relevant ones from another ESP32 IR environment. So the resulting custom environment should look something like this - short from being able to very with a TTGO T-Beam myself here :wink:

[env:ttgo-t-beam-ir]
platform = ${com.esp32_platform}
board = ttgo-t-beam
board_build.partitions = min_spiffs.csv
lib_deps =
  ${com-esp.lib_deps}
  ${libraries.wifimanager32}
  ${libraries.lora}
  ${libraries.irremoteesp}
build_flags =
  ${com-esp.build_flags}
  '-DZgatewayLORA="LORA"'
  '-DZgatewayIR="IR"'
  '-DIR_RECEIVER_GPIO=25'
  '-DGateway_Name="OpenMQTTGateway_TTGOTBEAM_IR"'

Regarding IR I understand that I need to hook up a transciever but how do I know what pins gateway is sending/listening on ?

With regards to hooking up, have a look at the IR pin definitions in config_IR.h, there for ESP32s the emitter pin is defined as 14, which on the TTGO T-Beam seems to be fine, but with the receiver pin as 26 this would have to be changed, as 26 on the TTGO T-Beam seems to be internally assigned to the LORA module, so a redefinition in your above custom environment with the addition of '-DIR_RECEIVER_GPIO=25' should do the trick, from a quick look at the pinout for TTGO T-Beam.

I hope the above makes it clearer on how to create custom environments for custom builds from source.

Thank’s alot! I’ll give it a try
Regards Håkan

I have included new environment as above in enviroments.ini and uncommented lines below in user_config.h:
#define ZgatewayRF “RF” //ESP8266, Arduino, ESP32
#define ZgatewayIR “IR” //ESP8266, Arduino, Sonoff RF Bridge
Either or both uncommented gives compile errors. seems that irrecv.h could not be found and JsonObject not defined. With RF and IR option deselected it compiles ok.

Se image for errors.

Am I missing something else to change?? Any idea how to solve this ?

The above example environment was for IR (and LORA if still desired), including the relevant lib_deps and build_flags, the latter being the defines from user_config.h - so there they should be left commented.

If you also want to include RF add the same required lib_deps and build_flags from a simple RF environment, like [env:esp32dev-rf] to extend your custom environment.

Hi
Thank’s for all help. Now it compiles without error and connecting to my broker. I had to change pin defs due to conflict with SPI-pins. Haven’t hooked up IR/RF yet but hopes it will work. Below is my env section, does it seems to be correct?
[env:ttgo-t-beam-ir]
platform = ${com.esp32_platform}
board = ttgo-t-beam
board_build.partitions = min_spiffs.csv
lib_deps =
${com-esp.lib_deps}
${libraries.wifimanager32}
${libraries.lora}
${libraries.irremoteesp}
${libraries.rc-switch}

build_flags =
${com-esp.build_flags}
‘-DZgatewayLORA=“LORA”’
‘-DZgatewayRF=“RF”’
‘-DZgatewayIR=“IR”’
‘-DIR_RECEIVER_GPIO=25’
‘-DIR_EMITTER_GPIO=33’
‘-DRF_RECEIVER_GPIO=13’
‘-DRF_EMITTER_GPIO=2’
‘-DGateway_Name=“OpenMQTTGateway_TTGOTBEAM_IR_RF”’

Best Regards Håkan

Hi,

Looks good to me, and hope it’ll work all fine when you hook up your IR and RF parts.

Actually, if you also remove
${libraries.lora}

‘-DZgatewayLORA=“LORA”’

as it might interfere with your wanted RF functionality and is not required for your desired set-up.

All the best.

1 Like