Feed on
Posts
Comments

Occasionally, we encounter application cases where users want to utilize Power-over-Ethernet (PoE), which allows a single Ethernet cable to deliver both network connectivity and electrical power. This setup eliminates the need for a separate power line, making it especially useful in remote or hard-to-reach locations where running additional cables is difficult. To enable PoE, a PoE switch injects voltage—typically 48VDC—into the Ethernet cable, which then carries both data and power. At the receiving end, a PoE-compatible power circuit is needed to step the voltage down to a usable level, such as 12VDC. OpenSprinkler does not natively support PoE, as its Ethernet module and power circuitry do not comply with PoE standards. However, you can use an off-the-shelf PoE splitter to separate the power and data: the splitter outputs 12VDC and a standard Ethernet signal (without the 48VDC). Since OpenSprinkler DC operates on 12VDC, this makes it compatible with a PoE switch when used with a suitable splitter.

The image below shows a typical PoE splitter. One end features an Ethernet receptacle where the PoE cable is connected. The other end splits the signal into two outputs: a 12VDC power plug and a standard Ethernet connector. The 12VDC plug connects to the power barrel of the OpenSprinkler DC, while the Ethernet connector plugs into the wired Ethernet module.

The diagram below illustrates the complete setup. With this configuration, a single Ethernet cable can deliver both power (for the controller and solenoids) and data connectivity. We’ve successfully tested this setup using a TP-Link 4-port PoE switch, a PoE splitter rated for 12VDC at 2A, and an OpenSprinkler DC with a wired Ethernet module—it worked flawlessly. Please note that this setup is only compatible with DC-powered OpenSprinkler models (including OpenSprinkler Latch), as they can operate directly on 12VDC. It is not suitable for OpenSprinkler AC, as there is no straightforward way to convert 12VDC to the required 24VAC.

Recently through a customer I learned about a product called WireSprout, and it only works with the AC-powered OpenSprinkler but not the DC-powered version. Out of curiosity, I looked into why this is happening. So what is WireSprout? Simply speaking, it allows individually controlling 2 zones using a single zone wire. This is useful in situations where some of your zone wires are broken and it’s too much hassle to repair the broken wires. Let’s say you have 2 zones, but only 1 good zone wire. Using WireSprout, you to control both zones using the single good zone wire. This works on any sprinkler controller (well, as you will see later, as long as it’s an AC sprinkler controller). A single WireSprout pack contains a pair of two ‘sprouts’. Each sprout is a tiny little circuit wrapped in heat shrink tubing, and has 3 wires: 1 blue and 2 green wires. Below is the diagram that shows how to connect it to a sprinkler controller:

To be fair it’s not adding more zones — to control 2 zones you still need to take 2 zone ports on the sprinkler controller. Also it requires the Common (COM) wire to be a good (i.e. non-broken) wire. But what it helps with is to reduce the number of zone wires. Note that it can only go with a pair of 2 zones. For example, if you want to control 4 zones, you need another good zone wire and another pack of sprouts. It unfortunately cannot allow you to control 4 zones with a single good zone wire.

Each sprout is very small, so likely it only contains a few electronic components. Also, it’s very general — it can work with any AC sprinkler controller, so the circuit doesn’t rely on the knowledge of any specific controller. It also works only for 2 zones at a time. Finally according to the customer, it doesn’t work with DC-powered OpenSprinkler, only works with AC-powered version. So it must rely on the property of AC to work. I googled similar products, and after a bit of research, it became clear to me that the circuit is indeed extremely simple. Each sprout is essentially two diodes in series, where the two ends are the green wires, and the center (between the two diodes) is the blue wire. Below is what I believe each sprout contains internally:

So how does it work all together? Here is the diagram:

Because the output voltage is AC, it has positive and negative cycles. As you can see, on the positive cycle of the COM wire, if Zone 2 port is on, the two diodes circled green will turn on. So the current flows from COM to Solenoid 1 through the Common wire, then through the zone wire to Zone 2 port. The other two diodes are reverse biased therefore solenoid 2 cannot turn on even if Zone 1 port is on. Conversely, on the negative cycle of the COM wire, the situations with all diodes are flipped, so only Solenoid 2 can turn on (assuming Zone port 1 is on). In this particular arrangement, Zone port 1 controls Solenoid 2, and Zone port 2 controls Solenoid 1. If you want them to correspond to each other (i.e. 1 -> 1 and 2 -> 2), just horizontally flip one of the sprouts.

In short, the WireSprout works by leveraging the fact that AC waves have positive and negative cycles. By using diodes, it can cleverly block half of the AC waves, therefore Solenoid 1 can only turn on during the positive cycles, and Solenoid 2 can only turn on during the negative cycles, or vice versa. Thus these two zones can be individually controlled.

Now it’s obvious why the DC-powered OpenSprinkler can’t work with WireSprout: DC-powered OpenSprinkler outputs DC-only voltage, there are no positive or negative cycles — there is only positive voltage. Therefore WireSprout can’t leverage the negative cycles to disable one of the solenoids therefore it cannot achieve individual control of 2 solenoids using a single zone wire.

There is possibly a downside of this method: each solenoid only get half of the AC waves as opposed to the full wave normally. Would this cause any reliability issues? I am not sure, but it seems there hasn’t been any reported issue so far.

Finally, we can also explain why WireSprout always works in pairs of 2 and not more than that: if you want to control, say 4 solenoids with a single zone wire, that would require counting the parity of the AC waves, which would be much more complex and may require an active circuit.

Fun with ChatGPT

Unless if you’ve been living under a rock, you’ve probably heard of ChatGPT by now, if you haven’t given it a try yet. Over this past weekend, I’ve had some fun with it. Not only it’s amazingly good at writing text description, but it can write programming solutions too. Here are just a few things I asked it to do.

Ray: tell me about opensprinkler

ChatGPT: OpenSprinkler is an open-source, web-based sprinkler controller for watering gardens, lawns, and other outdoor areas. It allows users to automate their irrigation systems and customize watering schedules through a web interface or a smartphone app. The controller can be programmed to turn on and off sprinkler valves at specified times, and can also be integrated with weather data to adjust watering schedules based on local weather conditions. OpenSprinkler is designed to be easy to install and use, and is compatible with a wide range of sprinkler valve systems.

Ray: tell me more about opensprinkler

ChatGPT:

OpenSprinkler is a sprinkler controller that allows users to automate their irrigation systems and customize watering schedules through a web interface or a smartphone app. The controller is connected to a network and can be accessed remotely, allowing users to control their irrigation systems from anywhere with an internet connection.

In addition to being able to set custom watering schedules, OpenSprinkler also offers a number of advanced features that make it easy to optimize watering schedules and conserve water. For example, the controller can be programmed to turn on and off sprinkler valves based on local weather data, such as temperature, humidity, and precipitation. This helps ensure that plants are watered at the optimal times, while also minimizing water waste.

OpenSprinkler is compatible with a wide range of sprinkler valve systems, making it a versatile choice for homeowners and gardeners. It is also easy to install and use, with a user-friendly interface that makes it easy to set up and customize watering schedules.

Overall, OpenSprinkler is a useful tool for automating and optimizing irrigation systems, and can help homeowners and gardeners save time and resources by ensuring that their plants are watered efficiently.

Ray: tell me about opengarage

ChatGPT:

OpenGarage is an open-source, WiFi-enabled garage door opener that allows users to remotely control their garage doors using a web interface or smartphone app. It consists of a microcontroller board with an embedded web server and a relay, which is used to activate the garage door opener.

Users can access the OpenGarage controller through a web interface or smartphone app to open and close the garage door, as well as set custom schedules and receive notifications when the garage door is opened or closed. The controller can also be integrated with other smart home devices, such as home security systems or smart lights, allowing users to automate their garage door functions and create custom scenes.

OpenGarage is designed to be easy to install and use, with a user-friendly interface and a range of customization options. It is also open-source, which means that the software is freely available for users to modify and customize to meet their specific needs.

