Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3: how to send calender? #77

Open
fromCologne opened this issue Sep 27, 2021 · 3 comments
Open

v3: how to send calender? #77

fromCologne opened this issue Sep 27, 2021 · 3 comments

Comments

@fromCologne
Copy link

fromCologne commented Sep 27, 2021

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
Copy link
Author

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
Copy link
Owner

what error is returning ? because for me works fine

@HeinzRuetschi
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants