skot / ESP-Miner

A bitcoin ASIC miner for the ESP32
GNU General Public License v3.0
309 stars 113 forks source link

Add MQTT Support #303

Open ffrediani opened 3 weeks ago

ffrediani commented 3 weeks ago

MQTT is a pretty versatile, lightweight and simple protocol which allows data export to platforms in order to improve monitoring, specially where there are a reasonable number of devices in order to identify faults or improve efficiency.

MQTT code is well developed for ESP32 and doesn't increase much the binary size or consumes any significant resources in terms of CPU and Memory. Tasmota firmware uses it widely for both ESP8266 and ESP32.

A few new lines in settings would be enough such as: Destination Host, ClientID, Username, Password and Topic.

References: https://tasmota.github.io/docs/MQTT/

skot commented 3 weeks ago

This is an interesting idea. We could maybe expand the monitoring/control options while not increasing the HTTP overhead?

Of course we'd need to figure out how to interface with this. Can web apps talk MQTT directly?

ffrediani commented 3 weeks ago

Hi skot Adding MQQT support doesn't have any reasons to increase anything in terms of HTTP overhead. MQTT is a separate protocol with readily available code for ESP32 and as lightweight will only consume a little extra resources if used, but should not increase HTTP overhead. As a separate protocol apps talk to MQTT directly.

Webranger2 commented 2 weeks ago

That would be a cool idea. This way you could get information in the vis from the iobroker or homeassist.

pixeldoc2000 commented 1 week ago

@Webranger2 FYI, Home Assistant Integration is already possible via hass-miner Integration (using pyasic).

MQTT Support +1