Dashboard add external png graph

Paul,

This is great. Thanks.
I assume the address http://192.168.1.121/emoncms is acceptible?
I change the user name and password also. Is that right?

I suppose the silliest question is how do I get it to start?

John

Paul,

Great I have now deployed the script and see a weatherstation NODE. Will play around with this and then, if you could assist with the live data feed can get this show on the road. The live data live on http://solarschols.com/realtime.txt I assume i need to add this somewhere.

John

Yes, delete the inject node which is posting the dummy data, and inject your live feed in it’s place.
How are you grabbing the data feed to post to Wunderground?

My feed to the weatherunderground is handled automatically (hardcoded) by the Cumulus software.

John

Ah OK, well just add something like the attached flow in place of the inject node, and scrape the data from http://solarschols.com/realtime.txt ;

[
    {
        "id": "fec519c7.eb7368",
        "type": "inject",
        "z": "f82b93ba.98aad",
        "name": "",
        "topic": "",
        "payload": "heartbeat",
        "payloadType": "str",
        "repeat": "300",
        "crontab": "",
        "once": true,
        "onceDelay": "5",
        "x": 174,
        "y": 270,
        "wires": [
            [
                "2897c76c.9ccbb8"
            ]
        ]
    },
    {
        "id": "2897c76c.9ccbb8",
        "type": "http request",
        "z": "f82b93ba.98aad",
        "name": "",
        "method": "GET",
        "ret": "txt",
        "url": "http://solarschols.com/realtime.txt",
        "tls": "",
        "x": 352,
        "y": 270,
        "wires": [
            [
                "25279bce.87bc34"
            ]
        ]
    }
]

So it looks like;
heartbeat

Just import the flow (as you did the last one) and connect the heartbeat & http request nodes to the CSV node. It works OK here!
It’s currently set to update every 5 minutes, but that can be easily changed in the ‘heartbeat’ node.

Paul,

Got that, again thanks very much.

And again sorry to be a pain, I really must learn more about NODERED, I’ve deleted the test feed but deleting the input test does not work. How do I stop NODERED feeding the test data?

John

By ‘test feed’ I assume that you mean the ‘Data Simulation’ inject node.
Nothing changes in node-red until you hit the deploy button - top right.
If the inject node is deleted, and then deployed, then no more data will be transferred to emoncms, as it’s the data injection which triggers the flow.
The inputs will stay in emoncms until they are either updated (by adding the 2 new nodes to node-red) or manually deleted - that’s how emoncms works.

Paul

Are you up and running John?

Paul

Thanks,
nearly yes. have all the inputs updating, have created feeds now try to add a Publish to MQTT to send to Emoncms.org. (I assume that’s what start feed??)

John

will show you an updated Dashboard when I have a couple of hours of data. Well thats the plan and I’ll keep fingers crossed.

John

That’s good to hear, now node-red is sorted and you have your inputs & feeds in place & updating, I’m going to leave it there (busy today), but hopefully other members can pick this up and address any specific issues that you have with emoncms.org

Paul

Paul,

Thank you very much for the time you have spent helping. Very appreciated.

John

A post was split to a new topic: Forward data from emonpi to emoncms.org

Paul,

Have started getting the following error in Debug
“/8/2018, 1:21:42 PMemonpi
msg.payload : string [90]
{“success”: false, “message”: “Error decoding JSON string (invalid or too deeply nested)”}”

Does this indicate that the data from realtime has too many elements. If I reduce the number of data item do you think this may fix it.

John

I have reduced the number of data items all okay now.

No. It means that it’s not able to parse the feed data, not the length of the JSON.
Have you altered the flow in any way?
If not, I suspect that your data feed may have changed format, such as a value missing, throwing the string out of sync.
If you can’t see a problem, let me have a copy of your realtime.txt (as you did before) and I’ll take a look tonight.

Paul

Paul,

Yes I have made the changes by reducing the number of data items. I was silly in that I was bringing over almost all the weather station data when I reality I was only ever going to use about 6 for display on the dashboard.

The realtime.txt file changes every 10 seconds. I assume I have deleted the particular data item that must have occasionally been causing the trouble. I’ll keep an eye on it. Thanks for offer to review data.

Thanks John

In fact I’ve got the URL of your feed, so I’ll take a look this evening.

If you have the time take a look at the dashboard I’ve got sofar

Hi John, great looking dashboard!!

I’ve had a look at the issue you posted above, and it appears to be an intermittent issue with the availability of http://solarschols.com/realtime.txt
More often than not, it’s available, but I’ve run some tests tonight and it appears to occasionally give a 404 error, which results in the error that you described.
The source of resultant 404 page is;

/* Copyright (c) 2018 Synology Inc. All rights reserved. */
(function(){var a=new XMLHttpRequest();a.open("get","/missing",true);a.send();a.onreadystatechange=function(){if(a.readyState==4&&(a.status==200||a.status==304)){var c=String(a.responseText);var e=document.open("text/html","replace");e.write(c);e.close()}else{var d={en:"The page you are looking for cannot be found." 

It may be that the realtime.txt file is in the process of being re-written by your Synology software, at the same time as we are making a http request.

Could that be the issue?

Paul

Paul,

I did notice a couple of errors last night after I had reduced the number of item being fed. Since midnight however things have been running smoothly.

I’ll do some reading up and see if i can’t add an error check before updating.

Thanks for you time.

John