matthijsvisser / kamstrup-402-mqtt

This project provides a Python library that enables communication with the Kamstrup Multical 402 heat meter. The configured parameters will be read from the meter at a certain interval and published in MQTT messages.
MIT License
45 stars 11 forks source link

Multical 403 - No response from meter / Message is invalid #3

Closed Chrisiesmit93 closed 3 years ago

Chrisiesmit93 commented 3 years ago

I am trying to get this script to save it's output to MQTT, but it throws 2 different error's when I start the script

I get those error when the meterhead is flat on the surface, and when I hold it about 1 cm above the normal place.

Also I see that the script is publishing values to MQTT, but I don't see them with MQTT browser (other MQTT stuff is working).

Some information: root@kamstrup-01:~# ls -l /dev/serial/by-id total 0 lrwxrwxrwx 1 root root 13 Feb 12 15:41 usb-FTDI_FT230X_Basic_UART_D308BOXH-if00-port0 -> ../../ttyUSB0

cloned the git in /opt/kamstrup

root@kampstrup-01:~# cat /opt/kamstrup/config.yaml
mqtt:
    host: 192.168.8.254
    port: 1883
    client: kamstrup
    topic: kamstrup
    qos: 0
    retain: False
    authentication: False
    username: mqtt
    password: <PASSWORD>
serial_device:
    com_port: /dev/ttyUSB0
kamstrup:
    parameters:
    - energy
    - volume
    - temp1
    - temp2
    poll_interval: 11
matthijsvisser commented 3 years ago

Hi,

Are you sure that the meter is 'awake'? The IR interface must be active to communicate with the meter. You can do so by pressing one of the buttons. From that point you have about 30 minutes before the interface will go back to sleep again.

Are you sure that the cable is working? You can verify it by using a camera to see if the IR led is blinking.

It may take a few attempts to find the correct position. Take a look at the log while continously restarting the kanstrup service.

The service will only publish to mqtt when the readout is succesfull, so its better to focus on the logging.

Good luck!

Chrisiesmit93 commented 3 years ago

Sorry for the late reply... The meter was awake when I tried, I pressed both buttons multiple times and then I started the script.

When the sript ran I had the sensor i my hand hovering above the meter, the log said some "Message is invalid" when I did that. If I have the sensor on the meter (without a gap or something), then I got the "No response from meter" (I think, let me try it this evening again). Will also look at the IR led blinking this evening with my phone to see if it works / there is an connection.

In the meantime I tested with the LogView HCW software, and that one works correctly.

Chrisiesmit93 commented 3 years ago

UPDATE: you're script is working correctly, however my Multical 403 shuts itself down after ~5min, even if I run the script every minute.

matthijsvisser commented 3 years ago

Awesome! Does it stay awake when you're using the LogView sofware for longer than 5 minutes?

Chrisiesmit93 commented 3 years ago

Nope, that one also don't respond after ~4 minutes, so this script is working fine and this "problem" is solved, thanks! The final solution was to (permanently) "hover" the meterhead ~2-3 cm above the screen / leds on the meter itself, probably too much trouble with reflection or something like that.