techem compact v - nanocul - crc fehler

Begonnen von chris_kr, 06 Januar 2018, 10:07:24

Vorheriges Thema - Nächstes Thema

chris_kr

hallo,

ich versuche mein wärmezähler mit dem modul https://fhem.de/commandref_DE.html#TechemWZ auszulesen. als hardware nutze ich dafür ein
"nanoCUL USB Stick FTDI CC1101 868MHz".

auf dem stick wurde die aktuelle firmware culfw-1.67 gespielt. die board.h hab ich angepasst:
* HAS_MBUS aktiviert
* ein paar protokolle die ich nicht benötige deaktiviert (damit keine ram probleme auftreten siehe https://forum.fhem.de/index.php?topic=72682.0)

#ifndef _BOARD_H
#define _BOARD_H

#include <stdint.h>

/* if you have an Arduino with only 8MHz disable the next line */
#define HAS_16MHZ_CLOCK

/* if you are using a CC1101 module for 868MHz disable the next line */
//#define HAS_CC1100_433


#define SPI_PORT PORTB
#define SPI_DDR DDRB
#define SPI_SS 2
#define SPI_MISO 4
#define SPI_MOSI 3
/* die aufgelötete gelbe LED ist an PB5/SCLK angeschlossen! */
#define SPI_SCLK 5

#define CC1100_CS_DDR SPI_DDR
#define CC1100_CS_PORT          SPI_PORT
#define CC1100_CS_PIN SPI_SS


/* CC1101 GDO0 Tx / Temperature Sensor */
#if 0
#define CC1100_OUT_DDR DDRC
#define CC1100_OUT_PORT         PORTC
#define CC1100_OUT_PIN          PC0
#define CC1100_OUT_IN           PINC
#define CCTEMP_MUX              CC1100_OUT_PIN
#else
#define CC1100_OUT_DDR DDRD
#define CC1100_OUT_PORT         PORTD
#define CC1100_OUT_PIN          PD3
#define CC1100_OUT_IN           PIND
#define CCTEMP_MUX              CC1100_OUT_PIN
#endif

/* CC1101 GDO2 Rx Interrupt */
#define CC1100_IN_DDR DDRD
#define CC1100_IN_PORT          PIND
#define CC1100_IN_PIN           PD2
#define CC1100_IN_IN            PIND

#define CC1100_INT INT0
#define CC1100_INTVECT          INT0_vect
#define CC1100_ISC ISC00
#define CC1100_EICR             EICRA

/* externe LED */
#define LED_DDR                 DDRB
#define LED_PORT                PORTB
#define LED_PIN                 1

//#define LED_ON_DDR              DDRB
//#define LED_ON_PORT             PORTB
//#define LED_ON_PIN              1


#define BOARD_ID_STR            "nanoCUL868"
#define BOARD_ID_STR433         "nanoCUL433"

/* define this device as a 433 MHz one */
/* this isn't done like a CUL by reading a port pin but instead a fixed value of 0 for mark433_pin is used */
#define MULTI_FREQ_DEVICE
#define MARK433_PIN mark433_pin
#define MARK433_BIT             0
extern const uint8_t mark433_pin;

#define HAS_UART
#define UART_BAUD_RATE          38400

/* ATMega328P has only one UART, no need to define the UART to use */
//#define USART_RX_vect           USART0_RX_vect
//#define USART_UDRE_vect         USART0_UDRE_vect

#define TTY_BUFSIZE             128


#define RCV_BUCKETS            2      //                 RAM: 25b * bucket
#define FULL_CC1100_PA                // PROGMEM:  108b
#define HAS_RAWSEND                   //
#define HAS_FASTRF                    // PROGMEM:  468b  RAM:  1b
#define HAS_ASKSIN
/* Intertechno Senden einschalten */
#define HAS_INTERTECHNO
#define HAS_TCM97001
/* Intertechno Empfang einschalten */
#define HAS_IT
#define HAS_REVOLT
#define HAS_CC1101_RX_PLL_LOCK_CHECK_TASK_WAIT
#define HAS_CC1101_PLL_LOCK_CHECK_MSG
#define HAS_CC1101_PLL_LOCK_CHECK_MSG_SW
/* HAS_MBUS requires about 1kB RAM, if you want to use it you
   should consider disabling other unneeded features
   to avoid stack overflows
*/
#define HAS_MBUS

#define HAS_ASKSIN_FUP
//#define HAS_MORITZ
//#define HAS_RWE
//#define HAS_ESA
#define HAS_TX3
#define HAS_UNIROLL
//#define HAS_HOERMANN
//#define HAS_HOERMANN_SEND
#define HAS_MEMFN
//#define HAS_SOMFY_RTS
#define HAS_FHT_80b                     // PROGMEM: 1374b, RAM: 90b
#define HAS_FHT_8v                    // PROGMEM:  586b  RAM: 23b
#define HAS_FHT_TF
#define FHTBUF_SIZE          174      //                 RAM: 174b
//#define HAS_KOPP_FC
//#define HAS_ZWAVE                     // PROGMEM:  882


#endif


im fhem wird mir der cul jetzt wie folgt angezeigt:


DeviceOverview
CUL868

Internals
CMDS
ABbCeFfGiKlMmRTtUVWXx
CUL868_MSGCNT
127
CUL868_TIME
2018-01-06 09:38:28
Clients
:TechemWZ:WMBUS:HMS:CUL_IR:STACKABLE_CC:TSSTACKED:
DEF
/dev/serial/by-id/usb-SHK_NANO_CUL_868-if00-port0@38400 0000
DeviceName
/dev/serial/by-id/usb-SHK_NANO_CUL_868-if00-port0@38400
FD
11
FHTID
0000
NAME
CUL868
NR
25
PARTIAL
RAWMSG
b364468501329095345433114A1009F23664B0008400100000394669A9B6D31BAA37C3B9D24D12AA314B24321451CCD2BF2495EE21565E2811EEAAEFAD4F34
STATE
Initialized
TYPE
CUL
VERSION
V 1.67 nanoCUL868
initString
X21 brt


Readings
cmds
A B b C e F f G i K l M m R T t U V W X x 2018-01-06 09:00:18
state
Initialized 2018-01-06 09:38:28
uptime
0 00:51:55 2018-01-05 23:43:56
version
V 1.67 nanoCUL868 2018-01-05 23:43:50


Attributes
rfmode WMBus_T




WMBus_T wurde eingestellt um die daten zu empfangen:

set rfmode to: WMBus_T



WMBUS erscheint dann nach ein paar minuten als neuer navigationseintrag. darin wurden scheinbar zwei zähler automatisch angelegt:

WMBUS
WMBUS_TCH_530****_69_67 "crc check failed for block 2"
WMBUS_TCH_530****_69_67 "crc check failed for block 2"


die details sehen wie folgt aus:


DeviceOverview WMBUS_TCH_530****_69_67
crc check failed for block 2
Internals
DEF
TCH 530**** 69 67
DeviceMedium
unknown
DeviceType
67
IODev
CUL868
IdentNumber
530****
Manufacturer
TCH
MessageEncoding
CUL
NAME
WMBUS_TCH_530****_69_67
NR
45
STATE
crc check failed for block 2
TYPE
WMBUS
Version
69
addr
TCH_530****_69_67


hier noch die logs:


2018.01.06 08:51:29 0: Featurelevel: 5.8
2018.01.06 08:51:29 0: Server started with 14 defined entities (fhem.pl:13447/2017-02-19 perl:5.022001 os:linux user:root pid:32090)
2018.01.06 08:51:44 3: WMBUS Unknown device b36446850*******, please define it
2018.01.06 08:51:44 2: autocreate: define WMBUS_TCH_530****_69_67 WMBUS b36446850*******
2018.01.06 08:51:44 3: WMBUS_TCH_530****_69_67: I/O device is CUL868
2018.01.06 08:51:44 2: autocreate: define FileLog_WMBUS_TCH_530****_69_67 FileLog ./log/WMBUS_TCH_530****_69_67-%Y.log WMBUS_TCH_530****_69_67
2018.01.06 08:51:54 3: WMBUS Unknown device b36446850*******, please define it
2018.01.06 08:51:54 2: autocreate: define WMBUS_TCH_530****_69_67 WMBUS b36446850*******
2018.01.06 08:51:54 3: WMBUS_TCH_5309****_69_67: I/O device is CUL868
2018.01.06 08:51:54 2: autocreate: define FileLog_WMBUS_TCH_530****_69_67 FileLog ./log/WMBUS_TCH_5309****_69_67-%Y.log WMBUS_TCH_5309****_69_67
2018.01.06 08:52:16 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:52:32 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:52:50 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:53:04 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:53:28 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:53:35 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:54:01 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:54:05 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:55:05 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:55:16 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:55:39 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:55:48 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:56:17 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:56:19 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:56:49 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:56:50 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:57:22 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:57:22 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:57:53 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:58:00 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:58:27 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:59:03 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:59:05 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:59:34 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 08:59:38 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 09:00:06 2: WMBUS WMBUS_TCH_5309****_69_67 Error during ApplicationLayer parse:crc check failed for block 2
2018.01.06 09:00:11 2: WMBUS WMBUS_TCH_530****_69_67 Error during ApplicationLayer parse:crc check failed for block 2



jetzt meine frage was genau funktioniert hier nicht? das "TechemWZ" lief die ganze nacht im "listen"-mode, ohne ergebnis. ich geh aktuell davon aus, dass es mit dem crc fehler zu tun hat.

chris_kr

#1
nach langem suchen im forum hab ich die excel tabelle von bolligru gefunden (https://forum.fhem.de/index.php/topic,42232.msg388780.html#msg388780 und https://forum.fhem.de/index.php?action=dlattach;topic=42232.0;attach=44097) gefunden die wurde für den techem compact v erstellt. wenn ich die rohdaten des cul dort eintrage kommen sinnvolle werte raus. stichtag, verbrauch, ablesetag passt alles.  ;D bis auf den crc. jetzt schaue ich mir mal an welche crc werte nicht passen.