Closed dabrahim closed 1 year ago
Is anyone experiencing lack of reporting anything when in action mode, and you pick up the cube and put it back on a face ? Tapping it or flipping it reacts well, but gently holding and putting it back down doesn’t do anything. I’ll try to use scene mode maybe
EDIT : indeed scene mode works perfectly for this use case
@ybizeul that's normal: https://github.com/Koenkk/zigbee2mqtt/issues/15652#issuecomment-1373787896
Perfect explanation thank you !
Testing with two of these cubes running the latest converter code, but I don't get consistent results. I'm new to zigbee/Z2M and not fully sure how to debug.
Observations/questions: Events/actions don't register consistently. Sometimes I'm trying the all the actions and they register fine, but then all of a sudden some actions start missing and I don't get any events. Scene mode seems more consistent: reports the side and hold action also works. A shake action also always works. But when in action mode it seems random: doesn't register rotate, slide or flip events. And then all of a sudden it does work.
While debugging in node red and in z2m log I also notice 4 events when doing one single action. sample outfput of my log:
info 2023-01-29 01:26:14: MQTT publish: topic 'zigbee2mqtt/AqaraCube_Nick', payload '{"action":"flip_to_side","action_angle":null,"action_from_side":null,"battery":100,"current":0,"device_temperature":25,"linkquality":255,"operation_mode":"scene_mode","power":1,"power_outage_count":10,"side":5,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":3082}' info 2023-01-29 01:26:14: MQTT publish: topic 'zigbee2mqtt/AqaraCube_Nick', payload '{"action":"","action_angle":null,"action_from_side":null,"battery":100,"current":0,"device_temperature":25,"linkquality":255,"operation_mode":"scene_mode","power":1,"power_outage_count":10,"side":5,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":3082}' info 2023-01-29 01:26:14: MQTT publish: topic 'zigbee2mqtt/AqaraCube_Nick/action', payload 'flip_to_side' info 2023-01-29 01:26:15: MQTT publish: topic 'zigbee2mqtt/AqaraCube_Nick', payload '{"action":"side_up","action_angle":null,"action_from_side":null,"battery":100,"current":0,"device_temperature":25,"linkquality":255,"operation_mode":"scene_mode","power":1,"power_outage_count":10,"side":5,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":3082}' info 2023-01-29 01:26:15: MQTT publish: topic 'zigbee2mqtt/AqaraCube_Nick', payload '{"action":"","action_angle":null,"action_from_side":null,"battery":100,"current":0,"device_temperature":25,"linkquality":255,"operation_mode":"scene_mode","power":1,"power_outage_count":10,"side":5,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":3082}' info 2023-01-29 01:26:15: MQTT publish: topic 'zigbee2mqtt/AqaraCube_Nick/action', payload 'side_up'
=> is that normal? I would expect just 1 event with all the payload because otherwise it's hard to define actions against it. When I installed the last version of the converter I also removed the devices and restarted Z2M. Am I missing something?
Link quality is good and testing this sitting close zo my sonoff zbdongle-e coördinator.
any ideas?
So close, yet so far.. any idea where i went wrong?
@Rhysgh r u talking about Null values for battery stuff? Those info takes a long time to show. It's normal for battery powered devices.
But you can make them show immediately by pressing on LINK, or give your cube a throw
motion.
Hi, yes, sorry, I'm terrible for lacking context.
I did try a throw, but I guess I didn't throw it right .. I see it's disabled here. Could that be the issue? i still have all null entries
I would try to remove/unlink and add the device again - maybe even a couple of times.
Ok tried deleign (forece reoved) , reatrted and readded .. i noticed the values where N/A and then changed to Null .. but are always Null nomatter what I try.. and the avalibility is still disabled.
@Rhysgh, when you perform an action on the cube, does Z2M produce any logs? You should be seeing a payload with the action show up when you rotate, flip, shake, etc. On HA and Z2M, the values show as Null or N/A for side, rotate, etc. because they are instant. If they show up in the Z2M logs, it means that the cube is functioning properly. To make automations, you can use MQTT as a trigger or condition, and just use the payload content instead of the device state. Example:
Trigger - MQTT Topic - "zigbee2mqtt/CUBE NAME/action" Condition - Template - {{ trigger.payload == "rotate_left" }}
This will trigger the automation when an action payload is detected by MQTT, and only perform it if the cube was rotated left.
The Availability showing up as "Disabled" is standard on Z2M. To change this you need to modify your Z2M configuration: https://www.zigbee2mqtt.io/guide/configuration/device-availability.html
EDIT:
If you want to enable availability, edit your configuration.yaml in the zigbee2mqtt folder and add this line:
availability: true
Thanks, I had a look. I see this.
Re availability, I had figured that was the issue. Do I need to set it to available? or is it ok as it is?
Make sure you're using the latest code (https://github.com/JJPro/CTP-R01-converter/blob/trunk/CTPR01.js) I was having this issue when the cube wasn't configuring properly. Might also be worth a shot trying the orange reconfigure button
@Rhysgh The availability feature doesn't affect the Cube's functionality - it simply reports if the device is online or not. Based on the logs, it looks like the converter was not properly set up. Did you include the file in your zigbee2mqtt configuration.yaml file? Also, have you restarted Z2M after adding the converter and editing the file?
I used this file - https://github.com/JJPro/CTP-R01-converter
This is my setup. Is that correct?
@Rhysgh That looks correct. Also, Z2M seems to have recognized the device as it shows up in a details page (your earlier screenshot) Another guess: When you add the device to the network, did you limit the pairing to the coordinator? Sometimes it makes a difference if one adds new devices via a repaeter.
@OstfrieseUnterwegs
No, I was permitted to join all, yea before adding the file ( I didn't know it wasn't supported), I got unsupported, but now I see it as you say.
its connected, and seeing it as in the sate I see what mode its in, and it changes when i click 5 times
I am on
Home Assistant 2023.2.0b7 Supervisor 2023.01.1 Operating System 9.5 Frontend 20230130.0 - latest
maybe that's an issue?
I cannot help with the HASS environment. But if you have not done so far, try:
Remove the device
Permit joining on coordinator only
add the device again
Also check your battery, the first screenshot you posted has a linkquality of 42. That's probably too low. If distance to your coordinator isn't an issue, then it might be the battery.
The pairing process will draw a lot of power.
The minimum working linkquality from my experiment, just tested minutes ago, in my environment, is around 67.
Ok, removed, restarted, join coordinator, re-added.
I have these logs
Do I need something in here?
I think ill delete everything and start again.
This may help you diagnose the issue.
Hey @Rhysgh, telegram me if u still need help diagnosing the problem.
We can set up a Zoom meeting.
Besides helping you out, you can also help me make the converter better, because yours reported genOnOff
cluster messages that I never come across, it's a good chance for me to dig more into it.
Let me know.
Telegram: contact info deleted
Ah shoot, already added. I just saw this pop up on the 2023.2 HA update log:
Sensor sensor.cube_action_angle has device class None, state class None and unit ° thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
@amaisano It's nothing about the converter. z2m emits empty action values when you have home assistant integration enabled. See here., and the empty value (null
value) is interpreted as None
by HA.
After looking at HA codebase, it's the newly introduced precision
feature that puts stricter constraints on numerical values, that raised this warning.
z2m may needs an update to cope with the new HA release.
There's already an open issue about it. #16360
Has anyone noticed that the temp reported by this thing is always 25C? I even see it in the shared logs and cube data above from other users. Is it a code problem not reading the right variable?
It should currently be reading about 15c... Always 25.
operation_mode: 'scene_mode',
voltage: 3061,
battery: 100,
device_temperature: 25,
power_outage_count: 17,
current: 0,
...
yes, it's always 25°C for me as well.
The device reports static temperature 25 °C, rendering device_temperature
useless.
So I have created a PR to remove it.
Koenkk/zigbee-herdsman-converters#5446
The device reports static temperature 25 °C, rendering
device_temperature
useless. Koenkk/zigbee-herdsman-converters#5446
What a shame. I use that as a sensor on the old cubes...
Related / unrelated question. @JJPro ... The ZigPY version of the cube driver (used by ZHA) does not include the features you have found. Would you consider looking at that? I understand if you don't. Thought maybe your knowledge could give them a boost.
https://github.com/zigpy/zha-device-handlers/issues/2145#issue-1560726748
@SirGoodenough Unfortunately, I'm not familiar with ZigPY, and don't have the time to learn a new system. However, feel free to ping me if you find someone who wants to work on it, I'd love to give him/her some hints and share knowledge about my implementation (specifically mode switch).
Hi everyone,
The scene mode of the new cube is amazingly accurate indeed.
I wanted to ask if anyone else experiences the same (inconsistent) behaviour of the cube as I do:
When placed on a surface it accurately displays the side_up:{"action":"side_up","linkquality":116,"operation_mode":"scene_mode","side":4}
When rotated right or left - then sometimes the payload doesn't come trough and sometimes it does. {"action":"rotate_right","action_angle":11.7,"linkquality":105,"operation_mode":"scene_mode","side":4}
This second message/payload:
So, it feels a bit like 'rotating_left' and 'rotating_right' directly is not working as expected right now? In the ideal situation, you would like to choose a face up - like 'lights on' and use rotate_left/right to dim those lights directly. Or have consistent feedback when using the cube and rotating left or right.
Or maybe I'm missing something here? What are you guys thinking?
Hi @NicoQubo, I see what you were trying to achieve. If I understand you correctly, you want to achieve "rotating on side change", e.g. turning on lights and dimming at the same time.
Unfortunately, that won't work, side change and rotation can't be triggered in one go, because flip_to_side
and rotate
actions are reported from the same multistate
cluster, and it reports one action at a time.
Always comes through, when placing the cube down and after waiting for a bit (like 3 seconds) and then rotating right or left.
That is the expected behavior. This is what happened during the operation sequence:
multistate
cluster reports flip_to_side
event. aqaraOpple
cluster reports side_up
event. multistate
cluster reports rotation event.Hope this clears your confusion.
Hi @JJPro,
Thanks for your insightful reply! There was something in what you said that triggered me. 'Place down the cube and let go.'
This sounds pretty obvious, but actually was the key for me!
I now also understand the inconsistency in 1. and 2., because I wasn't aware that my hand resting on the cube in between actions influenced the sensors! I probably sometimes 'let go' or 'rested hand on it' which obviously gave these weird reports. So: THANKS for that brilliant remark.
In both these cases: I placed down the cube and probably sometimes removed my hand from it in advance of wanting to rotate. This is the key. REMOVE YOUR HANDS FROM THE CUBE :-)
I tried 'placing down, letting go and rotating' a dozen times now, and it works every time. In which case you can almost immediately rotate left or right!
Link
https://www.aqara.com/en/product/cube-t1-pro
Database entry
{"id":5,"type":"EndDevice","ieeeAddr":"0x54ef44100062e05a","nwkAddr":25105,"manufId":4447,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.remote.cagl02","epList":[1,2,3],"endpoints":{"1":{"profId":260,"epId":1,"devId":259,"inClusterList":[0,3,6],"outClusterList":[0,3],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"2":{"epId":2,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"3":{"epId":3,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":25,"stackVersion":2,"hwVersion":1,"dateCode":"20220602","swBuildId":"2019\u0000www.","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1671404743897,"defaultSendRequestWhen":"immediate"}
Comments
I tried creating a custom converter using the one already exisiting for the older model MFKZQ01LM but I was stuck at some point, I didn't know how to properly fill the fromZigbee array in.
External converter
Supported color modes
No response
Color temperature range
No response