Format data from mqtt

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
selfri
New user
Posts: 4
Joined: 04 Mar 2018, 01:59

Format data from mqtt

#1 Post by selfri » 04 Mar 2018, 03:38

I am importing data from mqtt in Home Assistant of a DHT22 sensor to a EspEasy node and i need to format value and show in a oled display, for example 3130 to 31.3, can anyone help me whats wrong in the formula?

https://photos.google.com/share/AF1QipN ... 9neW14dzhB

https://photos.google.com/share/AF1QipN ... 9neW14dzhB

I hope you see the pictures
thanks

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

Re: Format data from mqtt

#2 Post by TD-er » 04 Mar 2018, 16:52

Perhaps use as formula:

Code: Select all

%value%/100

selfri
New user
Posts: 4
Joined: 04 Mar 2018, 01:59

Re: Format data from mqtt

#3 Post by selfri » 08 Mar 2018, 01:50

I`m still having de problem with de format from mqtt,
In the example I need to format from mqtt value 2820 to 28.2 and show in the oled display
IMG_20180307_214114308.jpg
IMG_20180307_214114308.jpg (22.54 KiB) Viewed 3928 times
I use de formula: %value%/100 but nothing change.
IMG_20180307_214114308.jpg
IMG_20180307_214114308.jpg (22.54 KiB) Viewed 3928 times
Attachments
IMG_20180307_213957362_LL.jpg
IMG_20180307_213957362_LL.jpg (35.58 KiB) Viewed 3928 times

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Format data from mqtt

#4 Post by grovkillen » 08 Mar 2018, 05:52

I think it could be a bug that formula isn't working for the mqtt import plugin..? You might want to report it on GitHub.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

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

Re: Format data from mqtt

#5 Post by TD-er » 08 Mar 2018, 13:36

You should see the computed value (after processing by formula) in the device overview tab.
And can you use real screenshots for the web-interface images, these photo's are too small and too unclear to see.

selfri
New user
Posts: 4
Joined: 04 Mar 2018, 01:59

Re: Format data from mqtt

#6 Post by selfri » 18 Mar 2018, 06:47

sorry for the bad photos before, the forum don't have a good image loader

I am still having problems formating the mqtt value
Attachments
IMG_20180318_024315112.jpg
IMG_20180318_024315112.jpg (3.33 MiB) Viewed 3777 times
IMG_20180318_024217214_LL.jpg
IMG_20180318_024217214_LL.jpg (351.61 KiB) Viewed 3777 times
IMG_20180318_023952514.jpg
IMG_20180318_023952514.jpg (1.94 MiB) Viewed 3777 times

Post Reply

Who is online

Users browsing this forum: No registered users and 62 guests