emonPi Solar PV OpenEVSE Setup Tesla Model 3

The OpenEVSE I purchased back in 2017 has been quietly waiting for my Tesla model 3 to arrive and now I am pleased to say it is here and is a wonderful car.

So, now it’s time to get the emonPi working in conjunction with the OpenEVSE. My next problem is the little I have learnt in the past regarding the emonPi I have forgotten and anyhow I only used it to display PV power and grid power which it does very well.

Looking at the various instructions for setting up the Pi to control the EVSE based upon available surplus PV is probably very easy once you have figured out how it is done. However, when you are starting from zero the learning curve is quite steep so I wondered if it will help me understand things if I could inspect an emonPi/emoncms config file that someone else is using to control an OpenEVSE.

If you have such a thing and are willing to share I would be very grateful.

1 Like

Well progress of sorts. I now have some data appearing on my OpenEVSE page but if the cursor reaches any of the data points this error message pops up. Any suggestions for a fix?

I am trying to setup the node openevse inputs and really have not a clue. Could some kind person give me some idea of what should be entered here please?

Sorry Brian you may need to wait for @TrystanLea or @glyn.hudson as many of us regular helpers do not have EV or much experience with the EVSE stuff.

IIRC there is a device template for EVSE withh the feeds all ready to go. What version of emoncms are you running? Do you have the device module installed?

Thanks Paul. I don’t know how to determine the emoncms version. Google reveals version 10.1.4 is available on github so I downloaded that but it looks like another voyage of discovery so I shall leave it alone for now.

What is the device module you mentioned and how would I know if I have it?

The setup instruction show two possible connection arrangement called Type 1 & Type 2. Presumably the type must be declared in the configuration somewhere but so far I have failed to determine where. I have included a drawing of my system below.

This image is in the installation instructions. It clearly shows the chrge current dropping to zero when PV is no longer available. Mine does not do this but reduces to 6A and then continues at 6A even when PV is zero.
openevse-divert

It should be on the foot of each page, but more detailed info is available on the admin page of emoncms.

It is an emonPi, I missed that the first time. If you have updated via the update buttons on the admin page recently you should be all good. The device module in place and using all the latest versions. That said, how old is the emonPi? I wonder what emonSD version number you are running? Again that info is on the admin page

You shouldn’t need to download anything and it might upset things if you do so yes, better to leave that.

Could you post the server info (there is a copy to clipboard button) from the admin page so we can see what you have?

Looking closer at the screenshots I suspect you are not running the latest versions. There is now a lafthand menu side bar throughout emoncms (much like you see for the apps page) but that can be collapsed so it isn’t an absolute indication of version. But I now notice there is no device setup cog at the end of each node header on the inputs page.

Unfortunately no, there is no place to globally declare that. It’s there mainly for you to understand the different ways of setting it up. More recently there are some templates for the emonPi or emonTx that use the “type1” and “type2” in the title to help you select the right device template for your hardware. BUT, I don’t think that will help you much here since it looks like your emonPi is neither type as it doesn’t have a CT on the grid or main consumers. and whilst you MartinR diverter is “type 2” there will not be any device templates for that hardware.

I assume the MartinR diverter posts the PV CT data so I’m wondering why you have chosen to measure that with the emonPi.

Going back to the original question. once you have access to the device module (via the cogs after updating or maybe via the “setup → device” menu’s currently?) you should be able to auto-configure your openEVSE.

This is the template device/data/OpenEVSE/openevse.json at 2.0.0 · emoncms/device · GitHub you see it has listed feeds like ev_power and ev_energy, hopefully these are the name that the openEVSE app looks for to auto configure.

although it looks like the error message suggests the more generic “use_kwh” feed is undefined. I assume it wasn’t able to “auto-detect” a feed called use_kwh. Whether it is called “use_kwh” or not, you will need phpfina feed that reports your use in kWh’s. If it was named “use_kwh” it will get picked up automatically, otherwise go to the openevse apps config (spanner top right) and use the dropdown for the “use_kwh” feed selection to select the correct feed.

[you posted while I was writing the above so in response to your last post . . ]

Ok the penny’s just dropped why you might want the emonPi PV CT, to help control the EV. If that is the case, I would expect the other emonPi CT is drawn in the wrong location and should be on the grid incomer not the EV charger. Otherwise it cannot know when you are exporting or not.

However, I suspect you need it all setup correctly for the auto control of the EV to work, it’s not just plug and play (as far as I can make out, but we are way out of my area of experience here) especially with the MartinR diverter, if that is working well, the EV will only charge after whatever your diverter loads finish consuming. I imagine you would want the EV to be a higher priority? Then the diverter would mop up the excess PV for each 6A step of the EV charger so it better uses the PV without importing.

Thanks Paul. The version at the foot of page is 9.9.9

