SergiuToporjinschi / node-red-contrib-heater-controller

Heater controller for node-red dashboard
GNU General Public License v3.0
18 stars 17 forks source link

v3: how to send calender? #77

Open fromCologne opened 2 years ago

fromCologne commented 2 years ago

Hi Sergiu,

with v2 I used this structure to send a calender to the node: "topic" : "setCalendar", "payload" : { "Monday": { "00:00": 17, "06:00": 17, "12:00": 17, "18:00": 17, "23:59": 17 }, "Tuesday": { "00:00": 17, "06:00": 17, "12:00": 17, "18:00": 17, "23:59": 17 }, ....

After migration to v3 this does not work anymore. I tried to change to this structure, but no success. "topic" : "userConfig", "payload" : { "calender" : { "Monday": { "00:00": 5, "06:00": 5, "12:00": 5, "18:00": 5, "23:59": 5 }, "Tuesday": { "00:00": 5, "06:00": 5, "12:00": 5, "18:00": 5, "23:59": 5 }, ....

Can you give me an example what structure I have to send to the node? In your sample flow there is a topic "calChange". But there is no description what it does or how it works.

Thanks

Ingo

fromCologne commented 2 years ago

Good news. The structure from v2 works in v3 too. After some reboots of the docker host and the nodered container.

Topic "calChange" is in your example but not in the code. It generates an error message.

SergiuToporjinschi commented 2 years ago

what error is returning ? because for me works fine

HeinzRuetschi commented 1 year ago

Hi Sergiu, we can not chance the calendar with a inject payload. It always gives an error. Invalid calendar with topic setCalendar {"calendar":{"Monday":{"00:00":18,"23:59":18},"Tuesday":{"00:00":18,"23:59":18},"Wednesday":{"00:00":18,"23:59":18},"Thursday":{"00:00":18,"23:59":18},"Friday":{"00:00":18,"22:00":18},"Saturday":{"00:00":18,"23:59":18},"Sunday":{"00:00":18,"23:59":18}}} with topic calChange, error is Calling unregistered event: calChange. With topic config we get no error but calendar doe not chance. Could you supply an example how to chance the calendar. Your support would be very much appreciated, thank you.