Not BigTimer. I think it was one of his older nodes call timeout (hence the name I gave mine: mytimeout). I originally used his code as a base but ran into a lot of problems. So I rewrote it. I think my parsing the strings was due to something that would occasional send a JSON string or a Javascript Object. I don't think I tracked down what external application was doing that.
@Flixm Personally I wouldn't use a node that requires the data in this form.
@colin why should i not use a node which requires this type of data ? ... it works so whatĀ“s the main problem of a json compared to javascript.
maybe i could not understand but iĀ“m interested in
Because the convention is to use javascript objects to pass data. For example I would expect to have to pass an object something like this
msg.payload = {
"timeout": 1000,
"warning": 30
}
not JSON like this
msg.payload = "{\"timeout\": 1000, \"warning\": 30}"
No-one is going to expect to have to pass JSON. Note that the node author has now clarified that he does not recommend JSON and does recommend js objects (which the node does support). He initially tried to support JSON because the code he picked up tried to do that, but he had so much trouble trying to make it work (it is not at all easy) that he has decided it is not a good idea. I believe he is going to clarify the readme accordingly. I trust he will forgive me if I have misrepresented him in this.
Colin, you are correct. JavaScript objects are the preferred way to pass data. This is the standard way node-red works. The extra support was for a few external applications that were not consistent with passing data.
I've updated the Readme, I'm pretty sure I could have another go at it and I will. Let me know any comments for improvements. I've been a bit overworked the last months and my concentration is suffering. I've updated npm but I still need to update my github repos.
Looks good to me
I've also fixed my ssh key issue with my git repos, so it's updated on github also.