Сбор показаний электросчетчика Меркурий 200

Обсуждение статей, технологий домашней автоматизации, программных и аппаратных решений
yuoras
Сообщения: 11
Зарегистрирован: 22 окт 2015, 22:20

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение yuoras » 28 мар 2017, 21:15

kpp писал(а):Лучше пока тестировать на командах: amper, power, volt, kwatthour и test.
Попробуйте установить FUZZY_MATCHING_CRC = YES
Разницы не увидел FUZZY_MATCHING_CRC = YES ,что FUZZY_MATCHING_CRC = NO.

Код: Выделить всё

/opt/etc/200 # sh electro_counter.sh kwatthour
OS: LINUX; DEVICE: /dev/ttyUSB0; COUNTER_SN: 094784(x01x72x40); COUNTER_TYPE: me                   rc200.sh; TEST_COMMUNITY: NO; DEV_EMULATOR: NO; METHOD_COMMUNITY: DD; FUZZY_MATC                   HING_CRC: YES
COMMAND: kwatthour; PARAMS: "kwatthour"> zona=01; SIZE: 23; OUTPARSER: "02x$((${                   zona} * 4 - 3)),02x$((${zona} * 4 - 2)),02x$((${zona} * 4 - 1)),02x$((${zona} *                    4))#Aprintf(\"%0.3f\",^b0/1000)"; DESCRIBE: Опрос накопленной энергии
SEND: _0x00_0x01_0x72_0x40_0x27_0xF4_0x3D
METHOD_COMMUNITY=DD len=23
ANSWER(1): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45                    23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(2): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45                    23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(3): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45                    23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(4): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45                    23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(5): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45                    23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(6): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45                    23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(7): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45                    23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(8): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45                    23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(9): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45                    23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(10): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(11): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(12): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(13): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(14): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(15): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(16): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(17): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(18): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(19): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(20): x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45x00x00x00x00x00x9                   6 23 0
x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45x00x00x00x00x00x96 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(21): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(22): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 22 3
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(23): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(24): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(25): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(26): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(27): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(28): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(29): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x4                   5 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(30): x00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45x00x00x00x00x00x96xA                   4 23 0
x00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45x00x00x00x00x00x96xA4 23 0
574.900
/opt/etc/200 # sh electro_counter.sh kwatthour
OS: LINUX; DEVICE: /dev/ttyUSB0; COUNTER_SN: 094784(x01x72x40); COUNTER_TYPE: merc200.sh; TEST_COMMUNITY: NO; DEV_EMULATOR: NO; METHOD_COMMUNITY: DD; FUZZY_MATCHING_CRC: YES
COMMAND: kwatthour; PARAMS: "kwatthour"> zona=01; SIZE: 23; OUTPARSER: "02x$((${zona} * 4 - 3)),02x$((${zona} * 4 - 2)),02x$((${zona} * 4 - 1)),02x$((${zona} * 4))#Aprintf(\"%0.3f\",^b0/1000)"; DESCRIBE: Опрос накопленной энергии
SEND: _0x00_0x01_0x72_0x40_0x27_0xF4_0x3D
METHOD_COMMUNITY=DD len=23
ANSWER(1): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(2): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(3): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(4): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(5): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(6): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(7): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(8): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(9): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(10): x00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45x00x00x00x00x00x96xA4 23 0
x00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45x00x00x00x00x00x96xA4 23 0
574.900
/opt/etc/200 # sh electro_counter.sh kwatthour
OS: LINUX; DEVICE: /dev/ttyUSB0; COUNTER_SN: 094784(x01x72x40); COUNTER_TYPE: merc200.sh; TEST_COMMUNITY: NO; DEV_EMULATOR: NO; METHOD_COMMUNITY: DD; FUZZY_MATCHING_CRC: YES
COMMAND: kwatthour; PARAMS: "kwatthour"> zona=01; SIZE: 23; OUTPARSER: "02x$((${zona} * 4 - 3)),02x$((${zona} * 4 - 2)),02x$((${zona} * 4 - 1)),02x$((${zona} * 4))#Aprintf(\"%0.3f\",^b0/1000)"; DESCRIBE: Опрос накопленной энергии
SEND: _0x00_0x01_0x72_0x40_0x27_0xF4_0x3D
METHOD_COMMUNITY=DD len=23
ANSWER(1): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36 15 2
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36 15 2
METHOD_COMMUNITY=DD len=23
ANSWER(2): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(3): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(4): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(5): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(6): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(7): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(8): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(9): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(10): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(11): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(12): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(13): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(14): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(15): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(16): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(17): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(18): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(19): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(20): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(21): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(22): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(23): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19 18 2
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19 18 2
METHOD_COMMUNITY=DD len=23
ANSWER(24): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(25): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(26): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(27): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(28): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(29): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(30): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(31): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(32): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(33): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(34): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(35): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(36): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(37): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(38): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(39): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
METHOD_COMMUNITY=DD len=23
ANSWER(40): x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
x00x01x72x40x27xF4x3Dx00x01x72x40x27x00x57x49x00x00x54x36x00x00x19x45 23 0
Error CRC!

