reinhard-brandstaedter / solarflow-bt-manager

A tool to connect to Zendure's Solarflow hub to retrieve telemetry data
45 stars 9 forks source link

Workaround for Solarflow-BT-Manager #10

Open olomberg opened 6 months ago

olomberg commented 6 months ago

Hi Reinhard.

I just bought an implemented my Solarflow PV Hub 2000 and AB 2000 for my house. Zendure App is fully configured. Now I would like to use your Solarflow Control and Statuspage part. Unfortunately I am currently 3 hours away from my house but have remote access via vpn tunnel. Given that I am not able to reconfigure the PV Hub via bluetooth. I did a Wireshark sniff an can see the PV Hub sending it's MQTT packages to mqtteu.zen-iot.com as I did the initial setup an configuration to Germany. So while thinking about how I could re-configre it remotely, while not being onsite, I came up with the idea to just fake the dns entry of "mqtteu.zen-iot.com" on my local dns server (leveraged also by my PB Hub) pointing to my local Mosquitto mqqt server. Did somebody ever tried/tested this? Should this work with your control tool? I will test this tomorrow, when I will have more time. Feedback on "faking" DNS is appreceated. Best Oliver

olomberg commented 6 months ago

Update: Seems to be working so far. Just had the chance to set a DNS record of "mqtt.zen-iot.com" pointing to my local mqtt server and disconnected my internet connection so that the PV Hub has to re-establish the connection. After this can see the mqtt messages flying in. At the same time my PV Hub is "Offline" in the Zendure App under My devices.

reinhard-brandstaedter commented 6 months ago

Yes, that will work seamlessly. This split-dns was also my initial setup without changes on the hub side. But since not everyone is able to operate their own DNS I took the generic approach within the hub’s config.

mavo commented 5 months ago

Hello @olomberg,

as you have the hub2k for some days now, did you manage to have sf-control working with it? I am currently struggeling. Maybe you have an idea what I forgot to do?

https://github.com/reinhard-brandstaedter/solarflow-control/issues/191

martin-nrw-85 commented 5 months ago

Hallo, ich hoffe hier kann man mir helfen. Ich habe den Hub1200 offline genommen. Musste eine Änderung in dem Skript vornehmen:

Da es immer zu einer Fehlermeldung: " File "/zendure/solarflow-bt-manager/src/solarflow-bt-manager.py", line 43, in local_mqtt_connect client = mqtt_client.Client(mqttclient.CallbackAPIVersion.VERSION1, client id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'paho.mqtt.client' has no attribute 'CallbackAPIVersion'"

Im MQTT Explorer bekomme ich jedoch nur "0{"messageId":"123","method":"device","deviceId":"xxxxx","timestamp":1712852073,"offData":0,"data":{"eventId":3,"startTime":1712851893,"endTime":1712852073,"inout":2,"mode":2,"electric":0}}" angezeigt sonst kommen keine Ereignisse.

ninjadriver commented 5 months ago

Yes, that will work seamlessly. This split-dns was also my initial setup without changes on the hub side. But since not everyone is able to operate their own DNS I took the generic approach within the hub’s config.

Hi, could you push or send me an short information about how you started with faking the DNS Entry? Background: