Recently i bougth the VM201 and wan’t to control this unit with a showcontrol device. To make this work I need the code to set a output on of off.
I found the code to set output 1 on or off. The code looks like this;
on: 02 06 4F 01 A8 03
off: 02 06 46 01 B1 03
So i’m able to switch relais 1 from on to off and vice versa.
My calculatings for the other ports are always wrong.
I’ll take a moment to show you how the checksum is calculated
First take the sum of all bytes up until the checksum byte: 02 + 06 + 4F + 01 = 58
Then invert this number (the not function on the Windows calculator): not 58 = A7
Add one: A7 + 1 = A8
How you decide which channel to toggle:
The byte right after 4F is a bitmask of the channels you want to toggle. You will need to calculate this in binary, for example:
00000001 = 01 = switch on channel 1 = 02 06 4F 01 A8 03
00000011 = 03 = switch on channel 1 & 2 = 02 06 4F 03 A6 03
10000000 = 80 = switch on channel 8 = 02 06 4F 80 29 03
11111111 = FF = switch everything on = 02 06 4F FF AA 03
I hope I didn’t make any miscalculations, since it’s already late in the evening