In the Node Red editor after you import the flow I sent earlier you should see the screen as per the jpg I have attached. The unexpected token message must mean something has become garbled, so I will do as suggested earlier – attach a file. node-red.txt is a notepad file. Open it, select all and copy to the clipboard. In the Node-red editor use the import from clipboard function. I just tried it with no errors, so hopefully this will work better. I have fixed the issue with the mis-spelt topic in this new version.
There are a lot of comments in the comment nodes that describe the function of each node.There are a lot of comments in the code of the functions as well.
Most people will probably need to add the emoncms node to Node red – I think sudo npm install emoncms will do it. If you don’t have emoncms, then perhaps swapping that with an email node would be better for those people.
The information about getting data to XBMC is in the comment node labelled deployment. This provides some information about changes necessary to run on another system eg where to edit IP addresses etc.
Your comments regarding polling etc mirror the conclusions I have reached. So that is the direction I will be going in. I was thinking of putting the publisher logic in a separate plugin. Unless this was to become “core” functionality, and maintained as such I would prefer not to be modifying the main OSPI code. That is why I have referred to this as a “demonstration” rather than a full application. It is a working demonstration though, at least on my system. It needs some tidying up, and more error handling though.
It does illustrate the ease of which these tools can be used to develop this applications and push messages around to different systems.