xoseperez / espurna

Home automation firmware for ESP8266-based devices
http://tinkerman.cat
GNU General Public License v3.0
2.99k stars 637 forks source link

Espurna for other relays #414

Open xoseperez opened 6 years ago

xoseperez commented 6 years ago

Originally reported by: Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66)


Good morning, You can upload the firmware espurna for these relays:

https://www.banggood.com/it/Geekcreit-2-Channel-AC-85V-250V-APP-Remote-Control-WIFI-Wireless-Switch-Socket-For- Smart-Home-p-1114958.html? rmmds = Myorder & cur_warehouse CN =

https://www.banggood.com/2-Channel-Mobile-WIFI-Remote-Control-Switch-Motor-Reversible-Relay-Module-p-1138666.html?rmmds=myorder&cur_warehouse=CN

xoseperez commented 6 years ago

The goal would be to have a hardware definition to add it to the hardware.h file. So far I understand that, except for the second device which might have gone through a bad flash, relays are just lie in the R2 but buttons are not. Best way would be to do a continuity test to see what goes where...

Actually best way would be to contact the manufacturer and ask them for the schematic of the device :)

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


Third and last device of the system and connected with ewelink: disassembling from the wall box, welded dupont cables on Pin PSF-B04 Tx and Rx and GPIO0 to be connected to ground before flash, loaded firmware espurna-1.12.1-itead-sonoff -dual-r2.bin ... everything ok, the LEDs of the relays and the leds of the wifi work well and works well from the web borwser, but if I press switches on the device it seems that they only work by buttons ... pulse for less than a second , for me the buttons are not a problem because I will go to cash the device and control everything from Lan and remotely via MQTT. I will do other tests to see what did not work on the second device as it seems dead and does not even see the wifi. I will further update you that it does not disturb you and if you care

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


Stop, first device all ok with Dual R2, I removed from the wall the second device that was connected to ewelink, I did the same procedure as the first and I flash Dual R2 ... but it does not work. I do other tests and update you on this.

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


yes, exactly Dual r2 and both leds and buttons work

xoseperez commented 6 years ago

So you confirm it has the same pin configuration as Dual R2? Including LEDs and buttons?

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


everything is OK, saladATO GPIO0 on the second pin PSF-B04, soldered Tx and Rx on PSF-B04 pins, Vcc and ground, bridge GPIO and ground and it has entered flash mode. Electrodragon image is not good, Motor Clockwise / Anticlockwise not vabene. Uploaded espurna-1.12.1-itead-sonoff-dual-r2.bin and finally everything is ok. Thank you

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


Or error:trying to connect flush start setting serial port timeouts to 1 ms setting serial port timeouts to 1000 ms flush complete espcomm_send_command: sending command header espcomm_send_command: sending command payload espcomm_send_command: receiving 36 bytes of data warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08 warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


Error: trying to connect flush start setting serial port timeouts to 1 ms setting serial port timeouts to 1000 ms flush complete espcomm_send_command: sending command header espcomm_send_command: sending command payload serialport_receive_C0: DD instead of C0 warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed

xoseperez commented 6 years ago

GPIO0 is the tenth pin of the PSF-B04 counting from the antenna. In the picture you attached is the second counting from the right of the top row of pads.

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


any idea where to find GPI0 for flash mode?

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


and i can not get into flash mode

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


Perhaps it is more similar as a card to IteadStudio Motor Clockwise / Anticlockwise. what do you think?

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


ef8910d3-2e84-46c0-a5d3-51c058243f4d.jpg I just received the article that I was talking to you a few days ago, I still have not tried to load Espurna for Electrodragon board, because it seems different ... it has three buttons and three modes, Jogging, Inter lock, auto-lock, you still recommend me to try with Espurna for Electrodragon board?

xoseperez commented 6 years ago

No problem. Let me know if/once you flash them with Electrodragon image.

xoseperez commented 6 years ago

Original comment by Carmelo (Bitbucket: Carmelo66, GitHub: Carmelo66):


I did not do any flash on these as they are mounted on shutters with ewelink, on others are sonoff and I have quietly loaded Espurna basic. Maybe I try to order another and as soon as I get there I try to flash with Electrodragon WiFi and let you know. Sorry for my bad english I'm italian.

xoseperez commented 6 years ago

They look like Electrodragon WiFi IoT boards... have you tried flashing them with the ESPurna image for the Electrodragon board?

jgyoldi commented 6 years ago

Hola @xoseperez,

Conseguiste algo con este módulo: https://www.banggood.com/it/Geekcreit-2-Channel-AC-85V-250V-APP-Remote-Control-WIFI-Wireless-Switch-Socket-For-Smart-Home-p-1114958.html

Yo lo tengo y querría cargar un firm de Tasmota o Espurna para usarlo con MQTT y Domóticz. Con Ewlink me funciona bien pero claro, no tengo acceso desde Domóticz para integrarlo.

¡Gracias!

xoseperez commented 6 years ago

El problema es que no tengo la documentacion necesaria ni el dispositivo com opara poder configurarlo.

jgyoldi commented 6 years ago

Gracias. Realmente no se sabe quién es el fabricante, ¿verdad?

En ewelink me dice que el fabricante es New Smart y el modelo G2. pero con eso no he encontrado nada ...

El mié., 11 abr. 2018 19:11, Xose Pérez notifications@github.com escribió:

El problema es que no tengo la documentacion necesaria ni el dispositivo com opara poder configurarlo.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xoseperez/espurna/issues/414#issuecomment-380527799, or mute the thread https://github.com/notifications/unsubscribe-auth/AeN6jwuPsqGoPXbFxhBWwrooRNoMxNzDks5tnjlXgaJpZM4TP-CQ .

jgyoldi commented 6 years ago

Xose, what do you need to start developing Espurna firm for this hardware? may I help you?

xoseperez commented 6 years ago

Grab a multimeter, set it to continuity mode and reverse engineer the board. Find out what ESP8266 GPIOs are connected where.

I can see in the pictures two additional IC, one of them might be a radio decoder (a PT2262?) and the other one could be a I/O extension which is not supported atm...

jgyoldi commented 6 years ago

OK. Next week I am quite busy. I will try to find some time to check it.