yuoras
Сообщения: 11
Зарегистрирован: 22 окт 2015, 22:20

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение yuoras » 28 мар 2017, 21:29

Andrey2509 писал(а): 3. Напряжение питания на БП и на самом счётчике?
Принудительно подал стороннее питание на счетчик 4,5 В и попробовал читать стандартной программой Универсальный Конфигуратор на Винде.
Прекрасно переносит 10% падение напряжения.

kpp
Сообщения: 142
Зарегистрирован: 29 авг 2011, 15:03
Откуда: Київ-Дніпро

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение kpp » 26 апр 2017, 15:55

Обновил скрипт для работы со счетчиком через чистый SHELL.
С учетом найденных вопросов.

Работы по улучшению скрипта продолжаются.
Принимаются предложения \ пожелания.

https://hi.dp.ua/svn/electo_counters/trunk/ user:tat pass:123
в electro_counter.conf указать нужные: DEVICE, COUNTER_SN, PASS_READ, COUNTER_TYPE.

Поддерживаются Меркурий 230, Меркурий 200.

Более подробно viewtopic.php?p=28000#p21644
"Та нам з тобою своє робити, відкрити очі і далі йти!
І зуби сильно стиснувши, маму ніжно любити, хто ж тоді, як не ми, брати?!"(с)

Eduard_K
Сообщения: 19
Зарегистрирован: 16 сен 2013, 13:31

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение Eduard_K » 18 июл 2017, 01:00

я тут наткнулся на Протокол однофазных счетчиков Меркурий. Основные команды.
http://incotex-support.blogspot.ru/2016 ... -post.html

empenoso
Сообщения: 852
Зарегистрирован: 11 ноя 2015, 08:03
Откуда: Пермь

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение empenoso » 17 ноя 2017, 08:23

kpp писал(а):Обновил скрипт для работы со счетчиком через чистый SHELL.
С учетом найденных вопросов.

Работы по улучшению скрипта продолжаются.
Принимаются предложения \ пожелания.

https://hi.dp.ua/svn/electo_counters/trunk/ user:tat pass:123
в electro_counter.conf указать нужные: DEVICE, COUNTER_SN, PASS_READ, COUNTER_TYPE.

Поддерживаются Меркурий 230, Меркурий 200.

Более подробно viewtopic.php?p=28000#p21644
Поддерживается и Меркурий 200.04 и 200.02?

yuoras
Сообщения: 11
Зарегистрирован: 22 окт 2015, 22:20

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение yuoras » 02 янв 2018, 10:39

empenoso писал(а):
17 ноя 2017, 08:23
Поддерживается и Меркурий 200.04 и 200.02?
Да, поддерживаются.
Тем более ,что 200.04 и 200.02 имеет одинаковый протокол (разница только в наличии PLC модема у 04 счётчика)

empenoso
Сообщения: 852
Зарегистрирован: 11 ноя 2015, 08:03
Откуда: Пермь

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение empenoso » 05 мар 2018, 21:27

А как протестировать что переходник CP2104 / CH340 видится на raspberry pi и корректно работает?

Код: Выделить всё

[07:57:09] openhabian@openHABianPi:~$ stty -F /dev/ttyUSB0
speed 9600 baud; line = 0;
min = 1; time = 0;
ignbrk -brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok noflsh -echoctl -echoke

[07:59:49] openhabian@openHABianPi:~$ uname -a
Linux openHABianPi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux


[08:00:12] openhabian@openHABianPi:~$ lsusb
Bus 001 Device 006: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 004: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[08:01:50] openhabian@openHABianPi:~$


[08:05:01] openhabian@openHABianPi:~$ ls /lib/modules/$(uname -r)/kernel/drivers/usb/serial
aircable.ko         empeg.ko        ir-usb.ko       mos7720.ko  qcaux.ko         ti_usb_3410_5052.ko
ark3116.ko          f81232.ko       iuu_phoenix.ko  mos7840.ko  qcserial.ko      usb_debug.ko
belkin_sa.ko        ftdi_sio.ko     keyspan.ko      navman.ko   quatech2.ko      usbserial.ko
!!!!!ch341.ko            garmin_gps.ko   keyspan_pda.ko  omninet.ko  safe_serial.ko   usb_wwan.ko
cp210x.ko           io_edgeport.ko  kl5kusb105.ko   opticon.ko  sierra.ko        visor.ko
cyberjack.ko        io_ti.ko        kobil_sct.ko    option.ko   spcp8x5.ko       whiteheat.ko
cypress_m8.ko       ipaq.ko         mct_u232.ko     oti6858.ko  ssu100.ko        wishbone-serial.ko
digi_acceleport.ko  ipw.ko          metro-usb.ko    pl2303.ko   symbolserial.ko  xsens_mt.ko
[08:06:12] openhabian@openHABianPi:~$



