Conessione wifi wpi354 tuya arduino

salve non riesco a collegare il modulo wpi354 all’app tuya ne in modalita AP ne in modalita accopiamento avete qualche consiglio da darmi?

Hello @cilie74

We tested a new WPI354. The latest library from tuya (Tuyav by Velleman version: 1.2.0 & 1.2.1)

It’s no longer compatible with Arduino Uno (due to low memory). Arduino Mega and Arduino Nano Every are compatible.

The older library 1.0.0 to 1.1.0 does work on Arduino Uno. But for linking, it is not identical to the latest library. This is done through software. Hence it does not work via the button. And due to the more difficult linking procedure, the old library has been updated to a newer version to simplify linking.

We recommend using Arduino Nano Every or Arduino Mega mega with this interface.
If you then use this library “Tuyav by Velleman” and use example code (Basic_IO_example) it will work.
As well as pairing (press the interface push button for +/- 5 seconds => blue LED flashes).

For Using Arduino Uno or Nano

Use the older library of Tuya => version: 1.0.0 https://github.com/Velleman/Tuyav/archive/refs/tags/v1.0.0.zip
When Tuyav library is installed in Arduino IDE via Library manager (Install verision 1.0.0)
. the open the sketch example: File => Examples => Tuyav =>
Tuyav_example

For Arduino Mega or Nano Every you can use the newest library: V1.2.1: GitHub - Velleman/Tuyav

For Arduino uno folow this:

Check the serial connection. Make sure that TX of Tuya board is connected to RX (PIN 2) of Arduino,
and RX of Tuya board is connected to TX (PIN3) of Arduino board.

/*
NOTE:
Recommended RX,TX => use pin 2 and pin 3 of arduino!
Make sure it’s not connected to the TX,RX pin 1 and 2 of arduino!

See below the pin assignments for Arduino Mega as well.

* Connections:
* VMA354 Arduino UNO Arduino MEGA
* VCC 5V 5V
* GND GND GND
* TX RX (pin2) RX1 (pin19)
* RX TX (pin3) TX1 (pin18)
*/

#include "Arduino.h"
#include "Tuyav.h"
#include "global.h"

#if defined(ARDUINO_AVR_UNO)
//User can choose SoftwareSerial
//you can choose your own pins
SoftwareSerial mySerial(2,3);
Tuyav tuyav(&mySerial);
#else // Mega
//User can choose HardwareSerial: Serial1/Serial2/Serial3
// Serial1 is pin 18/19 on a Arduino Mega
Tuyav tuyav(&Serial1);
#endif
//Initialize Time for updating Arbitrary Values
unsigned long previousTime = 0;
bool isLampOn = false;

void setup() {

/*
*If user does not use a pin: set the pin as PIN_UNUSED
*PIN 18 is A5
*/

tuyav.setDigitalInputs(8, 12, 18); //Set DigitalInputs: needs 5 pins
tuyav.setAnalogInputs(A0, A1, A2); //Set AnalogInputs
tuyav.setDigitalOutputs(13, 4, 5, 6, 7); //SetDigitalOutputs
tuyav.setAnalogOutputs(9, 10, 11); //Set AnalogOutputs

//UNCOMMENT NEXT LINE TO PAIR THE MODULE, COMMENT THE LINE AFTER PAIRING AND REFLASH THE ARDUINO
//Next line should only be executed once
//tuyav.setWifiMode(SMART_CONFIG_STATE);

**tuyav.initialize();**

}

To set up the Wifi connection:

Use the TuyaSmart app.
For android devices: https://play.google.com/store/apps/details?id=com.tuya.smart&hl=nl
For apple devices: ‎Tuya Smart on the App Store

Open the TuyaSmart app, and add a device.
Follow the wizard. Connect Your phone or tabled with Your Wireless router, and give in Your SSID and password. Now, push and hold the button on “Tuya board” (VMA354) for 5 seconds, till the RED LED flashes. Then confirm if the led blinks in the wizard. The app will now searching for Tuya boards (devices). If there’s found one, it will be added to Your Wifi network.

Hope to have informed you sufficiently with this.

Best Resgards,
Velleman Support

Ciao, ecco alcuni consigli che potrebbero aiutarti a collegare il modulo WPI354 all’app Tuya:

  • Assicurati che il modulo WPI354 sia collegato correttamente alla rete Wi-Fi.
  • Assicurati che l’app Tuya sia aggiornata all’ultima versione.
  • Prova a connettere il modulo WPI354 in modalità accoppiamento.

Se hai seguito questi consigli e continui a riscontrare problemi, puoi contattare il supporto Tuya per assistenza.

@johnsmiht34

Please post in english so other forum member could follow:

Hi, here are some tips that might help you connect the WPI354 module to the Tuya app:

Make sure the WPI354 module is correctly connected to the Wi-Fi network.
Make sure the Tuya app is updated to the latest version.
Try connecting the WPI354 module in pairing mode.
If you have followed these recommendations and are still experiencing problems, you can contact Tuya support for assistance.

Hi sorry unfortunately I don’t speak English from now on I will use the translator.
Anyway, I can’t connect in any way, neither in AP nor in normal pairing. I also tried to deactivate the 5G WiFi, the connections are ok since the LED of the module turns on and flashes only after the relative command has been transmitted from the Arduino Mega.
if I set the module in the ap I see the network generated by the module I connect to it with my mobile phone but the tuya app does not recognize the device the version of the tuya app is 5.7.0

Thank you

salve scusate purtroppo no parlo inglese da ora in poi usero il traduttore .
cmq non riesco in nessun modo a collegarmi ne in ap ne in normale accoppiamento ho provato anche a disattivare il wifi 5g, i collegamenti sono ok visto che il led del modulo si attiva lampeggiante solo dopo la trasmissione da arduino mega del relativo comando .
se imposto il modulo in ap vedo la rete generata dal modulo mi ci connetto con il cellulare ma l’app tuya non riconosce il dispositivo la versione di tuya app e’ la 5.7.0

grazie