-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
#788 improve Eurotronic SPZB0001 support #817
Conversation
As per the manifacturer documentation
...will require adjustments in other projects too (like ioBroker). Would you also be ok to keep the name as it is? I agree that host_flags sounds closer to the real meaning, but since this is an already implemented device and users may have created scripts that would need to be changed as well... |
I'd prefer to rename it, as the idea is to make it return a hash of the bits set (
I wonder if there is a clean way to deprecate things so could keep a eurotronic_system_mode around for one zigbee2mqtt release or something giving people time to move. Although IIRC this will cause issues with the toZigbee convertors if we have multiple ones, this still needs al of tweaking, as... this device is horribly implemented I just found out... e.g. set system_mode=off, wait, read system_mode => heat, but if you read the host_flags window open is toggled to true! (but I digress) |
312f167
to
39dbdd1
Compare
And how about keeping both, eurotronic_system_mode and additionally adding a new eurotronic_host_flags?
Then you have compatibility and it is only minimum overhead since the encoded value (0b00000001) has to be en/-decoded anyways |
@allofmex done, at least for the fromZigbee side... |
@allofmex @sti0 can you test these changes? The 'system_mode' should now be correctly mapped, also there is a new 'eurotronic_host_flags' that is a object that can be used to set the bit field in an easy way. e.g.
Will set both the child protection and display mirroring! There is still one bug in setting 'system_mode', I noticed it while correcting the auto vs heat behavior for system_mode... if you set system_mode, other bits for the host_flags get wiped. This is because off gets mapped to window_open detection for example and it just sends bit 5 set. @Koenkk I discovered a bug in the tz.eurotronic_system_mode while updating it... and I do not know how to fix it. long story short, the real systemMode cluster is always heat... so we ignore it and use the eurotronic host flags specific cluster... We map heat to the boost bit, off to the window open bit (TRV displays off on display). So we would need to read the current value before modifying it, but I am not sure how to do that in the convertSet code. |
- convert bitmask to object (both fromZigbee and toZigbee) - reintroduce eurotronic_system_mode for backwards compatibility (number) - update eurotronic_system_mode so it follows heat = boost
OK, meta.state should have the data I need... will fix that too |
@sjorge great! I'm looking forward to test it within this week. At the moment I got some trouble on my office radiator which must repaired first (not Eurotronic related ;)) I won't like to test it on my childs room ^^ |
Alright, I fixed the setting of system_mode.... for our little device this is now entirely based on the host_flags for both reading and writing. |
we should set the max reporting interval for the local temperature to 600sec as recommended in the docs. zigbee-herdsman-converters/devices.js Line 4521 in 95bf9a6
|
@sjorge I'm testing your implementation right now and switching from off->heat->boost->heat->boost->heat etc. works as expected. Even the pi_heating_demand attribute is reporting in notime now. But i noticed an issue with the host flags. Turning on child protection or mirroring the display by publishing
But turning it off by publishing the same payload with |
It should be The string
|
I did publish true without quotes first. Thought this didn't work. Will test it later again. |
@sti0 did it work 2nd try round? Would be great to get this in so I can start having a look at the reporting. (Small steps, carrying a few others diffs so want to work the diff against master away first) Did another full round of testing and it's working as expected now for me. |
@sjorge sorry I was busy yesterday. Tested it with true/false without quotes again and it works as expected. Tested the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
system_mode setting works as described
setting host flags works as expected
@Koenkk this should be ready now |
@Koenkk anychance we can still get this in before Xmas? |
Thanks @sjorge ! |
Thanks for merging, I will try to debug some of the other reporting and get (e.g. local_temp) issues tomorrow, will be AFK for a week after tomorrow though. |
* Keep requests in queue on send failure until expiration * add missing await * always send pending reqeuests in fastpoll, no implicit checkin on genPollCtrl
fromZigbee.eurotronic_system_mode
tofromZigbee.eurotronic_host_flags
eurotronic_host_flags
as hash