npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-netatmo-thermostat

v0.1.4

Published

A node-red to interact with Netatmo thermostat

Downloads

53

Readme

node-red-contrib-netatmo-thermostat

A Netatmo thermostat node for Node-Red

This project is more than inspired by the one from @ssadams11: ssadams11/node-red-contrib-netatmo. Thank a lot for the initial help ! :)

Installation

The installation is classical, using npm:

npm i node-red-contrib-netatmo-thermostat

Restart then you node-red server and .... voilà !

Installed nodes

Get thermostats data

Once you provided the appropriate credentials, this node will send you back in the payload your thermostats data, as described in the Netatmo documentation: https://dev.netatmo.com/dev/resources/technical/reference/thermostat/getthermostatsdata

Result sample

{
	"devices": [{
		"_id": "70:ee:xx:xx:xx:xx",
		"firmware": 68,
		"last_bilan": {
			"y": 2016,"m": 12
		},
		"last_setup": 1444471631,
		"last_status_store": 1485114592,
		"modules": [{
			"_id": "04:ee:yy:yy:yy:yy",
			"module_name": "Thermostat",
			"type": "NATherm1",
			"firmware": 40,
			"last_message": 1485114593,
			"rf_status": 72,
			"battery_vp": 3996,
			"therm_orientation": 3,
			"therm_relay_cmd": 0,
			"battery_percent": 66,
			"event_history": {
				"boiler_not_responding_events": [ { "K": 1475752896 }, { "K": 1475752896 }, { "K": 1475752896 }, { "K": 1475752896 }, { "K": 1476870486 }],
				"boiler_responding_events": [{ "K": 1456920842 }, { "K": 1457217077 }, { "K": 1475661682 }, { "K": 1476009738 }]
			},
			"last_therm_seen": 1485114593,
			"setpoint": { "setpoint_mode": "program" },
			"therm_program_list": [{
				"zones": [ { "type": 0, "name": "Comfort", "temp": 20, "id": 0 }, { "type": 1, "name": "Night",	"temp": 16, "id": 1 }],
				"timetable": [ { "id": 1, "m_offset": 0 }, { "id": 6, "m_offset": 435 }],
				"program_id": "5618e4434bda1d8c5d8b4602",
				"name": "Default",
				"selected": true
			}],
			"measured": { "time": 1485114593, "temperature": 18.3, "setpoint_temp": 18 	}
		}],
		"place": {
			"altitude": 463,
			"city": "Paris",
			"country": "FR",
			"improveLocProposed": true,
			"location": [2.83584, 48.65109],
			"timezone": "Europe/Paris",
			"trust_location": true
		},
		"plug_connected_boiler": true,
		"station_name": "My Home",
		"type": "NAPlug",
		"udp_conn": true,
		"wifi_status": 60,
		"last_plug_seen": 1485114592
	}]
}

Set thermpoint

Summary: this node let you control your thermostat and set it up.

All the documentation can be found on Netatmo API reference page: https://dev.netatmo.com/dev/resources/technical/reference/thermostat/setthermpoint

The following parameters can be sent using the payload or sometimes in the node configuration pane (read the parameter section to know).

If a parameter is set in the node configuration pane and in the payload the considered value will be the payload.

device_id parameter

Required

payload only

This parameter is required and needs to be set using payload.device_id.

This is the MAC address of your relay.

Be careful, this is the thermostat relay, not the weather station one. If you mix them, it won't work.

You can find it by opening the Netatmo web page dedicated to your thermostat ("Energy" : https://my.netatmo.com/app/energy ) and clicking the GEAR (top right): in the parameter list, you'll see the MAC address, starting with "70:ee:".

module_id parameter

Required

payload only

This parameter is required and needs to be set using payload.module_id.

If, like myself, you have only one relay and one thermostat, you will find the module_id thanks to the Get thermostats data node and a debug node with JSON selector msg.payload.devices[0].modules[0].

setpoint_mode parameter

Required

payload or node configuration pane

Define the mode for your thermostat: setpoint_mode

  1. program: indicates to the termostat to follow the already-defined-program
  2. away: put your thermostat in AWAY mode (for me, around 12°C)
  3. hg: lower than away, HG means "hors-gel" in french (ie Frost-guard). It is around 8°C
  4. off: switch off the thermostat
  5. max: set the maximum possible temperature (for a sauna)
  6. manual: enter into manual mode. In that case, the payload.setpoint_temp parameter will hold the desired temperature.

setpoint_temp parameter

Required when setpoint_mode is manual

payload or node configuration pane

This is the temperature you want to set up. This parameter is required if you ask for a manual mode. If not sent (payload or node configuration pane) an error is raised.

setpoint_endtime parameter

Considered only when setpoint_mode is manual or max

payload or node configuration pane

This parameter is optional but makes sense only when used with mode manual or max.

It will set the time your setup will be considered.

If not set, the applied value will the one you defined at your Netatmo account level.

Sample payload

Sample 1: set the program mode

var options = {
    'device_id' : '70:ee:nn:nn:nn:nn',
    'module_id' : '04:00:nn:nn:nn:nn',
    'setpoint_mode' : 'program',
};
msg.payload = options;
return msg;

Sample 2: set the manual mode, 25°C during 1 hour

var options = {
	'device_id' : '70:ee:nn:nn:nn:nn',
	'module_id' : '04:00:nn:nn:nn:nn',
	'setpoint_mode' : 'manual',
	'setpoint_temp' : 25,
	'setpoint_endtime' : 60,
};
msg.payload = options;
return msg;

Sample 3: set the away mode

var options = {
	'device_id' : '70:ee:nn:nn:nn:nn',
	'module_id' : '04:00:nn:nn:nn:nn',
	'setpoint_mode' : 'away',
	'setpoint_temp' : 25,
	'setpoint_endtime' : 60,
};
msg.payload = options;
return msg;

Note: setpoint_temp and setpoint_endtime will be ignored in that case.