Since there are many different sensors, and they may use different communication protocols, there doesn’t exist one procedure that can universally handle all sensor inputs. What type of sensors do you have in mind? Analog? Digital? I2C, SPI?
The firmware has built-in support for rain sensor, which can be thought of as a simple digital sensor. It basically checks the rain sensor status inside the inner loop and performs actions accordingly. You can use this as a starting example to add additional sensors.
I am looking at using 1-wire. Currently I use 1-wire for all other sensors in my home, would like to continue it outside. Temperature humidity and soil moisture is what I am looking at. I’m assuming the weather is read through xml from weather underground? I can output an xml file from my server, Can ospi be setup to read the sensor data from xml?
Sure, OSPi can parse XML. If you are using Dan’s Python interval program, it should be pretty easy to add a module to parse XML data from your server. If you are using the unified firmware, it’s a bit tricky because that program is written in C++ which means it’s not as easy as Python to parse XML.
The way the unified firmware parses weather data is that it queries the opensprinkler.com cloud server which runs a Python script. So the cloud server serves as a middle man between OS and WUnderground. If you can modify your server to return data in simpler format, that should work a lot better. You can take a look at weather.cpp in the unified firmware code to see the format of the output data from the weather script.