Sc500w-v2 loratap curtain/blind switch

Unfortunately I wasn’t able to flash this curtain switch, so I’m left with TuyaSmart…

Luckily there is a plug-in that connects to the Tuya cloud and let you control these switches. Not my preferred way of controlling things, but hey what else can I do when flashing to tasmota fails for some strange reason.

Installation all went well and Nymea is connected to the tuya cloud and the two switches appear in nymea. Totally happy now!

Until … lowering one off the blinds and no action on the switch. Tried it via TuyaSmart and everything works ok.

Any ideas? Do I have to manually allow some service or something?

Thanks again!

Regards,

André

Hi André ,

right, I had implemented that Tuya plugin only having a Tuya smart plug. So I added the curtain functionality blindly without having a device to actually test it. Seems I made a mistake there. I’m on my way to bed right now but I’ll look at this asap.

In the meantime, you can help me with doing the following:

Go the system settings, developer tools and enable the debug interface. From there you’ll get into a webinterface where you’ll find a Logs tab. In there, enable the the logs for the Tuya plugin. Then reproduce the issue and send me the logs please.

There shouldn’t be any passwords or tokens in the logs, but if you care about privacy, feel free to PM me the logs instead of posting them here.

Regards,
Michael

1 Like

Hi Michael,

Great to hear that you never had the change to test the curtain switches. So we know it can work.

I did enable the logging for Tuya and here are the results:

I | Tuya: “Tuya cloud login” Updating child devices
I | Tuya: Devices fetched
I | Tuya: Found existing Tuya cover “Zonnescherm” “ID” “Zonnescherm” online
I | Tuya: Found existing Tuya cover “Rolluik” “ID” “Rolluik” online
W | WebServer: Webinterface folder “//usr//share//nymea-webinterface//public//” does not exist.
W | WebServer: Webinterface folder “//usr//share//nymea-webinterface//public//” does not exist.
I | Tuya: “Tuya cloud login” Updating child devices
I | Tuya: Devices fetched
I | Tuya: Found existing Tuya cover “Zonnescherm” “ID” “Zonnescherm” online
I | Tuya: Found existing Tuya cover “Rolluik” “ID” “Rolluik” online
I | Tuya: “Zonnescherm” Controlling Tuya switch. Parent: “Tuya cloud login” command: “turnOnOff” value: “1”
W | Tuya: Json parser error in control switch reply “illegal value” “INVAILD_REQUEST_3”
I | Tuya: “Tuya cloud login” Updating child devices
I | Tuya: Devices fetched
I | Tuya: Found existing Tuya cover “Zonnescherm” “ID” “Zonnescherm” online
I | Tuya: Found existing Tuya cover “Rolluik” “ID” “Rolluik” online
I | Tuya: “Zonnescherm” Controlling Tuya switch. Parent: “Tuya cloud login” command: “startStop” value: “0”
W | Tuya: Json parser error in control switch reply “illegal value” “INVAILD_REQUEST_3”
I | Tuya: “Zonnescherm” Controlling Tuya switch. Parent: “Tuya cloud login” command: “turnOnOff” value: “0”
W | Tuya: Json parser error in control switch reply “illegal value” “INVAILD_REQUEST_3”
I | Tuya: “Zonnescherm” Controlling Tuya switch. Parent: “Tuya cloud login” command: “startStop” value: “0”
W | Tuya: Json parser error in control switch reply “illegal value” “INVAILD_REQUEST_3”
I | Tuya: “Tuya cloud login” Updating child devices
I | Tuya: Devices fetched
I | Tuya: Found existing Tuya cover “Zonnescherm” “ID” “Zonnescherm” online
I | Tuya: Found existing Tuya cover “Rolluik” “ID” “Rolluik” online

Actions I executed: Up,Stop, Down, Stop

Hope this helps.

Regards,

André

1 Like

Thanks for the logs. It has been helpful. I have looked into the plugin code and indeed found an issue.

Could you please go to app settings, system updates. In there you’ll find a settings button in the upper right corner where you can enable the testing repository (don’t enable experimental). After that you should get updates for the plugins. Once that’s done, restart nymea and if all goes well it should be working now.

Please let me know how it goes.

