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

[REQUEST] Also support Phyn Smart Water Assistant (PC1), a.k.a. Classic Phyn Smart Water Assistant with Cold and Hot Water Lines #4

Closed
Hedda opened this issue Dec 31, 2023 · 14 comments · Fixed by #24

Comments

@Hedda
Copy link

Hedda commented Dec 31, 2023

Please consider also supporting classic Phyn Smart Water Assistant with Cold and Hot Water Lines; Phyn Smart Water Assistant (PC1):

https://phyn.com/products/phyn

FYI, kasik96 has a pull request for it here which adds initial support for the original project -> MizterB#14

PS: Good idea is to combine Phyn Smart Water Assistant (PC1) with Phyn Plus (PP1/PP2) to get both hot and cold + shutoff valve.

@jordanruthe jordanruthe transferred this issue from jordanruthe/homeassistant-phyn-backup Jan 14, 2024
@jordanruthe
Copy link
Owner

I'm hesitant to add this myself as I don't have access to a device and I'm not sure what data it provides. If @kasik96 could provide a sample of the device state and the MQTT message, I'd be more than happy to integrate it.

@kasik96
Copy link

kasik96 commented Jan 17, 2024

Hey. I have my own version I have used for months now and works perfectly. I created a pull request here: #10

It has conflicts now, I will look into them later today.

image

@jordanruthe
Copy link
Owner

Would you be able to get a sample message from the test_mqtt example using my aiophyn repo code?

@kasik96
Copy link

kasik96 commented Jan 17, 2024

Sure :)

Here you go:

[{'alias_name': 'Home 1', 'has_configured': True, 'residents': 4, 'has_inventory': True, 'user_plumbing_type': 'prv', 'address': {'country': 'Czech Republic', 'street_address': '-', 'country_code': 'cz', 'locality': '-', 'postal_code': '-', 'region': '-', 'lat': 0}, 'updated_ts': 1704839870414, 'name': 'Home 1', 'user_plumbing_type_ts': 1697610683433, 'plumbing_type_ts': 1705480979016, 'plumbing_type': 'prv', 'created_ts': 1697580599288, 'pc_reminder': 0, 'id': 'anonymized', 'device_ids': ['anonymized'], 'devices': [{'device_id': 'anonymized', 'product_code': 'PC1'}]}] INFO:root:{'alias_name': 'Home 1', 'has_configured': True, 'residents': 4, 'has_inventory': True, 'user_plumbing_type': 'prv', 'address': {'country': 'Czech Republic', 'street_address': '-', 'country_code': 'cz', 'locality': '-', 'postal_code': '-', 'region': '-', 'lat': 0}, 'updated_ts': 1704839870414, 'name': 'Home 1', 'user_plumbing_type_ts': 1697610683433, 'plumbing_type_ts': 1705480979016, 'plumbing_type': 'prv', 'created_ts': 1697580599288, 'pc_reminder': 0, 'id': 'anonymized', 'device_ids': ['anonymized'], 'devices': [{'device_id': 'anonymized', 'product_code': 'PC1'}]} INFO:root:{'signal_strength': -49, 'online_status': {'v': 'online', 'sid': 'b556d0d7-1a6a-4e68-b00b-cff2cdbe42d4', 'ts': 1704857882324}, 'sd_status': {'v': 'G', 'r': 'watchdog', 'ts': 1703536059000}, 'hw_version': '0', 'device_id': '28F53740F9A0', 'product_code': 'PC1', 'network_name': 'MASTER', 'cold_line_num': 2, 'hot_line_num': 1, 'auto_shutoff_eligible': 0, 'serial_number': 'anonymized', 'temperature1': {'min': 58.563106536865234, 'max': 64.67961120605469, 'mean': 60.320139854162626, 'ts': 1705480789149}, 'temperature2': {'min': 48.951454162597656, 'max': 63.98058319091797, 'mean': 60.691436920129526, 'ts': 1705480789149}, 'pressure2': {'min': 14.471973419189453, 'median': 40.60564422607422, 'max': 62.47610092163086, 'mean': 42.50033660151496, 'percentile95': 62.15110397338867, 'pressure_threshold_s2_95': 43.9, 'percentile5': 38.11080551147461, 'ts': 1705480789149}, 'pressure1': {'min': 13.707271575927734, 'median': 56.6452522277832, 'max': 61.46287155151367, 'mean': 50.92575799256597, 'percentile95': 61.137874603271484, 'pressure_threshold_s1_95': 61.1, 'percentile5': 38.49315643310547, 'ts': 1705480789149}, 'fw_version': '40400001', 'timezone': 'Europe/Prague', 'partner': 'phyn', 'users': ['anonymized'], 'auto_shutoff_enable': False, 'created_ts': 1697580599168}]

@jordanruthe
Copy link
Owner

Unfortunately I made a lot of changes to the base which required me to do a lot of changes to the PR.

I uploaded a new branch 'phyn_classic_support'. Can you take a look at it and see if it works?

@kasik96
Copy link

kasik96 commented Jan 27, 2024

Hey. I tried it, but it gives me an Error.

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/phyn/init.py", line 75, in async_setup_entry
await coordinator.async_setup()
File "/config/custom_components/phyn/update_coordinator.py", line 68, in async_setup
await device.async_setup()
^^^^^^^^^^^^^^^^^^
AttributeError: 'PhynClassicDevice' object has no attribute 'async_setup'

@kasik96
Copy link

kasik96 commented Jan 27, 2024

We can debug this together via Google Meet or something, if you want.

@kasik96
Copy link

kasik96 commented Jan 27, 2024

Just added this to pc.py and it works now:
image

It just does not show pressure right now, but if i remember correctly, it takes some time.

image

@kasik96
Copy link

kasik96 commented Jan 27, 2024

Yeah, scrap that, that was bug in a code, here:
image

It works now, but the pressure is in Celsius? :D

image

@kasik96
Copy link

kasik96 commented Jan 27, 2024

So, I found the last problem too:

image

Now everything works, even the temperature cold / water lines are correct.

image

@kasik96
Copy link

kasik96 commented Jan 27, 2024

I created PullRequest for the bug fixes: https://github.com/jordanruthe/homeassistant-phyn/pull/23/files

@jordanruthe
Copy link
Owner

Thanks for updating that and the pull request.

Not sure if it's something that works, but if the device receives MQTT messages, I'm happy to integrate real time support. I just need a sample of the MQTT message. The data you gave me before looked like it was from the device_state not the MQTT connection

@kasik96
Copy link

kasik96 commented Jan 27, 2024

I don't think it has MQTT real-time support:

image

@jordanruthe
Copy link
Owner

That's unfortunate, but thanks for checking.

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 a pull request may close this issue.

3 participants