If you are referring to ecowitt sensors, I am using this ecowitt driver for my hub automation system (Hubitat) made by a developer of the community, and he spent quite some time with ecowitt support to have some info for the developement of the driver: https://github.com/mircolino/ecowitt. The driver supports all sensors of the ecowitt family available right now.
He wrote a nice document describing sensors and units of measurement: https://github.com/mircolino/ecowitt/blob/master/data_mapping.pdf
I have all ecowitt sensors installed, except for water-leak sensor. If you need to do tests I’ll be happy to help.
Regarding the pwsd modification, I want to attempt to do it, thanks for the instructions. I have some questions:
In the soil_temp_moist.php can I remove all references to temperatures, since the WH51 sensor provides only these two values:
Multi-channel Soil Moisture Sensor (WH51)
soilbatt[1-8] battery (¹) % Returned by ecowitt as AA voltage: (1.5V) OK, (1.0V) Low
soilmoisture[1-8] humidity (¹) % Soil moisture
I would only consider the soilmoisture# value, and ignore the soilbatt# one, correct?
The internal variable in the $wather array for solimoisture# is soil_mst#, correct? Because I also see the extra_hum# variable in the file.
In order to label the soil sensor can I then use the lang_xx.txt file like I did with the extra_tmp# sensors? Do I use the extra_hum# to label them?
I’ll start the modifications and see what I come up with, I’m starting to understand the logic of your template.
Sorry for the confusion, I meant the “not yet available sensors”, such as the water sensor (temp only) , soli-temp, AQ-voc
All those sensors are nearly available and to use them I need the sersor-names, uom and range to use them in the dashboard.
For all current available sensors there is ample documentation.
I have all ecowitt sensors installed, except for water-leak sensor. If you need to do tests I'll be happy to help.
Regarding the pwsd modification, I want to attempt to do it, thanks for the instructions. I have some questions:
1. In the soil_temp_moist.php can I remove all references to temperatures, since the WH51 sensor provides only these two values:
The new soil-temp sensor will also supply a value to integrate in your block.
Therefor the current block simply ignores them if there is no sensor value.
. . .
2. The internal variable in the $weather array for [b]solimoisture#[/b] is [b]soil_mst#[/b], correct?
In order to label the soil_mst# can I then use the lang_xx.txt file like I did with the extra_tmp# sensors?
2 and 3 correct.
the soil temps are soil_tmp#
But you do not have to hurry to start yourself.
Let me do a first setup and I mail you the script to test and adapt.
Also there needs to be a pop-up describing what the values / warnings are meant to be.
So I attach the 4 sensors of a Davis VP using the Leuven-Template.
Please find attached the alpha version of a soil-block.
Developing scripts can blow your dashboard to bits-heaven by making modifications, so I strongly advise to use a copy of your site when doing development work.
More work
Add a setting to display either the name of the sensor (“Garden left”) or measurement texts as it is in the screenshot now.
pop-up to explain what the texts such as saturation mean.
[li]tune warning texts for moist unit cb comparable to %
Davis has ample documentation and owners wrote books about the cb-uom
There is no conversion table or explanation yet of the % value of Ecowitt/Ambient, neither is the range of values known. Seems ridiculous to post 100% without even explaining that it means → fully saturated[/li]
I read this thread only after I completed my first version.
I made the block work by pulling data, I still didn’t modify the layout. I was going to remove the first column (ex temp. column). But your block is way better obviously, but I had fun modifying it because it let me understand the logic of pwsd.
I can’t find the scripts attached to your post, only the image. Would be glad to test your version if it’s ok for you. Thanks again.
One question: the title of these blocks, for extra_tmp I used the label “Extra block large” in the language file (btw: the word large was missing from all language files I analyzed), but I couldn’t find the “Extra block large” string in the files I modified, I wanted to introduce a title for the soil block to be used in the lang file. How can we customize it?
. . .
One question: the title of these blocks, for extra_tmp I used the label "Extra block large" in the language file (btw: the word [b]large[/b] was missing from all language files I analyzed), but I couldn't find the "Extra block large" string in the files I modified, I wanted to introduce a title for the soil block to be used in the lang file. How can we customize it?
Add these lines to PWS_blocks.php at the bottom.
That way I can see your changes also.
I added comments for the meaning of the lines.
$script = 'soil_tmp_mst.php';
$blck_ttls[$script] = 'Soil block'; // add to translation files
$blck_rfrs[$script] = $rfrsh_fct; // not very fast changing values
$blck_setup[$script] = 'Soil-moist-temp sensors of your station'; // used in easyweather setup
$blck_type[$script] = 'b'; // also used in easuweather
#$blck_ppp [$script][] = array ('show' => true, 'popup' => 'soil_popup.php?lang='.$used_lang, 'chartinfo' => 'popup', 'text' => 'Soil moist and temp info' );
# previous line will be uncommented when a pop-up block is ready.
If time permits I will tomorrow remove the extra header texts for temp when no temp is available and other small things.
Also a alpha version of a popup will be ready shortly.
I configured both blocks: mine and yours. You can check on the site.
The values in my block are all correct, I double-checked on my Ecowitt HP2551 console.
In your block, the last 4 values are ok, the first four no, but probably you’re testing something.
Updated version
Added setting for displaying condition-texts or sensor-names
Code cleaning + added comments
Removed temp column in table when no temp sensors present
use a 3 column layout with both sensor names and condition-text.
use font color instead of background color for values, to keep a minimal style, like you do for the extra TH sensors or the forecast block (that one is perfect and readable)
for 2 col. layout: the font color implies the condition, if you hover the mouse on the value, it could give you the condition-text so you don’t need the 3rd column
Thank you so much Wim, your support for this template is unbelievable.
Yes that translation could better be implemented as in the other blocks.
Add a line in the top part, f.i. just after line 67 where there is a header line for the small block
or change the first line of the large soilblock to
$blck_ttls[$script] = $head_temp_soil;
Brain-storming/Suggestions:
- use a 3 column layout with both sensor names and condition-text.
- use font color instead of background color for values, to keep a minimal style, like you do for the extra TH sensors or the forecast block (that one is perfect and readable)
- for 2 col. layout: the font color implies the condition, if you hover the mouse on the value, it could give you the condition-text so you don't need the 3rd column
. . .
A lot of good ideas but i have more to consider then just 1 user with only soil-moist sensors.
There are Davis users for which a soil sensor nearly always has temp en moist.
Ecowitt / Ambient will soon announce soil-temp and water-temp sensors, both of which could be used to measure soil-temps for planting advices.
Brain-storming/Suggestions: 3 column layout:
The number of columns is already 3 : moist | description for moist (and or temp) | optional temp
The 2 texts are in one column, adding another column will not fit.
use font color instead of background
Font color would be better, but I have to define the font colours from scratch and have to cater for moist in % , moist in cb and soil-temp.
And the colours needs to be readable in the 3 themes used: dark, light and user.
I think a good solution is to lower the number of colours. Blue and deep blue for to cold + to wet Default theme colour (now silver and black) for adequate moist and acceptable temps Red for irrigation needed as there is no “to hot” in soil-temp
hover the mouse Nice idea, but visitors do not hover, they read and click.
For up to 4 sensors I will combine the location-text on 1 line and the temp+moist text on a second line
For more then 4 sensors the pop-up should give the missing information.
Or, if we really make it ugly, it could be a scrolling block.
Done, working fine. I updated the language file for string “Soil info”.
A lot of good ideas but i have more to consider then just 1 user with only soil-moist sensors.
1. There are Davis users for which a soil sensor nearly always has temp en moist.
2. Ecowitt / Ambient will soon announce soil-temp and water-temp sensors, both of which could be used to measure soil-temps for planting advices.
There are a lot of users with the WH51 sensors (only moisture), but they still haven’t found PWSD template.
I agree, the block should have both moisture and temp. And I’m sure you’ll find a way to fit all the info in the block.
For example: the middle column seems to be large enough to contain the name of the sensor + the condition.
[i]use font color instead of background[/i]
Font color would be better, but I have to define the font colours from scratch and have to cater for moist in % , moist in cb and soil-temp.
And the colours needs to be readable in the 3 themes used: dark, light and user.
I think a good solution is to lower the number of colours.
[b]Blue and deep blue[/b] for to cold + to wet
[b]Default[/b] theme colour (now silver and black) for adequate moist and acceptable temps
[b]Red[/b] for irrigation needed as there is no "to hot" in soil-temp
This approach seems to be good. Didn’t you apply this kind of approach to the colors of other blocks (forecasts, extra TH sensors, etc.)? I see values with different colors based on a condition, right? The choice of the colors could be replicated?
For up to 4 sensors I will combine the location-text on 1 line and the temp+moist text on a second line
For more then 4 sensors the pop-up should give the missing information.
I didn’t understand, but when it’ll be ready I will check it.
Or, if we really make it ugly, it could be a scrolling block. :D
ahahahahah.
I agree, that would be ugly.
Attached another version to test.
I uploaded the new alpha version you attached, it contained a popup script, but I don’t see where I have to click to check the popup window.
I removed the gray background (#bbbbbb) of the moist value, made it look like the extra TH sensors block. The green is readable, the dark blu is not (dark skin), but I couldn’t find where to change the color of the text, there were 2 different places so I didn’t touch it.
Check pic attached.
Thanks for everything Wim, I’m sure you’ll develop a fantastic soil block in the end.