Publishing Environment - 1-Wire Temperature Statistics
Moderators: grovkillen, Stuntteam, TD-er
Publishing Environment - 1-Wire Temperature Statistics
Hi all,
First a big thanks for your software that helps me a lot in home automation.
A question I have, in ESPEasy, there is a possibility to have statistics regarding the use of DS18b20 sensors. Things such as Samples Read Success, Samples Read Retry.
Is there any way to publish these data over MQTT? (I would like to have them as attributes of my sensors).
Thanks a lot.
First a big thanks for your software that helps me a lot in home automation.
A question I have, in ESPEasy, there is a possibility to have statistics regarding the use of DS18b20 sensors. Things such as Samples Read Success, Samples Read Retry.
Is there any way to publish these data over MQTT? (I would like to have them as attributes of my sensors).
Thanks a lot.
Re: Publishing Environment - 1-Wire Temperature Statistics
This data is currently not available, other than via the web UI. It can however be made available, after a little coding effort
I'll see if that can be added without adding too much code, as this plugin is included in many builds, and some are really cramped for binary size issues
I'll see if that can be added without adding too much code, as this plugin is included in many builds, and some are really cramped for binary size issues
/Ton (PayPal.me)
Re: Publishing Environment - 1-Wire Temperature Statistics
That would be awesome, thanks.
Even if available only through rules, it would be fine.
Even if available only through rules, it would be fine.
Re: Publishing Environment - 1-Wire Temperature Statistics
That's what I was thinking of, as it's the easiest, and probably most compact, way of adding it.
/Ton (PayPal.me)
Re: Publishing Environment - 1-Wire Temperature Statistics
@antro31 I've added added PR #5051 to the ESPEasy repository to add this functionality. The binaries will be available from this GH Actions run.
Can you test and report your findings here?
Can you test and report your findings here?
/Ton (PayPal.me)
Re: Publishing Environment - 1-Wire Temperature Statistics
Hello, I have tried something like:
In the command line, but does not seem to work.
Pool is the name of the task where I have connected my temperature sensor.
I am using build ESP_Easy_mega_20240511_normal_ESP8266_4M1M May 11 2024
What am I doing wrong?
Code: Select all
Publish esppool/read,[Pool#sensorstats,1,success]
Pool is the name of the task where I have connected my temperature sensor.
I am using build ESP_Easy_mega_20240511_normal_ESP8266_4M1M May 11 2024
What am I doing wrong?
Last edited by antro31 on 13 May 2024, 23:02, edited 1 time in total.
Re: Publishing Environment - 1-Wire Temperature Statistics
since a comma (,) is an argument separator, you may need to add quotes to the 2nd arument
No idea if the rest is OK as this doesn't look like ESPEasy syntax.
Do you try to access these kind of stats? https://espeasy.readthedocs.io/en/lates ... statistics
Edit:
Ah nope, saw what Ton did: https://github.com/letscontrolit/ESPEasy/pull/5051
A bit strange to use a comma here, as we don't do that anywhere else. Why not a dot, Ton?
Code: Select all
Publish esppool/read,"[Pool#sensorstats,1,success]"
Do you try to access these kind of stats? https://espeasy.readthedocs.io/en/lates ... statistics
Edit:
Ah nope, saw what Ton did: https://github.com/letscontrolit/ESPEasy/pull/5051
A bit strange to use a comma here, as we don't do that anywhere else. Why not a dot, Ton?
Re: Publishing Environment - 1-Wire Temperature Statistics
Well, I did that also in other plugins, like P011 and P087, and in AdafruitGFX_Helper (for all supported Display plugins P095, P096, P116, P131, P141), and it works as intended.TD-er wrote: ↑13 May 2024, 23:01 Ah nope, saw what Ton did: https://github.com/letscontrolit/ESPEasy/pull/5051
A bit strange to use a comma here, as we don't do that anywhere else. Why not a dot, Ton?
But it might have been helpful/useful if that also used the dot as a separator, so maybe I'd switch to the dot and make the other implementations backward compatible.
@antro31
If you just type as a command [Pool#sensorstats,1,success] what do you get, a 0 or an empty value? And what if you replace 'success' with 'address' ?
/Ton (PayPal.me)
Re: Publishing Environment - 1-Wire Temperature Statistics
Hi Ton,
Actually, it does nothing (neither with 'success', nor with 'address')
I tried [Pool#Temperature] and it gives me the right temperature.
Actually, it does nothing (neither with 'success', nor with 'address')
I tried [Pool#Temperature] and it gives me the right temperature.
Re: Publishing Environment - 1-Wire Temperature Statistics
Hm, I now see where I made a typo (actually, a copy/paste error)
Will be able to fix that later today, not near my ESPEasy development system ATM.
Will be able to fix that later today, not near my ESPEasy development system ATM.
/Ton (PayPal.me)
Re: Publishing Environment - 1-Wire Temperature Statistics
I was able to fix it sooner than expected, so a GH Actions run is on its way.
Please update and retest.
Please update and retest.
/Ton (PayPal.me)
Re: Publishing Environment - 1-Wire Temperature Statistics
Well done ! Seems to work OK.
Re: Publishing Environment - 1-Wire Temperature Statistics
Great, thanks for the feedback
/Ton (PayPal.me)
Re: Publishing Environment - 1-Wire Temperature Statistics
@antro31 I've changed the argument separator for this plugin from comma to dot (period), so after you update to this GH Actions run, you'll have to update your rules!
So you'd have to use like this: [Pool#sensorstats.1.success]
This will go into the release version, so no reason not to update
So you'd have to use like this: [Pool#sensorstats.1.success]
This will go into the release version, so no reason not to update
/Ton (PayPal.me)
Re: Publishing Environment - 1-Wire Temperature Statistics
Thanks for the update!
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest