Activate analog sensor configuration

1. Activate the UI

The requirement is Firmware version 2.3.0(x) (or newer) with Analog Sensor API extension.
so that you OpenSprinkler can use the analog sensor configuration, the UI configuration must be adjusted.

Please note: There is no manufacturer support (from the USA) for the modified firmware, only via the German one Support page!

a) OpenSprinkler 3.x:

  1. Find out the ip of your OpenSprinklers by pressing B1
  2. Open a web browser and go to your SU configuration page OpenSprinklers:
    http://<ip-adresse>/su
    whereby the IP address from 1. is.
    e.g. http://192.168.178.123/su

b) OSPi

  1. Open a web browser and go to your SU configuration page OSPi
    http://<ip-adresse>:8080/su
    where is the IP address of your Raspberry Pi.
    e.g. http://192.168.178.123:8080/su

SU page:

  1. There are two input fields on the SU page.
  2. For UI Source, type “https://ui.opensprinklershop.de/js”, enter your password (“opendoor” when delivered) and confirm with “submit”.
    This is necessary because the "official" version does not support these extensions.
    In fact, it is the case that the OpenSprinkler Doesn't have any GUI (Graphical User Interface) built in - just an API. The GUI is dynamically loaded via Javascript via this page.
  3. Start yours OpenSprinkler new. Now under “Options” there should be a setting “Analog Sensor Config”:
  1. Android/IOS APP:
    – Android: Search the Play Store for “OpenSprinklerASB”.
    – IOS: Search the App Store for “OpenSprinklerASB.

2. Setup

Sensor list 2024-07

The picture above shows an example configuration with one SMT100 and two SMT50 sensors as well as a group configuration.

The area is divided into three parts: sensor, program adjustments and log

3. Sensors

With “Add Sensor” you can add a new sensor, with “Edit” you can edit and change an existing sensor, and with Delete you can delete a sensor.

Press “Add Sensor” and enter the parameters:

Analog sensoreditsmt50

“Sensor No”: Each sensor needs a unique number for management.

"Type": Select a sensor type. More types will probably follow, adding to the list:

  • Truebner SMT100 RS485 Modbus RTU over TCP: Connect an SMT100 over the network. For this you need a TCP to RS485 Modbus converter. The sensor supports two functions: soil moisture (moisture mode) or temperature (temperature mode).
    Enter the IP address and port for the RS485 converter, ID is the Modbus ID of the sensor.
  • OpenSprinkler analog extension board (ASB): 4 variants for converting the input data:
    – “voltage mode 0..4V”: No conversion of the input variables, the voltage is used directly
    – “0..3.3V to 0.100%” the voltage range 0 to 3.3V is converted to 0% to 100%
    – “SMT50 moisture mode”: The voltage range is set for the Truebner SMT50 converted - soil moisture mode
    – “SMT50 temperature mode”: The voltage range is set for the Truebner SMT50 converted - temperature mode
    – Likewise for Vegetronix
  • Special case “ASB – User defined sensor”: Here you can determine the parameters, ranges and offsets of the sensor values ​​yourself
  • “MQTT Subscription”: This sensor type is for MQTT sensor values ​​from the connected MQTT server. Define “Topic” (the section identifier) ​​and “Filter” (the sensor value)
  • “Remote sensor of a remote opensprinkler”: Sensor of another OpenSprinklers in the network. Enter IP+Port for the address of the remote OpenSprinkler a. The distant OpenSprinkler must have the same password as this one OpenSprinkler. ID is the number of the remote sensor
  • “Weather data” – Sensors for virtual sensors that receive the values ​​from the weather service
  • “Sensor group”: This defines a group that acts like a virtual sensor that can combine several sensors. Summarizing is done via
    – min: Smallest value of all sensors in the group
    – max: Highest value of all sensors in the group
    – avg: average value of all sensors in the group
    – sum: sum of all sensor values ​​of the group

“Group”: The assignment of the sensor to a group. Enter the number of the group sensor here (not a mandatory field, you can also configure this later)

"Surname": The name of the sensor

“IP Address” and “Port”: For network devices, the TCP/IP address and port

“ID”: Sensor-specific identification, see “Type”. With the "Analog Sensor Board" this is the connection, i.e. ID=0 for connection no. 9, ID=1 for connection no. 10 etc

“Read Interval (s)”: Reading distance of the sensor data in seconds (recommendation 300s)

“Sensor Enabled”: Must be active for the sensor to be read

“Enable data logging”: Save the logging data in the sensor log

“Show on main page”: Displays the sensor data on the home page

The sensor is saved with “Save”.

4. “program adjustments” – program adjustments

Here you can assign the sensors to programs.

An "adjustment" means that the values ​​of the sensor influence the running time of the program, for example the weather control can be shown here as a % value, a program can run longer or shorter.

Program adjustments202407

A program adaptation can only ever be assigned to one sensor. If you want to assign several sensors to a program, then create a sensor group and use this for adjustment. Alternatively, you can also define several program adjustments and assign them to the same program, but then the program adjustments are multiplied (e.g. adjustment A: 90%, adjustment B 110%, then the effective adjustment is 0,9 x 1,1 = 0,99 corresponding to 99% ).

“Adjustment No”: Unique number for the customization.

"Type": The type defines how the sensor data is converted for program adjustment:
– “No Adjustment”: There is no adjustment, eg for temporary switching off
– “Linear Scaling”: The adjustment is completely linear: “Min and Max Sensor value” define the range of the smallest and largest sensor value, e.g. 30% and 60%. “Factor 1 and 2” define the adjustment factors, whereby the values ​​represent a percentage adjustment. If, for example, you want to have an adjustment value of factor 0% for a min sensor value of 200, then enter “1” in “Factor 200”. In “Factor 2” enter the value for the max sensor value.
– “Digital under min”: If the sensor value falls below the min sensor value, then factor 2 applies, otherwise factor 1
– “Digital over max”: If the sensor value rises above the max sensor value, then factor 2 applies, otherwise factor 1

"Sensor": Select the sensor for the sensor data

“Factor 1/2” and “Min/Max Sensor value”: See Type for the adjustment values

5. Log

With “Clear Log” you can delete all log data. Download the log with “Download Log”.

You can also use the API function to read out the data directly in JSON format, filter it and then delete it.

The description of the API functions are currently available available here.

“Show Log” shows the last 24 hours:

Sensorlogwithminmax

The dashed “Min” and “Max” lines show the adjustment range that was created under “4. Program adjustments”.

sensors setup

1. Facility Types

The current software can use 4 types of sensors:

  • digital sensors via the SEN1/SEN2 connections (classic sensor inputs)
  • analog sensors via the A2D to the digital sensors (switching limit simulates digital sensor)
  • analog sensors via that new analog sensor board (direct connection to a sensor input)
  • analog sensors via TCP/IP RS485 Modbus converter (Truebner SMT100 RS485 Modbus version)

No external configuration is necessary for the first 3 variants, everything can be done directly in the OpenSprinklerapp to be set.

Only the last two variants can be recorded via the new sensor log and displayed in a diagram!

2. Analog sensors via TCP/IP RS485 Modbus converter

In order to integrate an RS485 Modbus sensor, an RS485 Modbus converter must be accessible via its IP address in the same network.

You will find detailed information about RS485 and Modbus here.

An example configuration based on the USR-W610 and Truebner SMT100 RS485 Modbus can be found here.

The “Waveshare RS485 to RJ45 Ethernet Converter Module” is recommended for the DIN rail. Info here.

 

Leave a Comment

Your e-mail address will not be published. Required fields are marked with * marked

This website uses Akismet to reduce spam. Learn more about how your comment data is processed.