[OBIS V2] - Jetzt auch mit SML-Unterstützung

Begonnen von Icinger, 08 April 2016, 19:54:44

Vorheriges Thema - Nächstes Thema

Icinger

Liegt daran, dass in dem Modul ein Fehler ist :)

KOmmentiere bitte - wie in den Posts darüber auch schon gesagt - die Zeile 73 aus.
Korrigierte Version kommt morgen früh per Update.

lg, Stefan
Verwende deine Zeit nicht mit Erklärungen. Die Menschen hören (lesen) nur, was sie hören (lesen) wollen. (c) Paulo Coelho

immi

Hi Stefan
$val=unpack("q", pack("Q", hex($data))) if ($dataL==8);
und
$val=unpack("Q", pack("Q", hex($data))) if ($dataL==8);
sind bei mir problematisch.
Errormessage Invalid type 'Q' in pack at /opt/fhem/FHEM/47_OBIS.pm line 253.
--> fhem crashes as soon as first telegrams come

Ich bin nicht sicher ob es hat etwas zu tun http://perldoc.perl.org/functions/pack.html
ZitatQuads are available only if your system supports 64-bit  integer values _and_ if Perl has been compiled to support those.  Raises an exception otherwise.

immi

Icinger

Hi Leuts,

hab grad ein Update hochgeladen.

1) OBIS_Set is raus, sorry nochmal, hatte ich zum testen drinnen.
2) @immi: Ich checke jetzt, ob du 32 oder 64bit hast. Sollte also klappen.
3) Der Auto-Detect sollte jetzt auch funktionieren.

lg, Stefan
Verwende deine Zeit nicht mit Erklärungen. Die Menschen hören (lesen) nur, was sie hören (lesen) wollen. (c) Paulo Coelho

Edi77

Hallo
Ich wollte mal fragen ob man 2 x IR Kopf aus dem Volkszählerprojekt an OBIS anbinden kann, und wie man das konfiguriert?
Der Hintergrund ist der, ich habe eine Produktionszähler und einen Bezug/Lieferzähler, beides EHZ.

Gruß
Master FHEM 6 als VM auf ESX Ubuntu 20.04 LTS mit MAXCube/MAX!/FS20|TabletUI|Flightradar|Tasmota|TTN Lora|CCU3 HomematicIP|RPi mit GammaScout|MQTT EasyESP 8266|LuftdatenInfo|deCONZ HUEDev|probemon|Siemens Logo|P4D|3D PRINTER RAISE3D

immi

