Skip to content

Support rmu writes and nibegw discovery - #62

Draft
elupus wants to merge 7 commits into
yozik04:masterfrom
elupus:discovery2
Draft

Support rmu writes and nibegw discovery#62
elupus wants to merge 7 commits into
yozik04:masterfrom
elupus:discovery2

Conversation

@elupus

@elupus elupus commented Nov 1, 2022

Copy link
Copy Markdown
Collaborator

This is dependant on #61 and should be considered after that.

  • Add support for writing RMU data to work as virtual RMU's
  • Add support for port configuration sent from nibegw device

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.

Comment thread nibe/connection/nibegw.py
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

'' binds a socket to all interfaces.
Comment thread nibe/connection/nibegw.py
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

'' binds a socket to all interfaces.
@pzduniak

Copy link
Copy Markdown

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.

@elupus

elupus commented Jan 28, 2024

Copy link
Copy Markdown
Collaborator Author

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.

@pzduniak

Copy link
Copy Markdown

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.

@elupus

elupus commented Jan 28, 2024

Copy link
Copy Markdown
Collaborator Author

If you are lazy, just order a lillygo T can. It has all you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants