<filename>device_dump.py
# -*- coding: utf-8 -*-

import argparse, os
from vedirect import Mpptsim
from vedirect import Vecommon
from vedirect import Vedirect

# ve = Mpptsim()
ve = Vedirect('/dev/tty.usbserial-VE4ZKFJZ',60, False)

print(ve.read_text_frame())
print ("========Below is command response ========")
for i in [1,3,4]:
    f,v = ve.send_command(":"+str(i))
    if f:
        print('{:d} : "'.format(i) + v + '",' )
print ("========Below is command 7========")
for i in range(65535):
    f,v = ve.send_command(":7"+ Vecommon.int_to_little_endian(i))
    if f:
        print('0x{:04X} : "'.format(i) + v + '",' )

# mppt_command_list = [
# 0x0100,0x0104,0x010A,0x010B,0x0140,
# 0x0200,0x0201,0x0202,0x0205,0x0207,
# 0xEDFF,0xEDFE,0xEDFD,0xEDFC,0xEDFB,0xEDF7,0xEDF6,0xEDF4,0xEDF2,0xEDF1,0xEDF0,0xEDEF,0xEDEC,0xEDEA,0xEDE8,0xEDE7,0xEDE6,0xEDE5,0xEDE4,0xEDE3,0xED2E,0xEDE0,0xEDCA,
# 0xEDEC,0xEDDF,0xEDDD,0xEDDC,0xEDDB,0xEDDA,0xEDD7,0xEDD5,0xEDD4,0xEDD3,0xEDD2,0xEDD1,0xEDD0,0xEDCE,0xEDCD,0xEDCC,0x2211,0x2212,
# 0xEDBC,0xEDBB,0xEDBD,0xEDB8,0xEDB3,
# 0xEDAD,0xEDAC,0xEDAB,0xEDA9,0xEDA8,0xED9D,0xED9C,0xED91,0xED90,
# 0xEDD9,0x0350,0x0351,0x0352,0x0353,0xEDBA,0xEDB9,0x100A,
# 0xEDA0,0xEDA5,0xEDA7,0xED9B,0xED9A,0xED99,0xED96,0xED97,0xED90,0x2030,0x2031,
# 0x104F,0x1050,0x1051,0x1052,0x1053,0x1054,0x1055,0x1056,0x1057,0x1058,0x1059,0x105A,0x105B,0x105C,0x105D,0x105E,0x105F,
# 0x1060,0x1061,0x1062,0x1063,0x1064,0x1065,0x1066,0x1067,0x1068,0x1069,0x106A,0x106B,0x106C,0x106D,0x106E,
# 0x0400,0x0401,0x0402,0x0403,0x0404,
# 0x2000,0x2001,0x2002,0x2003,0x2004,0x2007,0x2008,0x2009,0x200A,0x200B,0x200C,0x200D,0x200E,0x200F,0x2013,0x2014,0x2015,0x2018,0x2027
# ]

# bmv_command_list = [
# 0x0100, 0x0101,0x010A,0x010B,0x010C,0x0120,0x0150,
# 0xED8D,0xED7D,0xED8F,0xED8C,0xED8E,0xEEFF,0x0FFF,0x0FFE,0xEDEC,0x0382,0x0383,0xEEB6,
# 0x0300,0x0301,0x0302,0x0303,0x0304,0x0305,0x0306,0x0307,0x0308,0x0309,0x030A,0x030B,0x030E,0x030F,0x0310,0x0311,
# 0x1000,0x1001,0x1002,0x1003,0x1004,0x1005,0x1006,0x1007,0x1008,0x1009,0x1034,
# 0xEEFC,0x0320,0x0321,0x0322,0x0323,0x0324,0x0325,0x0326,0x0327,0x0328,0x0329,0x032A,0x032B,0x032C,0x032D,0x0331,0x0332,0x031F,
# 0x034F,0x034D,0x034E,0x100a,0x100b,0x0350,0x0351,0x0352,0x0353,0x0354,0x0355,0x0356,0x0357,0x035A,0x035B,0x035C,0x035D,0x0361,0x0362,
# 0xEEFE,0x0400,0xEEF5,0xEEE0,0xEEE1,0xEEE2,0xEEE3,0xEEE4,0xEEE5,0xEEE6,0xEEE7,0xEEE8,
# 0x1029,0x102c,0x0004,0x1030,
# 0xEEF9,0xEEF6,0xEEFB,0xEEFA,0xEEF7,0xEEF4,0xEEF8,0x0FFD,0xEC41,0x0090
# ]

<filename>device_dump.py
# -*- coding: utf-8 -*-

import argparse, os
from vedirect import Mpptsim
from vedirect import Vecommon
from vedirect import Vedirect

# ve = Mpptsim()
ve = Vedirect('/dev/tty.usbserial-VE4ZKFJZ',60, False)

print(ve.read_text_frame())
print ("========Below is command response ========")
for i in [1,3,4]:
    f,v = ve.send_command(":"+str(i))
    if f:
        print('{:d} : "'.format(i) + v + '",' )
print ("========Below is command 7========")
for i in range(65535):
    f,v = ve.send_command(":7"+ Vecommon.int_to_little_endian(i))
    if f:
        print('0x{:04X} : "'.format(i) + v + '",' )

# mppt_command_list = [
# 0x0100,0x0104,0x010A,0x010B,0x0140,
# 0x0200,0x0201,0x0202,0x0205,0x0207,
# 0xEDFF,0xEDFE,0xEDFD,0xEDFC,0xEDFB,0xEDF7,0xEDF6,0xEDF4,0xEDF2,0xEDF1,0xEDF0,0xEDEF,0xEDEC,0xEDEA,0xEDE8,0xEDE7,0xEDE6,0xEDE5,0xEDE4,0xEDE3,0xED2E,0xEDE0,0xEDCA,
# 0xEDEC,0xEDDF,0xEDDD,0xEDDC,0xEDDB,0xEDDA,0xEDD7,0xEDD5,0xEDD4,0xEDD3,0xEDD2,0xEDD1,0xEDD0,0xEDCE,0xEDCD,0xEDCC,0x2211,0x2212,
# 0xEDBC,0xEDBB,0xEDBD,0xEDB8,0xEDB3,
# 0xEDAD,0xEDAC,0xEDAB,0xEDA9,0xEDA8,0xED9D,0xED9C,0xED91,0xED90,
# 0xEDD9,0x0350,0x0351,0x0352,0x0353,0xEDBA,0xEDB9,0x100A,
# 0xEDA0,0xEDA5,0xEDA7,0xED9B,0xED9A,0xED99,0xED96,0xED97,0xED90,0x2030,0x2031,
# 0x104F,0x1050,0x1051,0x1052,0x1053,0x1054,0x1055,0x1056,0x1057,0x1058,0x1059,0x105A,0x105B,0x105C,0x105D,0x105E,0x105F,
# 0x1060,0x1061,0x1062,0x1063,0x1064,0x1065,0x1066,0x1067,0x1068,0x1069,0x106A,0x106B,0x106C,0x106D,0x106E,
# 0x0400,0x0401,0x0402,0x0403,0x0404,
# 0x2000,0x2001,0x2002,0x2003,0x2004,0x2007,0x2008,0x2009,0x200A,0x200B,0x200C,0x200D,0x200E,0x200F,0x2013,0x2014,0x2015,0x2018,0x2027
# ]

# bmv_command_list = [
# 0x0100, 0x0101,0x010A,0x010B,0x010C,0x0120,0x0150,
# 0xED8D,0xED7D,0xED8F,0xED8C,0xED8E,0xEEFF,0x0FFF,0x0FFE,0xEDEC,0x0382,0x0383,0xEEB6,
# 0x0300,0x0301,0x0302,0x0303,0x0304,0x0305,0x0306,0x0307,0x0308,0x0309,0x030A,0x030B,0x030E,0x030F,0x0310,0x0311,
# 0x1000,0x1001,0x1002,0x1003,0x1004,0x1005,0x1006,0x1007,0x1008,0x1009,0x1034,
# 0xEEFC,0x0320,0x0321,0x0322,0x0323,0x0324,0x0325,0x0326,0x0327,0x0328,0x0329,0x032A,0x032B,0x032C,0x032D,0x0331,0x0332,0x031F,
# 0x034F,0x034D,0x034E,0x100a,0x100b,0x0350,0x0351,0x0352,0x0353,0x0354,0x0355,0x0356,0x0357,0x035A,0x035B,0x035C,0x035D,0x0361,0x0362,
# 0xEEFE,0x0400,0xEEF5,0xEEE0,0xEEE1,0xEEE2,0xEEE3,0xEEE4,0xEEE5,0xEEE6,0xEEE7,0xEEE8,
# 0x1029,0x102c,0x0004,0x1030,
# 0xEEF9,0xEEF6,0xEEFB,0xEEFA,0xEEF7,0xEEF4,0xEEF8,0x0FFD,0xEC41,0x0090
# ]

