Coder Social home page Coder Social logo

Comments (5)

AlCalzone avatar AlCalzone commented on September 28, 2024 1

You can now reproduce like this:

  1. check out the current master of https://github.com/zwave-js/node-zwave-js
  2. run yarn && yarn build to get everything up to date
  3. save the following file in the repository as server_config_thermostat_sp.js
  4. run yarn mock-server -c server_config_thermostat_sp.js
  5. execute zwave-js-server with tcp://localhost:5555 as the path
  6. hook up Home Assistant to the external zwave-js-server
// @ts-check
const {
	CommandClasses,
} = require("@zwave-js/core");
const {
	ccCaps,
} = require("@zwave-js/testing");
const {
	ThermostatMode,
	ThermostatSetpointType,
} = require("zwave-js");

/** @type {import("zwave-js/Testing").MockServerOptions["config"]} */
module.exports.default = {
	nodes: [
		{
			id: 2,
			capabilities: {
				basicDeviceClass: 4, // Routing Slave
				genericDeviceClass: 8, // Thermostat
				specificDeviceClass: 6, // General Thermostat V2

				commandClasses: [
					{
						ccId: CommandClasses.Version,
						version: 3,
					},
					{
						ccId: CommandClasses["Manufacturer Specific"],
						version: 1,
					},
					ccCaps({
						ccId: CommandClasses["Thermostat Mode"],
						isSupported: true,
						isControlled: false,
						secure: true,
						version: 3,
						supportedModes: [
							ThermostatMode.Off,
							ThermostatMode.Heat,
							ThermostatMode["Auto"],
							ThermostatMode["Resume (on)"],
							ThermostatMode["Auto changeover"],
						],
					}),
					ccCaps({
						ccId: CommandClasses["Thermostat Setpoint"],
						isSupported: true,
						isControlled: false,
						secure: true,
						version: 3,
						setpoints: {
							[ThermostatSetpointType.Cooling]: {
								minValue: 10,
								maxValue: 36,
								scale: "°C",
							},
							[ThermostatSetpointType["Dry Air"]]: {
								minValue: -9.87,
								maxValue: 56.78,
								scale: "°C",
							},
							[ThermostatSetpointType["Full Power"]]: {
								minValue: 20,
								maxValue: 32.767,
								scale: "°C",
							},
						},
					}),
					CommandClasses["Z-Wave Plus Info"],
				],
			},
		},
	],
};

from certification-backlog.

marcelveldt avatar marcelveldt commented on September 28, 2024

Reproduce as soon as we have the mock controller, it seems that we can't map a few properties for this test device.

from certification-backlog.

marcelveldt avatar marcelveldt commented on September 28, 2024

If the device has heating mode but not heating setpoint, it means the device setpoint for heating can not be controlled.
We should just hide the temperature control in that case.

from certification-backlog.

marcelveldt avatar marcelveldt commented on September 28, 2024

We can end up in the situation where a device has some setpoint that needs to be set but not (Z-Wave) mode exists for that. Worst case scenario we just make up a new mode to satisfy HA user interface but we don't set it in Z-Wave.

from certification-backlog.

AlCalzone avatar AlCalzone commented on September 28, 2024

Update: The test no longer throws errors in the UI. I still can't change setpoints though.

Image

from certification-backlog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.