node-red-contrib-thermostat-scheduler icon indicating copy to clipboard operation
node-red-contrib-thermostat-scheduler copied to clipboard

Support for MQTT climate devices

Open scargill opened this issue 4 years ago • 7 comments

Hi

As you've developed a thermostat scheduler which leans heavily on my original coding (my stat is in full time use) - I thought I'd take a look - with a view to using yours if it is better than what I'm using....

I grabbed the needed mytimeout - and pulled in your English flow...

and

Imported unrecognised types:

api-call-service server-state-changed server Imported:

Ideas?

Pete

scargill avatar Nov 23 '20 12:11 scargill

Hi Pete, the flow gets (and puts) the data from home assistant via node-red-contrib-home-assistant-websocket, which includes the nodes you mentioned.

giuseppeg88 avatar Nov 23 '20 19:11 giuseppeg88

Hi again - does it have to be tied to Home Assistant? I 'm not using Home Assistant - just Node-Red (and Dashboard of course) and MQTT. That would be a shame if it depended on HA. I was quite looking forward to trying it out.

Pete

scargill avatar Nov 23 '20 19:11 scargill

By making some changes (i.e. replacing the source and control nodes with MQTT nodes), it should be possible to use this thermostat even without the Home Assistant: I'll put it on the to-do list.

giuseppeg88 avatar Nov 24 '20 07:11 giuseppeg88

By making some changes (i.e. replacing the source and control nodes with MQTT nodes), it should be possible to use this thermostat even without the Home Assistant: I'll put it on the to-do list.

Hi Do let me know, once you make it easy I'll load the flow in my setup, can test it on my office air-conditioner in Spain and assuming it works as well as it looks, I'll then write about it on the blog which might give you more interested users. Feel free to contact me directly.

Pete

scargill avatar Nov 24 '20 08:11 scargill

Is there any step ahead? I doens't seem so. Really pity!

I can try my best, bu if someone has a better starting point ...?? Or a code description regarding the outputs/inputs of the HA nodes??

Moosbueffel avatar Apr 02 '21 09:04 Moosbueffel

By making some changes (i.e. replacing the source and control nodes with MQTT nodes), it should be possible to use this thermostat even without the Home Assistant: I'll put it on the to-do list.

Ciao, hai qualche idea su come utilizzarlo senza HA? Grazie

beppexx80 avatar Mar 05 '22 09:03 beppexx80

Hi,

I've tried with success to replace HA related with node-red-dashboard ui

[{"id":"c10f47600a462cea","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"f036317dd7c514f3","type":"ui_switch","z":"c10f47600a462cea","name":"","label":"HVAC ACTION","tooltip":"","group":"4c8392d36beb7e74","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"hvac_action","topicType":"str","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","animate":false,"className":"","x":340,"y":360,"wires":[["1d409ff652302291"]]},{"id":"65ba197462d3ab50","type":"ui_numeric","z":"c10f47600a462cea","name":"","label":"ATTUALE (DEBUGONLY)","tooltip":"","group":"4c8392d36beb7e74","order":1,"width":0,"height":0,"wrap":false,"passthru":false,"topic":"target_temperature","topicType":"str","format":"{{value}}","min":"0","max":"40","step":1,"className":"","x":310,"y":320,"wires":[["1d409ff652302291"]]},{"id":"c77d166bcc8770a4","type":"ui_numeric","z":"c10f47600a462cea","name":"","label":"SETPOINT (DEBUGONLY)","tooltip":"","group":"4c8392d36beb7e74","order":1,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"ambient_temperature","topicType":"str","format":"{{value}}","min":"10","max":"25","step":"0.1","className":"","x":300,"y":280,"wires":[["1d409ff652302291"]]},{"id":"b05cb514c2efb270","type":"comment","z":"c10f47600a462cea","name":"set this","info":"","x":130,"y":280,"wires":[]},{"id":"1d409ff652302291","type":"function","z":"c10f47600a462cea","name":"Store climate state","func":"\nflow.set(msg.topic, msg.payload);\nmsg.topic = 'climate';\nmsg.payload = msg.payload;\nreturn msg;\n\n//flow.set(\"ambient_temperature\", msg.data.attributes.current_temperature);\n//flow.set(\"target_temperature\",msg.payload);\n//flow.set(\"climate_state\",msg.payload);\nflow.set(\"off_view\",msg.payload == \"off\" ? true : false);\n//flow.set(\"hvac_action\",msg.data.attributes.hvac_action);\n\nnode.status({fill:\"red\",shape:\"dot\",text:msg.payload}); \n\n\n\nvar expr = (msg.payload).toString();\nconsole.log(You are here: ${expr});\n\n\n\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":300,"wires":[["18e377cc21124b6f"]]},{"id":"18e377cc21124b6f","type":"function","z":"c10f47600a462cea","name":"Data","func":"msg.topic = \"update\";\n\nvar msg2 = {};\nmsg2.payload = flow.get(\"thermostat_mode\");\n\nvar data = {\n 'ambient_temperature': flow.get(\"ambient_temperature\") || 20,\n 'target_temperature': flow.get(\"target_temperature\") || 14,\n 'hvac_state': flow.get(\"hvac_action\") || 'off',\n 'has_leaf': flow.get(\"away_mode\") || false,\n 'off_view': flow.get(\"off_view\") || false\n}\nmsg.payload = data;\nnode.status({fill:\"red\",shape:\"dot\",text: \"ambient_temperature: \" + data.ambient_temperature + \" / target_temperature: \" + data.target_temperature + \" / away_mode: \" + data.has_leaf + \" / climate_state: \" + flow.get(\"climate_state\") + \" / hvac_state: \" + data.hvac_state + \" / thermostat_mode: \" + msg2.payload});\n\nvar msg3 = {};\nif (msg2.payload == \"off\")\n{\n msg3.payload = false;\n}\nelse if (msg2.payload == \"countdown\")\n{\n msg3.payload = true;\n}\nelse\n{\n msg3 = null;\n}\n\nreturn [msg,msg2,msg3];","outputs":3,"noerr":0,"initialize":"","finalize":"","x":790,"y":340,"wires":[[],[],[]]},{"id":"4c8392d36beb7e74","type":"ui_group","name":"opzioni","tab":"5d954e3e.9339b","order":5,"disp":true,"width":"6","collapse":true,"className":""},{"id":"5d954e3e.9339b","type":"ui_tab","name":"Cronotermostato","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

image

Don't have understood what should do HVAC action, any advice please?

SummerSeaSun avatar Nov 17 '22 11:11 SummerSeaSun