For this new article we will adapt a new device; the SMART RF & WIFI GATEWAY or SMART HOME MODEM (difficult to have the real name with this kind of generic product ...)
The shape of the stick and its theoretical abilities attracted me at first time in aliexpress, I was asking myself what kind of microcontroller handle the wifi and RF on this size.
A simple package with a short user manual and the USB Stick.
At the rear a link enable to download an app, but it is not the way I want to go.
If with a screw driver or a knife we open it, we can see a surprise !
It seems to have an ESP on it.
We can see also a buzzer, a button and 2 leds. At the right we see the 433mhz antenna with its decoder.
The part of the uC back that we can see looks like a lot with the back side of an ESP12
.We see also 4 small holes that remind us the kind of programming holes present on the SONOFF devices. Do they enable to flash the chip?
By checking with a multimeter and seeing the pinout we can verify that the first one is connected to GND (black), second one to RX (yellow), third one to TX (orange).
Regarding VCC power we will use a separate power supply through the USB plug.
Once this check done I connected an FTDI following this principle:
- BOARD GND - FTDI GND
- BOARD RX - FTDI TX
- BOARD TX - FTDI RX
I tried to upload many times without success, after rechecking the flashing prerequisites of the ESP12 I saw that GPIO0 must be at connected to ground, and it is not the cas per default of this board.
Let's connect GPIO0 to GND and see what happens
And it is flashed!!
Let's go in deep into this flashing process:
- Connect the FTDI to the board and the ground to GPIO0
- Connect the FTDI to your computer
- Power the board with an external power source through USB
- Open your arduino IDE or platformio
- With platformio type the following command: platformio run --target erase
- With the arduino IDE :Erase flash "All flash content" & DOUT mode
- And now you can flash it with OpenMQTTGateway
The board is an ESP8266, here is the configuration used with PIO in the platformio.ini file:
[env:rf-wifi-gateway]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_RF"'
'-DRF_RECEIVER_PIN=5'
board_build.flash_mode = dout
The RF receiver use the GPIO5, after some test we can see that:
the buzzer is on GPIO15,
the blue LED on GPIO14
the red LED on GPIO16.
But I didnt found which pin the button is connected to ...
After some tests of sending RF signals the device doesn't seems to support it.
Indeed I can't see any dedicated circuit for sending.
Indeed I can't see any dedicated circuit for sending.
Nevertheless this ESP8266 board with an integrated RF receiver is quite interesting and fully compatible with OpenMQTTGateway.
Hi there, first thanks for all the great work you spend into this project. I'm new to OpenMqttGateway and with this great instructions I got the binary version successful flashed on the WIFI GATEWAY. As I would like to use the KAKU protocol I bought this device as it's listed to support that. KAKU is according to my reading only supported with RF2 or pilight protocol - which does not exist pre-build. I compiled my own version of RF2 and pilight (everything is duplicated from the generic esp8266 RF2/pilight section except of -DRF_RECEIVER_PIN=5 that parameter). I could not get the device to receive any signal on pilight or RF2 - only with the pre-build rf firmware it worked. Wondering if I'm doing something wrong or if the device does simply not support pilight or RF2.
RépondreSupprimerHi Herbert,
RépondreSupprimerThis device should support KAKU with RF2 gateway as there is no separate decoding chip.
Ce commentaire a été supprimé par l'auteur.
RépondreSupprimerHi, Do you have another ESP with an RF receiver, so as to check if flashed with RF2 you are receiving your KAKU signals.
SupprimerI have a raspberry pi with an pilight instance which is receiving the KAKU signal from the switch. I don't have another ESP with 433 receiver available
RépondreSupprimer