Zendure / developer-device-data-report

Subscribe to device data for Zendure products. To receive information from the device, Developers can obtain the same device information as the official App by subscribing to Zendure MQTT Broker
82 stars 3 forks source link

Help to install into Fhem #2

Open tasisale opened 1 year ago

tasisale commented 1 year ago

Can you give a example how to add your code to Fhem?

Zendure commented 1 year ago

To integrate Fhem with MQTT and subscribe to messages starting with a user's appKey, you can follow these steps:

Install the MQTT plugin in Fhem. You can use the following commands to install the plugin:

update all install MQTT Configure the MQTT connection. Add the following content to the Fhem configuration file:

define mqtt MQTT : attr mqtt user attr mqtt password Where is the address of the MQTT broker server, is the port number, and are the username and password required to connect to the MQTT broker server.

Subscribe to messages starting with the user's appKey. Add the following command to the Fhem configuration file:

define my_mqtt_sub MQTT_SUB Where is the MQTT topic filter you want to subscribe to, such as {appKey}/#.

After completing these steps, Fhem will be able to connect to the MQTT broker server and subscribe to all MQTT messages starting with appKey. Please note that this assumes you have correctly configured your MQTT client and server and that your Fhem system is able to communicate with the MQTT broker server.

tasisale commented 1 year ago

unfortunately it doesn't work that way for me. how do I connect the MQTT to Zendure? what is my app key?

lbouriez commented 1 year ago

@tasisale To get your app key, follow the readme instructions here: https://github.com/Zendure/developer-device-data-report I used Postman to post the message and get the information

tasisale commented 1 year ago

@tasisale To get your app key, follow the readme instructions here: https://github.com/Zendure/developer-device-data-report I used Postman to post the message and get the information

ok, but why? sorry for the bad question. how i will connect it finaly to fhem?

thx for yout help.

tasisale commented 1 year ago

no one who can help?

steffenxx commented 11 months ago

i use NodeRed to read the MQTT Values from the Zendure MQTT Server. Then NodeRed writes some Values to an influxDB/Grafana and some Values i write via MQTT direkt in FHEM Device readings. sounds complicated but it is not.