flyingflo / heat_can

CAN bus interface firmware for my Logamatic heating
GNU General Public License v3.0
7 stars 1 forks source link

Where to buy the hardware? #5

Closed sowinski closed 2 months ago

sowinski commented 2 months ago

Hi,

where can we buy the hardware? I would like to try this.

Thank you!

flyingflo commented 2 months ago

I used a NodeMCU based on ESP8266, which is probably out-dated at that time, but was available everywhere. And connected via SPI a CAN module. I think you can use everything that has a CAN interface and can run the software.

sowinski commented 2 months ago

Can I just use something like this on my raspberry pi?

https://www.waveshare.com/usb-can-a.htm

flyingflo commented 2 months ago

I think yes. You can then run the protocol component on that raspberry pi as well.

Basically, this component sends incoming CAN messages out over MQTT, IIRC as a hex string, and it sends to CAN what it receives over MQTT. Thus, it is easily exchangeable, hardware and software.

sowinski commented 2 months ago

Which baudrate did you use to read the can bus?

Is the Logamatic sending data all the time or do we need to send first something?

Did you use a 120-ohm termination resistor?

flyingflo commented 2 months ago

It is sending "monitor" data all the time at 50kbit. You will receive something, if everything works. I'm quite sure the termination resistor is installed, yes.

sowinski commented 2 months ago

Thank you!

Unfortunately I still do not receive anything.

Where did you connect to the CAN-BUS? Did you use this 15pin (D15) Interface on the front of the Logamatic device or the internal Can bus?

Did you add to the Logamatic site also a 120-ohm termination resistor or is this already build in?

flyingflo commented 2 months ago

I use the CAN terminals on the inside located on the central module. I think they are labeled quite well. There should be a termination resistor built-in, irrc.

I'm not sure whether there are CAN signals on the 15pin interface at the front at all.

sowinski commented 2 months ago

Okay, after some googling I got some messages. Not sure why it not worked from the beginning...

I ordered a better can interface because this one lacks some linux support.

But this is some of my output.

<<< aa c8 00 00 15 1c 80 8a a1 27 a0 8d 55 
1237.319280 Frame ID: 0000, Data: 8d a0 27 a1 8a 80 1c 15 
<<< aa c8 00 00 15 23 c1 2a c0 84 c2 90 55 
1237.519404 Frame ID: 0000, Data: 90 c2 84 c0 2a c1 23 15 
<<< aa c8 00 00 15 2a c2 90 c2 90 c2 90 55 
1237.719530 Frame ID: 0000, Data: 90 c2 90 c2 90 c2 2a 15 
<<< aa c8 00 00 15 31 c2 90 c2 90 c2 90 55 
1237.919661 Frame ID: 0000, Data: 90 c2 90 c2 90 c2 31 15 
<<< aa c8 00 00 15 38 c2 90 c2 90 c2 90 55 
1238.119796 Frame ID: 0000, Data: 90 c2 90 c2 90 c2 38 15 
<<< aa c8 00 00 15 3f c2 90 c2 90 c2 90 55 
1238.318648 Frame ID: 0000, Data: 90 c2 90 c2 90 c2 3f 15 
<<< aa c8 00 00 15 46 c2 90 c2 90 c2 90 55 
1238.518754 Frame ID: 0000, Data: 90 c2 90 c2 90 c2 46 15 
<<< aa c8 00 00 15 4d c2 90 c2 90 c2 90 55 
1238.720150 Frame ID: 0000, Data: 90 c2 90 c2 90 c2 4d 15 
<<< aa c8 00 00 15 54 c2 90 c2 90 c2 90 55 
1238.917754 Frame ID: 0000, Data: 90 c2 90 c2 90 c2 54 15 
<<< aa c8 00 00 15 5b c2 90 c2 90 c2 90 55 
1239.119126 Frame ID: 0000, Data: 90 c2 90 c2 90 c2 5b 15 
<<< aa c8 00 00 15 62 c2 90 c2 90 c2 90 55 
1239.318001 Frame ID: 0000, Data: 90 c2 90 c2 90 c2 62 15 
<<< aa c8 00 00 16 00 3d 11 22 2a 02 22 55 
1239.519368 Frame ID: 0000, Data: 22 02 2a 22 11 3d 00 16 
<<< aa c8 00 00 16 07 00 00 05 05 2d 01 55 
1239.718261 Frame ID: 0000, Data: 01 2d 05 05 00 00 07 16 
<<< aa c8 00 00 16 0e 01 04 4b 05 4b 3c 55 
1239.952077 Frame ID: 0000, Data: 3c 4b 05 4b 04 01 0e 16 
<<< aa c8 00 00 16 15 03 01 05 01 01 05 55 
1240.118540 Frame ID: 0000, Data: 05 01 01 05 01 03 15 16 
<<< aa c8 00 00 16 1c 0c 03 65 00 00 65 55 
1240.319957 Frame ID: 0000, Data: 65 00 00 65 03 0c 1c 16 
<<< aa c8 00 00 16 23 04 0f 0b 00 07 3c 55 
1240.520078 Frame ID: 0000, Data: 3c 07 00 0b 0f 04 23 16 
<<< aa c8 00 00 16 2a 28 0a 0a 11 65 65 55 
1240.720314 Frame ID: 0000, Data: 65 65 11 0a 0a 28 2a 16 
<<< aa c8 00 00 16 31 65 65 65 00 65 65 55 
1240.920406 Frame ID: 0000, Data: 65 65 00 65 65 65 31 16 
<<< aa c8 00 00 16 38 00 01 1e 1e 00 01 55 
1241.120525 Frame ID: 0000, Data: 01 00 1e 1e 01 00 38 16 

