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

Added support for namron edge thermostat #8650

Merged
merged 22 commits into from
Jan 23, 2025

Conversation

bskjon
Copy link
Contributor

@bskjon bskjon commented Jan 19, 2025

@bskjon bskjon force-pushed the namron_edge_thermostat branch 2 times, most recently from 1f41119 to 257b0bb Compare January 20, 2025 00:25
@bskjon bskjon force-pushed the namron_edge_thermostat branch from 257b0bb to 95eb9b3 Compare January 20, 2025 00:27
src/devices/namron.ts Outdated Show resolved Hide resolved
src/devices/namron.ts Outdated Show resolved Hide resolved
src/devices/namron.ts Outdated Show resolved Hide resolved
const tzNamronOperationMode = fzNamronOperationMode.fromFzToTz();

const fzNamronFault = {
0: 'No Fault',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make all these snake_case, also for e.g. fzNamronWorkDays

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ex: no_fault?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also how should i deal with: {0: 'Mon-Fri Sat-Sun', 1: 'Mon-Sat Sun', 2: 'No Time Off', 3: 'Time Off'};

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mon_to_fri_and_sat_sun, mon_to_sat_and_sun, no_time_off, time_off

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no way to keep the "-" between?

device.powerSource = 'Mains (single phase)';
device.save();
},
extend: [m.electricityMeter({voltage: false}), m.onOff({powerOnBehavior: false})],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check whether it is possible to use modern extend for all the other attributes, this should allow to get rid of a lot of code here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙃 unfortuentaly, i dont see any i can use here

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't have any cluster or attribute that i can see is usable for this device. Most of the common cluster info is already defined in the fz tz thermostat, and not in the modernExtend. Also for some reason, the manufacturer can't decide which attribute ids they want to stick to, so most of the new attribute ids is for this device only it seems.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not a reason modern extend cannot be used, you can take the Lumi modern extends as an example:

lumiCurtainManualStop: (args?: Partial<modernExtend.BinaryArgs>) =>

Copy link
Contributor Author

@bskjon bskjon Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got no clue how to test or verify this..
How will i be able to debug or test that this works?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't be much different than how you developed initial support for this device, I recommend to do it via an external converter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the current code fine, or is there other changes that are required?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, very clean!

@bskjon bskjon force-pushed the namron_edge_thermostat branch from ce555ca to c9e2e73 Compare January 21, 2025 21:09
@Koenkk Koenkk merged commit 79e4c85 into Koenkk:master Jan 23, 2025
2 checks passed
@jskjorv
Copy link

jskjorv commented Feb 3, 2025

Would it be possible to kindly include the floor temperature sensor's temperature as well, if feasible?

@bskjon
Copy link
Contributor Author

bskjon commented Feb 3, 2025

Would it be possible to kindly include the floor temperature sensor's temperature as well, if feasible?

From what I've seen, there is no other data attribute. So you have to use the one you have selected as main sensor/sensor mode

@jskjorv
Copy link

jskjorv commented Feb 10, 2025

Getting a lot of these errors in the logs:

First occurred: February 9, 2025 at 22:20:52 (6319 occurrences)
Last logged: 09:02:06

Invalid option for select.varmekabler_vaskerom_system_mode: 'heat' (valid options: ['0', '1', '3', '4'])
Invalid option for select.varmekabler_bad_2_etg_system_mode: 'heat' (valid options: ['0', '1', '3', '4'])

@bskjon
Copy link
Contributor Author

bskjon commented Feb 10, 2025

Getting a lot of these errors in the logs:

First occurred: February 9, 2025 at 22:20:52 (6319 occurrences)
Last logged: 09:02:06

Invalid option for select.varmekabler_vaskerom_system_mode: 'heat' (valid options: ['0', '1', '3', '4'])
Invalid option for select.varmekabler_bad_2_etg_system_mode: 'heat' (valid options: ['0', '1', '3', '4'])

Mhm, mapped it up in reverse. Should be fixed when an updated z2m drops or so

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 this pull request may close these issues.

3 participants