empenoso
Сообщения: 852
Зарегистрирован: 11 ноя 2015, 08:03
Откуда: Пермь

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение empenoso » 06 мар 2018, 08:38

Физически заменил конвертер на другой (из под windows все тоже заработало), на raspberry pi:

Код: Выделить всё

[09:35:02] openhabian@openHABianPi:~$ lsusb
Bus 001 Device 007: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 001 Device 004: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[09:35:45] openhabian@openHABianPi:~$ stty -F /dev/ttyUSB0
speed 9600 baud; line = 0;
min = 1; time = 0;
ignbrk -brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok noflsh -echoctl -echoke
[09:36:04] openhabian@openHABianPi:~$
Но ошибка скрипта все равно.

kpp
Сообщения: 142
Зарегистрирован: 29 авг 2011, 15:03
Откуда: Київ-Дніпро

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение kpp » 07 мар 2018, 23:44

Вопрос решен, скрипт
https://hi.dp.ua/svn/electo_counters/trunk/ user:tat pass:123
в electro_counter.conf указать нужные: DEVICE, COUNTER_SN, PASS_READ, COUNTER_TYPE.
Поддерживаются Меркурий 230, Меркурий 200.
работает.
Дело было в особенности расположения утилиты echo.

Для вашего случая необходимо:

в файле electro_counter.conf
C_ECHO=/bin/echo
#C_ECHO=echo

по умолчанию
#C_ECHO=/bin/echo
C_ECHO=echo
"Та нам з тобою своє робити, відкрити очі і далі йти!
І зуби сильно стиснувши, маму ніжно любити, хто ж тоді, як не ми, брати?!"(с)

empenoso
Сообщения: 852
Зарегистрирован: 11 ноя 2015, 08:03
Откуда: Пермь

Re: Сбор показаний электросчетчика Меркурий 200

Сообщение empenoso » 08 мар 2018, 09:26

kpp писал(а):
07 мар 2018, 23:44
Вопрос решен, скрипт
https://hi.dp.ua/svn/electo_counters/trunk/ user:tat pass:123
в electro_counter.conf указать нужные: DEVICE, COUNTER_SN, PASS_READ, COUNTER_TYPE.
Поддерживаются Меркурий 230, Меркурий 200.
работает.
Дело было в особенности расположения утилиты echo.

Для вашего случая необходимо:

в файле electro_counter.conf
C_ECHO=/bin/echo
#C_ECHO=echo

по умолчанию
#C_ECHO=/bin/echo
C_ECHO=echo
Спасибо, все заработало! https://www.ab-log.ru/forum/viewtopic.p ... =80#p31946

Код: Выделить всё

[10:20:52] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh test
Error! Counter(680870) not answer!
[10:20:56] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh amper
Amper=0.48
[10:21:04] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh kwatthour
205.38
[10:23:11] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh datetime
datetime=08.03.18 10:22:03
[10:23:53] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh last_on
On=19.02.18 16:55:17
[10:24:12] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh last_off
Off=19.02.18 16:55:00
[10:24:26] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh volt
Volt=231.9
[10:24:51] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh power
Power=0.038
[10:25:02] openhabian@openHABianPi:~$

Код: Выделить всё

[07:18:38] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh kwatthour_all
205.39
75.47
0.00
0.00
[07:19:40] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh kwatthour:T2
75.47
[07:21:32] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh kwatthour:T1
205.40
[07:21:36] openhabian@openHABianPi:~$
kwatt_month_summ - сумма накопленной энергии за указанный месяц: kwatt_month_summ:3 - за март:

Код: Выделить всё

[07:34:59] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/elec                                                                                                                                                             tro_counter.sh kwatt_summ
T1 = 206.02
T2 = 75.81
T3 = 0.00
T4 = 0.00
Sum = 281.83
[07:35:10] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh kwatt_summ2
T1=206.02
T2=75.81
T3=0.00
T4=0.00
SUM=281.83
[07:35:33] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh kwatt_month_summ:2
T1=186.24
T2=54.14
T3=0.00
T4=0.00
SUM=240.38
[07:35:54] openhabian@openHABianPi:~$ sh /etc/openhab2/exec/electo_counters/electro_counter.sh kwatt_month_summ:1
T1=88.42
T2=29.18
T3=0.00
T4=0.00
SUM=117.60

Ответить