Do you think this is the correct output to start with your tool?

EDIT

After a reboot the Frame ID changed...

<<< aa c8 00 04 87 1e 35 08 09 4e 14 34 55 
1683.980415 Frame ID: 0400, Data: 34 14 4e 09 08 35 1e 87 
<<< aa c8 00 04 87 24 08 09 14 35 08 09 55 
1684.214292 Frame ID: 0400, Data: 09 08 35 14 09 08 24 87 
<<< aa c8 00 04 89 00 12 11 04 11 00 00 55 
1684.380680 Frame ID: 0400, Data: 00 00 11 04 11 12 00 89 
<<< aa c8 00 04 89 06 0a 03 00 00 08 00 55 
1684.580803 Frame ID: 0400, Data: 00 08 00 00 03 0a 06 89 
<<< aa c8 00 04 89 0c 00 00 00 00 00 00 55 
1684.780899 Frame ID: 0400, Data: 00 00 00 00 00 00 0c 89 
<<< aa c8 00 04 89 12 1b 1b 10 64 64 1b 55 
1684.981021 Frame ID: 0400, Data: 1b 64 64 10 1b 1b 12 89 
<<< aa c8 00 04 92 00 5f 00 01 54 fb 20 55 
1685.181165 Frame ID: 0400, Data: 20 fb 54 01 00 5f 00 92 
<<< aa c8 00 04 92 06 23 1e 00 63 03 00 55 
1685.381272 Frame ID: 0400, Data: 00 03 63 00 1e 23 06 92 
<<< aa c8 00 04 92 0c 01 07 00 02 df b0 55 
1685.580198 Frame ID: 0400, Data: b0 df 02 00 07 01 0c 92 
<<< aa c8 00 04 92 12 35 5e 1e 64 00 00 55 
1685.781587 Frame ID: 0400, Data: 00 00 64 1e 5e 35 12 92 
<<< aa c8 00 04 81 00 04 03 05 1c 00 6e 55 
1686.181669 Frame ID: 0400, Data: 6e 00 1c 05 03 04 00 81 
<<< aa c8 00 04 81 06 00 00 00 ed 80 00 55 
1686.380570 Frame ID: 0400, Data: 00 80 ed 00 00 00 06 81 
<<< aa c8 00 04 81 0c 1e 1e 1e 00 00 00 55 
1686.581895 Frame ID: 0400, Data: 00 00 00 1e 1e 1e 0c 81 
<<< aa c8 00 04 82 00 04 03 05 1a 00 6e 55 
1686.780749 Frame ID: 0400, Data: 6e 00 1a 05 03 04 00 82 
<<< aa c8 00 04 82 06 00 00 00 ef 80 00 55 
1686.982138 Frame ID: 0400, Data: 00 80 ef 00 00 00 06 82 
<<< aa c8 00 04 82 0c 1e 1e 1e 00 00 00 55 
1687.181019 Frame ID: 0400, Data: 00 00 00 1e 1e 1e 0c 82 
<<< aa c8 00 04 83 00 04 02 18 18 2a 6e 55 
1687.382403 Frame ID: 0400, Data: 6e 2a 18 18 02 04 00 83 
<<< aa c8 00 04 83 06 00 00 64 00 80 00 55 
1687.581465 Frame ID: 0400, Data: 00 80 00 64 00 00 06 83 
<<< aa c8 00 04 83 0c 20 2a 32 00 00 00 55 
1687.781659 Frame ID: 0400, Data: 00 00 00 32 2a 20 0c 83 
<<< aa c8 00 04 84 00 01 60 41 41 16 00 55 
1687.980495 Frame ID: 0400, Data: 00 16 41 41 60 01 00 84 
<<< aa c8 00 04 84 06 80 00 00 00 00 00 55 
1688.181806 Frame ID: 0400, Data: 00 00 00 00 00 80 06 84 
<<< aa c8 00 04 85 00 1b 1b 00 00 00 00 55 
1688.380853 Frame ID: 0400, Data: 00 00 00 00 1b 1b 00 85 

I do not trust this output and will wait for my new can adapter.

EDIT2

Can you add to your code some example how I could use your decoder? => https://github.com/flyingflo/logamatic/blob/master/logamatic4000.py I guess this is your decoder. An example dump would help me to understand how I have to structure my stream.

flyingflo commented 2 months ago

Looks good! The CAN frame ID encodes sender and receiver and and whether it is a "monitor" message. After power up the complete config is sent (which is not "monitor"), which causes the different frame ID.

Some examples:

/heizung/burner/can/raw/recv/ 0;421;88 00 0c 19 05 13 00 00 
/heizung/burner/can/raw/recv/ 0;421;88 06 00 20 00 ff 00 00 
/heizung/burner/can/raw/recv/ 0;421;88 0c 01 56 3c ff ff ff 
/heizung/burner/can/raw/recv/ 0;421;88 12 00 2d 69 ff ff ff 
/heizung/burner/can/raw/recv/ 0;421;88 18 1e 64 9c 00 19 6e 
/heizung/burner/can/raw/recv/ 0;421;88 1e 5f 19 00 00 82 00 
/heizung/burner/can/raw/recv/ 0;421;88 24 00 00 6e 6e 6e 00 
/heizung/burner/can/raw/recv/ 0;421;89 00 14 11 04 11 00 00 
sowinski commented 2 months ago

Thank you! I still wonder how you pass the data to your python script and in which format.

Can you show us a small example ?

flyingflo commented 2 months ago

The logamatic program has only MQTT interfaces. It receives and sends CAN messages on the one side and it broadcasts decoded monitor data and receives control commands over MQTT on the other side.

I should definetly write up some getting started guide. I've added a little to the README.

sowinski commented 2 months ago

Do I understand it correct. I have to start all three python scripts and then I need to write something which is sending the can message somehow to one of this script over mqtt?

flyingflo commented 2 months ago

No, just start logamatic4000.py. All the others are modules, pulled in by the main program. You can replace mqtt_can.py with your own module, if your CAN interface is local.

sowinski commented 2 months ago

I guess I am missing some requirements.

python logamatic4000.py 
INFO:mqtt_can:Start MQTT CAN receiver
Traceback (most recent call last):
  File "/home/ps/logamatic/logamatic4000.py", line 605, in <module>
    mqtt_can.start(can_recv_callback)
  File "/home/ps/logamatic/mqtt_can.py", line 49, in start
    rc = client.connect("pi3.lan")
  File "/home/ps/logamatic/venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 1435, in connect
    return self.reconnect()
  File "/home/ps/logamatic/venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 1598, in reconnect
    self._sock = self._create_socket()
  File "/home/ps/logamatic/venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 4609, in _create_socket
    sock = self._create_socket_connection()
  File "/home/ps/logamatic/venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 4640, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
  File "/usr/lib/python3.9/socket.py", line 822, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

Do I need to install a MQTT server or anything else to make this work?

flyingflo commented 2 months ago

Check the mqtt_*.py files and replace "pi3.lan" with the hostname of your MQTT broker.

sowinski commented 2 months ago

Great thank you!

I was able to start the script.

python logamatic4000.py 
INFO:mqtt_can:Start MQTT CAN receiver
INFO:mqtt_can:client.connect 0
INFO:mqtt_logamatic:Start
INFO:mqtt_can:on_connect rc 0
INFO:mqtt_logamatic:client.connect 0
INFO:mqtt_logamatic:on_connect rc 0

And the final step would be to send for example this message somehow to the broker?

mosquitto_pub -h localhost -t test/topic -m "Hello from MQTT

Not sure how to adappt this message?

8612.036000 Frame ID: 0400, Data: 00 16 3f 41 60 01 00 84 
<<< aa c8 00 04 84 06 80 00 00 00 00 00 55 

Is the topic always /heizung/burner/can/raw/recv/ or do I need some logic to change the topic?

flyingflo commented 2 months ago

The topic is always the same on the CAN side, one for receiving, one for sending. But if your device has the CAN interface connected via USB, it doesn't make much sense to send the CAN messages over MQTT first.

The format is rtr;id;data. rtr is not relevant.

sowinski commented 2 months ago

Because there is currently no other way, I will just use your MQTT interface. If you want I can later commit something to call your script directly.

But for now I would like to make it work.

I am sending my can messages over the broker but nothing happens.

MQTT-Published: 0;0400;00 80 ed 00 00 00 06 81
MQTT-Published: 0;0400;00 00 00 1e 1e 1e 0c 81
MQTT-Published: 0;0400;6e 00 19 05 03 04 00 82
MQTT-Published: 0;0400;00 80 f0 00 00 00 06 82
MQTT-Published: 0;0400;00 00 00 1e 1e 1e 0c 82
MQTT-Published: 0;0400;6e 2a 18 18 02 04 00 83
MQTT-Published: 0;0400;00 80 00 64 00 00 06 83
MQTT-Published: 0;0400;00 00 00 32 2a 20 0c 83
MQTT-Published: 0;0400;00 16 3e 41 60 01 00 84
MQTT-Published: 0;0400;00 00 00 00 00 80 06 84
MQTT-Published: 0;0400;00 00 00 00 1b 1b 00 85
MQTT-Published: 0;0400;00 00 00 00 00 00 06 85
MQTT-Published: 0;0400;00 00 00 00 00 00 00 87
MQTT-Published: 0;0400;0d 09 0c 1b 0d 51 06 87
MQTT-Published: 0;0400;1b 0d 4e 09 0c 1d 0c 87
MQTT-Published: 0;0400;09 0c 1d 0d 09 0c 12 87
MQTT-Published: 0;0400;14 09 08 34 14 51 18 87
MQTT-Published: 0;0400;34 14 4e 09 08 35 1e 87
MQTT-Published: 0;0400;09 08 35 14 09 08 24 87
MQTT-Published: 0;0400;00 00 11 04 11 12 00 89
MQTT-Published: 0;0400;00 08 00 00 03 0a 06 89
MQTT-Published: 0;0400;00 00 00 00 00 00 0c 89
MQTT-Published: 0;0400;1b 64 64 10 1b 1b 12 89
MQTT-Published: 0;0400;22 fb 54 01 00 5f 00 92
MQTT-Published: 0;0400;00 00 63 00 1e 23 06 92
MQTT-Published: 0;0400;be df 02 00 07 01 0c 92
MQTT-Published: 0;0400;00 00 64 1e 5e 35 12 92
MQTT-Published: 0;0400;6e 00 1c 05 03 04 00 81
MQTT-Published: 0;0400;00 80 ed 00 00 00 06 81
MQTT-Published: 0;0400;00 00 00 1e 1e 1e 0c 81
MQTT-Published: 0;0400;6e 00 19 05 03 04 00 82
MQTT-Published: 0;0400;00 80 f0 00 00 00 06 82
MQTT-Published: 0;0400;00 00 00 1e 1e 1e 0c 82
MQTT-Published: 0;0400;6e 2a 18 18 02 04 00 83
MQTT-Published: 0;0400;00 80 00 64 00 00 06 83
MQTT-Published: 0;0400;00 00 00 32 2a 20 0c 83
MQTT-Published: 0;0400;00 16 3e 41 60 01 00 84
MQTT-Published: 0;0400;00 00 00 00 00 80 06 84

If I use your data, I can see something published under /heizung/logamatic/mon/Kessel/...

Any idea what could be wrong? Are my logamatic data/codes different?

flyingflo commented 2 months ago

Hope they are not different. Try to set log level to DEBUG at the top of logamatic*.py to see more about what's going on.

I remember there is a ID setting on the heating controller, but that should only be relevant when sending config.

sowinski commented 2 months ago

Unfortunately setting to DEBUG does not change anything :(

I have a Logamatic 4111? Your codes work fine. Mine are doing nothing ...

Which Logamatic do you have?

flyingflo commented 2 months ago

I don't know exactly at the moment, 43.. or 42.. I think.

If DEBUG is in effect you should see multiple log lines per incoming CAN message, as it goes through the layers.

Looking at the monitor object types I implemented, which are selected by the first data byte, it looks yours are indeed different.

sowinski commented 2 months ago

Ohh you are right. I set the DEBUG in the wrong file:

This is the output:


python logamatic4000.py 
INFO:mqtt_can:Start MQTT CAN receiver
INFO:mqtt_can:client.connect 0
INFO:mqtt_logamatic:Start
INFO:mqtt_can:on_connect rc 0
INFO:mqtt_logamatic:client.connect 0
INFO:mqtt_logamatic:on_connect rc 0
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0000', '88 0c 01 56 3c ff ff ff']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '6e 00 1b 05 03 04 00 81']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 80 ee 00 00 00 06 81']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 1e 1e 1e 0c 81']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '0c 81 04 00 c8 aa 00 82']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '6e 00 19 05 03 04 00 82']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 80 f0 00 00 00 06 82']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 1e 1e 1e 0c 82']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '6e 2a 18 18 02 04 00 83']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 80 00 64 00 00 06 83']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 32 2a 20 0c 83']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 16 3e 41 60 01 00 84']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 00 80 06 84']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 1b 1b 00 85']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 00 00 06 85']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 00 00 00 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '0d 09 0c 1b 0d 51 06 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '1b 0d 4e 09 0c 1d 0c 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '09 0c 1d 0d 09 0c 12 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '14 09 08 34 14 51 18 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '34 14 4e 09 08 35 1e 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '09 08 35 14 09 08 24 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 11 04 11 12 00 89']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 08 00 00 03 0a 06 89']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0020', 'be 00 81 40 18 09 01 00']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0000', '7c 99 18 d0 36 0b 00 01']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 00 00 0c 89']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '1b 64 64 10 1b 1b 12 89']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '24 fb 54 01 00 23 00 92']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '01 05 63 00 1f 23 06 92']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', 'c4 df 02 00 07 01 0c 92']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 64 1f 5e 35 12 92']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '6e 00 1c 05 03 04 00 81']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 80 ed 00 00 00 06 81']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 1e 1e 1e 0c 81']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '6e 00 19 05 03 04 00 82']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 80 f0 00 00 00 06 82']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 1e 1e 1e 0c 82']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '6e 2a 18 18 02 04 00 83']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 80 00 64 00 00 06 83']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 32 2a 20 0c 83']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 16 3e 41 60 01 00 84']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 00 80 06 84']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 1b 1b 00 85']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 00 00 06 85']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 00 00 00 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '0d 09 0c 1b 0d 51 06 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '1b 0d 4e 09 0c 1d 0c 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '09 0c 1d 0d 09 0c 12 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '14 09 08 34 14 51 18 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '34 14 4e 09 08 35 1e 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '09 08 35 14 09 08 24 87']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 11 04 11 12 00 89']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 08 00 00 03 0a 06 89']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 00 00 00 00 0c 89']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '1b 64 64 10 1b 1b 12 89']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '24 fb 54 01 00 23 00 92']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '01 05 63 00 1f 23 06 92']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', 'c4 df 02 00 07 01 0c 92']
DEBUG:mqtt_can:on_message /heizung/burner/can/raw/recv/ : ['0', '0400', '00 00 64 1f 5e 35 12 92']

Looking at the monitor object types I implemented, which are selected by the first data byte, it looks yours are indeed different.

Ohh no :/ game over? or do you have any idea what I could do

flyingflo commented 2 months ago

Hm.. I think you still haven't enabled DEBUG in the logamatic4000.py module, line 10. What happens, if you wait some minutes, do the messages look differently then?

sowinski commented 2 months ago

You are again right. I did not set the one on line 10 ...

I attached the output of the file which I had run a few minutes. output.log

As you can see, 99% of the time you can see the 0400 id.

sowinski commented 2 months ago

I found the problem ... my values are reversed

I found this document in the internet which helped me to find the problem: https://community.symcon.de/uploads/short-url/9aEaOCdRB5gVGh6SCi6rBlgsWm3.pdf

Do you know this document? It seems like, that there is a lot of information included

flyingflo commented 2 months ago

I found the problem ... my values are reversed

Ah.. :man_facepalming:

I found this document in the internet which helped me to find the problem: https://community.symcon.de/uploads/short-url/9aEaOCdRB5gVGh6SCi6rBlgsWm3.pdf

Do you know this document? It seems like, that there is a lot of information included

Yes, that is the source of the data types in the code. The framing is different on the CAN bus, I had to reverse engineer that, but the payload is defined in these documents.

sowinski commented 2 months ago

Do you still use this tool or do you got in the mean time a new heating system?

flyingflo commented 2 months ago

Still in use, in combination with a heatpump, which is the main heat source.

sowinski commented 2 months ago

Okay, because my heat source is not detected by your code. I could add this to your code if you want =>

  1. Add my gas heater to your code
  2. Remove the static hostname (config file or .env?)
  3. Add a setting to switch between DEBUG / INFO etc. and create another pull request.

Otherwise I will play in my fork :)

flyingflo commented 2 months ago

PR is welcome!

I would add config as a command line args or env vars.

flyingflo commented 2 months ago

I think it works for you now.