I don’t see an admin page. This is what I see:

The admin session timesout for security reasons. So when you first log in you are an admin level user, after a while that drops to a standard user level session. If you log out and then log back in, you should see an “admin” option in that menu.

Oh and 9.9.9 is quite a jump to 10.1.4 so please don’t attempt an update until we confirm your versions.

When the updater become less compatible with earlier versions there was a version check introduced, but early versions do not have the check installed yet (until after the update is started) so it might attempt to update then find out it can’t after having made changes. So beware of updating until we know what you have.

In fact, you might not even have the server info button yet?

How much data do you have and how open are you to the idea of backing up your data and moving to a newer emonSD image version if needed?

My historical data is held on PVOutput using another RPI so whatever is hels on the emoncms.org server can be erased.

I am happy to start with a clean slate whatever that entails.

No that’s safe, I was referring to stuff on your emonPi

If you don’t have anything of value on the emonPi, I would consider flashing the sdcard with the latest image

See emonSD pre built SD card Download & Change Log · openenergymonitor/emonpi Wiki · GitHub, you will need a torx screwdriver to get at the sdcard on the emonpi. Make sure to take off the right end (the end without the antenna) so as not to disturb the lcd etc unnecessarily, you can just pull the sdcard without moving any of the internals once the end plate is off.

The most important thing is once you put the sdcard back into the emonPi, attach a Ethernet cable before powering up, and once you connect the power, walk away and leave it for half an hour or so, it will do a long update at first boot and if you try to do anything during that time it can cause havoc.

Once it has settled, then add your wifi details and expand the filesystem as per the guide linked.

Another small tip is (if there’s not one there already) add a blank file called “ssh” (no extn) to the boot partition of the sdcard immediately after flashing and before moving it to the emonPi, that will facilitate “ssh’ing in” to expand the filesystem without having to play with the lcd menu/button (or removing the sdcard again).

Correct, there is nothing of value on the emonPi. Just to be clear are you recommending I replace the version of emoncms with v 10.1.4 or are you saying replace the entire sdcard image? Or maybe both?

If I am to replace the entire OS then obviously I shall need to add emoncms somehow. Is there another set of instructions for that?

The emonSD image is a complete image of the Raspbian OS with all the emon and OEM stuff (incl emoncms) already installed and to a large degree “setup”. You will need to create a emoncms user account in the same way you did on emoncms.org (or your existing emonpi image)

yes

yes as emoncms is pre-installed on that image

No need, already done.

Doing the whole image incl emoncms is the guide I pointed to, the latest “emonSD-30oct18” image is available to download on that same page.

Ahh. The first link on that page took me to the Raspian download page but further down is the link you are refering to. OK thank you I am currently downloading the image.

Hi Brian,

Fantastic your M3 has arrived, I’m sure it was worth the wait!

Once you have an updated version of Emoncms setting up the OpenEVSE with Emoncms should not be too difficult, the device module will auto configure all the require Input process setup, see this OpenEVSE Emoncms setup guide: OpenEVSE / EmonEVSE Setup Guide — OpenEnergyMonitor 0.0.1 documentation

There are two options to upgrade your Emoncms:

  1. Backup your current emonPi (setup > Backup) then run update (Admin > Update)
  2. If you want to start from a fresh download our latest SD card image and flash to a fresh SD card then insert into emonPi: emonSD pre built SD card Download & Change Log · openenergymonitor/emonpi Wiki · GitHub

I would recommend moving emonPi CT1 to monitor grid import / export in the same location as the PV diverter CT. This would then be a Type 2 setup. See emonPi solar PV guide to setup solar PV: Solar PV — OpenEnergyMonitor 0.0.1 documentation

I order for the OpenEVSE to take priority over your PV diverter I would recommend using solar PV gen rather than grid-import-export to inform the OpenEVSE divert. To do this you will want to enter into the solar PV gen MQTT topic in the OpenEVSE setup emon/emonpi/power2

Hi Glyn. I was beginning to wonder if the car would ever arrive but now they are coming in by the shipload every week.

Tesla lied about it. This thing is not a car, it’s a rocket propelled computer on wheels. I had not realised it’s a 450bhp machine!

If you get the chance to try one you will be amazed, it’s way better than I expected so all the waiting and grief was worth it. The Tesla superchargers are brilliant and running on sunshine as I have been is great fun.

Anyhow, that is off topic. I have updated the SDcard and am working my way through the excellent instructions so thank you both for that. I shall allow some data to be gathered and then look to see if it makes any sense.

1 Like

OK, some progress. I have set up the inputs and feeds. Screen grabs follow.

Then I setup the Feeds - see screen grab.

After this if I click on graph I can see data with a gap while I was programming the SDcard. See below.

Finally the app view for ‘My Electric’