Bridge local MQTT broker to SAJ server #4
Replies: 7 comments 23 replies
-
Let me know if the bridging works for you as well. 😉 If you already poisened your dns locally, you can skip the adguard step for dns rewrite. |
Beta Was this translation helpful? Give feedback.
-
That doesn't sound good, will have to try myself to see if it happens as well with the AIO3 module... 😢
Hmm, I'm not seeing all these topics when I sniffed my network with tcpdump... |
Beta Was this translation helpful? Give feedback.
-
There is no webserver in my dongle. I'm using one of the integrations which talks to the SAJ server to get its data. Definitely not ideal and it needed tweaking to make it work. Messing around with a modbus hardware intervention was more effort than I wanted to make. mqtt was the middle ground and seemed like a good compromise which I'll try again with. I used wireshark to capture what the dongle was up to - which also got me the credentials I needed to allow the dongle to connect to mosquitto after poisoning the DNS. I was surprised I had to sniff on the actual wifi rather than on the eth adapter where the mqtt server was, after all, the traffic ends up on the eth for the server to see it. I hadn't thought about the possibility of different capacity inverters using different firmwares. But that could explain why nothing I've tried works "out of the box". In which case it'll probably need more time spent on it than I'll have available this weekend. Ugh. |
Beta Was this translation helpful? Give feedback.
-
interesting! I like the MQTT approach (if we get it working). I still want to use the SAJ mobile app but also get the real time info from the inverter in Home Assistant. So poisoning the DNS to a local MQTT broker in the LAN and forward the MQTT message to SAJ makes sense to me. |
Beta Was this translation helpful? Give feedback.
-
Not a problem, I'm also running mqtt broker with username/password. You'll just need to add the saj username/password to the list of logins in the mqtt broker config. The dns rewrite can be done in adguard with a single line (replace with your HA ip if you are running the mqtt broker addon in HA, or the IP of your mqtt standalone instance): Scripts don't need to be installed themselves, you can just run them with python. Dutch is fine for me in direct communication. On github I rather keep it in English so everyone can follow. 😉 |
Beta Was this translation helpful? Give feedback.
-
Done!I’m looking forward to see how this works. I think is much cleaner than the elfin solution.Do you resend the information to the original broker ? Or do you use it isolated ?El 31 des. 2024, a les 20:22, h3llrais3r ***@***.***> va escriure:
@miquelbotanch Please DM me on ***@***.*** so I can reply.
Replied as well ;)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
And what if they force an update using the broker, and the we loose the magic, because as far as I know, bringing is both ways so, exist the possibility that they force the upgrade and this propagate to our MQTT and then we loose all the magic.Enviat des del meu iPhoneEl 2 gen. 2025, a les 22:14, h3llrais3r ***@***.***> va escriure:
Yes, data is still sent to the original broker. That's why we are bridging it, so you can still use the saj e-solar app. ;)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
This post comes from this issue, in particular it has been posted by @h3llrais3r
Ok, I thought the infamous firmware was for the inverter... but it's for the battery I assume?
My inverter is the H1-5K-S2 with firmware 1.202.
For the battery I can see a software version, which seems to be 1.152
Based on https://solar-assistant.io/help/home-assistant/broker-setup
mqtt.saj-solar.com
to your mqtt ip address (I'm running the mosquitto addon in HA, so for me it's the HA ip)customize: true
andfolder: mosquitto
to mosquitto config/share/mosquitto/saj_mqtt_bridge.conf
with following content to bridge saj app topic to still have access to the data from the saj app:address
contains the real ip ofmqtt.saj-solar.com
remote_username
contains the username used by saj to connect tomqtt.saj-solar.com
remote_password
contains the password used by saj to connect tomqtt.saj-solar.com
saj/<serial>/realtime_dataPlus
, but other firmwares might be usingsaj/<serial>/realtime_data
)With this setup, the app still gets the data, but I don't think remote control is still possible as I'm not bridging the data_transmission topic, so even if it's published on the remote broker, it won't be bridged as it's not part of the bridge topic config.
Only problem I can see now is that the ip address of
mqtt.saj-solar.com
can change and the bridge woudn't work anymore until the ip is updated in the bridge config.If I would be able to change the mqtt server on the aio3 module directly (I know you can change it via the app, but I never tested it yet) and it actually also keeps that value after a reboot, then the adguard dns rewrite could be removed and in the bridge config, I could put
mqtt.saj-solar.com
as address instead. Then it should work also when the ip address is changing at saj side..So I still need to check if the mqtt server can be changed and if it's kept after a restart of the aio3 module.
PS: I suppose you know the credentials for saj mqtt? If not, I can share in PM.
Beta Was this translation helpful? Give feedback.
All reactions