0.1.55 • Published 4 months ago

node-red-contrib-vib-smart-scheduler v0.1.55

Weekly downloads
-
License
CC-BY-2.5
Repository
github
Last release
4 months ago

Smart Scheduler

WORK IN PROGRESS, close to a stable release, please help me and report any issue

This node is part of a suite of nodes to control heating:

  • smart-scheduler: visual &multi schedule management,
  • smart-valve: manage valve in a same room in a group and enable auto-recalibration and as well on device override,
  • smart-boiler: enable to pilote the boiler with the most relevant temperature according to the valves in the house.

This node have been more than inspired by the excellent work of node-red-contrib-light-scheduler.

It enables to define heating zones with temperature setPoint. It support multiple schedules and exposes realtime information to home assistant (via MQTT).

Default setpoint feature and multiple execution mode are as well supported.

The Smartscheduler is interfaced with Home assistant and use MQTT to advertise and send update.

Key features:

  • Interface with Home Assistant (adversise, and update),
  • Heating zone definition with color,
  • Multiple schedule management, activable directly from home assistant
  • Visual weekly calendar, copy daily schedule from 1 day to another
  • Manual Override mode with duration,
  • On / Off / Auto / Override execution mode
  • Different output modes (state-change, state-change+startup, every minute)
  • External manual trigger
  • Default setPoint when there is no event

Details

Input

The input is used to changed to the current execution mode between:

  • Off: smart-scheduler is not active (no output)
  • Auto: smart-scheduler is following the active schedule
  • override: smart-scheduler is in force mode with a defined setpoint for a defined periode of time

Input can be node-red input and MQTT directly from home assistant (see Home Assistant section)

Input payload

The following example give the message expected in input:

msg:{
    payload:{
		command:"override",				// set the execution mode
		setpoint:25					// set the new setpoint
	}
}
FieldValuesdescription
command1|on|triggerManual trigger of an execution cycle
commandautoset execution mode to auto
commandoverrideset execution mode to override
command0|offset execution mode to off (no output)
setpointInteger 0-35define the override setpoint temperature
noouttrue|falseflag to avoid output message from the scheduler on the next cycle to avoid endless loop with override message comming from the smart-valve

Outputs

This node has 1 output to send update to smart-valve,

the tipical msg output is :

msg.payload={
    "setpoint":20,                          // target temperature of the valve based on the schedule                     
    "previous_setpoint":0,                  // previous target temperature
    "setname":"Confort",                    // name of the heating zone
    "short_start":"17:00",                  // schedule event start time
    "short_end":"20:00",                    // schedule event end time
    "start":"2018-01-05 17:00:00",          // start iso timestamp
    "end":"2018-01-05 20:00:00",            // end iso timestamp
    "manualtrigger":false,                  // is this the result of a manual trigger
    "triggermode":"triggerMode.statechange.startup",
    "active_ruleidx":3,                      // rule id
    "prev_ruleidx":0,                        // prev rule id
    "executionmode":"auto",                  // execution mode |auto|manual|off
    "hasSpchanged":true                      // has the setpoint changed from the previous cycle
}

Configuration setting

List of settings:

SettingTypedescription
NameStringName & title of the nonde in Node-red and in Home assistant
TopicStringtopic is not used and sent in every output message
UniqueIdStringuniqueid is used by home assistant for device & entities discovery, it can not be empty and must be unique (be careful)
Set pointInteger 0-35default setpoint value that will be output when no active event are defined
Scheduledropdown-listlist of definded schedules, the one selected is active
RulesListlist of heating zone used in the visual schedule event definition. A rule is defined by the following field name| setpoint value|color
Schedule NameStringactive schedule name
Copylist to listenable to copy a daily schedule to another day
cleanbuttonwipe out the active schedule
Trigger mode[list: "when state change, when state change+startupevery cycle]
Cycle duration Integer 1-60duration between two execution cycle default
Execution override [truefalse]allow execution override on the schedule, if false, smart-scheduler will not handle override command in input
Execution Modelist: auto|manual|offdefault execution mode at startup, manual=override
DurationInteger 1-120Override duration in min after override input command
Execution setpointInteger 0-35Default setpoint for override command
Debug info[truefalse]enable output debug to console

Interface with Home Assistant

The smart-scheduler is inteface with home assistant and entities and should be discovered as new device automatically.

The name of the device in Home Assistant is the name of the node in the setting.

MQTT Topics

EntitiesTypeDescriptiontopic
ModeAdvertiseExecution Mode[MQTT_PREFIX/select/UniqueId/mode/config ]
ModeSetExecution Mode[MQTT_PREFIX/UniqueId/mode/set ]
ModeStateExecution Mode[MQTT_PREFIX/UniqueId/mode/state ]
Schedule ListAdvertiseDropdown list of schedules[MQTT_PREFIX/select/UniqueId/schedule_list/config ]
Schedule ListSetDropdown list of schedules[MQTT_PREFIX/UniqueId/schedule_list/set ]
Schedule ListStateDropdown list of schedules[MQTT_PREFIX/UniqueId/schedule_list/state ]
setpointAdvertiseCurrent setpoint[MQTT_PREFIX/sensor/UniqueId/current_sp/config ]
setpointSetCurrent setpoint[MQTT_PREFIX/UniqueId/current_sp/set ]
setpointStateCurrent setpoint[MQTT_PREFIX/UniqueId/current_sp/state ]
Previous setpointAdvertisePrevious setpoint[MQTT_PREFIX/sensor/UniqueId/previous_sp/config ]
Previous setpointSetPrevious setpoint[MQTT_PREFIX/UniqueId/previous_sp/set ]
Previous setpointStatePrevious setpoint[MQTT_PREFIX/UniqueId/previous_sp/state ]
Event nameAdvertiseCurrent event name[MQTT_PREFIX/sensor/UniqueId/current_event_name/config ]
Event nameStateCurrent event name[MQTT_PREFIX/UniqueId/current_event_name/state ]
Event startAdvertiseCurrent event start time[MQTT_PREFIX/sensor/UniqueId/current_event_start/config ]
Event startStateCurrent event start time[MQTT_PREFIX/UniqueId/current_event_start/state ]
Event endAdvertiseCurrent event end time[MQTT_PREFIX/sensor/UniqueId/current_event_end/config ]
Event endStateCurrent event end time[MQTT_PREFIX/UniqueId/current_event_end/state ]

If you like my work, please support me

i

0.1.55

4 months ago

0.1.28

6 months ago

0.1.25

6 months ago

0.0.78

6 months ago

0.0.77

6 months ago

0.0.76

6 months ago

0.0.74

6 months ago

0.0.73

6 months ago

0.0.71

6 months ago

0.0.70

6 months ago

0.0.68

7 months ago

0.0.66

7 months ago

0.0.63

7 months ago

0.0.62

7 months ago

0.0.61

7 months ago

0.0.41

7 months ago

0.0.1

7 months ago