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

[BUG] crontime triggered twice times at the same time #24

Open
alexneo2003 opened this issue Jun 28, 2024 · 4 comments
Open

[BUG] crontime triggered twice times at the same time #24

alexneo2003 opened this issue Jun 28, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@alexneo2003
Copy link

Home Assistant:

  • Core: 2024.6.4
  • Supervisor: 2024.06.2
    Node-Red: 18.0.1
    node-red-crontinject: 3.0.2

I am using crontime type and it sometimes have triggered twice at the same time, look at the debug log on the screen

Screenshot 2024-06-28 at 16 15 15
@buglss buglss self-assigned this Jun 28, 2024
@buglss buglss added the bug Something isn't working label Jun 28, 2024
@buglss
Copy link
Owner

buglss commented Jul 7, 2024

@alexneo2003 Can you share the json of this stream? Can you tell me about Home Assistant? I did not encounter this bug in my own tests.

image

@alexneo2003
Copy link
Author

@alexneo2003 Can you share the json of this stream? Can you tell me about Home Assistant? I did not encounter this bug in my own tests.

My HA it's self-installed instance on the OrangePI
I don't have much of devices, I'm just started my way)
I have disabled all my flows and have tried to reproduce flow when it happened

[{"id":"c2cf08aacbfa011d","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"baeef182f5efeb33","type":"crontinject","z":"c2cf08aacbfa011d","name":"cron fake","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","crontiMethod":"onCrontime","crontiArgs":"[\"*/1 * * * *\"]","inputs":0,"hasButton":true,"x":830,"y":120,"wires":[["8bd9727d6e46bf6b"]]},{"id":"8bd9727d6e46bf6b","type":"debug","z":"c2cf08aacbfa011d","name":"debug 17","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1040,"y":120,"wires":[]},{"id":"630f96774af17caf","type":"telegram command","z":"c2cf08aacbfa011d","name":"/ping","command":"/ping","description":"Ping","registercommand":true,"language":"","scope":"default","bot":"2cf3ec881d3daa28","strict":false,"hasresponse":true,"useregex":false,"removeregexcommand":false,"outputs":2,"x":570,"y":300,"wires":[["be01bc14f93402d8","ff84a99386478b2c"],[]]},{"id":"be01bc14f93402d8","type":"function","z":"c2cf08aacbfa011d","name":"typing","func":"const chatId = msg.payload.chatId || 130992084\n\nconst payload = {}\n\npayload.chatId = chatId\npayload.type = \"action\"\npayload.content = \"typing\"\n\nmsg.payload = payload\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":360,"wires":[["a7e2f11462062395"]]},{"id":"a7e2f11462062395","type":"telegram sender","z":"c2cf08aacbfa011d","name":"","bot":"2cf3ec881d3daa28","haserroroutput":false,"outputs":1,"x":1170,"y":300,"wires":[[]]},{"id":"ff84a99386478b2c","type":"delay","z":"c2cf08aacbfa011d","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":760,"y":280,"wires":[["da239b75bc0eb31c"]]},{"id":"da239b75bc0eb31c","type":"function","z":"c2cf08aacbfa011d","name":"pong","func":"const chatId = msg.payload.chatId\n\nconst payload = {}\n\npayload.chatId = chatId\npayload.type = \"message\"\npayload.content = \"pong\"\n\nmsg.payload = payload\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":280,"wires":[["a7e2f11462062395"]]},{"id":"69fd984bee086c88","type":"inject","z":"c2cf08aacbfa011d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":600,"y":180,"wires":[["ff84a99386478b2c"]]},{"id":"2cf3ec881d3daa28","type":"telegram bot","botname":"HomeAssistant2342_bot","usernames":"","chatids":"","baseapiurl":"","updatemode":"polling","pollinterval":"3000","usesocks":false,"sockshost":"","socksprotocol":"socks5","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","botpath":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false}]

Screenshot 2024-07-07 124317

Screenshot 2024-07-07 125108

@SindreLindahl
Copy link

This happens to me too very rarely, for example when set to run once per hour, it can happen perhaps once per day that it triggers 2 messages.

@buglss
Copy link
Owner

buglss commented Aug 13, 2024

@SindreLindahl Thank you for your feedback.

@alexneo2003 @SindreLindahl I will take action on this as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants