Closed DanielNagy closed 2 years ago
Also worth noting this WARNING in the logs.
2022-07-05 10:23:53 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses deprecated async_get_registry
to access device registry, use async_get instead. Please report issue to the custom component author for automate using this method at custom_components/automate/helpers.py, line 36: dev_registry = await get_dev_reg(hass)
Can you please try applying the following patch if you're familiar enough with modifying code in place?
diff --git a/aiopulse2/const.py b/aiopulse2/const.py
index 1015610..ff67c0c 100644
--- a/aiopulse2/const.py
+++ b/aiopulse2/const.py
@@ -47,6 +47,7 @@ TYPES = {
"B": "Hub/Gateway",
"C": "Curtain motor",
"D": "DC motor",
+ "d": "DC motor (lower)",
"S": "Socket",
"L": "Lighting devices",
}
This is very much just a test to see what maybe happening... It could well be the unknown type (lower rather than upper case D
) is causing other issues. This is a quick test for that.
I tried this, but it is still showing as unknown?
Hi @sillyfrog,
Is there any additional testing you wish me to try?
Hi,
Can you please give this branch a go: https://github.com/sillyfrog/aiopulse2/tree/short-motor-debug
I think the issue is actually just the regex (it assumes it's always upper case), this branch changes that, and has some additional debugging. You can hopefully just copy the contents of the aiopulse2
folder in this repo over the one in site-packages
in your deployment (depending on hour you're running HA), and restart.
Let me know how you go, and if you have any issues, please include the logs with aiopulse2
in the line, the extra logging I have (at info
level), should help me debug further.
Cheers.
Hello.
Ok, I finally managed to try this. Positioning is now correctly reported on these two Q1.1 devices (rather than being stuck at 50%)
the Q1.1 devices are Study - 8B9 Study Corner Left - PHX
As noted in screenshot above the Battery icon isn't displaying
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('1LS', 'Lower Void Left')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!PHXNAMEStudy Corner Left;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('PHX', 'Study Corner Left')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!9SMNAMEGames Right;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('9SM', 'Games Right')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!X8YNAMELiving Right;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('X8Y', 'Living Right')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!I63NAMEGames Left;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('I63', 'Games Left')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!BYJNAMEStudy Corner Right;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('BYJ', 'Study Corner Right')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!JBTNAMELower Void Right;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('JBT', 'Lower Void Right')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!W0MNAMELower Void Middle;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('W0M', 'Lower Void Middle')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!RLRNAMELiving Left;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('RLR', 'Living Left')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!0GCNAMETheatre Left;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('0GC', 'Theatre Left')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!8B9NAMEStudy;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('8B9', 'Study')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!JTJNAMEDining;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('JTJ', 'Dining')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!34NNAMETheatre Right;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('34N', 'Theatre Right')
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] recv < b'!B5GNAMELower Void Side;'
2022-07-27 10:33:27 DEBUG (MainThread) [aiopulse2.devices] 192.168.60.6: Received response: DEVICE_QUERY_NAME_RESPONSE content: ('B5G', 'Lower Void Side')
2022-07-27 10:33:29 DEBUG (MainThread) [aiopulse2.devices] Got payload: {'hubId': '1031194', 'name': 'RA-Pulse', 'dailyReboot': False, 'mac': 'c8:2b:96:xx:xx:xx', 'onlineLatest': 1658882010.543239, 'mfi': {'PD': 'xx', 'manufacturer': 'Rollease Acmeda', 'model': 'MT02-0401-067001'}, 'firmware': {'version': '1.5.0', 'RFversion': 'B16'}, 'shades': {'BYJ': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.6D20', 'ls': 1, 'rs': -73}, 'PHX': {'is': True, 'ol': True, 'mp': 100, 'vo': '7.8d20', 'ls': 1, 'rs': -95}, '9SM': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.0D24', 'ls': 1, 'rs': -93}, 'JBT': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.1D24', 'ls': 1, 'rs': -79}, 'W0M': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.1D24', 'ls': 1, 'rs': -81}, '1LS': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.2D24', 'ls': 1, 'rs': -81}, 'B5G': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.0D24', 'ls': 1, 'rs': -75}, 'JTJ': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.1D24', 'ls': 1, 'rs': -81}, 'X8Y': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.3D24', 'ls': 1, 'rs': -75}, 'RLR': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.3D24', 'ls': 1, 'rs': -76}, '0GC': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.4D24', 'ls': 1, 'rs': -81}, '34N': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.5D24', 'ls': 1, 'rs': -73}, '8B9': {'is': True, 'ol': True, 'mp': 100, 'vo': '8.0d25', 'ls': 1, 'rs': -95}, 'I63': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.0D24', 'ls': 1, 'rs': -77}}}
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.6D20'>, vo: 11.6D20
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.6', 'D', '20')
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 6), match='7.8d20'>, vo: 7.8d20
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('7.8', 'd', '20')
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.0D24'>, vo: 11.0D24
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.0', 'D', '24')
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.1D24'>, vo: 11.1D24
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.1', 'D', '24')
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.2D24'>, vo: 11.2D24
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.2', 'D', '24')
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.3D24'>, vo: 11.3D24
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.3', 'D', '24')
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.4D24'>, vo: 11.4D24
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.4', 'D', '24')
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.5D24'>, vo: 11.5D24
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.5', 'D', '24')
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 6), match='8.0d25'>, vo: 8.0d25
2022-07-27 10:33:29 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('8.0', 'd', '25')
2022-07-27 10:33:31 DEBUG (MainThread) [aiopulse2.devices] Got payload: {'hubId': '1031194', 'name': 'RA-Pulse', 'dailyReboot': False, 'mac': 'c8:2b:96:xx:xx:xx', 'onlineLatest': 1658882012.545652, 'mfi': {'PD': 'xx', 'manufacturer': 'Rollease Acmeda', 'model': 'MT02-0401-067001'}, 'firmware': {'version': '1.5.0', 'RFversion': 'B16'}, 'shades': {'BYJ': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.6D20', 'ls': 1, 'rs': -73}, 'PHX': {'is': True, 'ol': True, 'mp': 100, 'vo': '7.8d20', 'ls': 1, 'rs': -95}, '9SM': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.0D24', 'ls': 1, 'rs': -93}, 'JBT': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.1D24', 'ls': 1, 'rs': -79}, 'W0M': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.1D24', 'ls': 1, 'rs': -81}, '1LS': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.2D24', 'ls': 1, 'rs': -81}, 'B5G': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.0D24', 'ls': 1, 'rs': -75}, 'JTJ': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.1D24', 'ls': 1, 'rs': -81}, 'X8Y': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.3D24', 'ls': 1, 'rs': -75}, 'RLR': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.3D24', 'ls': 1, 'rs': -76}, '0GC': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.4D24', 'ls': 1, 'rs': -81}, '34N': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.5D24', 'ls': 1, 'rs': -73}, '8B9': {'is': True, 'ol': True, 'mp': 100, 'vo': '8.0d25', 'ls': 1, 'rs': -95}, 'I63': {'is': True, 'ol': True, 'mp': 100, 'vo': '11.0D24', 'ls': 1, 'rs': -77}}}
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.6D20'>, vo: 11.6D20
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.6', 'D', '20')
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 6), match='7.8d20'>, vo: 7.8d20
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('7.8', 'd', '20')
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.0D24'>, vo: 11.0D24
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.0', 'D', '24')
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.1D24'>, vo: 11.1D24
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.1', 'D', '24')
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.2D24'>, vo: 11.2D24
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.2', 'D', '24')
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.3D24'>, vo: 11.3D24
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.3', 'D', '24')
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.4D24'>, vo: 11.4D24
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.4', 'D', '24')
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 7), match='11.5D24'>, vo: 11.5D24
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('11.5', 'D', '24')
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo: <re.Match object; span=(0, 6), match='8.0d25'>, vo: 8.0d25
2022-07-27 10:33:31 INFO (MainThread) [aiopulse2.devices] XXX batteryinfo groups: ('8.0', 'd', '25')```
It is worth noting from issue https://github.com/sillyfrog/aiopulse2/issues/6 that these Q1.1 device previously was being reported as a "U25". The newer Q1.1 I've recently received was "U20". It appears that since the Pulse Hub firmware has been updated, these are now "d25" and "d20". Somewhat making the "U" const.py definition somewhat defunct. (obviously once peoples hub firmware's are updated)
Thanks for the updates. I've finally got back to this, and just pushed some changes to the https://github.com/sillyfrog/aiopulse2/tree/short-motor-debug branch. If you can please give that another go that would be great.
Once tested and confirmed working, I'll make a proper release.
Cheers.
Hello @sillyfrog,
Just applied and it looks good.
This is fixed in the v0.7.0 release. I'll link in the Automate-Pulse-v2 HACS release now.
Thanks you :)
Previously i raised https://github.com/sillyfrog/aiopulse2/issues/6 as the Q1.1 short motor I purchased, was showing as AC type instead of battery, which was rectified. I've since got a second Q1.1 short motor.
However, I note, in Home assistant, the "Position" adjuster, always shows 50% for these, irrelevant of actual blind position.
ie, The icon state is Yellow indicating open blind When you click for more details, the position slider is 50%. The blind is actual 100% open. But, it doesn't matter what position i set the actual blind to, the position slider is always reporting 50%
This only happens with the 2x Q1.1 Short motors that I have. The other Q2 motors i have behaving as expected, where the position slider shows true indication of the blind position.
It is also worth noting that the Device view is showing "< unknown >", and no battery. (This is new as previously based on issue 6, this was fixed. However i had spoken to Acmeda about a homekit issue i had, where they did a remote firmware update of my hub. I feel this is when this changed, as within the Pulse2 app itself, the "Power Module Type" is also not populated for both these Q1.1 motors.
The Q1.1 short motors are PHX and 8B9. Interesting the vo "D" is lower case vs the Q2's. Given that this was reporting as U25 previously(before the 1.4.0 firmware pulse 2 hub update), in both the debug log, as well as the Pulse2 app, it seems the 1.4.0 Pulse 2 hub firmware is a little under baked.
Would this "< unknown >" be the reason why positioning state is not correctly gathered?