I’m Markus from nachbelichtet.com and I wrote the article about the TCRT5000 and ESPeasy.
You can do the calculations inside ESPeasy and you’ll get the result via MQTT. Connecting ESPeasy to OpenHAB should be fairly easy.
You just have to take in account, that this solution isn’t absolutely precise, especially, if the power consumption is low and therefore the disc of the ferraris counter is turning very slow. But you’ll get a general picture of your power consumption.
If implemented that idea and put a TCRT5000 as shown in the photo. I connected it to a counter modul at my ADAM6050 und read the counter value via MODBUS. Works perfect. The real value differs within a year from the countered one only by 1 Wh.
Do you have an tip for me?
It works for now. 1 count is one round. So 75 rounds are 1kwh. I checked it and it’s really accurate.
Can you give me an hint for the calculation inside espeasy?
And espeasy doesn’t save the data on powerloss. Any tip for that?
I think I need the kwh value in espeasy to Transfer it via Mqtt to openhab. And in openhab i can calculate the rest. I have to add the state of the electric meter at the time I start the script, and this should be an retained mqtt massage.
Or other ideas?
Ah. Thanks.
So i must send the counts to openhab. and when its got 75 it will be calculated. so i have to delete the counts on the espeasy? or is there an rule where it checks every 75?!
If you can do the counts on espeasy and only send a message every 75 rounds that would be preferred. Then you will only need to use UoM on the value sent to OH for kwh item. That being said I’m not sure how difficult counting on espeasy and sending every 75 rounds is but in OH a rule shouldn’t be that hard.
Can anybody help me with a Rule for the calculation. I’m also working with the tutorial of @nachbelichtet (thank you!) and it would be awesome if I could use the ESP for the calculation and just send the value over to openhab but I don’t know how to achive this. I even don’t know where to start if I would set up the rule in openHAB. Does anybody have it working and could share his rules with me?