Support rmu writes and nibegw discovery - #62
Conversation
| if ip_address(sockaddr[0]).is_multicast: | ||
| group_bin = socket.inet_pton(family, sockaddr[0]) | ||
| if family == socket.AF_INET: # IPv4 | ||
| sock.bind(("", sockaddr[1])) |
Check warning
Code scanning / CodeQL
Binding a socket to all network interfaces
| mreq = group_bin + struct.pack("=I", socket.INADDR_ANY) | ||
| sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq) | ||
| else: | ||
| sock.bind(("", sockaddr[1])) |
Check warning
Code scanning / CodeQL
Binding a socket to all network interfaces
|
Hi @elupus, is this code any good? I thought MODBUS 40 would be sufficient for having a "virtual" thermostat, but its refusing writes at register S1 through it. Did you figure out any other way to make this work? I'd like to know before I commit to building a nibegw and reviving this code / adding it to Home Assistant. |
|
Ive not really landed on a way. At the moment im sort of testing out: elupus/esphome-nibe#60 which works over esphome api instead of the UDP based solution. But im not too happy with locking it in to the esp/home assistant based eco system so ive sort of not landed on any feet yet This one is simpler, yet its more complex on the device next to the pump. |
|
Either way, emulating them with a nibegw-like device is the way to go. I'm personally very much into doing the bare minimum to get it working in ESPHome + HomeAssistant, so I'll spin it up with Ethernet, possibly with a custom PCB like the FHEM Vaillant eBus guys. Thanks for all the work! This branch alone was more useful than most of the documentation I could find. |
|
If you are lazy, just order a lillygo T can. It has all you need. |
This is dependant on #61 and should be considered after that.
The nibegw port configuration data is a custom UDP frame, following standard nibe format, sent to the MODBUS40 address, where it's unlikely nibe would ever try to send this code.