ESPHome Component for EmonTX (ESPx & PiPicoW)

I can’t offer an opinion. I know nothing of the systems (homeassistant, docker, HA, HaOS, MQTT, ESPHome) you’re discussing.

Yes they can coexist - the two things are completely different - please continue :slight_smile:

The ESPHome component takes the serial data from the TX device and sends it on to other systems (primarily emoncms and HA).

The emoncms add-on is a complete emoncms system that runs in HA. It is just one way to run emoncms rather than a dedicated Pi, Linux host, VM, emoncms.org, etc, etc. The add-on isn’t ‘overkill’ it is a simple means of running emoncms in an existing setup (which is really good). How the data gets to the add-on just depends on circumstances & setup with the ESPHome component just one option!

Others may wish to use, what in someway is a superior system, for storing and viewing the data collected.

You asked for an unlimited emoncms for testing - installing the add-on gives you that in a simple way :wink:

2 Likes

It will be the weekend before I get a chance to, but I’ll give it a go on an ESP8266 I had my version running on.

Can you configure it to just do HTTP?

BTW AFAIK MQTT doesn’t yet work on the RP2040 :cry:

What do you mean “just do http” ?
I didn’t yet implemented MQTT.

If you install it on an esp8266, you’ll have to probably disable the webserver. That’s advised in the ESPHome doc.

Do you need any further information for testing?

My vision for this is that it is not just a component to communicate with HA, but could replace the existing ESP code to link a TX to emoncms (currently emonESP). In this case, a user may wish to just configure the data to be sent via HTTP and not create HA sensors.

:+1: It is because that is what I have ready to go :slight_smile:

I’d need a configuration to test the HTTP interface. Perhaps a full config example?

Oh yes, I see. I know from the ESPHome doc, that any module programmed with it can be used without HA. For that, a special parameter has to be defined to avoir the ESP reboot every couple of minutes. The other way is to disable completely the native API.

I’ll have to make so tries on this subject.
Looks like you don’t even need an HA to build with ESPHome: Getting Started with the ESPHome Command Line — ESPHome

Ok, I’ll try a couple of configs with the strict minimum and post it here.

1 Like

No you don’t and in theory we could include the ESPHome Builder with emoncms. You can also create a deployable configuration that sets up the Wi-Fi connection etc.

To an extent that is external to the Component, but worth bearing in mind.

1 Like

That looks all great!

Nice work @FredM67! I think a good goal might be to get the emonTx to a position where it can have the Built for ESPHome label attached. This would open up a big new user base for the system as well, for those who don’t have or don’t want to use emonCMS.

With that in mind, would it help if I sent @borpin the currently built adapter board, rather than you? Then you’d have someone else who can test independently. Let me know and I’ll arrange :slight_smile:

It’s up to you, you can send the adapter to @borpin if he needs it more than me.

Sure, this extension could be a good argument to sell more emontx. Today, an IoT device without the label like “Works with Alexa, Home Assistant…” will have less success.

But there’s one “big” point about all the openenergymonitor stuff. They need a way to sell it to the EU without problems (custom fees, …) due to the Brexit.
I remember, I bought my EmonTx4 through Robin Emley, who brought it to me in person in France.

1 Like

Well, that’s an entirely different (and rather smelly…) kettle of fish. The customs amounts aren’t usually too bad, but it’s on a country by country basis rather than unified so it’s easy to make a mistake. Sometimes I’ve been charged for things, other times not - probably very manageable for big companies, but not so for small ones :frowning: Anyway, let’s leave that aside for now and focus on some excellent integration!

2 Likes

Here’s the doc for the already implemented features.

2 Likes

Nice @FredM67 :slight_smile: Do you have an idea of how long the upstreaming into the ESPHome source takes?

Well, it can take a long time, BUT,
As far as I’ve read, if multiple users write a comment on the PR that the system is working, then it should reduce the time, since the reviewer(s) will see, “ok, multiple users have tested it, and it works”.

The other way to speed-up the process is to have a (good) contact with one or more of the reviewers… unfortunately, I don’t know anybody there !

In the mean time, it’s usable through the PR using this extra block in the yaml:

external_components:
  - source: github://pr#9027
    components: [ emontx ]
    refresh: 0s # ensure a fresh pull from GitHub - only required if you think things will have changed.
1 Like

That looks fantastic - @TrystanLea @glyn.hudson - this is a great step forwaqrd I’d suggest.

1 Like

A quick comment on this :slight_smile: .

Where you have “'Create individual sensors” this should perhaps be “create sensors for HomeAssistant that track…” - as these definitions only really work with HA.

Could you please add “This component can also be used to send data to an emoncms (link) system via HTTP” [and MQTT eventually]. Working directly with emoncms seamlessly is a key benefit!

[edit]
A link to the http component page would probably be useful too :slight_smile:

I’d be inclined to turn your http/emoncms note into a section as an example configuration for emoncms so it the appears in the left menu? This may break their doc structure so nothing more than a suggestion.

1 Like

@borpin
what about the latest version ?
Hope, I’ve implemented all your recommandations properly :smiley:

Hi all of you, @TrystanLea @glyn.hudson @borpin @awjlogan

I’ve some good news…

I’ve just implemented mqtt forwarding, including documention, and … it WORKS !!!

:partying_face: :tada: :partying_face: :tada: :partying_face: :tada:

3 Likes

Yes, that looks really good and clear!

1 Like

:rocket: Very impressive!

2 Likes