-
Notifications
You must be signed in to change notification settings - Fork 2
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
Can't connect to #135
Comments
Update. Tried to run the failed script couple times and I've got different results:
These 4 randomly change |
Hi, Thank you for the feedback and sorry for delayed response. Despite it's name The script from other issue that you've mentioned is simply too low level and doesn't have a mechanism to cope with it. It's why you only get issues with that script and not diagnostics.py which internally uses Here I updated it for you: """Collect a single frame and dump it on screen."""
import asyncio
import sys
import pyplumio
from pyplumio.const import DeviceType
from pyplumio.frames import requests, responses
# Set host and port here.
HOST = "localhost"
PORT = 8899
async def main() -> int:
"""Collect a single UID frame and dump it on screen.
We'll use DummyProtocol here, since we'll need direct control over
connection and access to a raw ecoMAX frame.
"""
async with pyplumio.open_tcp_connection(
host=HOST, port=PORT, protocol=pyplumio.DummyProtocol()
) as connection:
print("Requesting UID from the ecoMAX...")
await connection.writer.write(requests.UIDRequest(recipient=DeviceType.ECOMAX))
print("Waiting for response...")
while connection.connected:
try:
if isinstance(
(response := await connection.reader.read()),
responses.UIDResponse,
):
print(f"Got response ({response.length} bytes): {response}")
break
except pyplumio.ProtocolError:
# Continue reading next frame in case of protocol errors.
pass
sys.exit(asyncio.run(main())) Notice that now we catch |
Hi again, A couple of more things to note, that I've apparently missed in your issue description, due to being sick. You see, PyPlumIO (PIO) frame reader uses fail-fast approach to error handling. In this approach we check a frames in order from least to most expensive checks. While this allows to fail frame early with least amount of wasted resources, this also makes it a bit harder to debug, since errors such as Since you've indicated in your issue description that you've only got ecoMAX connected to the network and nothing else, PIO shouldn't have encountered any unknown devices. So it this case the real issue is probably stems from PIO getting malformed frames from your device, which means there's possibly issue with your HW (converter settings or even RS485 wires not being properly attached). I'd start debugging this issue from hardware standpoint first. |
Is there an existing issue for this?
I'm having the following issue:
Hello,
I am having issues with connecting to the boiler. Noticed initially in home assistant integration (timeouts) and after some digging I've found an error message in pyplumio.
Unknown sender type (80)
I have tried the script to get data from the ecomax (https://gist.github.com/denpamusic/5df805524738ea1bb9c00d25ed351c46) without any issues. Attaching file
ecomax_data.json
But when I tried to test another script I found in other issue here I got the unknown sender error again.
Would you please try to help me where should I look?
Tried:
Only change I made at home before this happened was that I changed the router (from old mikrotik to newer mikrotik) but it shouldn't be the issue I believe.
Thank you
My environment is:
I have following devices connected:
I'm connecting to my devices using:
Ethernet/WiFi to RS-485 converter
I'm seeing following log messages:
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: