danielfett / inetbox.py Goto Github PK
View Code? Open in Web Editor NEWA software implementation of something similar to a Truma iNet box
License: GNU General Public License v3.0
A software implementation of something similar to a Truma iNet box
License: GNU General Public License v3.0
Hi Daniel, im README schreibst Du:
Changing settings
In general, publish a message to
service/truma/set/<setting>
(where<setting>
is one of the settings published inservice/truma/control_status/#)
with the value you want to set. After restarting the service, wait a minute or so until the first set of values has been published before changing settings.
Du meinst damit nicht, dass nach jeder Änderung eines Werts mittels mosquitto_pub
der Service neu gestartet werden muss, aber so könnte man es aufgrund der Satzstellung missverstehen.
Wäre es so evtl. deutlicher?
Changing settings
In general, before you change a setting, restart the service (
sudo systemctl restart miqro_truma
) and wait a minute or so until the first set of values has been published. Then publish a message toservice/truma/set/<setting>
(where<setting>
is one of the settings published inservice/truma/control_status/#)
with the value you want to set.
Hi Daniel,
in read_log.py you have also implemented the possibility of reading data from a file.
It would be fantastic if you could post an example of an input file.
Da ich die miqro.yaml nicht in den Ordner /etc kopieren konnte,
habe ich versucht, per sudo chmod -R 777 /etc den Ordner beschribbar zu machen.
Dies war offensichlich eine schlechte Idee, da ich jetzt keinen SSH-Zugriff und diverse andere Probleme habe
Daher meine Frage: Welche Zugriffsrechte benötigt /etc MINDESTENS ? 755 ? 775 ?
Hi Daniel! In your guide, you write:
The relevant pin is highlighted in this picture:
https://github.com/danielfett/inetbox.py/raw/master/docs/pinout.jpg
Until now I thought that by "highlighted" you mean the orange wire (third from right), but now I'm not sure if maybe there is nothing highlighted on your photo.
Can you please confirm which one is connected to the Truma?
The next photo on your guide shows a green line but maybe that colour has nothing to do with the wire's colour on your previous photo?
PS:
Ich könnte auch in Deutsch schreiben. ;) Was macht hier mehr Sinn?
Hi Daniel!
Sorry that I have these dumb questions:
Is LIN (the only of the 6 lines you have highlighted on the RJ12 connector) really the only line that gets connected with the Truma Combi?
GND and 12V+ on the transceiver do not have to come from the Truma but could also come from another source that is not toggled?
I do not yet quite understand what is connected where. 😊
And how do you connect PINs 14 and 15 of your Raspberry Pi if it has the Pimoroni Automation HAT attached, or don't you use it anymore?
Thanks for your time and help!
Hello, i get data for topic service/truma/display_status
but cp_plus_status
is always waiting
.
I tried RESET at CP Plus, but no change.
Any idea ?
Hello,
as I understand well, we can access to the clock but not set it. Is there a possibility to change the time of the panel since it would be great to automatically set time at power on with an RTC clock.
Best,
Hallo,
vielen Dank für die tolle Software und die damit verbundene Arbeit!
Leider habe ich ein kleines Problem. Meine Umgebung:
inetbox.py Version 0.3
Truma Combi D6E
CP Plus Bedienteil (iNet ready)
RPi Zero mit dem genannten LIN to UART Transceiver
Als MQTT-Broker nutze ich den bereit vorhandenen Cerbo GX.
Der Transceiver ist eingeschleift zwischen CP Plus und Truma. Verhält sich aber identisch, wenn ich ihn direkt am zweiten Port der Heizung anschließe.
Ich erhalten keine "display_status" Meldungen. "control_status" und die anderen Topics sind vorhanden. Publishing und damit verbunden die Steuerung funktioniert ebenfalls.
Irgendeine Idee?
Danke!
Markus
Hey guys,
i got a error when installing truma_service (after test it). I get the following error while installation (truma_service --install) running as pi user:
Traceback (most recent call last):
File "/home/pi/.local/bin/truma_service", line 8, in <module>
sys.exit(truma_service.run())
File "/home/pi/.local/lib/python3.9/site-packages/inetbox/truma_service.py", line 142, in run
miqro.run(TrumaService)
File "/home/pi/.local/lib/python3.9/site-packages/miqro/__init__.py", line 606, in run
systemd_path.write_text(systemd_unit_file)
File "/usr/lib/python3.9/pathlib.py", line 1274, in write_text
with self.open(mode='w', encoding=encoding, errors=errors) as f:
File "/usr/lib/python3.9/pathlib.py", line 1241, in open
return io.open(self, mode, buffering, encoding, errors, newline,
File "/usr/lib/python3.9/pathlib.py", line 1109, in _opener
return self._accessor.open(self, flags, mode)
PermissionError: [Errno 13] Permission denied: '/etc/systemd/system/miqro_truma.service'
Is there a fix for that?
Hi Daniel,
I wanted to try your software out, but I have not yet figured out how to set username and password for authentication of the mqtt broker. Can you give me a hint?
Thanks in advance,
best regards,
Sönke
@danielfett @morawekj
I opened the Truma app the first time after a longer while not using it and received a message about an available update. It reads (in German):
INET BOX UPDATE VERFÜGBAR
Bitte laden Sie das Update innerhalb der nächsten 30 Tage auf alle Endgeräte sowie Ihre Truma iNet Box, um die Funktionen Ihres Systems auch weiterhin sicherzustellen.
OK
It reminds of other IoT gadgets that receive vendors' updates that are not always to the best of the customers. Regarding the inetbox.py project, I wonder if the vendor could change the workings of the Truma communication protocol (incl. encryption, maybe?) that could render this nice project useless.
Do you or anybody else knowledgeable of the protocol etc. have a clue if this could happen?
I assume that as long as no iNet box is connected and used, no undesired update can happen. Maybe people who do use the iNet box, might face problems with remote control (sending/receiving SMS), if not updating the software/firmware.
Thanks for sharing your thoughts!
Add Ground Connection to RJ12 Picture.
There is not Allways a Ground Connection from the PI to the Caravan DC
Hello!
If this great project could be transposed to ESP32, would it matter if it's with CH340 or CP2102 USB-UART chip?
You get 3 of the latter for under 20€. Maybe that's the only advantage?
Apart from this, is it worth the trouble at all, since it should work on e.g. a Raspberry Pi 4?
Sorry, I know that this is not an "issue" but would not know where else to ask this question.
Hi,
would it be possible to get this working on an ESP 8266 or ESP 32, maybe also using ESPHome?
There seems to be python for the ESP32: https://docs.micropython.org/en/latest/esp32/tutorial/intro.html
I am not good enough to understand if a port would be possible.
Thanks for the great work!!
Hi Daniel!
If I remember correctly, you use this DC DC down-stepper, right? https://www.amazon.de/gp/product/B07NLV411C
While its USB port shows +5V on my multimeter, i.e. enough voltage and +- not reversed, I cannot properly power my RPi with it. Since I run it headless (and ssh into it), I cannot see some "undervoltage" message on a screen but suspect it the culprit. The RPi never shows up in the network. When I power it with my original RPi power supply, it works. Do you have similar experiences? Could it be that the DC DC down-stepper does not have enough voltage if the RPi runs with the Pimoroni HAT?
As I would like to take advantage of the Pimoroni HAT, I would like to keep it but am stuck with regard to a proper power supply. It does not seem to make much sense to plug the standard RPi power supply into my caravan, which has a converter, but there is always loss with it. For testing purposes, I could try, of course.
Sorry for my (many) hardware-related questions. I hope you have some ideas to share in this regard, too. 🙂
EDIT:
I measured the voltage between GND and 5V on the Pimoroni HAT and got this:
With DC DC down-stepper as power supply: 4.88 V
With original Raspberry Pi power supply: 5.12 V
It seems that at least my DC DC down-stepper is not good enough to properly power the RPi 4.
Hello, I am trying to connect to a Truma Saphir comfort RC controlled by a Truma iNet X Panel. I have connected the LIN converter to the free RJ11 port of the Saphir (the other port is occupied by the Truma iNet X Panel).
This is what I see passing through, and furthermore, I can't find the "PR SET" command on the X Panel...
Is it necessary to have the CP Plus controller?
2024-07-15 12:50:01,657 inet.lin DEBUG TRANSPORTLAYER FRAME master → slave
2024-07-15 12:50:01,657 inet.lin DEBUG node address: 02
2024-07-15 12:50:01,657 inet.lin DEBUG single frame, expected bytes: 5
2024-07-15 12:50:01,657 inet.lin DEBUG payload: 05 0c 00 00 00
2024-07-15 12:50:01,658 inet.lin DEBUG service id: unknown (0xb8)
2024-07-15 12:50:01,714 inet.lin DEBUG in < 00 55 7d 02 03 7f b8 09 ff ff ff b9 → processing
2024-07-15 12:50:01,714 inet.lin DEBUG → → identified as transportlayer SLAVE → MASTER
2024-07-15 12:50:01,714 inet.lin DEBUG TRANSPORTLAYER FRAME slave → master
2024-07-15 12:50:01,715 inet.lin DEBUG node address: 02
2024-07-15 12:50:01,715 inet.lin DEBUG single frame, expected bytes: 2
2024-07-15 12:50:01,715 inet.lin DEBUG payload: b8 09
2024-07-15 12:50:01,715 inet.lin DEBUG negative response, error code = b8
2024-07-15 12:50:01,778 inet.lin DEBUG in < 55 97 not a proper sync -wait for sync-
2024-07-15 12:50:01,778 inet.lin DEBUG in < 0b 7c not a proper sync -wait for sync-
2024-07-15 12:50:01,779 inet.lin DEBUG in < 70 00 not a proper sync -wait for sync-
2024-07-15 12:50:01,838 inet.lin DEBUG in < 00 55 3c 7f 06 b2 00 17 46 05 0c 59 → processing
2024-07-15 12:50:01,838 inet.lin DEBUG → → identified as transportlayer MASTER → SLAVE
2024-07-15 12:50:01,839 inet.lin DEBUG TRANSPORTLAYER FRAME master → slave
2024-07-15 12:50:01,839 inet.lin DEBUG node address: broadcast
2024-07-15 12:50:01,839 inet.lin DEBUG single frame, expected bytes: 5
2024-07-15 12:50:01,839 inet.lin DEBUG payload: 00 17 46 05 0c
2024-07-15 12:50:01,839 inet.lin DEBUG service id: Read by Identifier
2024-07-15 12:50:01,839 inet.lin DEBUG → potentially handled by protocol!
2024-07-15 12:50:01,893 inet.lin DEBUG in < 00 55 7d 02 06 f2 17 46 05 0c 00 96 → processing
2024-07-15 12:50:01,893 inet.lin DEBUG → → identified as transportlayer SLAVE → MASTER
2024-07-15 12:50:01,894 inet.lin DEBUG TRANSPORTLAYER FRAME slave → master
2024-07-15 12:50:01,894 inet.lin DEBUG node address: 02
2024-07-15 12:50:01,894 inet.lin DEBUG single frame, expected bytes: 5
2024-07-15 12:50:01,894 inet.lin DEBUG payload: 17 46 05 0c 00
2024-07-15 12:50:01,894 inet.lin DEBUG positive response to Read by Identifier
Hi Daniel!
poetry.lock refers to miqro version = "1.1.0"
but pyproject.toml refers to miqro = ">=1.2.0"
.
I do not understand whether this matters at all, but in case it does, I wanted to make you aware of it.
Hi,
Feature request.
Given that power in motorhomes is at a premium, would it be possible to port this project to run on an ESP based low power board? IT would also help since Pi's are pretty rare in the wild at the min too...
Even better, a port to an ESPHome module to help with configuration and would also lead to easy Home Assistant integration via it's api that's built into the ESPHome framework (It's Arduino under the skin).
A lot of Home Assistant users are also motrohomer's so this would be a great addition.
[]https://esphome.io/
Thanks
Hey
I have an Alde system with a 3010 control panel (3010 413 but who also has the color version 3010 613 is in the same scenario) - this is a closed system
but it looks like I can upgrade just the control panel to a 3020 HE which has a TIN bus interface:
If that is true I'm planning to use inetbox.py to control my Alde system remotely.
Before trying to borrow a 3020HE control panel from my RV dealer, I wanted to check if anyone has suggestion or think this might or might not work? A normal inet implementation would lead to connect the box to the boiler, but it look like from the second image that this could also be accomplished using the control panel interface?
Thoughts?
Hi Daniel! The following from the readme about el_power_level
and the value electricity
for energy_mix
only applies to the Truma Combi E (with 230V electricity supply), right?
energy_mix
andel_power_level
should be set together.
energy_mix
can be one ofnone
/gas
/electricity
/mix
el_power_level
can be set to0
/900
/1800
when electric heating or mix is enabled
I have the non-E Combi EDIT: 4 (not 6), i.e. can only use gas for heating (water and air).
Hi
I have installed this service and connected to my truma heater via a linbus > UART connection from my rpi3.
I am getting messages through which is great but they are consistently marked as 'not a proper sync' as per the below
Any thoughts?
in < ff ff not a proper sync -wait for sync-
in < 80 5c not a proper sync -wait for sync-
in < 84 21 not a proper sync -wait for sync-
in < 80 7c not a proper sync -wait for sync-
in < 80 dc not a proper sync -wait for sync-
in < 11 a5 not a proper sync -wait for sync-
in < 80 fc not a proper sync -wait for sync-
in < a1 07 not a proper sync -wait for sync-
in < 04 3f not a proper sync -wait for sync-
in < 80 3c not a proper sync -wait for sync-
in < e3 ff not a proper sync -wait for sync-
in < 80 5c not a proper sync -wait for sync-
in < fe ff not a proper sync -wait for sync-
in < 80 7c not a proper sync -wait for sync-
in < ff ff not a proper sync -wait for sync-
in < 80 5c not a proper sync -wait for sync-
in < e0 ff not a proper sync -wait for sync-
in < 80 7c not a proper sync -wait for sync-
in < f0 ff not a proper sync -wait for sync-
in < 80 bc not a proper sync -wait for sync-
in < ff ff not a proper sync -wait for sync-
Hier möchte ich gerne ein paar Debugging-Outputs liefern.
pi@pi4:~ $ DEBUG_LIN=1 truma_service
pi@pi4:~ $ DEBUG_PROTOCOL=1 truma_service
pi@pi4:~ $ DEBUG_APP=1 truma_service
Heute Abend schaffe ich es leider nicht mehr, weil ich den Output aus der ConnectBot App auf meinem Handy nicht vernünftig kopieren kann.
Gibt's evtl. die Möglichkeit, den Debugging-Ouput direkt und ausschließlich in eine Log-Datei umzuleiten und diese dann hier anzufügen?
DEBUG_LIN=1 truma_service > lin.log
erzeugt eine leere Datei. Vermutlich mache ich es falsch oder es geht nicht.
Wie lange soll der Debug laufen?
Sollte ich während der Debug läuft, am CP+ etwas verändern (z.B. die Lüfterstufe)? Auch das kann ich erst morgen machen.
Hallo Daniel
ich habe es jetzt geschafft, Dein Script auf einem eigenen Raspi Zero 2 zu installieren
(der Versuch auf meinem Raspi mit Bluebattery ist leider gescheitert- ich habe es nicht geschafft, BEIDE ser. Schnittstellen gleichzeitig zu verwenden- nur entweder seriell oder BT)
truma_service per Hand läuft problemlos und zeigt per MQTT alle relevanten Daten
Danach habe ich versucht, den Service so zu installieren:
truma_service --install
sudo systemctl enable miqro_truma
sudo systemctl start miqro_truma
jedoch scheint der Service nicht korrekt zu Laufen:
Oct 23 06:58:21 raspzero3 env[3751]: Traceback (most recent call last):
Oct 23 06:58:21 raspzero3 env[3751]: File "/home/pi/.local/bin/truma_service", line 5, in
Oct 23 06:58:21 raspzero3 env[3751]: from inetbox import truma_service
Oct 23 06:58:21 raspzero3 env[3751]: ModuleNotFoundError: No module named 'inetbox'
Oct 23 06:58:21 raspzero3 systemd[1]: miqro_truma.service: Main process exited, code=exited, status=1/FAILURE
Subject: Unit process exited
efined-By: systemd
Wo kann der Fehler liegen ?
Danke !
Hallo,
ich habe deine Software nochmal auf einer neuen Raspi Installation aufgesetzt.
Das Skript starte ich von Hand, den service habe ich erst gar nicht enabled.
Wenn ich nun truma_service als normaler user starte kommen Fehlermeldungen
pi@raspberrypi:~ $ truma_service
2022-10-06 13:52:32,220 truma.main INFO started
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/serial/serialposix.py", line 322, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
PermissionError: [Errno 13] Permission denied: '/dev/serial0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/.local/bin/truma_service", line 8, in
sys.exit(truma_service.run())
File "/home/pi/.local/lib/python3.9/site-packages/inetbox/truma_service.py", line 56, in run
miqro.run(TrumaService)
File "/home/pi/.local/lib/python3.9/site-packages/miqro/init.py", line 578, in run
service(
File "/home/pi/.local/lib/python3.9/site-packages/inetbox/truma_service.py", line 21, in init
self.serial = Serial(serial_device, 9600, timeout=0.03)
File "/home/pi/.local/lib/python3.9/site-packages/serial/serialutil.py", line 244, in init
self.open()
File "/home/pi/.local/lib/python3.9/site-packages/serial/serialposix.py", line 325, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/serial0: [Errno 13] Permission denied: '/dev/serial0'
Kannst du mir einen Tip geben wie ich weiterkommen könnte.
LG Rudi
Hiya.
It seems it is running and recognised by cp-plus but not reacting to the commands sent. On RPi4B, tried several uarts.
"mosquitto_sub -t service/truma/cp_plus_status" shows "waiting", after few sec it gives:
truma.main ERROR Cannot send updates to inetapp, no status received from CP Plus yet. Changes will be delayed until status received.
And soon after:
inet.app ERROR Status buffer does not start with preamble, expected b'\x00\x1e\x00\x00"\xff\xff\xffT\x01', got b'\x00\x1e\x00\x00"\x00\x00\x00T\x01'
Any thoughts on that? Just trying to make my life a bit easier, btw awesome project.
sorry, bitte ignorieren - das Wesentliche kommt im nächsten Beitrag
Hallo Daniel,
ich komme da nicht wirklich weiter, bekomme nach jedem "Received status data from cp plus" die oben genannte warning.
System ist eine Truma, die auf Diesel läuft. Die Umschaltung über energy_mix funktioniert aber.
2022-10-17 19:27:52,296 truma.main INFO - Loop(_update_online_status) called 1 times, average duration 0.003755s, load=0%
2022-10-17 19:27:52,297 truma.main INFO - Loop(send_status) called 59 times, average duration 6.315254237288136e-05s, load=0%
2022-10-17 19:28:03,444 inet-lin INFO Received status data from cp plus
2022-10-17 19:28:03,446 app WARNING Unknown status buffer type b'\n\x15'
2022-10-17 19:29:09,821 inet-lin INFO Received status data from cp plus
2022-10-17 19:29:09,822 app WARNING Unknown status buffer type b'\n\x15'
2022-10-17 19:30:03,424 inet-lin INFO Received status data from cp plus
2022-10-17 19:30:03,425 app WARNING Unknown status buffer type b'\n\x15'
2022-10-17 19:30:52,299 truma.main INFO Loop stats:
2022-10-17 19:30:52,300 truma.main INFO - Loop(_update_online_status) called 1 times, average duration 0.004092s, load=0%
2022-10-17 19:30:52,301 truma.main INFO - Loop(send_status) called 60 times, average duration 6.231666666666665e-05s, load=0%
2022-10-17 19:31:08,076 inet-lin INFO Received status data from cp plus
2022-10-17 19:31:08,077 app WARNING Unknown status buffer type b'\n\x15'
2022-10-17 19:32:03,405 inet-lin INFO Received status data from cp plus
2022-10-17 19:32:03,406 app WARNING Unknown status buffer type b'\n\x15'
2022-10-17 19:33:07,473 inet-lin INFO Received status data from cp plus
2022-10-17 19:33:07,475 app WARNING Unknown status buffer type b'\n\x15'
2022-10-17 19:33:52,301 truma.main INFO Loop stats:
2022-10-17 19:33:52,303 truma.main INFO - Loop(_update_online_status) called 1 times, average duration 0.003031s, load=0%
2022-10-17 19:33:52,304 truma.main INFO - Loop(send_status) called 60 times, average duration 6.301666666666666e-05s, load=0%
2022-10-17 19:34:14,980 inet-lin INFO Received status data from cp plus
2022-10-17 19:34:14,981 app WARNING Unknown status buffer type b'\n\x15'
2022-10-17 19:35:05,689 inet-lin INFO Received status data from cp plus
2022-10-17 19:35:05,690 app WARNING Unknown status buffer type b'\n\x15'
2022-10-17 19:36:13,203 inet-lin INFO Received status data from cp plus
2022-10-17 19:36:13,204 app WARNING Unknown status buffer type b'\n\x15'
Hast Du eine Idee, was ich da ändern kann / muss. (Ich kapiere die bitstruct nicht :( )
Hey,
i have a problem to get States to my MQTT Broker. Connection is fine but i get on startup:
2022-12-05 18:06:25,229 truma.main WARNING Service configuration for truma not found in 'services' section of configuration file /etc/miqro.yml. Using empty configuration.
2022-12-05 18:06:25,229 truma.main INFO started
2022-12-05 18:06:25,229 truma.main INFO Opening serial device /dev/serial0 in exclusive mode
2022-12-05 18:06:25,232 truma.main INFO Loop stats:
2022-12-05 18:06:25,232 truma.main INFO - Loop(_update_online_status) called 0 times, average duration 0.0s, load=0%
2022-12-05 18:06:25,232 truma.main INFO - Loop(send_status) called 0 times, average duration 0.0s, load=0%
2022-12-05 18:06:25,233 truma.main INFO - Loop(commit_updates) called 0 times, average duration 0.0s, load=0%
2022-12-05 18:06:25,233 truma.main INFO - Loop(send_update_status) called 0 times, average duration 0.0s, load=0%
2022-12-05 18:06:25,233 truma.main INFO - Loop(send_cp_plus_status) called 0 times, average duration 0.0s, load=0%
2022-12-05 18:06:25,243 truma.main INFO MQTT connected, client=<paho.mqtt.client.Client object at 0x7fb21b7d00>, userdata=None, rc=0
2022-12-05 18:06:25,244 truma.main INFO Subscribing to ...
2022-12-05 18:06:25,244 truma.main INFO - service/truma/set/#
2022-12-05 18:06:25,244 truma.main INFO - service/truma/enabled
2022-12-05 18:06:25,360 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2022-12-05 18:06:25,422 inet.protocol INFO Received read by identifier request.
2022-12-05 18:06:25,456 truma.mqtt ERROR Caught exception in on_message: _on_enable() takes 2 positional arguments but 3 were given
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1164, in _loop
rc = self.loop_read()
File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1556, in loop_read
rc = self._packet_read()
File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
rc = self._packet_handle()
File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
return self._handle_publish()
File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
self._handle_on_message(message)
File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
on_message(self, self._userdata, message)
File "/home/pi/.local/lib/python3.9/site-packages/miqro/__init__.py", line 421, in _on_message
handler(self, payload)
TypeError: _on_enable() takes 2 positional arguments but 3 were given
2022-12-05 18:06:25,778 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2022-12-05 18:06:25,841 inet.protocol INFO Received read by identifier request.
2022-12-05 18:06:26,197 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2022-12-05 18:06:26,259 inet.protocol INFO Received read by identifier request.
2022-12-05 18:06:26,615 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2022-12-05 18:06:26,678 inet.protocol INFO Received read by identifier request.
2022-12-05 18:06:27,034 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2022-12-05 18:06:27,097 inet.protocol INFO Received read by identifier request.```
Running System is Raspbian 64 Bit. Heater: Truma Combi 4 - Panel is Inet Ready.
Does anyone had this problem and could help me to fix it?
Thanks!
Hi Daniel, I followed your installation guide, i.e. first installed as normal user. It further reads: "After you have tested that the software works for you". Erm, how can I test it? 😊
BTW, I put this in my .bashrc: export PATH="$HOME/.local/bin:$PATH"
Then I installed everything as admin (with sudo) but got this error message after trying to start this service:
pi@pi4:~ $ sudo systemctl status miqro_truma
● miqro_truma.service - truma MIQRO microservice
Loaded: loaded (/etc/systemd/system/miqro_truma.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2022-10-04 18:53:39 CEST; 12s ago
Process: 3095 ExecStart=/usr/bin/env python3 /usr/local/bin/truma_service (code=exited, status=1/FAILURE)
Main PID: 3095 (code=exited, status=1/FAILURE)
CPU: 336ms
Can you please point me to a direction where I should have a closer look? Thank you!
Hi,
I installed your software today following the readme file.
When starting the truma_service, I get the following output:
andreas@raspberrypi:~ $ truma_service
2023-07-30 15:22:59,567 truma.main INFO started
2023-07-30 15:22:59,572 truma.main INFO Opening serial device /dev/serial0 in exclusive mode
2023-07-30 15:22:59,576 truma.main INFO Loop stats:
2023-07-30 15:22:59,577 truma.main INFO - Loop(_update_online_status) called 0 times, average duration 0.0s, load=0%
2023-07-30 15:22:59,577 truma.main INFO - Loop(send_status) called 0 times, average duration 0.0s, load=0%
2023-07-30 15:22:59,578 truma.main INFO - Loop(commit_updates) called 0 times, average duration 0.0s, load=0%
2023-07-30 15:22:59,579 truma.main INFO - Loop(send_update_status) called 0 times, average duration 0.0s, load=0%
2023-07-30 15:22:59,580 truma.main INFO - Loop(send_cp_plus_status) called 0 times, average duration 0.0s, load=0%
2023-07-30 15:22:59,612 truma.main INFO MQTT connected, client=<paho.mqtt.client.Client object at 0x76312520>, userdata=None, rc=0
2023-07-30 15:22:59,613 truma.main INFO Subscribing to ...
2023-07-30 15:22:59,617 truma.main INFO - service/truma/set/#
2023-07-30 15:22:59,618 truma.main INFO - service/truma/enabled
2023-07-30 15:22:59,838 truma.mqtt ERROR Caught exception in on_message: _on_enable() takes 2 positional arguments but 3 were given
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/andreas/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/home/andreas/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "/home/andreas/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1164, in _loop
rc = self.loop_read()
File "/home/andreas/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1556, in loop_read
rc = self._packet_read()
File "/home/andreas/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
rc = self._packet_handle()
File "/home/andreas/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
return self._handle_publish()
File "/home/andreas/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
self._handle_on_message(message)
File "/home/andreas/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
on_message(self, self._userdata, message)
File "/home/andreas/.local/lib/python3.9/site-packages/miqro/init.py", line 421, in _on_message
handler(self, payload)
TypeError: _on_enable() takes 2 positional arguments but 3 were given
2023-07-30 15:25:59,580 truma.main INFO Loop stats:
2023-07-30 15:25:59,581 truma.main INFO - Loop(_update_online_status) called 1 times, average duration 0.004874s, load=0%
2023-07-30 15:25:59,582 truma.main INFO - Loop(send_status) called 348 times, average duration 6.132758620689659e-05s, load=0%
2023-07-30 15:25:59,582 truma.main INFO - Loop(commit_updates) called 1521 times, average duration 3.68343195266273e-05s, load=0%
2023-07-30 15:25:59,583 truma.main INFO - Loop(send_update_status) called 1521 times, average duration 0.0001977172912557534s, load=0%
2023-07-30 15:25:59,583 truma.main INFO - Loop(send_cp_plus_status) called 1521 times, average duration 0.00010838724523339853s, load=0%
MQTT states are:
enabled (null)
online 1 [is set to 0 after some time]
I tried to uninstall and install again without success.
For me it seems to be a version conflict or something like that.
Can you suggest something?
Greets
Andreas
Hi Daniel!
First of all, I would like to congratulate and thank you very much for your efforts and great results on this topic. 👍
I have a hardware-related question and hope that you don't mind me putting it here under "Issues":
You mention the MEROURII bus module as LIN to UART Transceiver. I own this LIN-Bus Breakout Board:
https://buyzero.de/products/lin-bus-breakout-board
I wonder if that can serve the same purpose?
The main differences I see on the first glance is that the SK Pang electronics board has a 3.3 V or 5 V supply, a jumper to toggle master/slave (would that be needed for our use case at all?), but lacks the comfortable screw terminal. Your board can directly use the 12 V from the heating, whereas mine needs a DC/DC down-stepper. I have this one (seems to be the same as in your slides), which I will use for the RPi power supply anyway.
Cheers
7wells
Hallo zusammen,
nach ewigem Testen und sämtliche GNDs auf ein Potential bringen komme ich einfach nicht weiter. Der LIN Debug liefert mir ausschließlich "no proper sync" Meldungen. Habe mal ein LOG von einer INIT des CPs angehängt.
Konfig: Raspi 3B, CP Firmware: C4.03.02, Heizung: H5.00.00, UART-LIN Konverter aus der Readme....
Kann mir jemand Tipps geben?
Hello... Readme states that serial_port
is used for configuring device, but it needs to be: serial_device
Regards,
Wolfgang
Hi, firstly I wanted to say this is awesome work and thank you!
I have installed the scripts and connected my pi to my Alde 3020 (connected to the boiler, not behind the panel.)
When running the truma_service I get two main errors:
inet.app ERROR Status buffer does not start with preamble, expected b'\x00\x1e\x00\x00"\xff\xff\xffT\x01', got b'\x00*\x00\x00"\xff\xff\xffT\x01'
AND then:
2023-01-20 13:06:49,745 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2023-01-20 13:06:49,866 inet.lin WARNING → → checksum error: Checksum error (received 3c, calculated aa)
2023-01-20 13:06:49,926 inet.lin WARNING → → checksum error: Checksum error (received 55, calculated 00)
2023-01-20 13:06:52,522 inet.protocol INFO Received read by identifier request.
2023-01-20 13:06:52,812 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2023-01-20 13:06:52,932 inet.lin WARNING → → checksum error: Checksum error (received 03, calculated aa)
2023-01-20 13:06:53,173 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2023-01-20 13:06:54,636 inet.lin WARNING → → checksum error: Checksum error (received 03, calculated aa)
2023-01-20 13:06:54,877 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2023-01-20 13:06:55,177 inet.protocol INFO Responding to 08 message (updates_to_send={})!
2023-01-20 13:06:55,297 inet.lin WARNING → → checksum error: Checksum error (received 03, calculated aa)
2023-01-20 13:07:05,569 inet.lin WARNING → → checksum error: Checksum error (received 03, calculated aa)
2023-01-20 13:07:06,721 inet.lin WARNING → → checksum error: Checksum error (received 3c, calculated aa)
2023-01-20 13:07:06,782 inet.lin WARNING → → checksum error: Checksum error (received 03, calculated aa)
2023-01-20 13:07:16,652 inet.lin WARNING → → checksum error: Checksum error (received 03, calculated aa)
2023-01-20 13:07:16,983 inet.lin WARNING → → checksum error: Checksum error (received 3c, calculated aa)
2023-01-20 13:07:17,043 inet.lin WARNING → → checksum error: Checksum error (received 03, calculated aa
I also see an error on the control panel:
"iNet Connecton Fail"
Does the 3020 use slightly different serial comms to the 3010 or did I miss something?
Happy to help with testing and debugging comms if needed...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.