Paxy / SmartESS-proxy

SmartESS (PowMr) to MQTT proxy
9 stars 3 forks source link

No topic on MQTT #4

Open AndrewT1000 opened 1 month ago

AndrewT1000 commented 1 month ago

Sorry for my English. The program starts, receives data from the logger and sends it further, the settings from SmartESS also work. However, no data appears on the MQTT broker. Logs from the broker show that the client connected successfully. What else can I check?

Paxy commented 1 month ago

Can you show a log from java service?

AndrewT1000 commented 1 month ago

I have little contact with Java. How to see these logs? Any parameters at startup? I have it under debian 12.

console run:

root@debian12:/usr/SmartESS-proxy-main/bin# java -jar SmartESS-proxy.jar 2024-05-13 21:14:09.834 - Connected to server 47.242.188.205 2024-05-13 21:14:09.936 - MQTT connected 2024-05-13 21:14:10.141 - Server: 598A0001000AFF0118050D130E090023 2024-05-13 21:14:10.141 - Waiting for node ... 2024-05-13 21:14:10.771 - Connected node 192.168.43.11 2024-05-13 21:14:10.973 - Node: 598A01020010FF015130303237303832383130373539

Paxy commented 1 month ago

If you have started the process with screen command, type screen -r to resume the screen and see the last logs. JAR when starter, reports what inverter and cloud have sent. I need to see that log report to be able to help you.

AndrewT1000 commented 1 month ago

with such a command java -jar SmartESS-proxy.jar 2>>sm.log sm.log file is empty

command: screen -dmS jar1 bash -c 'java -jar SmartESS-proxy.jar' result screen -r:

2024-05-14 09:08:18.035 - Connected to server 47.242.188.205 2024-05-14 09:08:18.091 - MQTT connected 2024-05-14 09:08:18.353 - Server: 40A70001000AFF0118050E0708120023 2024-05-14 09:08:18.353 - Waiting for node ... 2024-05-14 09:08:18.867 - Connected node 192.168.43.11 2024-05-14 09:08:19.068 - Node: 40A701020010FF015130303237303832383130373539 2024-05-14 09:08:19.457 - Server: 40A80001000BFF02010204050C191A2241 2024-05-14 09:08:19.671 - Node: 40A801020008FF0200016E756C6C40A801020012FF020002513030323730383238313037353940A801020007FF020004312E3240A80102000BFF020005332E352E312E3340A801020005FF02000C3140A801020006FF020019313440A801020004FF02011A40A80102000EFF020022323430302D382D312D3040A801020004FF020141 2024-05-14 09:08:20.059 - Server: 40A90001000AFF04050311D30002314A 2024-05-14 09:08:20.574 - Node: 40A900010007FF04050382E150 2024-05-14 09:08:20.962 - Server: 40AA0001000AFF0405031195002D9143 2024-05-14 09:08:21.878 - Node: 40AA00010061FF0405035A0400A509F301FD073B011601640004000000A509F3015901A400080008000000000040080000010068106810E6001200F000E600F401120000000000F923D200A80C19002401020001000100020000001E00E6000200E6000E018A71 2024-05-14 09:08:22.267 - Server: 40AB0001000AFF04050311C20010E142 2024-05-14 09:08:22.881 - Node: 40AB00010027FF0405032024011601C80024013C0078001E00661502000D000D003D000000000005000100B60E

Paxy commented 1 month ago

That looks completely fine. The server is sending a requests to the inverter, and the inverter is responding back with the data. Also, MQTT shows as contected. Test accessing to MQTT from computer to see all MQTT topics with the command: mosquitto_sub -v -h <ip> -p <port> -t '#' -u <user> -P <pass>

Also, check your config.ini file where SmartESS-proxy.jar is located that you have set correct settings for enableMqttAuthm mqttUser and mqttPass.

AndrewT1000 commented 1 month ago

config.ini is the first thing that I check.

mosquitto_sub -v -h 192.168.40.11 -p 1883 -t '#' -u ##### -P ##### lxu401/connected online homeassistant/switch/Listwa_LXU401_relay_1/config {"dev":{"ids":["Listwa LXU401"],"name":"lxu401","sw":"1.17.457","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://192.168.43.100/index"},"name":"1","~":"lxu401","avty_t":"~/connected","pl_on":"1","pl_off":"0","uniq_id":"Listwa_LXU401_relay_1","qos":1,"stat_t":"~/1/get","cmd_t":"~/1/set"} homeassistant/switch/Listwa_LXU401_relay_2/config {"dev":{"ids":["Listwa LXU401"],"name":"lxu401","sw":"1.17.457","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://192.168.43.100/index"},"name":"2","~":"lxu401","avty_t":"~/connected","pl_on":"1","pl_off":"0","uniq_id":"Listwa_LXU401_relay_2","qos":1,"stat_t":"~/2/get","cmd_t":"~/2/set"} homeassistant/switch/Listwa_LXU401_relay_3/config {"dev":{"ids":["Listwa LXU401"],"name":"lxu401","sw":"1.17.457","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://192.168.43.100/index"},"name":"3","~":"lxu401","avty_t":"~/connected","pl_on":"1","pl_off":"0","uniq_id":"Listwa_LXU401_relay_3","qos":1,"stat_t":"~/3/get","cmd_t":"~/3/set"} homeassistant/switch/Listwa_LXU401_relay_4/config {"dev":{"ids":["Listwa LXU401"],"name":"lxu401","sw":"1.17.457","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://192.168.43.100/index"},"name":"4","~":"lxu401","avty_t":"~/connected","pl_on":"1","pl_off":"0","uniq_id":"Listwa_LXU401_relay_4","qos":1,"stat_t":"~/4/get","cmd_t":"~/4/set"} homeassistant/switch/Listwa_LXU401_relay_5/config {"dev":{"ids":["Listwa LXU401"],"name":"lxu401","sw":"1.17.457","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://192.168.43.100/index"},"name":"5","~":"lxu401","avty_t":"~/connected","pl_on":"1","pl_off":"0","uniq_id":"Listwa_LXU401_relay_5","qos":1,"stat_t":"~/5/get","cmd_t":"~/5/set"} homeassistant/sensor/Listwa_LXU401_rssi/config {"dev":{"ids":["Listwa LXU401"],"name":"lxu401","sw":"1.17.457","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://192.168.43.100/index"},"name":"RSSI","~":"lxu401","avty_t":"~/connected","uniq_id":"Listwa_LXU401_rssi","qos":1,"dev_cla":"signal_strength","stat_t":"~/rssi","unit_of_meas":"dBm"}

this is with running smartess_proxy! I have devices that work via MQTT without problems.

AndrewT1000 commented 1 month ago

Or maybe the reason is that I have a different inverter (Anern) and only the logger is supported? The data is forwarded but not decoded to MQTT. Should I look for the reason in ProcessInverterData.java?

Paxy commented 1 month ago

If you have time, try to troubleshoot ProcessInverterData.java, especially part of data parsing. It is likely that inverter have different data codes. This project was based on PowMr inverters data.

AndrewT1000 commented 1 month ago

And that's fine. Works with Anern inverter. I read the basic parameters correctly, but I still need to work on the additional ones.

Paxy commented 1 month ago

you can set service as man-in-the-middle service (without fake) and montior data changes while changing additional parameteres in ESS app. That can give you a clue what data means.