I still think it is a network issue as you cannot connect by Dataplicity. I will point out again that the data sent to Watchman does not actually have anything to do with Emoncms as it never goes through the local EmonCMS system.
- The EmonTX sends the data via RFM to the RFM board on the EmonPi - any problems here and the data is lost.
- The RFM board passes the data via a serial interface and it is picked up on the EmonPi by
emonhub
. -
emonhub
is then sending it to two places; Watchman via the HTTP API and the local EmonCMS via MQTT.emonhub
will buffer the data on the HTTP API interface if the remote server (Watchman) does not respond with an ‘ok’.
So it seems, as EmonHub appears to be buffering the data as there is no data loss at Watchman, that Emonhub is unable to make contact with the Watchman server to send the data.
That is a Network issue. Where the problem is, Router, EmonPi or Watchman is more difficult to ascertain .
It is almost certainly nothing to do with Apache unless it is effectively overlaoding the network with rubbish.
The Emonhub logs might tell you what is happening, but currently these are rotated every hour. If you want a scheme that still stops /var/log
filling up (the reason for the hourly rotate), but retains emonhub.log
for a while have a look at this post emonSD next steps: filesystem & logrotate - #86 by borpin and adapt as necessary.
One other thing you can do (probably via Dataplicity), is install and run tshark
on Watchman and see what HTTP messages are being received and also run it on the EmonPi. I’ve used tshark
a bit so search here - it takes a bit of research to get the right parameters so you just get what you need.