1 Like

Hi Michael,

Thanks for the udate!

Enabled the test repository and updated nymea.
Both Tuya curtain switches are working now!

Thanks!

Regards,

André

1 Like

Great, thanks a lot for the feedback.

The fix will be included in the next stable release.

You probably want to disable the testing repository again now. It won’t downgrade your system and will continue to use the stable upgrade path then.

2 Likes

Hi Foenky, which method did you use to flash, GPIO with raspberryPi or the USB-to-serial?

Hi Bojan,

I tried flashing with the usb to serial. That didn’t work for me.

Regards,

André

Hi Andre,

Could you please share the original SC500W-V2 firmware?

Thanks.

Hi FaN,

That’s way over my league. The devices are in use right now and I don’t have the original firmware downloaded or something like that.

Also not sure how to do this. Sorry.

Regards,

André

Oh, understood.
I was sure you have backed up the original firmware before you have tried to flash Tasmota.
I have V1 version, works great, wanted to have V2 option as I have push-button switches in some places.

Thanks.

Fwiw, some time ago I flashed some tuya devices manually and wrote the steps down in here: https://www.hackster.io/michael_zanetti/smartlife-tuya-wifi-light-switch-with-tasmota-and-nymea-09a7a6?utm_campaign=new_comment_for_project&utm_medium=email&utm_source=hackster#comments

Maybe that helps to achieve what you’re looking for.

Thanks mzanetti,
I have flashed HAA, works perfect, directly with HomeKit, including shutter percentage.

Thanks.

Hi Michael,

Here I am again on the tuya devices … After some updates in Nymea I have a sunscreen that is going down a little bit (25% I guess) and then it stops. Using the stop button and the down button again it continues to go down all the way. Any ideas?

Regards,

André

Hey @Foenky,

The cloud server seems to have introduced some API limits now that the nymea plugin was exceeding and that caused issues recently. This is already fixed in experimental (and will be in testing very soon now).

Now, from your error description I’m not sure if it’s actually that issue. Could you please provide the logs for the tuya plugin when reproducing this issue? (system settings -> dev tools -> debug interface -> logs tab -> enable tuya).

Michael,

Hereby the logs from my tuya sunscreen:

I | Tuya: “Tuya cloud login” Updating child devices
W | Tuya: Invalid data from Tuya cloud: “{\n “header”: {\n “code”: “FrequentlyInvoke”,\n “msg”: “you can discovery once in 600 seconds”,\n “payloadVersion”: 1\n },\n “payload”: {\n }\n}\n”
I | Tuya: “Tuya cloud login” Updating child devices
W | Tuya: Invalid data from Tuya cloud: “{\n “header”: {\n “code”: “FrequentlyInvoke”,\n “msg”: “you can discovery once in 600 seconds”,\n “payloadVersion”: 1\n },\n “payload”: {\n }\n}\n”
I | Tuya: Controlling Tuya device Thing(“Zonnescherm”, id: “{5b6ea077-e727-4935-bcd3-843b0f8f1def}”, ThingClassId: “{d4bb0170-596d-4904-8fd0-fd8e7ad39f72}”) . Parent: “Tuya cloud login” command: “turnOnOff” value: “0”
I | Tuya: Device controlled
W | Tado: Request error: 401 “Host requires authentication”
W | Tado: Request error: 401 “Host requires authentication”
W | Tado: Request error: 401 “Host requires authentication”
W | Tado: Request error: 401 “Host requires authentication”
I | Tuya: “Tuya cloud login” Updating child devices
W | Tuya: Invalid data from Tuya cloud: “{\n “header”: {\n “code”: “FrequentlyInvoke”,\n “msg”: “you can discovery once in 600 seconds”,\n “payloadVersion”: 1\n },\n “payload”: {\n }\n}\n”
I | Tuya: “Tuya cloud login” Updating child devices
W | Tuya: Invalid data from Tuya cloud: “{\n “header”: {\n “code”: “FrequentlyInvoke”,\n “msg”: “you can discovery once in 600 seconds”,\n “payloadVersion”: 1\n },\n “payload”: {\n }\n}\n”
W | Tado: Request error: 401 “Host requires authentication”
W | Tado: Request error: 401 “Host requires authentication”
W | Tado: Request error: 401 “Host requires authentication”
W | Tado: Request error: 401 “Host requires authentication”
I | Tuya: “Tuya cloud login” Updating child devices
W | Tuya: Invalid data from Tuya cloud: “{\n “header”: {\n “code”: “FrequentlyInvoke”,\n “msg”: “you can discovery once in 600 seconds”,\n “payloadVersion”: 1\n },\n “payload”: {\n }\n}\n”
I | Tuya: “Tuya cloud login” Updating child devices
W | Tuya: Invalid data from Tuya cloud: “{\n “header”: {\n “code”: “FrequentlyInvoke”,\n “msg”: “you can discovery once in 600 seconds”,\n “payloadVersion”: 1\n },\n “payload”: {\n }\n}\n”
I | Tuya: Controlling Tuya device Thing(“Zonnescherm”, id: “{5b6ea077-e727-4935-bcd3-843b0f8f1def}”, ThingClassId: “{d4bb0170-596d-4904-8fd0-fd8e7ad39f72}”) . Parent: “Tuya cloud login” command: “startStop” value: “0”
I | Tuya: Device controlled
I | Tuya: Controlling Tuya device Thing(“Zonnescherm”, id: “{5b6ea077-e727-4935-bcd3-843b0f8f1def}”, ThingClassId: “{d4bb0170-596d-4904-8fd0-fd8e7ad39f72}”) . Parent: “Tuya cloud login” command: “turnOnOff” value: “0”
I | Tuya: Device controlled
W | Tado: Request error: 401 “Host requires authentication”
W | Tado: Request error: 401 “Host requires authentication”
W | Tado: Request error: 401 “Host requires authentication”
W | Tado: Request error: 401 “Host requires authentication”
I | Tuya: “Tuya cloud login” Updating child devices
W | Tuya: Invalid data from Tuya cloud: “{\n “header”: {\n “code”: “FrequentlyInvoke”,\n “msg”: “you can discovery once in 600 seconds”,\n “payloadVersion”: 1\n },\n “payload”: {\n }\n}\n”
I | Tuya: Controlling Tuya device Thing(“Zonnescherm”, id: “{5b6ea077-e727-4935-bcd3-843b0f8f1def}”, ThingClassId: “{d4bb0170-596d-4904-8fd0-fd8e7ad39f72}”) . Parent: “Tuya cloud login” command: “startStop” value: “0”
I | Tuya: Device controlled
I | Tuya: Controlling Tuya device Thing(“Zonnescherm”, id: “{5b6ea077-e727-4935-bcd3-843b0f8f1def}”, ThingClassId: “{d4bb0170-596d-4904-8fd0-fd8e7ad39f72}”) . Parent: “Tuya cloud login” command: “turnOnOff” value: “1”
I | Tuya: Device controlled
I | Tuya: “Tuya cloud login” Updating child devices
W | Tuya: Invalid data from Tuya cloud: “{\n “header”: {\n “code”: “FrequentlyInvoke”,\n “msg”: “you can discovery once in 600 seconds”,\n “payloadVersion”: 1\n },\n “payload”: {\n }\n}\n”

Hope this will help you.

Regards,

André

According to this log, nymea did send a “close” command and a bit later a “stop” command.

If you’re not pressing the stop button, it seems to be some rule that executed the stop action. You could inspect the system event log in system settings -> system logs. It might give some hints where it is coming from.

I had a bright idea and tested lowering the sunscreen via the tuya app.

Guess what? Same thing happens here, so I will speak to them first why this suddenly happens.

Strange, because it happens only when lowering the sunscreen.

Regards,

André

Just to be sure… If you happen to have some magic configured which for example would stop the sunscreen 3 seconds after it starts moving, that would still trigger, even if you’d start the lowering with the tuya app. Before contacting tuya I’d probably stop nymea completely and see if it’s still happening. Because according to your log nymea does send a stop command. So it’s likely that.

I have to press stop in order to fully lower the sunscreen. Otherwise it won’t do anything.

So I press close, sunscreen stops at 25%, press stop and press close again to fully lower the sunscreen.

It’s weird, but I will check Tuya …