Overall, OpenGarage is a useful tool for automating and controlling garage doors, and can help users save time and effort by allowing them to remotely access their garages from anywhere with an internet connection.

Ray: what’s unique about opengarage

OpenGarage is an open-source, WiFi-enabled garage door opener that offers a number of unique features and benefits compared to other garage door openers on the market. Some of the key features and benefits of OpenGarage include:

  1. Open-source: One of the key features of OpenGarage is that it is open-source, which means that the software is freely available for users to modify and customize to meet their specific needs. This allows users to easily add custom features or modify the controller to work with specific garage door systems.
  2. Remote access: OpenGarage can be accessed remotely through a web interface or smartphone app, which allows users to control their garage doors from anywhere with an internet connection.
  3. Customization: OpenGarage offers a wide range of customization options, including the ability to set custom schedules, receive notifications when the garage door is opened or closed, and integrate with other smart home devices. This makes it easy for users to automate their garage door functions and create custom scenes.
  4. Compatibility: OpenGarage is compatible with a wide range of garage door systems, making it a versatile choice for homeowners.
  5. User-friendly interface: OpenGarage has a user-friendly interface that makes it easy to set up and customize garage door functions, even for users who are not technically proficient.

Overall, OpenGarage is a powerful and flexible garage door opener that offers a wide range of features and customization options to help users automate and control their garage doors.


As you can see from above, it’s really quite good at generating text descriptions. What’s more incredible is its ability to generate programming code. For example:

Ray: write a jquery program with three buttons, when the first button is clicked, draw a circle, when the second button is clicked, draw a square, when the third button is clicked, draw a face

In this case, the chat engine stopped a few times, and I had to type ‘continue’ to let it finish the program. But after it’s done, it generated a proper Javascript program, when you run it, it pops up the following interface. The circle and square are both drawn perfectly, the face is a bit of a failure, but it’s amusing to see it even produced comments in the code to document how the code draws a face.

I was pretty mind-blown by its capability. As a text generation engine, it’s clearly not just memorizing things, because if you ask it the same question again it will give you a somewhat different answer. I’ve also tried a number of other things, as listed below. Some are more successful than the others.

  • tell me about opensprinkler, in Shakespeare style
  • write instructions to create an IFTTT applet for OpenSprinkler
  • write an Arduino program for ESP8266 to connect to opensprinkler.com
  • write an Arduino program for ENC28J60
  • write a C++ program that uses a circular queue to implement a log

If you want to make changes or correct any mistakes, you can have a conversation with it. Such as ‘change the variable x to y’; ‘rewrite the second paragraph to use less words’, ‘your circular queue implementation is wrong, blah blah blah’.

To a University Professor like me, this is going to have a profound impact on how classes are to be taught, how homework is to be assigned, and how cheating cases are to be detected in the future. I mean, not only it can produce essays, but it can generated reasonably complex program code. A lot of the introductory level programming tasks can be easily solved by it. Well, at least for now, I am glad we can leverage this incredible tool for ourselves to write text descriptions, instructions, and sample programs. Have fun with it!

Today we’ve officially released OpenSprinkler firmware 2.2.0(1). As you may have noticed on this forum post, this firmware is a major revision from the previous firmware 2.1.9. Most of the new features are thanks to Valeriy Soltan’s excellent work almost 2 years ago (I know, time flies during the pandemic), including support for sequential groups, setting a date range for each program, support for pausing and resuming stations, shifting zones forward, more flexible master on/off adjustment times etc. In addition, we’ve added a device name parameter, which is included in all IFTTT notifications; and a new weather adjustment method called ‘Monthly’ adjustment is added to set a manual watering percentage per month. For OpenSprinkler 3.x only — one major step forward is the support of OpenThings Cloud (OTC) token, which allows remote access via the OTC cloud server. This eliminates the need for settings up port forwarding, which has been a pain for manual users. OTC has been enabled for our OpenGarage product for a while, and it seems to be working pretty well, so this is a good time to enable OTC for OpenSprinkler as well. A major benefit of OTC is that the same web interface / UI is available both locally and remotely, and OTC server serves as a real-time ‘relay’ between the firmware and user, it doesn’t actually store any date on the cloud server. Another step forward for OpenSprinkler 3.x is upgrading ESP8266 core to version 3.0.2 (the latest ESP8266 core for Arduino). In important benefit of this is that the WiFi and wired Ethernet are unified, through the lwip library available in this core version. As a result, wired Ethernet and WiFi use exactly the same interface functions, so all WiFi features (including OTA update) are also supported by wired Ethernet. Moreover, this allows OTC to be supported by both WiFi and wired Ethernet as well.