Hi Stefan
yes if (length(pack('j', -1))*8 == 64) detects the 32bits and disables the unpack('q'
As a predictable sideeffect, I do not get the total_consumption anymore.

2016.04.25 22:09:59 5: OBIS (PowerMeter) - Msg-Parse: 1-0:1.8.0*255(>0*Wh)
2016.04.25 22:09:59 5: OBIS (PowerMeter) - Msg-Parse: 1-0:1.8.1*255(0*Wh)
2016.04.25 22:09:59 5: OBIS (PowerMeter) - Msg-Parse: 1-0:1.8.2*255(0*Wh)
2016.04.25 22:09:59 5: OBIS (PowerMeter) - Msg-Parse: 1-0:15.7.0*255(387*W)

would you be so nice to consider my suggestion in the pm of sunday?
thanks
immi

KölnSolar

@Edi77 Frage hab ich schon in Deinem anderen Thread beantwortet.
RPi3/2 buster/stretch-SamsungAV_E/N-RFXTRX-IT-RSL-NC5462-Oregon-CUL433-GT-TMBBQ-01e-CUL868-FS20-EMGZ-1W(GPIO)-DS18B20-CO2-USBRS232-USBRS422-Betty_Boop-EchoDot-OBIS(Easymeter-Q3/EMH-KW8)-PCA301(S'duino)-Deebot(mqtt2)-zigbee2mqtt

dbox2user

Zitat von: Icinger am 21 April 2016, 06:39:10
Guten Morgen,

Für sowas hab ich mir eh eine Option freigelassen.
Das OBIS ist so aufgebaut, dass es auch als zweistufiges Modul funktioniert.

Ich kann also ein extra-Modul machen, welches auf der Schnittstelle lauscht, dann seine Daten in einen richtigen OBIS-Frame umwandelt und diese dann an das OBIS dispatched.
Direkt im OBIS will ich das nicht unbedingt implementieren, weil ich da dann lauter Sonderregelungen bräuchte (es passen ja nichtmal "Beginn des Datensatzes" und "Ende des Datensatzes".



Werd mich mal dranmachen und schaun, ob das wirklich so funktioniert, wie ich mir das ursprünglich vorgestellt habe.

Also bitte noch ein bisschen Geduld, das werden wir schon hinbekommen :D

lg, Stefan

Hallo Stefan!

Na, hast Du Dich mal "dran gemacht"?  ;)
Wollte nur mal hören ob Du evtl schon neue Ekenntnisse hast. :)

Gruß,
Chris
Fhem 5.8 auf Raspberry Pi2; 1 Wire OWSERVER mit DS9490R und OWX DS2480;AVR-NET-IO mit 1Wire;  LOGO8; Kostalpiko; Selbstbau CUL; Arduino mit cFirmata; Denon AVR; Samsung TV; Fritzbox;

Icinger

Hi Chris,

Komme momentan leider nicht wirklich zu irgendwas, aber ich habs im Hinterkopf.....

Ich haffe mal, dass ich jetzt im laufe des Mai's was hinbekomme.

lg, Stefan
Verwende deine Zeit nicht mit Erklärungen. Die Menschen hören (lesen) nur, was sie hören (lesen) wollen. (c) Paulo Coelho

HarryT

Hi

Does anybody use this module with Landis E350? It doesn´t give me any readings.  I use

define MyObis OBIS /dev/ttyUSB1@115200,8,N,1

/dev/ttyUSB1@115200 too  is used for SmartMeterP1 and that works. The log for this device reports is 8,N,1  so I guess I should use them.

The obis version I use is:
# $Id: 47_OBIS.pm 11208 2016-04-09 14:37:09Z icinger $

What could be may mistake?

Thanks
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Icinger

Hi Harry,

what do you get in your Log with a verbose 5?
Verwende deine Zeit nicht mit Erklärungen. Die Menschen hören (lesen) nur, was sie hören (lesen) wollen. (c) Paulo Coelho

HarryT

#55
Hi

I get
2016.05.15 18:09:55 3: Opening MyObis device /dev/ttyUSB1
2016.05.15 18:09:55 3: Setting MyObis serial parameters to 115200,8,N,1
2016.05.15 18:09:55 3: MyObis device opened
[...]
016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: /XMX5LGBBFG1009198749
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse:
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-3:0.2.8(42)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-0:1.0.0(160515181000S)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-0:96.1.1(4530303331303033313438313939363135)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:1.8.1(000073.217*kWh)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:1.8.2(000026.572*kWh)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:2.8.1(000091.209*kWh)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:2.8.2(000154.517*kWh)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-0:96.14.0(0001)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:1.7.0(00.000*kW)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:2.7.0(00.259*kW)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-0:96.7.21(00001)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-0:96.7.9(00000)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:99.97.0(0)(0-0:96.7.19)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:32.32.0(00000)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:32.36.0(00000)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-0:96.13.1()
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-0:96.13.0()
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:31.7.0(001*A)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:21.7.0(00.000*kW)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 1-0:22.7.0(00.259*kW)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-1:24.1.0(003)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-1:96.1.0(4730303235303033333630333031323136)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: 0-1:24.2.1(160515180000S)(00041.661*m3)
2016.05.15 18:10:03 5: OBIS (MyObis) - Msg-Parse: !370E

every 10 seconds.

See (https://i.imgsafe.org/2989515.jpeg) for a pic of Obis.

{HT}
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Icinger

Ok, got it up and running here.....

I'll commit it in some minutes, so you can update tomorrow.

Standard-OBIS has a 6-Byte-Adress for the readings like
1-0:2.8.1*255(000091.209*kWh)

This *255 is missing in your data, so the regExes didn't grab it.
Adjusted the regExes for that.

What I don't know, is what THIS readings are for:

1-3:0.2.8(42)
0-0:96.1.1(4530303331303033313438313939363135)
0-0:96.14.0(0001)
0-0:96.7.21(00001)
1-0:99.97.0(0)(0-0:96.7.19)
1-0:32.32.0(00000)
1-0:32.36.0(00000)
0-0:96.13.1()
0-0:96.13.0()
0-1:24.1.0(003)
0-1:96.1.0(4730303235303033333630333031323136)
0-1:24.2.1(160515180000S)(00041.661*m3)


Especially the last line is interesting.....What does your meter count here?
Gas should start with 7-1:
Water should start with 8-1:
and district heating should be 6-1:
Verwende deine Zeit nicht mit Erklärungen. Die Menschen hören (lesen) nur, was sie hören (lesen) wollen. (c) Paulo Coelho

HarryT

Hi

The last line is gas

If you send me the module I can test it

{HT}
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

HarryT

BTW (160515180000S)  is the time of the last Gas measurement

{HT}
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

dbox2user

Hi Stefan!
Nach dem post von HarryT hab ich auch mal verbose auf 5 gestellt und nun seh ich alle Einträge im Log.
Vorher hatte ich die Werte ja aus den "Internals" des Moduls kopiert.

Die Werte aus dem Log-File schauen denke ich garnicht mehr so "pervers" aus.  ;)
Vielleicht kannst Du mir jetzt mit ganz wenig Aufwand helfen...


Hier mal die Log-Einträge:

2016.05.16 09:39:53 3: Opening MyObis2 device /dev/ttyUSB0
2016.05.16 09:39:53 3: Setting MyObis2 serial parameters to 300,7,E,1
2016.05.16 09:39:53 3: MyObis2 device opened
...
2016.05.16 09:40:03 5: SW: 2f3f210d0a
2016.05.16 09:40:04 5: OBIS (MyObis2) - Internal timer set to 2016-05-16 09:40:14
2016.05.16 09:40:05 5: OBIS (MyObis2) - Msg-Parse: /PAF5EC3g00006
2016.05.16 09:40:05 5: SW: 063030300d0a
2016.05.16 09:40:07 5: OBIS (MyObis2) - Msg-Parse: 0.0.0(72045525)
2016.05.16 09:40:08 5: OBIS (MyObis2) - Msg-Parse: 0.0.1(PAF)
2016.05.16 09:40:09 5: OBIS (MyObis2) - Msg-Parse: F.F(00)
2016.05.16 09:40:09 5: OBIS (MyObis2) - Msg-Parse: 0.2.0(1.29)
2016.05.16 09:40:10 5: OBIS (MyObis2) - Msg-Parse: 1.8.1*00(000275.40)
2016.05.16 09:40:11 5: OBIS (MyObis2) - Msg-Parse: 1.8.2*00(000305.89)
2016.05.16 09:40:12 5: OBIS (MyObis2) - Msg-Parse: 2.8.0*00(000801.48)
2016.05.16 09:40:14 5: SW: 2f3f210d0a
2016.05.16 09:40:14 5: OBIS (MyObis2) - Internal timer set to 2016-05-16 09:40:24
2016.05.16 09:40:14 5: OBIS (MyObis2) - Msg-Parse: C.2.1(000000000000)(                                                )
2016.05.16 09:40:15 5: OBIS (MyObis2) - Msg-Parse: 0.2.2(:::::G11)!


Interessant sind ja nur die Zeilen:
2016.05.16 09:40:10 5: OBIS (MyObis2) - Msg-Parse: 1.8.1*00(000275.40)       Bezug Tarif 1
2016.05.16 09:40:11 5: OBIS (MyObis2) - Msg-Parse: 1.8.2*00(000305.89)       Bezug Tarif 2
2016.05.16 09:40:12 5: OBIS (MyObis2) - Msg-Parse: 2.8.0*00(000801.48)       Geliefert durch PV-Anlage


Du hast ja bei HarryT geschrieben ... ein Standard-Obis-Eintrag wäre z.B. 1-0:2.8.1*255(000091.209*kWh) .... kannst Du die regExes so anpassen, dass sie eben auch auf meine "00" und ohne "kWh" reagieren würden?

Liebe Grüße,
Chris
Fhem 5.8 auf Raspberry Pi2; 1 Wire OWSERVER mit DS9490R und OWX DS2480;AVR-NET-IO mit 1Wire;  LOGO8; Kostalpiko; Selbstbau CUL; Arduino mit cFirmata; Denon AVR; Samsung TV; Fritzbox;