Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rmu writes and nibegw discovery #62

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

elupus
Copy link
Collaborator

@elupus elupus commented Nov 1, 2022

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.

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.
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

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
Copy link
Collaborator Author

elupus commented Jan 28, 2024

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

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
Copy link
Collaborator Author

elupus commented Jan 28, 2024

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.

2 participants