Skip to the content.

YaS☀️lR Manual

Quick Start

When everything is wired and installed properly, you can:

  1. Flash the downloaded firmware (see Initial Firmware Installation)
  2. Power on the system to start the application
  3. Connect to the WiFI: YaSolR-xxxxxx
  4. When you hear the 2 beeps and/or see the yellow light, the Captive Portal has been started and is waiting for you to connect to its WiFi to select the WiFI network to join (or work in AP mode)

  5. After selecting your network and entering your WiFi credentials, the application will join your WiFi and you will be able to connect to it by using the IP address assigned by your router (check your router to find it).

Initial Firmware Installation

The firmware file which must be used for a first installation is the one ending with .FACTORY.bin:

Firmware can be downloaded here : Download

Flash with esptool.py (Linux / MacOS):

# Erase the memory (including the user data)
esptool.py \
  --port /dev/ttyUSB0 \
  erase_flash
# Flash initial firmware and partitions
esptool.py \
  --port /dev/ttyUSB0 \
  --chip esp32 \
  --before default_reset \
  --after hard_reset \
  write_flash \
  --flash_mode dout \
  --flash_freq 40m \
  --flash_size detect \
  0x0 YaSolR-VERSION-MODEL-CHIP.FACTORY.bin

Do not forget to change the port /dev/ttyUSB0 to the one matching your system. For example on Mac, it is often /dev/cu.usbserial-0001 instead of /dev/ttyUSB0.

With Espressif Flash Tool (Windows):

Be careful to not forget the 0.

Espressif Flash Tool

Captive Portal (Access Point) and WiFi

Captive Portal and Access Point address: http://192.168.4.1/

A captive portal (Access Point) is started for the first time to configure the WiFi network, or when the application starts and cannot join an already configured WiFi network fro 15 seconds.

The captive portal is only started for 3 minutes, to allow configuring a (new) WiFi network. After this delay, the portal will close, and the application will try to connect again to the WiFi. And again, if the WiFi cannot be reached, connected to, or is not configured, the portal will be started again.

This behavior allows to still have access to the application in case of a WiFi network change, or after a power failure, when the application restarts. If the application restarts before the WiFi is available, it will launch the portal for 3 minutes, then restart and try to join the network again.

In case of WiFi disruption (WiFi temporary down), the application will keep trying to reconnect. If it is restarted and the WiFi is still not available, the Captive Portal will be launched.

Access Point Mode

You can also chose to not connect to your Home WiFi and keep the AP mode active. In this case, you will need to connect to the router WiFi each time you want to access it.

In AP mode, all the features depending on Internet access and time are not available (MQTT, NTP). You will have to manually sync the time from your browser to activate the auto bypass feature.

Detailed Manual

Here are the main links to know about in the application:

(replace yasolr.local with the IP address of the router)

And here is the main menu of the application:

Menu

Overview menu

The Overview section shows the main information about the router and provides access to some basic actions. This is also the main page.

General information:

Relays:

Router outputs:

Also, if the PZEM-004T v3 measurement devices are installed on each output, the following information will be available per output:

Total power measurements:

Temperatures:

This is the temperature of the sensor installed in the water tank.

It can help automate some router features based on the water temperature, such as Auto Bypass.

I strongly suggest to pick a DS18B20 for this sensor because they come with a very long cable.

Health menu

The health section shows the state of the router features and a small error description if something is wrong, like no grid voltage detected, unable to start a component, time synchronization issue, etc.

Pinout Live menu

This section shows the live state of the router inputs and outputs for the activated features. For example, we can see here that the LED pins have been duplicated by mistake. This error is currently active in the system. If a feature is not activated, the pin will be shown as Disabled.

Pinout Configured menu

This section shows the pinout configuration of the router as saved. This is not the live state, but what is saved in configuration. For example, if you change the pinout of a component, like LEDs, you need to restart if to activate the new pins. So this view shows the current configuration, and eventually its issues, but not the live state.

Here in example we see that the live pinout for LEDs has an issue, which has been fixed since the configured pinout is now OK, so we need to restart the LED component with the new configuration in order to fix the issue.

Management menu

The management page allows you:

The configuration of the router can also be modified through MQTT and the REST API, or through the Configuration Debug page.

Display configuration menu

The display configuration page allows you to enabled or disable the display, and to configure its settings such as:

When a setting is changed, you need to deactivate and reactivate to apply the changes. But you don’t need to restart the router.

The display will show:

Electricity configuration menu

This menu allows to configure the electricity parameters of the router.

JSY-MK-194T

The JSY is used to measure the grid power and voltage and total router output power and stores energy data. This is a key component of the router, but still, a router can work without it in a limited way.

When a setting is changed, you need to deactivate and reactivate to apply the changes. But you don’t need to restart the router. If the JSY is not activated, some features won’t be available like:

This is important to remember that the JSY is used to measure the total routed power: all the dimmer outputs pass through the JSY measurement clamp

Zero-Cross Detection