# -*- coding: utf-8 -*- # ve = Mpptsim() # mppt_command_list = [ # 0x0100,0x0104,0x010A,0x010B,0x0140, # 0x0200,0x0201,0x0202,0x0205,0x0207, # 0xEDFF,0xEDFE,0xEDFD,0xEDFC,0xEDFB,0xEDF7,0xEDF6,0xEDF4,0xEDF2,0xEDF1,0xEDF0,0xEDEF,0xEDEC,0xEDEA,0xEDE8,0xEDE7,0xEDE6,0xEDE5,0xEDE4,0xEDE3,0xED2E,0xEDE0,0xEDCA, # 0xEDEC,0xEDDF,0xEDDD,0xEDDC,0xEDDB,0xEDDA,0xEDD7,0xEDD5,0xEDD4,0xEDD3,0xEDD2,0xEDD1,0xEDD0,0xEDCE,0xEDCD,0xEDCC,0x2211,0x2212, # 0xEDBC,0xEDBB,0xEDBD,0xEDB8,0xEDB3, # 0xEDAD,0xEDAC,0xEDAB,0xEDA9,0xEDA8,0xED9D,0xED9C,0xED91,0xED90, # 0xEDD9,0x0350,0x0351,0x0352,0x0353,0xEDBA,0xEDB9,0x100A, # 0xEDA0,0xEDA5,0xEDA7,0xED9B,0xED9A,0xED99,0xED96,0xED97,0xED90,0x2030,0x2031, # 0x104F,0x1050,0x1051,0x1052,0x1053,0x1054,0x1055,0x1056,0x1057,0x1058,0x1059,0x105A,0x105B,0x105C,0x105D,0x105E,0x105F, # 0x1060,0x1061,0x1062,0x1063,0x1064,0x1065,0x1066,0x1067,0x1068,0x1069,0x106A,0x106B,0x106C,0x106D,0x106E, # 0x0400,0x0401,0x0402,0x0403,0x0404, # 0x2000,0x2001,0x2002,0x2003,0x2004,0x2007,0x2008,0x2009,0x200A,0x200B,0x200C,0x200D,0x200E,0x200F,0x2013,0x2014,0x2015,0x2018,0x2027 # ] # bmv_command_list = [ # 0x0100, 0x0101,0x010A,0x010B,0x010C,0x0120,0x0150, # 0xED8D,0xED7D,0xED8F,0xED8C,0xED8E,0xEEFF,0x0FFF,0x0FFE,0xEDEC,0x0382,0x0383,0xEEB6, # 0x0300,0x0301,0x0302,0x0303,0x0304,0x0305,0x0306,0x0307,0x0308,0x0309,0x030A,0x030B,0x030E,0x030F,0x0310,0x0311, # 0x1000,0x1001,0x1002,0x1003,0x1004,0x1005,0x1006,0x1007,0x1008,0x1009,0x1034, # 0xEEFC,0x0320,0x0321,0x0322,0x0323,0x0324,0x0325,0x0326,0x0327,0x0328,0x0329,0x032A,0x032B,0x032C,0x032D,0x0331,0x0332,0x031F, # 0x034F,0x034D,0x034E,0x100a,0x100b,0x0350,0x0351,0x0352,0x0353,0x0354,0x0355,0x0356,0x0357,0x035A,0x035B,0x035C,0x035D,0x0361,0x0362, # 0xEEFE,0x0400,0xEEF5,0xEEE0,0xEEE1,0xEEE2,0xEEE3,0xEEE4,0xEEE5,0xEEE6,0xEEE7,0xEEE8, # 0x1029,0x102c,0x0004,0x1030, # 0xEEF9,0xEEF6,0xEEFB,0xEEFA,0xEEF7,0xEEF4,0xEEF8,0x0FFD,0xEC41,0x0090 # ]