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

Error listing dynamic solar schedules #42

Closed
Simon01011 opened this issue Jul 6, 2021 · 3 comments
Closed

Error listing dynamic solar schedules #42

Simon01011 opened this issue Jul 6, 2021 · 3 comments
Labels
need more info Need more information to resolve this issue

Comments

@Simon01011
Copy link

Hi Steve!

I have a simple test case which throws an error I cannot find on my side. At the moment I suppose it is something inside cron-plus
The flow is like:
image
Here's the code:

[{"id":"bc92186b.349fe8","type":"inject","z":"b375a2fb.745f6","name":"Test One","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[     {         \"name\": \"10:30 (MDMDF__) -> 34 %\",         \"expression\": \"0 30 10 * * 1,2,3,4,5 *\",         \"expressionType\": \"cron\",         \"payloadType\": \"default\",         \"solarEvents\": \"sunset\",         \"solarType\": \"selected\",         \"location\": \"52.520007 13.404954\",         \"offset\": \"-120\",         \"limit\": null,         \"payload\": 34,         \"topic\": \"Shutter01\",         \"command\": \"add\",         \"type\": \"date\"     },     {         \"name\": \"Sunset (-30 min) -> 83 %\",         \"expression\": \"0 30 12 * * 1,2,3,4,5 *\",         \"expressionType\": \"cron\",         \"payloadType\": \"default\",         \"solarEvents\": \"sunset\",         \"solarType\": \"selected\",         \"location\": \"52.520007 13.404954\",         \"offset\": \"-30\",         \"limit\": null,         \"payload\": 83,         \"topic\": \"Shutter01\",         \"command\": \"add\"     } ]","payloadType":"json","x":200,"y":1160,"wires":[["a5eb51b3.3b26a"]]},{"id":"bfe4bb57.6e1618","type":"inject","z":"b375a2fb.745f6","name":"Test Two","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"name\":\"10:30 (MDMDF__) -> 34 %\",\"expression\":\"0 30 10 * * 1,2,3,4,5 *\",\"expressionType\":\"cron\",\"payloadType\":\"default\",\"solarEvents\":\"sunset\",\"solarType\":\"selected\",\"location\":\"52.520007 13.404954\",\"offset\":\"-120\",\"limit\":null,\"payload\":34,\"topic\":\"Shutter01\",\"command\":\"add\",\"type\":\"date\"},{\"name\":\"Sunset (-30 min) -> 83 %\",\"expression\":\"0 30 12 * * 1,2,3,4,5 *\",\"expressionType\":\"solar\",\"payloadType\":\"default\",\"solarEvents\":\"sunset\",\"solarType\":\"selected\",\"location\":\"52.520007 13.404954\",\"offset\":\"-30\",\"limit\":null,\"payload\":83,\"topic\":\"Shutter01\",\"command\":\"add\",\"type\":\"date\"}]","payloadType":"json","x":200,"y":1200,"wires":[["a5eb51b3.3b26a"]]},{"id":"2c32a787.d22528","type":"inject","z":"b375a2fb.745f6","name":"{\"command\":\"list-all\"}","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"list-all\"}","payloadType":"json","x":240,"y":1240,"wires":[["a5eb51b3.3b26a"]]},{"id":"a5eb51b3.3b26a","type":"cronplus","z":"b375a2fb.745f6","name":"","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[],"x":500,"y":1220,"wires":[["ea6f55a9.c767d8"]]},{"id":"5554c7b9.c595c8","type":"inject","z":"b375a2fb.745f6","name":"{\"command\":\"remove-all\"}","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"remove-all\"}","payloadType":"json","x":250,"y":1280,"wires":[["a5eb51b3.3b26a"]]},{"id":"ea6f55a9.c767d8","type":"debug","z":"b375a2fb.745f6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":650,"y":1220,"wires":[]}]

So I have two test cases that each insert two dynamic schedules into cron-plus. These should be used to control roller shutters (don't look to close at the name, they do not - due to testing - match the schedules). The first test case has two cron schedules that can be listed without problems. The second one has one cron and one solar schedule and doesn't list as expected.

Steps to reproduce:

  1. inject "Test One", then "list-all" gives the desired output in the debug node
  2. inject "Test Two", then "list-all" gives an error as output in the debug node

The error looks like:
image

Funny thing is, if I open the cron-plus node and view the dynamic schedules, it looks okay to me:
image

Actually, I don't know if it just affects the list command or if it also doesn't trigger correctly... Didn't check that until now!

Maybe you have a hint for me, what I'm doing wrong. Or maybe you can take a look into your code that explains this error. Thanks in advance!

Simon

@Steve-Mcl
Copy link
Owner

Hi, are you running very latest version V1.5.4?

image

I think (hope) this was fixed in latest release.

@Steve-Mcl Steve-Mcl added the need more info Need more information to resolve this issue label Jul 6, 2021
@Simon01011
Copy link
Author

I'm completely ashamed 😳 I deny everything I wrote and argue the converse!

You're right, my version on that specific machine was still 1.5.3, with 1.5.4 everything works perfectly!

I think I'll go hiding underneath my desk for the rest of the day...

@Steve-Mcl
Copy link
Owner

Steve-Mcl commented Jul 6, 2021

Haha. No worries.

Glad it's sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Need more information to resolve this issue
Projects
None yet
Development

No branches or pull requests

2 participants