The Zero-Cross Detection (ZCD) module is used to detect the zero-crossing of the grid voltage. It is required, whether you use a Robodyn or SSR or any routing algorithm (phase control or burst mode). The Robodyn includes a ZCD (its ZC pin). The SSR does not include a ZCD, so you need to add one.

When a setting is changed, you need to deactivate and reactivate to apply the changes. But you don’t need to restart the router.

MQTT Sources

Here is an example of a Home Assistant configuration to publish the sensors to MQTT:

# https://www.home-assistant.io/integrations/mqtt_statestream
mqtt_statestream:
  base_topic: homeassistant/states
  publish_attributes: true
  publish_timestamps: true
  exclude:
    domains:
      - persistent_notification
      - automation
      - calendar
      - device_tracker
      - event
      - geo_location
      - media_player
      - script
      - update

This is possible to even further filter and customize the published data and what is published. Thanks to that, the router can have access and listen to any topic where data is published, including the Grid Power from a Shelly EM for example.

Grid Power and Voltage

Here are the sources used by the router to read the Grid Power and Voltage:

Grid Power:

  1. Reads from MQTT if configured
  2. Reads from JSY if installed

Grid Voltage:

  1. Reads from MQTT if configured
  2. Reads from JSY if installed
  3. Uses a default value (230V). This is an acceptable fallback but can lead to wrong statistics if the voltage of the grid differs a lot from this value.

MQTT configuration menu

This section allows to configure the MQTT connection of the router:

When a setting is changed, you need to deactivate and reactivate to apply the changes. But you don’t need to restart the router.

The complete reference of the published data in MQTT is available here. The published data can be explored with MQTT Explorer.

Home Assistant Discovery

YaS☀️lR supports Home Assistant Discovery: if configured, it will automatically create a device for the Solar Router in Home Assistant under the MQTT integration. For that, you need to configure:

You can read more about Home Assistant Discovery and how to configure it here.

Here is a configuration example for Home Assistant to move the published state topics under the homeassistant/states:

# https://www.home-assistant.io/integrations/mqtt_statestream
mqtt_statestream:
  base_topic: homeassistant/states
  publish_attributes: true
  publish_timestamps: true
  exclude:
    domains:
      - persistent_notification
      - automation
      - calendar
      - device_tracker
      - event
      - geo_location
      - media_player
      - script
      - update

To configure the discovery topic, you need to go http://homeassistant.local:8123/config/integrations/integration/mqtt, then click on configure, then reconfigure then next, then you can enter the discovery prefix homeassistant/discovery.

Once done on Home Assistant side and YaS☀️lR side, you should see the Solar Router device appear in Home Assistant in the list of MQTT devices. Here is an example of the Solar Router device in Home Assistant:

Network configuration menu

The network configuration page allows you to configure the network-related settings of the router.

WiFi and access

They require a restart of the router if changed.

Time settings

They are applied at runtime and do not need a restart.

Time synchronization is required for some features to work, like Auto Bypass, which is triggered based on time and day.

Output configuration menu

This section allows to configure the 2 outputs of the router. Each output is composed of:

Please note that if you do not install a bypass relay (or bypass relay is disabled), the dimmer will be used instead of it to send the full nominal power to the resistive load when needed.

Dimmer

All these settings are applied at runtime and do not need a restart.

If the dimmer is deactivated, this is equivalent as disabling the whole output.

Temperature Sensor

The temperature sensors is used to monitor the water tank but also to trigger an automatic heating based on temperature levels (called auto bypass). All these settings are applied at runtime and do not need a restart.

Supported temperature sensor: DS18B20

Changing one of these settings requires to disable and re-enable for the changes to be applied.

If the temperature sensor is disabled or not working properly, the auto bypass mode will work but will not consider the temperature settings.

ByPass Relay

All these settings are applied at runtime and do not need a restart.

Auto Bypass

The Auto Bypass feature will automatically start the heating depending on some rules: days, hours and temperature, if the temperature sensor is installed. If not, temperature settings will be ignored. If a relay is not present, the router will use the dimmer instead and set it to 100%.

Warning: If you do not install a relay and the dimmer is used instead, the power sent to to the resistive load when auto bypass is activated will count as routed power and energy.

Note that the auto bypass will only work if the time can be synchronized.

If the relay is deactivated or not installed, the dimmer will be used instead and will be set at full power.

Output Power Monitoring with PZEM-004T V3

Each output supports the addition of a PZEM-004T v3 sensor to monitor the power sent to the resistive load specifically for this output. This also unlocks some additional features such as independent outputs and the ability to balance the excess power between outputs.

Thanks to the PZEM per output, it is also possible to get some more precise information like the dimmed RMS voltage, resistance value, etc.

Pairing procedure

The PZEM-004T v3 devices has a special installation mode: you can install 2 PZEM-004T v3 devices on the same Serial TX/RX. To communicate with the right one, each output will use a different slave address. The initial setup requires to pair each PZEM-004T v3 with the corresponding output.

  1. Connect the 2 PZEM-004T v3 devices to the grid (L/N) and install the clamp around the wire at the exit of the dimmer of first output
  2. Only connect the terminal wire (+5V, GND, RX, TX) of the first PZEM-004T v3 to pair to Output 1
  3. Boot the ESP32 wit the router firmware
  4. Press the PZEM Pairing button in the Output 1 menu
  5. Verify that the pairing is successful
  6. Disconnect the PZEM-004T v3 from the ESP32
  7. Connect the second PZEM (which has its clamp at the exit of the dimmer of the second output) to the ESP32
  8. Press the PZEM Pairing button in the Output 2 menu this time
  9. Verify that the pairing is successful
  10. Now connect the 2 PZEM-004T v3 devices to the ESP32

You can verify that the pairing is successful by:

"pzem": {
  "address": 1,
  "current": 0,
  "enabled": true,
  "energy": 0.005,
  "frequency": 50,
  "power_factor": 0,
  "power": 0,
  "voltage": 234.3999939,
  "time": 2364846
}

Note: this complex pairing procedure is not specific to this router project but is common to any PZEM-004T device when using several PZEM-004T v3 devices on the same Serial TX/RX. You can read more at:

Relay configuration menu

YaS☀️lR supports 2 relays (Electromechanical or SSR, controlled with 3.3V DC) to control external loads, or to be connected to the A1 and A2 terminals of a power contactor. The voltage is not dimmed: these are 2 normal relays.

All these settings are applied at runtime and do not need a restart.

Rules for the threshold

Virtual Power is calculated by the router as Grid Power - Routed Power - Relay Threshold. This is the power that would be sent to the grid if the router was not routing any power to the resistive loads or no relay activated. Virtual Power is negative on export and positive on import.

The relay will automatically start when Virtual Power <= - (Relay Threshold + 20%).

The relay will automatically stop when Virtual Power >= - (Relay Threshold - 20%).

Which means that for the Relay Threshold to work properly, it needs to consume a nearly constant power that is in the range Relay Threshold +/- 20%.

Relays will be started in order and stopped in reverse order.

Note: the relay tolerance is currently not flexible enough to cover all use cases and will be improved in the future. There is also no way currently to ensure that the excess remained above this threshold for a specific duration.

Example

We have this relay: Relay Threshold == 1000 W, so a tolerance between 800 W - 1200 W

Virtual Power == 0 - 1000 W = -1000 W (since relay stopped). -1000 W > - 1200 W => relay will not start.

Virtual Power == 0 - 1200 W = -1200 W (since relay stopped). -1200 W <= - 1200 W => relay will start! At this point, the routing will decrease to 200 W if the appliance connected to the relay consumes 1000 W.

Virtual Power == 0 - 200 W - 1000 W = -1200 W (since relay is on). -1200 W < - 800 W => relay will not stop.

Virtual Power == 0 - 0 W - 1000 W = -1000 W (since relay is on). -1000 W < - 800 W => relay will not stop.

Virtual Power == 200 - 0 W - 1000 W = -800 W (since relay is on). -800 W >= - 1200 W => relay will stop!

System configuration menu

System temperature

Supported temperature sensor: DS18B20.

This sensor is optional and only used to monitor the temperature in the router box.

Changing one of these settings requires to disable and re-enable for the changes to be applied.

Buzzer

The buzzer is used to emit sounds and beeps to notify the user of some events like reset, restarts, router ready, etc.

This sensor is optional.

Changing one of these settings requires to disable and re-enable for the changes to be applied.

LEDs

The LEDs are used to notify the user of some events like reset, restarts, router ready, routing, etc.

Changing one of these settings requires to disable and re-enable for the changes to be applied.

This sensor is optional.

LIGHTS SOUNDS STATES
🟢 🟡 🔴 BEEP BEEP STARTED + POWER + WIFI_OFF
🟢 🟡 ⚫   STARTED + POWER
🟢 ⚫ 🔴 BEEP BEEP STARTED + WIFI_OFF
🟢 ⚫ ⚫ BEEP STARTED
⚫ 🟡 🔴 BEEP BEEP BEEP RESET
⚫ 🟡 ⚫    
⚫ ⚫ 🔴 BEEP BEEP RESTART
⚫ ⚫ ⚫   OFF

Push Button

This sensor is optional.

Changing one of these settings requires to disable and re-enable for the changes to be applied.

When you activate the push button, a long press and hold for 10 seconds is always available and will do a factory reset.

Statistics page

This page shows a lot of statistics and information on the router. Amongst them you will find:

Configuration Debug page

This page is accessible at: http://<esp-ip>/config. It allows to see the raw current configuration of the router and edit it. This page should not normally be used, except for debugging purposes.

Web Console page

A Web Console is accessible at: http://<esp-ip>/console. You can see more logs if you activate Debug logging (but it will make the router react a bit more slowly).

Web OTA page

This page allows to update the firmware over the air:

The firmware file which must be used is the one ending with .UPDATE.bin:

YaSolR-<VERSION>-<MODEL>-<BOARD>.UPDATE.bin

Help and support