Quick question; the Inputs and Feeds from an emonTx/ESP8266 have not arrived at my emonPi (192.68.2.50) for about a week now, but if I log in to the emonTx (192.168.2.54) everything “looks” right except under the emoncms tab it shows up as “Connected: No”. Checking the data in the fields looks right, I re-enter the writeAPI and click on Save, but whether I restart or not the Inputs & Feeds don’t re-start. Nor does “Connected:No” ever become “Yes”.
Why might this be and what might the solution be? Wifi comms must be OK as otherwise 192.168.2.54 wouldn’t work.
Hello @haffle sorry to hear that its stopped! I cant think of anything specific, perhaps it would be worth doing a factory reset on the module and re-entering the settings to see if that sorts it?
Alternatively maybe trying the MQTT route instead?
Sorry - yes, I should have replied. I reset the ESP8266 by pushing the two tiny buttons (can’t remember exactly which combination), but that cleared things and it is now working. Thanks for your help!
Great to hear. so just a standard hardware reset rather than a factory reset and reconfiguration? Is this the first time this has happened since I sent the replacement unit to you last November? Setting up an emonPi - some newbie questions - #121 by haffle
Having a similar issue, but with a different emonTx/ESP8266. I can log in via 192.168.2.51, but even after re-entering the Write API and rebooting etc, I can’t get the Inputs to update.
I’m slightly confused about how it can be that Inputs don’t update & it says it is not connected, but I can log in via a browser?
Hello @haffle I assume the base station ip address has not changed?
Can you attach a UART to usb reader and see what it prints out without resetting the unit?
The not connected refers to the ESP looking back at the emonpi and not being able to connect (which is why there are no feed values).
Anything in the emoncms logs (log level info)?
If not, using tshark to see if anything is coming in to the Pi might help debug it. Search on the forum here for suitable commands - I have posted stuff before on this.
I’ll say it again @TrystanLea, these ESP devices are more trouble than they are worth. They almost need a category of their own on the forum! I’d ditch them in favour of a RPiZ solution. At least then you have a fighting chance of debugging it .
There is no such thing as “emoncms on the ESP8266” - emoncms is the software running on the Pi.
Do you mean there is nothing in the emoncms log for that ESP8266?
Please put 3 backticks on a line befoe and after any code, logs etc.
Is this when the inputs stopped?
Something odd there.
The error seems to appear at 04:00 every day. What happens then?
Might be unrelated…
No, Emonhub is something that runs under Raspbian - you would either first flash Raspbian and then use the emonScripts or simply use an EmonSD - a full emoncms will not hurt - just ignore it although it makes it easy to modify the emonhub config.
I suggest you just point the HTTP interface to your EmonPi in the emonhub config.
I hadn’t (because I didn’t know how). Still not sure if I have done the right thing, but I installed it on my emonPi via ssh https://zoomadmin.com/HowToInstall/UbuntuPackage/tshark and ran the command you suggested. Here is a snippet of the results, with my API redacted.
pi@emonpi:~ $ sudo tshark -f "port 80" -Y http
Running as user "root" and group "root". This could be dangerous.
Capturing on 'wlan0'
4 0.007944548 192.168.2.54 → 192.168.2.50 HTTP 359 GET /emoncms/input/post.json?json={MSG:28941,Vrms:248.75,P1:52,E1:11094,pulse:1,psent:28861,psuccess:27395,freeram:29528}&node=barn&apikey=REDACTED HTTP/1.1
6 0.147998214 192.168.2.50 → 192.168.2.54 HTTP 224 HTTP/1.1 200 OK (text/plain)
12 0.538235481 192.168.2.57 → 192.168.2.50 HTTP 241 GET /emoncms/input/post?json=%7B%7B%22percentage%22%3A99.8023296858454%7D%7D&node=0&apikey= REDACTED HTTP/1.1
14 0.655201537 192.168.2.50 → 192.168.2.57 HTTP 236 HTTP/1.1 200 OK (text/plain)
22 4.070983774 192.168.2.53 → 192.168.2.50 HTTP 361 GET /emoncms/input/post.json?json={ct1:2,ct2:0,ct3:0,ct4:0,vrms:24608,pulse:0,psent:212625,psuccess:212039,freeram:29464}&node=HWtank&apikey= REDACTED HTTP/1.1
24 4.211786859 192.168.2.50 → 192.168.2.53 HTTP 224 HTTP/1.1 200 OK (text/plain)
30 6.638170556 192.168.2.52 → 192.168.2.50 HTTP 370 GET /emoncms/input/post.json?json={ct1:0,ct2:-115,ct3:0,ct4:0,vrms:25241,pulse:0,t0:221,psent:287811,psuccess:287537,freeram:29272}&node=house&apikey= REDACTED HTTP/1.1
32 6.806072092 192.168.2.50 → 192.168.2.52 HTTP 224 HTTP/1.1 200 OK (text/plain)
38 10.006243824 192.168.2.54 → 192.168.2.50 HTTP 359 GET /emoncms/input/post.json?json={MSG:28942,Vrms:248.83,P1:53,E1:11094,pulse:1,psent:28862,psuccess:27396,freeram:29472}&node=barn&apikey= REDACTED HTTP/1.1
40 10.145406719 192.168.2.50 → 192.168.2.54 HTTP 224 HTTP/1.1 200 OK (text/plain)
46 10.516572630 192.168.2.57 → 192.168.2.50 HTTP 241 GET /emoncms/input/post?json=%7B%7B%22percentage%22%3A99.8023296858454%7D%7D&node=0&apikey= REDACTED HTTP/1.1
48 10.633888577 192.168.2.50 → 192.168.2.57 HTTP 236 HTTP/1.1 200 OK (text/plain)
56 11.856052041 192.168.2.52 → 192.168.2.50 HTTP 372 GET /emoncms/input/post.json?json={ct1:-11,ct2:-117,ct3:0,ct4:0,vrms:25226,pulse:0,t0:221,psent:287812,psuccess:287538,freeram:29304}&node=house&apikey= REDACTED HTTP/1.1
58 12.022684788 192.168.2.50 → 192.168.2.52 HTTP 224 HTTP/1.1 200 OK (text/plain)
64 13.976402117 192.168.2.53 → 192.168.2.50 HTTP 361 GET /emoncms/input/post.json?json={ct1:3,ct2:0,ct3:0,ct4:0,vrms:24605,pulse:0,psent:212626,psuccess:212040,freeram:29688}&node=HWtank&apikey= REDACTED HTTP/1.1
66 14.116488491 192.168.2.50 → 192.168.2.53 HTTP 224 HTTP/1.1 200 OK (text/plain)
72 20.002474823 192.168.2.54 → 192.168.2.50 HTTP 359 GET /emoncms/input/post.json?json={MSG:28943,Vrms:248.79,P1:62,E1:11094,pulse:1,psent:28863,psuccess:27397,freeram:29640}&node=barn&apikey= REDACTED HTTP/1.1
74 20.140149451 192.168.2.50 → 192.168.2.54 HTTP 224 HTTP/1.1 200 OK (text/plain)
80 20.519041004 192.168.2.57 → 192.168.2.50 HTTP 241 GET /emoncms/input/post?json=%7B%7B%22percentage%22%3A99.8023296858454%7D%7D&node=0&apikey= REDACTED HTTP/1.1
82 20.652273077 192.168.2.50 → 192.168.2.57 HTTP 236 HTTP/1.1 200 OK (text/plain)
90 22.077329711 192.168.2.52 → 192.168.2.50 HTTP 372 GET /emoncms/input/post.json?json={ct1:-13,ct2:-122,ct3:0,ct4:0,vrms:25226,pulse:0,t0:221,psent:287813,psuccess:287539,freeram:29416}&node=house&apikey= REDACTED HTTP/1.1
92 22.250037078 192.168.2.50 → 192.168.2.52 HTTP 224 HTTP/1.1 200 OK (text/plain)
The emonTx’s on 192.168.2.52/53/54 get through, but not the one in question (.51). The .57 is my Node-RED instance.
Yes, sorry, that is what I meant.
Again, sorry, but now done.
No; looking at my list of Inputs, the garage emonTX stopped reporting 18 hours ago (@ 17:30), so it must have stopped at ~23:30 approx. I can’t think of anything that happens on the network at 04:00 each day - Octopus Go is 00:30-04:30, and I am not aware of any scheduled tasks on the USG router etc each night.
You have conclusively proved the problem is that the emonTX has stopped sending the data via HTTP @TrystanLea@glyn.hudson. It clearly has a network connection (you can log into the web interface on IP 51).
As I say, the ESP firmware is, to my mind, a bit flaky.
Thanks for the tshark results above and for your help @borpin.
On the faulty ESP8266 could you check the Latest Data tab, are the values there updating? It would be good to establish if the data is coming through from the EmonTx to the ESP8266 unit - or if the issue is definitely on the ESP8266 unit itself e.g something with the HTTP request code may have caused that part to fail somehow…
@TrystanLea - herewith 3 superimposed pages showing the emonPi dashboard (.50, behind), the garage (.51, top) and a working node house (.52, bottom). Does this show no data is going from the garage emonTx to the ESP8266?
Ah ok, great, so that sounds like its may be the EmonTx unit that has crashed rather than the ESP8266… possibly… On the EmonTx unit there is a little reset push on the opposite side to the CT sensor inputs, could you try pushing that down to reset the unit (without resetting the ESP8266) to see if that brings it back online?