FHEM Forum

FHEM => English Corner => Thema gestartet von: kroonen am 21 Februar 2015, 22:21:43

Titel: Readout serial port with ecmd device?
Beitrag von: kroonen am 21 Februar 2015, 22:21:43
Hi,

I got a smart meter, and when I connect it within linux, and I run the following command

sudo cu -l /dev/ttyUSB0 -s 9600 --parity=none

I get this output every 10 seconds

/ISk5\2ME382-1003

0-0:96.1.1(4B413650303035313534323830333133)
1-0:1.8.1(02179.828*kWh)
1-0:1.8.2(01358.495*kWh)
1-0:2.8.1(00000.001*kWh)
1-0:2.8.2(00000.000*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(0000.25*kW)
1-0:2.7.0(0000.00*kW)
0-0:17.0.0(0999.00*kW)
0-0:96.3.10(1)
0-0:96.13.1()
0-0:96.13.0()
0-1:24.1.0(3)
0-1:96.1.0(4730303135353631303133333035303133)
0-1:24.3.0(150221220000)(00)(60)(1)(0-1:24.2.1)(m3)
(01218.277)
0-1:24.4.0(1)
!

Ho can I use this in fhem. Is this possible with the emcd device, with a classdev?

regards Richard


Titel: Antw:Readout serial port with ecmd device?
Beitrag von: fruit am 23 Februar 2015, 22:33:22
I think it should be possible. I had a brief play with ECMD some time back but that was with a server that sent back unpredictable messages.

From memory you will need to construct the classdef (I think there is info in the wiki) but from what you have written you won't need to worry about sending responses.

A forum search for S0 (S zero and perhaps add tty) may find something that others have already got working.