It's a proof of concept project, discovering all Sonoff devices in the same LAN, that entered to LAN mode, and collecting and forwarding commands sent to it/arriving from them to an MQTT broker for further processing.
It's using multiple websockets and multithreading so i have no clue how it can be converted into a working Domoticz Python plugin, i made it as a standalone app now.
https://github.com/enesbcs/sonofflan2mqtt
Sonoff LAN mode MQTT bridge
Moderator: leecollings