(15-11-2025, 11:01 AM)jlm a écrit :(14-11-2025, 10:53 PM)thorium a écrit : Hello!
I'm trying to set it up with an Elfin IP Gateway and I cannot get it to work.
I am confident the Elfin is connected to the JK BMS (PB2A16S30P v19) and working properly, because this alternative project (https://github.com/luisgonzalezgonzalez/jkbms_mqtt) is successfully pulling the data from the Elfin (this is coming in from this alternative tool).
I wish to use your tool because I am going to have 4 parallel batteries soon with a master/slave.
{"battery_voltage": 53.753, "battery_power": 1433.369, "battery_current": 26.8, "cell_00_voltage": 3.36, "cell_01_voltage": 3.36, "cell_02_voltage": 3.357, "cell_03_voltage": 3.358, "cell_04_voltage": 3.361, "cell_05_voltage": 3.361, "cell_06_voltage": 3.362, "cell_07_voltage": 3.362, "cell_08_voltage": 3.363, "cell_09_voltage": 3.36, "cell_10_voltage": 3.36, "cell_11_voltage": 3.358, "cell_12_voltage": 3.36, "cell_13_voltage": 3.358, "cell_14_voltage": 3.36, "cell_15_voltage": 3.36, "mos_temperature": 29.6, "battery_temperature_1": 30.3, "battery_temperature_2": 30.8, "balance_current": 0, "battery_soc": 72}
My configuration file is:
jkbms_path: 192.168.1.93:502
jkbms_count: 1
use_gateway: true
gateway_ip_port: 192.168.1.93:502
communication_debug: true
bms_broadcasting: false
CAN_bus_usage: false
mqttadresse_port: 192.168.1.96:1883
mqttuser: mqtt
mqttpass: ######
The log is:
14 Nov 14:46:24 - [info] Node-RED version: v4.1.1
14 Nov 14:46:24 - [info] Node.js version: v22.16.0
14 Nov 14:46:24 - [info] Linux 6.12.51-haos x64 LE
14 Nov 14:46:25 - [info] Loading palette nodes
14 Nov 14:46:29 - [info] Settings file : /etc/node-red/config.js
14 Nov 14:46:29 - [info] Context store : 'default' [module=localfilesystem]
14 Nov 14:46:30 - [info] User directory : /config/smartphoton_jkbms/
14 Nov 14:46:30 - [warn] Projects disabled : editorTheme.projects.enabled=false
14 Nov 14:46:30 - [info] Flows file : /config/smartphoton_jkbms/flows.json
14 Nov 14:46:30 - [warn] Encrypted credentials not found
14 Nov 14:46:30 - [info] Server now running at http://127.0.0.1:1891/
14 Nov 14:46:30 - [info] Starting flows
14 Nov 14:46:30 - [info] Started flows
14 Nov 14:46:30 - [error] [serialconfig:6e1abcbcc6ebb714] serial port /dev/JKBMS-Fake error: Error: Error: No such file or directory, cannot open /dev/JKBMS-Fake
14 Nov 14:46:30 - [info] [mqtt-broker:56f7b2737cce493b] Connection failed to broker: mqtt://core-mosquitto.local.hass.io:1883
14 Nov 14:46:31 - [info] [function:traitement des variables] Champ 'gateway_ip_port' traité: 192.168.1.93:502
14 Nov 14:46:31 - [info] [function:traitement des variables] Champ 'mqttadresse_port' traité: 192.168.1.96:1883
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'path' = 192.168.1.93:502
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'nb_jkbms' = 1
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'use_gateway' = true
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'gateway_ip' = 192.168.1.93
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'gateway_port' = 502
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'communication_debug' = true
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'bms_broadcasting' = false
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'CAN_bus_usage' = false
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'mqttadresse' = 192.168.1.96
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'mqttport' = 1883
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'mqttuser' = mqtt
14 Nov 14:46:31 - [info] [function:traitement des variables] Variable globale 'mqttpass' = •••••••••
14 Nov 14:46:35 - [info] [mqtt-broker:56f7b2737cce493b] Connected to broker: mqtt://192.168.1.96:1883
Bonjour,
Alors vu que tu utilises une passerelle, pas besoin de modifier le jkbms_pathpar défaut. Mais c'est pas important.
- Peux-tu vérifier que tu es bien à la dernière version d'hier v3.3.3 C'est important, car j'ai amené beaucoup de modifications concernant les passerelles IP
- Peux-tu installer et utiliser l'application serial wifi terminal pour vérifier qu'il y a bien un dialogue régulier entre le module et la passerelle
- Agrandir le buffer dédié dans la configuration du Elfin. Par contre tu ne m'as pas dit si c'est un Elfin EE10 ou EW10
- Le debug ne montre rien dans le log ?
Hello,
Since you are using a gateway, there is no need to change the default jkbms_path. But that's not important.
- Can you check that you have the latest version from yesterday, v3.3.3? This is important because I have made a lot of changes concerning IP gateways.
- Can you install and use the serial wifi terminal application to check that there is regular communication between the module and the gateway?
- Enlarge the dedicated buffer in the Elfin configuration. However, you didn't tell me if it's an Elfin EE10 or EW10.
- Does debugging show anything in the log?
Thank you for your coding efforts.
1. Yes, I am using v3.3.3
2. I tried to use "TCP2COM" Windows app and didn't see anything. But I'm not sure if I was using it correctly. The other app is reading it regularly though (screenshot of MQTT below showing regular updates of the BMS parameters), so it stands to reason it must be transmitting on the Elfin.
3. Elfin Product Name is "EW41B." I increased the buffer size from 512 to 8092 (max allowed) on the Communication Settings screen. If there is another Wifi serial adapter you use that is known tested good, please let me know the make & model and I'm happy to buy that one.
4. Debugging doesn't show anything, the log file ends after the MQTT server connection line in the original log excerpt I pasted.
Additional Info:
- You can see on the Elfin that your app is connecting to it (192.168.1.96 is the home assistant server making a connection to the Elfin, .90 is that Other App running on a container outside of home assistant).
- When your app starts the last log message is "Connected to broker: mqtt://" -- but then several minutes later HTML markup of goes into the Log window (partially pasted at bottom). This appears to be the Synology NAS I have on my network. It is a separate device entirely at 192.168.1.100 and it does not host Home Assistant. The only relation to Home Assistant is that I use the synology NAS NGINX as a HTTPS reverse proxy for home assistant, so I can connect to https://192.168.1.100:4433 and that is reverse proxied to the home assistant server at http://192.168.1.96:8123. I have no idea why your app would be trying to access the synology or why that shows up in the logs.
Other App (https://github.com/luisgonzalezgonzalez/jkbms_mqtt) pulling from Elfin OK
Elfin settings
<h1 id="a"></h1>
<hr>
<p>© 2024 <a href="http://www.synology.com">Synology Inc.</a></p>
</body>
<script type ="text/javascript">
/* Copyright © 2024 Synology Inc. All rights reserved. */
(function(){var a={en:"Sorry, the page you are looking for is not found.",zh:"\u62b1\u6b49\uff0c\u60a8\u6240\u6307\u5b9a\u7684\u9875\u9762\u4e0d\u5b58\u5728\u3002",it:"La pagina richiesta non \u00e8 stata trovata.","zh-HK":"\u62b1\u6b49\uff0c\u60a8\u6240\u6307\u5b9a\u7684\u9801\u9762\u4e0d\u5b58\u5728\u3002",cs:"Hledan\u00e1 str\u00e1nka nebyla nalezena.",es:"Lo sentimos, no se encuentra la p\u00e1gina que est\u00e1 buscando.",ru:"\u0418\u0437\u0432\u0438\u043d\u0438\u0442\u0435, \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u0432\u0430\u043c\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430.",nl:"Sorry, de pagina die u zoekt kan niet weergegeven worden.",pt:"Desculpe, a p\u00e1gina que procura n\u00e3o foi encontrada.",no:"Beklager, siden du leter etter finnes ikke.",nb:"Beklager, siden du leter etter finnes ikke.",tr:"\u00dczg\u00fcn\u00fcz, arad\u0131\u011f\u0131n\u0131z sayfa bulunamad\u0131.",pl:"Przepraszamy, nie znaleziono strony, kt\u00f3rej szukasz.",fr:"D\u00e9sol\u00e9, la page que vous recherchez est introuvable.",de:"Es tut uns Leid, die von Ihnen gesuchte Seite konnte nicht gefunden werden.",da:"Desv\u00e6rre, den side, du leder efter, kunne ikke findes.","pt-BR":"Desculpe, a p\u00e1gina que procura n\u00e3o foi encontrada.","zh-MO":"\u62b1\u6b49\uff0c\u60a8\u6240\u6307\u5b9a\u7684\u9801\u9762\u4e0d\u5b58\u5728\u3002",hu:"Eln\u00e9z\u00e9st, a keresett oldal nem tal\u00e1lhat\u00f3.",ja:"\u7533\u3057\u8a33\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u635c\u3057\u3066\u3044\u308b\u30da\u30fc\u30b8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093",nn:"Beklager, siden du leter etter finnes ikke.","zh-TW":"\u62b1\u6b49\uff0c\u60a8\u6240\u6307\u5b9a\u7684\u9801\u9762\u4e0d\u5b58\u5728\u3002",ko:"\uc8c4\uc1a1\ud569\ub2c8\ub2e4. \ucc3e\uace0\uc790 \ud558\ub294 \ud398\uc774\uc9c0\ub97c \ubc1c\uacac\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.",sv:"Sidan du s\u00f6ker hittades inte."};var b=window.navigator.browserLanguage||window.navigator.language;if(-1==["zh-TW","zh-MO","zh-HK","pt-BR"].indexOf(b)){b=b.split("-",1)}document.getElementById("a").innerHTML=a[b]||a.en})();
</script>
</html>



