Open Barabba11 opened 1 month ago
It's also complicated for me to understand how to drive the dimmer, in your example you have inject nodes and function it produces:
msg.payload ={ dps: 20, set : true}
for turn on, what is dps? it should be always 20? How can I set the dimming value?
proceding with tests, broadcast packet UDP:7000 from app looks only announcement, the dimmer connects by Bluetooth when near or cloud, there is no direct IP connection neither LAN broadcast command to dimmer. It looks to me these devices should be refleshed to get control from LAN, amazing
Hi, I've several problems implementing it, first I've complained with the guide written in TuyAPI about the connection guide, I've done all the stept and now I'm wondering to now if somthing is wrong with module, cause I can't connect Thank you for your kind reply, I'm ready to collaborate to know things better and improve our results.
Here are the results of my experiment, what I wrote there:
My device, which is a S1-B (WT) trailing/leading Tuya edge triac, no battery and direct to AC power, here are the results of my experimenting: 1) When I wrote the post I was working only with Bluetooth, I've understood it today when deelply I've analyzed my LAN trafic and understood the device wasn't connected to WiFi at all. Since cloud recognized the device I thought it was online, I was wrong.. those datas are submitted by Smart Life app, doesn't matter the device itself, so be careful here.
2) I've deleted, pressed button and paired again, now I saw on my router 2 new MACs, one of them asked for IP and present itself with name wlan0, the second which shares the same first bytes values and differs only on the last 2, disappeared after minutes. The dimmer broadcasts regulary on LAN with UDP dest port 6667 The dimmer keeps alive the connection with 3.76.16.47:8883 and from this address (cloud) receives command when is not connected on the same WiFi name as dimmer, and here I got 2 casesM a) if LAN has another WiFi on the same IP subnet/Layer2 broadcast it worked only by cloud, stopping gateway it didn't work more (bluetooth also off), when I switched phone to the same wifi it worked back. b) on the second attempt it worked also with the second wifi, the app start controlling the dimmer using broadcast LAN address with UDP destination port 7000. Probably it attempt to connect with broadcast at beginning, if dimmer doesn't reply it fails somehow and don't attempt more.
3) the app is broadcasting UDP to 255.255.255.255:7000 each time a command is set, which is not the LAN broadcast, this packet is probably useless, I'm not sure it becomes with broadcast MAC destination since it's out of subnet, it will die on the router. The app does try use the correct LAN broadcast only when cloud and bluetotth are unavailable. The app never connect directly to the dimmer IP
Now, using the module, assuring dimmer is cloud connected, I can't connect with it by ID and neither by its IP: 1) using ID + secret (which I obtained by tuya-cli wizard), I can't connect with any 3.1 3.2 and 3.3 protocols, I always have "connecting" 2) By IP, using the known right IP of device, I got timeout errors. It's stange to try a direct connection since the Smart Life app doesn't try this, it uses the broadcast LAN IP to send UDP on port 7000, I've tried specify there also the broadcast address but same result, probably the device never answer on LAN requests, I can ping device, no TCP porta are listening/answer, on UDP to get an answer you need to send proper command.
What can I do? Thanks