UVR1611 - all values via mqtt?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ControlGuy
New user
Posts: 4
Joined: 31 Mar 2024, 09:31

UVR1611 - all values via mqtt?

#1 Post by ControlGuy » 31 Mar 2024, 10:45

Hi there , Happy Easter to everyone!
Is there a way to get all Values out of the UVR1611 without selecting one vale per Object? 12 Sensors is Quite limiting if the uvr1611 already has 16 temp Sensors.
Can someone Help? Is there Kind a Raw Data stream i can send to my HomeAssistant via mqtt?
I already Played with the all values bit (UVR#All) bit it doesnt seem to change anything?
Maybe someone can help- gues i set it up wrong

kind regards

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: UVR1611 - all values via mqtt?

#2 Post by TD-er » 31 Mar 2024, 13:06

For some plugins, like the GPS plugin, you always get all units of measure without asking for it.
So for those plugins, I have added 'virtual' taskvalues, which you can query regardless whether they are assigned as a taskvalue output.
For example if you didn't have "hdop" selected, you can still use it as a taskvalue for the task named "gps" like this: [gps#hdop]

Not sure if this UVR1611 is always giving all values without asking for them. But if it is, then we can also add similar functionality to this plugin.

ControlGuy
New user
Posts: 4
Joined: 31 Mar 2024, 09:31

Re: UVR1611 - all values via mqtt?

#3 Post by ControlGuy » 31 Mar 2024, 14:48


TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: UVR1611 - all values via mqtt?

#4 Post by TD-er » 31 Mar 2024, 15:05

Well no I haven't used it myself as those devices are way too expensive for me "just for testing".

We can take a look at the code to see how the data is being processed and maybe we can add the same 'virtual' taskvalues like I mentioned is being used in the GPS plugin.
But then the sensor should be sending out all values continuously or "for free" or else it will be rather complicated as you need to sync up several instances of the same plugin talking to the same device.

User avatar
Ath
Normal user
Posts: 3531
Joined: 10 Jun 2018, 12:06
Location: NL

Re: UVR1611 - all values via mqtt?

#5 Post by Ath » 31 Mar 2024, 15:15

DL-bus seems to send all data when communicating with a host, so it should be possible to retrieve the other values too. But a check has to be made that the device isn't currently receiving data, as then the buffer content is invalid, and empty values would be returned :shock:
We don't have mechanism that handles this situation nicely, and adding double-buffering can be hard on these memory-tight ESP8266 units (that buffer is ~800 bytes...).

This plugin seems to be designed to have a single DL-bus device connected, and (optionally) multiple tasks configured to retrieve data from it, so the syncing should not be a problem, other than the problem I mention above...

To have more than 12 tasks (devices) you can use an ESP32 unit (In this Forum thread TD-er names a number of reasons to use an ESP32), as these all support 32 tasks. And also, these ESP32's have much more ram available, usually making them run more stable under some load (f.e. with many or memory hogging tasks).
/Ton (PayPal.me)

ControlGuy
New user
Posts: 4
Joined: 31 Mar 2024, 09:31

Re: UVR1611 - all values via mqtt?

#6 Post by ControlGuy » 31 Mar 2024, 22:42

hmm i am not very familiar with C and the programm structure of ESPEasy but as far as i see the Protocoll of the uvr1611 is 64 Bytes long (https://espeasy.readthedocs.io/en/lates ... r1611-page) - why the buffer of 800 bytes will be an issue here? Also the Data is send max all 10 sec. Would it be such a pitty if these 64 Bytes will be "lost" till the new values are read from the bus?

I already found the sourcecode of the plugin - but have no programming experience on C... https://github.com/letscontrolit/ESPEas ... _DLbus.ino

Maybe there can be another Dropdown menue - "raw" sending all 64 Bytes via MQTT ?

User avatar
Ath
Normal user
Posts: 3531
Joined: 10 Jun 2018, 12:06
Location: NL

Re: UVR1611 - all values via mqtt?

#7 Post by Ath » 31 Mar 2024, 23:03

Hm, it's even worst, according to the code-analysis of VSCode, it's even taking 1355 bytes for the buffer:
Screenshot - 31-03-2024 , 23_00_42.png
Screenshot - 31-03-2024 , 23_00_42.png (6.41 KiB) Viewed 196 times
So, for ESP8266, that's not getting a double-buffered option :shock:

This buffer is designed to support the greatest common denominator for all supported devices.
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3531
Joined: 10 Jun 2018, 12:06
Location: NL

Re: UVR1611 - all values via mqtt?

#8 Post by Ath » 31 Mar 2024, 23:28

Well, I can add the feature of reading all available device values, but that will often turn into empty values, messing up your MQTT data, so you won't be happy with that.
We'll need to come up with a different approach for handling this.
I'll think about how to do this properly.
/Ton (PayPal.me)

ControlGuy
New user
Posts: 4
Joined: 31 Mar 2024, 09:31

Re: UVR1611 - all values via mqtt?

#9 Post by ControlGuy » 01 Apr 2024, 18:26

thx Ath!

but while thinking - dont forget to enjoy eastertime ;)
Hope ur Bunny brings u a nice big present ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests