I am currently trying to get this working with my hardware, but seem to be having problems getting my OpenEVSE and EmonPi to talk to each other.
I have flashed the latest EmonPi image to a new card, flashed the OpenEVSE control board with 4.8.0 and the ESP8266 HUZZAH with ESP8266_WiFi_v2.x-master.
I can access the web servers of both the EmonPi and the ESP8266 from my PC without a problem.
In the Services tab on the ESP8266 I am trying to enable “Energy Monitoring” and “MQTT”, but they always show “Connected: No”.
One thing that seems suspicious, in the System tab, it shown the WiFi Firmware version as “BUILD_TAG”. Should there be a number there? Could I have a corrupted ESP8266?
Any hints or suggestions of things to try would be greatly appreciated.
Ok, I eventually spotted you have a pre-compiled binary “firmware.bin” available here.
I uploaded that and am now seeing V 2.7.0.
But I still cant get it talking to the EmonPi. I’m pretty sure I’m just getting my names, addresses, nodes, topics etc all muddled. Finding it hard to be sure what to enter where:
The user name I created when I first logged into the EmonPi web interface it “testpi”
These are the feeds I have setup:
Ok, so my “Energy Monitoring” and “MQTT” panels are now showing “Connected: Yes”
I’m not sure how/why it started working. I think I just wandered off and came back later and it said “Connected”
But I still can’t enable Eco mode, the little slider thing just flips off again after a couple of seconds when I try to enable it.
So, I guess I still haven’t populated the MQTT panel parameters correctly.
I have read the setup document but I doesn’t say explicitly what to do and I don’t currently understand enough about how it actually works in order to figure it out.
Do I need to create a new virtual feed on EmonPi for solar surplus, in my case that would be “solar - use” or does it pull what it needs from the EmonPi, and of so how does it know weather I have a type 1 ot type 2 setup, in my case type 2.
The MQTT username and password is the MQTT server user name and password. The default for the emonPi (unless you have changed them) is username: “emonpimqtt” password: “emonpimwtt2016” as defined here: emonSD Download — OpenEnergyMonitor 0.0.1 documentation. The Mosquitto MQTT server running on the emonPi (port 1880) is not open to the outside word to security is not too much of an issue.
I would recomend OpenEVSE controller FW V4.12.3 from the openenergymonitor/open_evse repo, this has a number of fixes including a fix to enable charging at 6A. See changelog on the releleases page. The reason for the firmware fork is that we’re maintaining the UK/EU specific FW which has a number of minor customisation to be CE complaint e.g. 32A max, proximity pilot support, L2 default level.
Perfect, nice work
What do you see on the Emoncms inputs? It looks like that one stage in time the openevse managed to post to Emoncms (3.9 days ago)!
If you have a type 2 setup I would recomend using “Grid (+I/-E) topic” and entering the MQTT topic for your grid import / export CT (CT1 in this diagram). Make sure the CT is orientated so power is positive when importing and negative when exporting. You will need to be using an AC-AC voltage adaptor with the emonPi to determine direction of current. The openevse will divert any excess power not being used by your house into your EV e.g
That’s strange. Could you try and toggle the switch with dev console open in your browser (CTRL + SHIFT + I) on Chrome. You should see Message Event with data {"divertmode":2}. This means eco mode is active. eg.
It’s showing emonSD-26Oct17. I think that is the latest?
Got it. Although I assume you meant name: emonpi not emonpimqtt and password: emonpimqtt2016 not emonpimwtt2016? according to that link
Ok Done. Wasn’t aware of that one.
That seems to be working now, updating every 30sec. I think the 3.9 days ago thing was because I imported a backup from my working system to this bench setup (it wasn’t working on that system either though).
Got it. I was wondering why I couldn’t enter anything into the “Grid (+I/-E) topic:” box. Now I know it’s because you have to delete from the “SolarPV-gen topic:” first before the other one becomes editable.
Again, this seems to be working now, although I’m sure I didn’t do anything to make it work. I think it’s just shy and doesn’t like doing anything while I’m watching and waits until I go away and do something else for a while.
Actually, I now think I’ve figured out what most of my problems are/were. My browser (Internet Explorer 11 on Windows 7) doesn’t update the pages properly, so it appeared to be ignoring me on certain things. Once I started configuring it through my iPhone it seems ok.
And now nature is playing a cruel joke on me. I’ve been several days trying to get this to work during which time I have had bright sunny days. Now I’m ready to test it, it’s overcast and snowing
Many thinks for your reply. I will let you know how it goes next time the sun puts in an appearance.
I’m not sure if its possible to do over-the-air updates. If not I think you have to use an ISP programmer, or maybe through the serial port with an FTDI adapter and Arduino.
I used an Atmel AVR-ISP Mk2 and did it through AvrStudio IDE.
Do you have any programming kit available?
Doh, yes your totally right. My mistake, the link is correct .
I will correct my post above.
Great!
Great. Oh dear, sorry to hear it’s not working on IE 11. We’ve tested on Edge, I’m afraid I don’t have easy access to a windows PC to test. I’ll try and setup a VM, although I don’t think IE 11 compatibility will be high on the dev list. Recommend updating if possible. Bit if it’s an easy fix I’ll do my best.
Same here, not a good day for solar. Lots of wind though, the UK grid was over 40% from wind today
Let me know how you get on when the sun comes out.
I think I remember reading somewhere that the code is very large and so the bootloader had to be removed to make room. So as Glyn said, you will need an ISP programmer. This would connect via the 6-pin connector with pins mosi, miso etc…
I believe you can use another Arduino, if you have one, as an ISP programmer, but I’ve never tried that.
On a side note, I noticed that since loading 4.12.3.EU, the display starts to shimmer after a couple of minutes.
I’ve looked at the code and traced it to the timer used to provide the 2 minute forced display update required by the spec.
It’s just a missing line that updates the time variable each time it’s triggered. It’s inside loop() and should be:
// Force LCD update (required for CE certification testing) to restore LCD if corrupted.
if ((millis()-lastlcdreset)>120000)
{
g_OBD.Update(OBD_UPD_FORCE);
lastlcdreset = millis(); // <--- MISSING LINE
}
I haven’t done any sort of collaborative code before, so I’m not sure what I should do. Do I just report it here or should I sign up for a github account and contribute it there somehow?
Correct, this is exactly why. Also the openevse team did not want to make it too easy to change the openevse FW since it has important safety controls.
The eepron_24.bin is just the openevse config. I would skip flashing this to use the default config.
Yes, you can use this to read the serial and provide DC 5V power to the board, but an ISP programmer will need to be used to flash the open_evse FW.
I didn’t start logging the OpenEVSE amps until after I started, so missed some at the beginning.
The solar was pretty erratic, so it was a harsh first test, but I’m certainly pleased with the results.
Thanks Glyn. Got some more ev changing in today. Still working great.
I think, for sure the docs should strongly discourage using IE as it’s not currently supported.
If you just take the Session Status box, using my Apple iPhone or Android tablet, It instantly updates from “Not Connected” to “EV Connected” to “Charging” as it should. But with IE, no matter how much I try to refresh the page the status never changes. It’s the same with Windows 7 and 10.
I’m pretty sure if I’d known about this before, following your doc would have got me up and running without any problems.