We’ve release a test version of firmware 2.2.0 a month ago and since then have been working on fixing bugs both in the firmware and the UI. At this point, the firmware is ready to be released to the public, and we are really excited. The full list of new features can be found in the Github release notes. As usual, firmware update instructions can be found on our support website at support.opensprinkler.com Since this firmware is very new, bugs and issues are probably inevitable. If you encounter any problem, please be patient and file a support ticket at support.opensprinkler.com We will try to handle them as quickly as we can.

We are happy to announce that OpenGarage firmware 1.2.0 is now officially available. The main change of this firmware is on cloud connection options for remote access: it now supports both Blynk and OpenThings Cloud (OTC) connections. Previous firmwares have only supported Blynk. The motivation for this change is the fact that the Blynk team is officially ending the Blynk legacy app and legacy server; in the meantime we have developed our own cloud proxy called OpenThingsFramework. So it’s the right time for us to push out our own cloud framework.

What are the technical differences? With Blynk, data is stored on the cloud server, which serves as a ‘cache’ between the application and firmware. In contrast, OpenThingsFramework is a proxy — it does not store data on the cloud server, instead, when a request comes from the application, it’s forwarded directly to the firmware, which sends responds back. This is implemented using WebSocket and persistent TCP connection. There are pros and cons of each approach. For example, Blynk has a faster response time, since the data is ‘cached’ on the cloud server; however, the firmware design is more complicated as the built-in web interface of OpenGarage cannot be easily replicated using Blynk. Also, some users may have privacy concerns over data stored on the cloud server. With OpenThingsFramework, data is never stored on the cloud server; and its proxy nature allows the same built-in web interface to be remotely accessible. This significantly simplifies the firmware design: only a small number of changes are needed in firmware code to allow remote access. On the other hand, the response speed can be slow, since the server does not ‘cache’ any data.

Both Blynk and OTC options are supported by our OpenGarage mobile app, as well as a simple OpenGarage web app that I wrote. To users, the practical differences are as follows: push notification is only available with Blynk, and you must have the Blynk legacy app installed on your phone. This legacy app is no longer available in the app store (since the Blynk team has discontinued it). However, if you are Android user, you can still find and install this app manually. That said, you can always use IFTTT for push notification, which is independent of either Blynk or OTC. If you need the ability to remotely access the full built-in user interface of OpenGarage, including changing settings and viewing log data, only OTC supports it. Otherwise, if you just need the ability to check door status and car status, and trigger door actions remotely, you can go with either of them. Please note that as the official Blynk server is going offline soon, if you want to use Blynk, we recommend you to create your Blynk token on our own server at openthings.io. The support article here explains how to create and use Blynk and OTC tokens respectively. I’ve also created a new OpenGarage video that gives you a quick walk-through of the steps. The section starting at 7:25 is about cloud tokens:

If you decide to upgrade to firmware 1.2.0, please note that it requires ESP8266 WiFi chip that has 4MB flash. Most OpenGarage units sold in recent years have 4MB flash, the only exceptions are the early versions (v1.0, 1.1 and 1.2 I believe). Also, as this firmware has changed the flash memory layout, it will trigger a factory reset so it will lose all settings and WiFi configuration. You will need to reconfigure WiFi after the firmware update. Finally, you can choose to use either Blynk or OTC, but you can’t use both of them at the same time.

That’s all. Thanks!

« Newer Posts - Older Posts »