What is YaS☀️lR ?
YaS☀️lR is an Arduino / ESP32 firmware for Solar Routers, compatible with most of existing and easy to source hardware components.
If you have a Solar Router at home built by yourself or someone else, there is a good chance that YaS☀️lR will be compatible.
A Solar Router allows to redirect the solar production excess to some appliances instead of returning it to the grid. To work properly, it requires to be connected to a resistive load, such as the resistance of a water tank, because the application will adapt the power sent to this resistance by reducing or increasing its voltage.
A router can also do more things, like controlling (on/off) the activation of other appliances (with the grid normal voltage and not the dimmed voltage) in case the excess reaches a threshold. For example, one could activate a pump, pool heater, etc if the excess goes above a specific amount, so that this appliance gets the priority over heating the water tank.
A router can also schedule some forced heating of the water tank to ensure the water reaches a safe temperature, and consequently bypass the dimmed voltage. This is called a bypass relay.
YaS☀️lR Vision
YaSolR is built with this vision in mind:
-
OpenSource: anybody can help and participate in the project
-
Good development practices, PlatformIO project with versioning and version control, issue management, etc: this is big project and not a simple Arduino project (.ino file)
-
Flexible: it is made in a way that you can only pick the components you need depending on the features you want to activate
-
Hardware compatibility: supports several phase control systems like Random SSR, Robodyn, many ESP32 boards with WiFi and Ethernet
-
Easy to build: I wanted to propose a router that everyone can build, with few components to assemble, but at the same time be able to use more powerful components
-
Easy to repair: any piece can be easily repaired: there is no complex PCB to solder
-
Easy to use: The firmware should be easy to install and use
-
Little to No Harmonics: Try to be smart about harmonic effects and help you take actions to reduce them or totally remove them with Burst Fire mode
-
Automation and Integration: Web API, MQTT Api, Home Assistant auto-discovery, etc
-
230V 50hz and 110V 60hz: the dimmer implementation and proposed hardware all support both frequencies ad voltages
-
Statistics / API / Home Automation: The router exposes a lot of statistics and information through MQTT and REST API and provides a very good integration with Home Assistant or other home automation systems. The router can be completely controlled remotely through a Home Automation System.
A Pro version (which includes the use of some commercial libraries) is also provided to get even more features and support.
YaS☀️lR Features
🚧 means In Progress
Up to 2 Routing Outputs
A routing output is connected to a resistive load and controls its power. Each output is composed of:
-
A Dimmer (required) to control the power sent to the load. Supported dimmers:
Robodyn
(Phase Control and Burst mode)Random Solid Sate Relays
(Phase Control and Burst mode) associated with a Zero-Cross Detection moduleZero-Cross Solid Sate Relays
(Burst mode) associated with aZero-Cross Detection
module (ZCD)
Supported routing algorithms:
Phase Control
(🚧) (for Robodyn, Random SSR, Triac): more accurate but generates harmonics, should be limited to light loadsBurst Fire Control
(🚧) (for Robodyn, Random SSR, Triac, Zero-Cross SSR): no harmonic, but a little less accurate
-
A Bypass Relay (recommended) to force a heating at full power by bypassing the dimmer. If not installed, the dimmer will be used and set to 100% or 0% to simulate the relay.
Supported relays for bypass:
Zero-Cross Solid Sate Relays
Random Solid Sate Relays
Electromagnetic Relays
-
A Temperature Sensor (optional) to monitor the temperature of the water boiler for example. If not installed, Auto Bypass based on temperature won’t be possible. The Auto Bypass will work but temperature settings will be ignored. Supported sensors:
DS18B20
-
A Measurement device (recommended) to monitor the power sent to the load. Supported measurement devices:
JSY-MK-194T
: to monitor the global routed power and grid power. JSY is limited to only one per UART, but has 2 channels and supports 2-way measurementsPZEM-004T V3
: to precisely monitor each output. Several PZ are supported per UART, but only 1 channel and 1-way measurement, which is perfect to measure routed power
Each output supports the following features:
Auto Bypass
: Plan when to force a heating (days, hours, temperature range)Auto Dimmer
: Take control over the routing yourself or let the router automatically dim based on measured production excessDimmer Limit
: Set a limit to the dimmer to avoid routing too much powerAuto calibration
: Detect and measure the resistive load to provide more accurate routing and statisticsRemote output
(🚧): Remotely control the router output (dimmer + relay + sensor), in case you need the router control to stay at a place and outputs to be setup remotelyStatistics
: Harmonic information, power factor, energy, routed power, etcIndependent Outputs
(🚧): Outputs are sequential by default meaning that the second output will be activated only when the first one is at 100% and there is still excess power available. It is possible to switch to50%/50%
mode or25%/75%
mode in order to independently activate both outputs and they will both receive the corresponding power. This is useful to heat 2 water tank at once for example, to avoid one being left at a lower temperature.Independent Outputs
requires to install a PZEM measurement module on each output.
Up to 2 Relays to connect additional loads
Relays can be uses to commute (on/off) a load based on a threshold. Features for each relay:
NO / NC
relay typeRelay Threshold
: Set a power threshold to automatically switch the relay on/off based on the virtual excessRemote relay
(🚧): Remotely control relays
Grid Power Measurement
Measuring the grid power is essential to know how much power is available to route. The measurement device needs to support 2-way measurement: positive power when importing, negative power when exporting and eventually positive and returned energy counters. Supported measurement methods:
JSY-MK-194T
: accurate, will also store energy dataRemote JSY-MK-194T
(🚧): Read the measurement from a JSY board remotelyMQTT
: Read the excess power remotely from a remote MQTT topic, for example from a Shelly EM, Home Assistant, Jeedom, etc. This is less accurate but still works and facilitate the building of a router
Thanks to power measurement, the router also provides these features:
Virtual Excess
: Expose the virtual excess (MQTT, REST API, web) which is composed of the current excess plus the routing powerEV Charger Compatibility
(i.e OpenEVSE): Don’t prevent an EV charge to start (router can have lower priority than an EV box to consume available production excess)
Note that the JSY-MK-194T
has 2 channels, so it can be used both to measure the grid power but also to measure the total routed power of the router (2 outputs combined).
It cannot be used though to independently measure each router output.
Home Automation Systems
The router exposes a lot of statistics and information through MQTT and REST API and provides a very good integration with Home Assistant or other home automation systems. The router can be completely controlled remotely through a Home Automation System.
REST API
: extensive REST API supportMQTT
: extensive MQTT API (withTLS
support)- Home Assistant Integration: Activate Home Assistant Auto Discovery to automatically create a YaS☀️lR device in Home Assistant with all the sensors
Monitoring and Management
Manual Override
: Override anything remotely (MQTT, REST, Website)Statistics
: Harmonic information, power factor, energy, routed power, grid power, grid frequency and voltage, etcCharts
(🚧): Live charts displayed for some important metricsRestart
,Factory Reset
,Config Backup & Restore
,Debug Logging
Live Activation
: every router component can be activated and configured live without restartHealth Status
: configuration mistakes are detected as much as possible and issues displayed when a component was found to not properly work.Pinout Map
: 2 pinout maps show the view of configured pins and activated pins, to report issues, duplications or invalid pins.Web console
: View ESP logs live from a Web interfaceWeb OTA Firmware Update
: Update firmware through the Web interface
Additional components can be installed in the router box:
Temperature Sensor
: for router box heat monitoring (Supported type:DS18B20
)Push Button
: Add a push button to restart, reset, activate bypassLEDs & Buzzer
: Add LEDs and Buzzer for visual and sound alertsDisplay
Add I2C OLED Display (SSD1307
,SH1106
,SH1107
)
Networking features
Ethernet & Wifi
: ESP32 boards with Ethernet and WiFi are supported (see Compatible ESP32 Boards)Captive Portal
a captive portal is started first time to help you connect the routerAccess Point Mode
: router can work in AP mode without WiFi and InternetAdmin Password
: to protect the website, API and Access PointNTP
support to synchronize time and date with Internet. If not activated, it is still possible to manually sync with your browser.DNS & mDNS
: Discover the device on the network through mDNS (Bonjour) or DNS
Pro features
The Pro version is based on ESP-DASH Pro and provides a better Web interface from which the router can be completely configured and managed. THe Free version is based on ESP-DASH OSS and is just showing the overview page. The configuration can still be done online through a “Debug Configuration” page.
Configuration Pages
: Configure components directly on websiteHealth Page
: Show status and potential issues with componentsManagement Page
: Manage router configuration (backup and restore) and reset, restarts, updatePinout Pages
: Show pinout mapping and potential issuesHelp and Support
: Help and support will be done through a private space accessible by persons who bought the pro version
Alternatives and Inspirations
This project was inspired by the following awesome projects:
Solar Routers based on RobotDyn AC Dimmer (or similar TRIAC based systems)
- Routeur solaire PV monophasé Le Profes’Solaire from Anthony
- Solar Router from Benoit Courty
- Construction d’un Power Router pas à pas de Association P’TIWATT
- Mk2 PV Router
- MK2 PV Router (old website)
- MK2 PV Router (new owners)
- PVRouter-Single (adapted by Frédéric)
- PVRouter-3-phase (adapted by Frédéric)
- Diverting surplus PV Power, by Robin Emley
- André (F1ATB):
- Remy (Domo rem81):
- Cyril
Solar Routers based on Random SSR
- MaxPV
- Routeur Tignous
- Seb Salva:
- PV-discharge-Dimmer-AC-Dimmer-KIT-Robotdyn (fork)
- MaxPV-relaisext (fork)
Solar Routers supporting Burst Mode
- Mk2 PV Router
- MK2 PV Router (old website)
- MK2 PV Router (new owners)
- PVRouter-Single (adapted by Frédéric)
- PVRouter-3-phase (adapted by Frédéric)
- Diverting surplus PV Power, by Robin Emley
- Cyril
Others