You can see the JSON construction here
Interesting that the non-JSON format can include Current values. Is this an oversight not including it in the JSON format?
Is there a reason not to concatenate the values and then do a single print statement? Is this more efficient?
Itās just the Arduino implementation - it may or may not be better to build the string in advance, depending on the situation. In this case, itās all blocking calls so thereās no point in allocating a chunk of memory just to do this - the cost is some extra function calls. If thereās non-blocking available (i.e. you transmit using DMA), then youād build the string in advance at the cost of requiring to allocate the full message size in memory. This is what I do in the Pi3 as thereās a DMA unit available - the full string is built, then the DMA gets the message size and sends it off in the background and the processor is free rather than polling the UART or responding to interrupts (UART is slow compared to the processor!).
I donāt think itās been requested, is all - itās not a particularly interesting piece of information (as far as Iām aware!). Easy to add
It used to be when it was necessary to calibrate each c.t., probably not so much now as weāre using rather more precise c.tās and components generally. Itās still nice to have either current or power factor in addition to power/energy, if youāre trying to identify the type of load youāre measuring.
It is one of those really annoying things that OEM tend to do. Logically, if you enable it for one output form, why wouldnāt you mirror that in the other output form especially when it is optional!
I wonder whether the consideration was disc space on the emoncms.org server from the days of NanodeRF before the emonPi appeared, and the thinking simply hasnāt changed?
Hi guys,
Well, after a LOT of fighting with the whole ESPHome framework (thatās unbelievable how restrictive is everything ! No way to let an unused variable, no way to pass a my_string.c_str()
of if the function takes a const std::string&
, ā¦), I finally got my PR green !
Well, now itās compiling with all checks/test/sā¦
Hereās the very simple yaml file I use (boilerplate stuff not shown):
And here what I get:
āInconnuā means āunknownā. These are sensors my old emontx4 does not deliver.
Iāve defined default parameters for each sensor depending on the prefix/pattern. This can be overwritten by the user.
If someone wants to play with this component, hereās what needs to be defined 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.
uart:
id: emontx_uart # using UART2
rx_pin: GPIO16
tx_pin: GPIO17
baud_rate: 115200
emontx:
sensor:
# your sensors
and then, all the sensors.
Here the pull request, still marked as draft.
Well guys,
Slowly but surely, Iāll need some āinfiniteā access to an emoncms server, so I can test the forwarding of the data through http
Fred
Nice @FredM67
Re. the server, do you have emonCMS setup locally? If you have a spare Raspberry Pi, or similar, you can either use the docker image or flash a pre-configured SD card.
Well, I could grab some old hw (Raspberry Pi 3 !), but well, I takes too much time + my desk is already full of HW and other stuff.
Maybe, thatād be better and faster to test on the real emoncms.org.
Iāve an account on it, but well, if possible, Iād prefer not waste my credits for testing !
We could also define a ātest accountā on emoncms.org.
@TrystanLea or @glyn.hudson might be able to help? In the meantime, you could just run a local server to look at the HTTP requests? I assume itās just a POST request, so you could use something like this gist and point the ESPHome to your local IP address.
There is an HA add-on available.
Open-Building-Management/emoncms: emoncms home-assistant addon
Thatās not the same use-case I think. Thatās an add-on to āimportā completely an emoncms instance, right ?
From my personal point of view, what I want is to have all my EmontxV4 sensor data in my HomeAssistant to track consumptions, define automations, ā¦
And the mentioned solution is realized with docker. Not sure itās usefull when using HaOS.
So⦠http forwarding from inside the component finally works fine.
Btw, Iāve found that the pre-def device for EmonTx4 is wrong on Emoncms.
I donāt know how it looks like on a single phase firmware, but at least for 3 phases, itās Vx and not Vrms. (already mentioned the discrepancy in the source code).
Should I now go for MQTT ?
Youāre on a roll, it seems, so go for it
Lolā¦
Thatās now easier for me to just continue. If I make a break, and the break is too long, Iāll forget a lot and then Iāll have to dive again in it!.
Thatād be cool and useful, if someone or better a couple of people test whatās already available.
If everything is ok and stable, Iāll also start the docā¦
The only point about this http forwarding where I didnāt do anything yet is the parameter āFingerprintā. If someone can explain me in details what it is for, perhaps Iāll be able to add it.
Btw, thereās also a webserver on it, to show the data similar to emonESP.
If you want to give a try, here the address: http://82.64.56.179:8080/
Login: admin
Pwd: .emoncms.
Thatās not the same use-case I think. Thatās an add-on to āimportā completely an emoncms instance, right ?
From my personal point of view, what I want is to have all my EmontxV4 sensor data in my HomeAssistant to track consumptions, define automations, ā¦
And the mentioned solution is realized with docker. Not sure itās usefull when using HaOS.
the emoncms addon works on HaOS, it is designed for that. It is not an add-on to āimportā completely an emoncms instance. It creates an emoncms server in homeassistant. If you have a backup, you can restore it with the backup module of emoncms⦠after it works like a classic emoncms server, with all the workers, redis, etc etc
to track an emontx in home assistant with a usb adapter, you can use this add on : GitHub - Open-Building-Management/emontx_sniffer: home-assistant addon sniffer for devices like openergymonitor emontx
cf also
RFM69 id and group resets to i0 and g210 Ā· Issue #1 Ā· Open-Building-Management/emontx_sniffer Ā· GitHub
Well, @Robert.Wall @TrystanLea @awjlogan, should I continue, or just give up?
I think, @alexandrecuer solution is one solution, that sounds for me somewhat āoverkillā for a lot of people.
Both solutions can coexist, each with its own user.