Pete's Blog Virage - KS7012 Generic Tuya Dimmer

Blog posts by pete_c

pete_c

Guru
Installed / tested 30th of March, 2022 2000 c

KS-7012.jpg


This are known as Virage or generic KS-7012.

Hardware required / used (purchased from Amazon) for JTAG

1 - DSD TECH USB to TTL Serial Adapter with FTDI FT232RL Chip Compatible with Windows 10, 8, 7 and Mac OS X $12.49 USD * note this is my favorite one out of many I have used.
2 - EDGELEC 120pcs Breadboard Jumper Wires 20cm Wire Length Optional Dupont Cable Assorted Kit Male to Female Male to Male Female to Female Multicolored Ribbon Cables $6.99 USD
3 - Laptop with Wireless and network port (personally use Ubuntu Linux). Any old laptop will do or any old desktop will do.
4 - screwdriver set - here is a cheapo set on Amazon - Mini Screwdriver Set with 42 Bits, VCELINK 45 in 1 Small Precision Screwdriver Bit Set, Magnetic Tiny Screwdriver Kit with Tweezers & Extension Shaft for Laptop, PC, Phone, Computer, Game Console $12.99 USD
5 - old computer cord - cut the female end off and strip the end wires. You will only need the black and white wire for testing.

Software Required

1 - Tasmotizer (personally use Linux here). Very nice GUI. I used to use command line Python to do this a few years back.

NOTE: Tuya-Convert (OTA) does not work with these switches

Virage Labs VirageDimmer

Purchased these in bulk last year for around $13 each.

Virage Labs is now closed. I did test their Tasmota firmware and it did work when I tested it.

Virage Labs

VirageLabs created a proprietary HA add on which worked when I tested it.

Dimmer Instructions are attached.

Original custom Tasmota Virage Dimmer firmware is also attached.

Firmware

Currently utilizing most current version of Tasmota with these switches.

This is a revisit here relating to taking them apart and programming them with Tasmota.

Pictorial will be posted here for taking them apart. It is much more difficult to take them apart than to update them with Tasmota.

Taking apart the Virage KS7012 switch for JTAGing with Tasmota. (total 10 tiny screws optionally or 6 if you do not remove main board).
1 - remove two screws on the back cover.
2 - remove cover and heat sink and flip up regulator
3 - remove 4 corner screws and lift off back cover
4 - there are small little tabs connected to switches, remove these.
5 - remove 4 screws holding faceplate board and remove board. (optional and easier for me)

pictures3.jpg

Tiny pieces of plastic switches / a couple of springs inside of the switch.

JTAG and Upgrading firmware to Tasmota - solderless methodology

1 - connect left side pins VCC, Ground, RX and TX.
2 - connect gpio 0 (I00) to ground
3 - run Tasmotizer
4 - plug in and auto connect to board
5 - upgrade firmware to latest Tasmota Bin.
6 - unplug USB TTL stick and disconnect GPIO 0 from ground
7 - power up board with USB TTL stick (I left the RX/TX cables in place)
8 - you will see the board boot up in AP mode
9 - connect to AP mode of Tasmota and configure it to connect to your home AP
10 - it will reboot and get a DHCP address from your home LAN
11 - connect to the IP and you will see Tasmota unconfigured.
12 - put it back in the switch case...and make sure there are no extra screws left when you are done.

Virage-JTAG.jpg
Configuration of Tasmota Tuya KS-7012 (Easy Button way)

1 - using the cut computer cord attach it to the black and white leads using wire nuts. Also put wire nuts on all of the free leads from the switch. Be carefull. Plug the computer cable in to a power strip.

p13.jpg

2 - Go to IP of new device. Here just looked at the firewall to look for new device in the DHCP list.
New unconfigured device here is named: tasmota-1E2278-0632 with IP of 192.168.244.252

Continued on next post.


20th of April, 2023
- Updating this post via my back up Internet (T-Mobile LTE modem) which is working fine today as XFinity will probably be down all day. The Ooma and Obi VOIP boxes work fine via the T-Mobile LTE modem (connected to PFSense).
 

Attachments

  • 1ee0de7c-b77e-4493-9a65-08e6c0737b3e.pdf
    935.2 KB · Views: 0
  • VirageDimmer_3-2-1.zip
    338.2 KB · Views: 0
  • FireShot Capture 171 - KitchenTable - Console - 192.168.245.242.jpg
    FireShot Capture 171 - KitchenTable - Console - 192.168.245.242.jpg
    108.7 KB · Views: 18
Last edited:
3 - Set the time. Here utilize the Tasmota Timezone Table
For America / Chicago type the following in the console.
Backlog0 Timezone 99; TimeStd 0,1,11,1,2,-360; TimeDst 0,2,3,1,2,-300
Also configure ntpserver1,2,3. I use GPS/PPS on the PFSense box so type in the router IP for ntpserver1
and 0.north-america.pool.ntp.org for ntpserver2 and 2.north-america.pool.ntp.org for ntpserver3
IE: ntpserver2 0.north-america.pool.ntp.org
I also put longitude and latitude in. Check sunrise / sunset times in the timer section under configuration.

4. Go to Tasmota==> Configuration ==> Configure Module ==> Tuya MCU (54)

5. Go to Tasmota Main Menu = > restart + go back to configure module and you will see GPIO 1 configured for Tuya Tx and GPIO 3 configured for Tuya Rx.

6 - Go to the console and type weblog 4 to configure the Tuya chip.

Installation of Tasmota Tuya Helper ==> (optional)



Webpage snapshot of Tasmota Tuya Helper

fireshot-capture-171-kitchentable-console-192-168-245-242-jpg.11041


7. In the console now you will see the Tuya communications. By default you will only see an on off toggle for the switch and no dimming functions. Personally here in my batch of switches some are using a red-green LED (very dim) and some are using a blue-green (bright) center LED.

8. Manually toggle the switch to full brightness watching the console and write down the value you see for full brightness

9. Manually toggle the switch to lowest level watching the console and write down the value you see for full dimming.

10. Use these values to set the dimming range.

Status Update 27th of April 27, 2023

Found a "bad" KS7012 switch. The Tuya communications would quit working after a day or two. I would have to disconnect the main power to the switch then enable it and all would be ok. The switch lost the Tuya connection 3 times in two days. Replaced the switch with another switch.

Status update 4th of May, 2023

Replacement of KS7012 switch has worked fine. Easy peasey way to check is to look at the console setting weblog 4 and using Tuya Helper.

kitchentable.jpg
 
Last edited:
Back
Top