Automation of surplus photovoltaic generation with Smartthings

Automating the use of the solar surplus generated can be done easily and cheaply with Smartthings.

  1. A power meter must be installed on the mains input line to our home
  2. When placing the clamp meter, the arrow must be placed in a specific direction, pointing towards the network or pointing towards the house. Any of them is fine, but we have to be clear to do the routines what a positive or negative power will mean informed by the power meter
    Let’s assume a positive instantaneous power means that we are consuming energy from the grid and that a negative power indicates that we are pouring photovoltaic energy into the grid.
  3. With the zigbee power meter Mc and zwave electric meter Mc drivers you can use any of these 3 power and energy meters. Choose the one you think works best for you:
  1. You have to identify which systems (hot water, air conditioning, etc.) and the priority of use you want to assign to them so that they use the solar surpluses.

  2. I’m going to focus on my use case as an example:

  3. Domestic electric hot water, with priority 1: You create a local virtual switch, called “Enable Solar Hot Water”. You can use Mc Virtual Applications or another driver.

  4. Priority 2 Air Conditioning and Heating: Create another virtual switch, called “Enable Solar A/C”

  5. Car battery charger with priority 3: You create another virtual switch, called "Enable Car Charger.

  6. You create another virtual switch called “Manual Use of Solar Surpluses”: This switch will allow you to disable the routines and have everything work even if there are no surpluses when you want, during the night or days of rainy or cloudy weather.

  7. More virtual devices can be created if you need more sophistication of operation, different operation of routines in summer or winter, etc…

  8. Let’s set the priorities for the use of solar surpluses:

  9. If the water heater, priority 1 consumes 1000w, for example:
    We make a routine that says: If the solar surpluses are greater than 1000w for 2 minutes then turn on the switch “Enable Solar Hot Water” and turn on the water heater. It can be more sophisticated and with more routines, depending on the type of water heater.
    Let’s do another routine: If more than 600w is consumed from the grid for 2 minutes, then turn off the “Enable Solar Hot Water” switch: this will cause the heater to turn off until there is more than 1000w of solar surplus again and we will not consume from the grid.

  10. If Air Conditioning, priority2 consumes 2500w, for example:
    We do a routine that says: If the solar surpluses are greater than 2600w for 2 minutes then turn on the switch “Enable Solar Air Conditioning” and turn on the A/C system. It can be more sophisticated and with more routines, depending on the type of A/C system we have, integrated into smartthings or not integrated.
    Let’s do another routine: If more than 350w of the grid is consumed for 2 minutes, then turn off the “Enable Solar Conditioning” switch. This causes the A/C to turn off until the surplus exceeds 2600w and always the priority A/C 2 will turn off before and turn on after the priority 1 water heater, priority 1.

  11. If the car charger, prioritized3 consumes 2000w, for example:
    We do a routine that says: If the solar surplus is greater than 3000w for 2 minutes then turn on the switch “Solar Car Charger” and turn on the charger. It can be more sophisticated and with more routines, depending on the type of charger.
    Let’s do another routine: If more than 10w is consumed from the grid for 1 minute, then turn off the switch “Enable Solar Car Charger”: this will make the charger turn off until there is more than 3000w of solar surplus again and we will not consume from the grid to charge the car". This ensures that the charger will always turn on last, priority 3 and turn off first.

  12. We make routines with a precondition so that they only run when the “Manual Use Solar Surplus” switch is off

  13. We do routines to turn on the switch the “Manual Use of Solar Surpluses” 50 minutes before sunset and another one can be done in case it is cloudy or raining.

  14. We do routines to turn off the “Manual Use Solar Surplus” switch 60 minutes after sunrise and other can be do for if the weather is sunny for sure.

  15. In this way we ensure the operation of the all systems that uses the network and surpluses if there are any

  16. It’s also advisable to implement routines to protect your home’s electrical system and avoid incidents, let me explain.

With non-isolated photovoltaic installations, you have a grid connection that’s added to the photovoltaic system when there’s production.

The most common dynestic installations in Spain are certified for a maximum power of 10 kW.
Protected with a 230V 40A circuit breaker and a 30mA differential current device.

If the 40A is accidentally exceeded, the protection could trip and leave the house without power until it is manually reset.

I installed an automatically resettable differential current device. It resets up to three times maximum, with a 1-minute interval between resets.

In my house,
I have a grid supply contract for 4.6 kW and a 5 kW photovoltaic installation.
If at any time I were to operate all or many of the systems and appliances, I could be close to the 10 kW limit, and the power company’s power limiter (4.6 kW) might not activate.

To avoid possible installation overloads, I have routines that sequentially disconnect the A/C, water heater, or car charger, etc., if the house consumption (grid + solar) exceeds 7.5kW for 2 minutes.
Theses routines ensure a limit consumption prior to 40A circuit breaker.

  1. I have done something similar at home since April 2024 and I have already managed not to use diesel in the heater and save more than 1500eur in energy costs and rising, to amortize the photovoltaic installation and take care of our planet.

  2. Also at my daughter’s house.

  3. When green technologies and policies to help the ecological transition come together, we ensure that society as a whole benefits and creates wealth that benefits the majority of citizens and not just the super-rich and extreme right deniers.

Spanish Prime Minister Pedro Sánchez receives the 2025 Global Goalkeeper Award from Gates Foundation Chairman Bill Gates at an event in New York on September 23.

  • I’m going to put some screenshots of my devices, in a room called power control. The device names are a bit different and I have a few more, since my A/C system is not integrated directly into smartthings and the integration is with IR’s moes and sonoff temperature sensors used as virtual thermostats with my Mc drivers. I need different routines for summer and winter and enable or disable thermostats, But basically that’s what I’ve told you

Now captures of how the consumption of the house adapts, with the routines actions, to the daily production curve, consuming as much as possible from the solar panels and the least from the grid.
These are examples of the month of August 2025 in Madrid, with a heat wave in spain with temperaturas of 40ºC-43º C during the day and 22ºC-26ºC at night and for 15 days in a row, which has led to huge fires with several fatalities

Sunny and hot day, running in automatic mode during the day and manual mode after sunset and night because A/c is needed during night.

Sunny day in the morning cloudy and stormy in the afternoon, running in automatic mode in the morning and manual mode in the afternoon and after sunset and night. A/C is needed

Variable and hot cloudy day, running in manual mode all day and night so that the A/C and hot water work with any energy, grid or photovoltaic.

Ahora en español os cuento como esto se hace posible en España con un gobierno progresista que impulsa políticas sociales y de ayudas a la transición ecológica, que además crea riqueza al país:
3. Ayudas a la instalación de fotovoltaica en viviendas individuales:
4. En mi caso, 14 paneles solares+ inversor de 5,5kw sin batería fisica.(6200€)
Deducciones directas del impuesto sobre la renta anual:
1500 Eur máximo por cada contribuyente a la renta familiar del precio de la factura de instalación fotovoltaica . En mi caso 1500€+1500€ por esposa y yo.
Si tu renta anual es mas baja puedes optar a una subvención directa similar de un fondo anual, (hasta que se agote el fondo), esta es más lenta. Solo puedes optar a una, la que más te convenga.
5. Contratos con compañías eléctricas, que pagan los excedentes vertidos en forma de batería virtual en Euros.
Mi compañía me suministra 4,6kw a 0,16€ kw/mes + batería virtual por 3€ mes y me paga mensualmente a 0,1 € el Kw de excedente vertido y lo acumula en la batería virtual.
Del precio total de la factura de energía consumida de la red se descuenta directamente lo que tengas acumulado en la batería virtual. Desde abril a agosto de 2025 he acumulado 354 Eur en la batería, he pagado 0€ en facturas de luz y me quedan 26 € en la batería virtual para el mes de septiembre.
La compañía eléctrica vende mis excedentes pagados a 0,1 € el Kw a otros clientes a un precio de 0,16 € el kw + 21% de tasa, que vuelven al estado para financiar las ayudas y otros servicios públicos, sanidad, educación, ….
Otras compañías ofrecen ofertas similares, puedes elegir.
En la factura también financiamos el bono social para descuento en factura luz a familias vulnerables o renta anual baja o familias con 4 o mas miembros 0,6€ mes.

Si se puede conseguir que tecnología y regulación social y justa creen riqueza y se redistribuye a toda la sociedad en su conjunto.

El presidente del Gobierno español, Pedro Sánchez, recibe el Premio Global Goalkeeper 2025, de manos del presidente de la Fundación Gates, Bill Gates, en un evento en Nueva York, el 23 de septiembre

7 Likes

Integration of a non-intelligent A/C inverter system into smartthings with local operation and low cost.

I’m going to recover and update a post from 2024 where I explained an example of integrating a non-smartA/C system into smartthings and put it in that conversation so that everything is together.

It is my own installation, which I have been using for two summers and one winter with very good results and observations of the operation of the IR moes, which may be useful to users.

I use a local solution for 5 Splits, 2 daikin and 3 Panasonic, inverter compresor, 20 years of use:

  • 5 Moes zigbee remote controls, (€12x5=€60)
  • 5 sonoff SNZB02 temperature sensors (5x15€=75€)
  • 5 tuya contact sensors TS203 (5x4€=20€)
  1. With the Moes IR and the “zigbee IR remote controller” driver from @otivax , you can configure the power on for hot or cold mode and a power off keys.
  • You must use an IR moes for each split.

  • Place it near the split and within direct view of the split’s IR receiver.

  • To configure IR moes and use them in summer and winter, you must use two devices from the list: Main for winter and Airconditioning1 for summer, for example.

  • On each split, you must teach the IR moes the command it will send to the split for the ON and OFF keys, which will turn the split On and Off:

  • On the split’s remote control, configure all the information to be sent in the command:

  • Each ON or OFF command sent, always contains all the information the split needs to operate in a personalized and efficient manner.

  • Mode: Heat or cool, whatever you are going to teach the IR remote.

  • Temperature: 1ºc below the minimum temperature you want in the room in summer (24°c)or 1ºc above in winter (21°c). This guarantees economical and efficient operation of the split.

  • Fan Speed: I recommend Auto, so the split will decide the appropriate speed to efficiently reach the set temperature based on the current room temperature and target temperature.

  • Other functions, such as slat orientation, or any other functions the split has that you want to use when you turn it On.

  • Once you have everything set up on the split remote, have it ready so that when you press the ON/OFF button in the split remote, the OFF command is sent to the IR moes.

  • In App the IR device, press the On/Off button so that ON is displayed.

  • Choose the device list mode, Main (for winter) or Airconditioning1 (for summer), which the IR moes will learn.

  • Select Learning Mode and then press the On/Off button. It will display: Learning Power Off and the IR LED will flash.

  • Point the split’s remote control to the Moes IR and press the On/Off button in split IR .

  • Once icommand learned, the display will show “Learning Off” again.

  • Re-activate learning mode and press the On/Off button again in app. The display will show “Learning Power On” and the IR LED will flash.

  • Point the split’s remote control to the Moes IR and press the On/Off button in split IR. It will send the On command to the IR moes.

  • Once it’s learned, the display will show “Learning Off” again.

  • Check that the commands have been learned correctly by pressing On and Off in the app and observing the split’s response.

  • Repeat these steps to record the On and Off commands in the Moes IR for AirConditioning1 device list

  1. With the temperature sensors and the “zigbee Temp sensor with thermostat Mc” driver, you can make a thermostat for each split or use one of them with the average temperature of the 5 sensors to control all the splits with a single thermostat, programming the desired temperature for each period of the day and night.
    Based on my experience, I recommend using the thermostats individually, one controlling your split and your room. This is more efficient and reduces consumption peaks, since each split turns on and off independently based on the room temperature.
    This requires more on/off routines, but they are repetitive, and with the duplicate routine feature, they are easy to do.
  • Temperature sensors must be paired directly with the MC driver for it to be configured with sufficient precision to be used as a thermostat (0.1°C and 5-minutes intervals). If a temperature sensor change driver is made from the sock controller, it will not have sufficient precision (0.5°C and will report at longer intervals, such as 10 minutes).
    The Sonoff SNB02 (CR2450) battery life is very good with maximum precision. It has been in use some for 4 years and is still at 56%.
    Any Tuya TS0201 model can also work, but I prefer the Sonoff.

  • For use as individual thermostat you must disable “Controls-Multi” in preferences

-Screenshots for multi sensors control

  1. With the 5 contact sensors (TS0203, little and battery life > 1 year), placed on the slats ansdcasing of each Split you have feedback on whether or not the Split is working as the routines commanded.
    These contact sensors are small, they use a CR2032, although it shows 1%, after a year they work perfectly if you don’t want to change the battery.

  • By carrying out the necessary local routines to turn the splits on and off with the orders of the master thermostat or each individual thermostat, you achieve local control for everyone.

  • If you also have a photovoltaic installation, you can install a local energy meter to measure the surpluses power in real time and only have the AA work with solar surpluses during the day. I use an aeotec gen5 zwave, configured to report surpluses power every 2 minutes and control the AA and DHW production.

So far, for two summers and a winter installed it works perfectly, automatically and locally.
Warning:
Useful observations to keep in mind regarding the operation of the IR moes:

  • The effectiveness of the commands sent to the split depends largely on the correct positioning of the IR moes relative to the split’s IR receiver sensor.
  • The IR moes battery consumption is adequate; two AAA batteries last approximately one year.
  • The battery level indication in the app is correct, but I have observed this very important behavior to keep in mind:
  • the IR moes consumes the most battery power when it sends the infrared command to the split.
  • There is a time when intermittent failures of not receiving the On or Off command on the split begin to appear. The IR moes executes a command an the status en App is correct according to the routine executed, but the split does not receive the command and the status of the contact sensor installed in slat of split is incorrect.
  • These failures begin to occur with different battery levels in the IR moes home (40%, 35%, 15%). This is because, depending on the location of the IR moes in relation to the split and/or the sensitivity of each split’s IR sensor, the transmission power and received power at the split receiver vary, and intermittent failures are detected with different battery levels indicated in the app.
  • The solution is to replace the batteries with new ones, even if the level shown in the app is correct.
    I have tested this with my 5 IR moes and with the 6 from another similar installation at my daughter’s house.

I’ll be editing to post to add screenshots, now I have to leave it.

4 Likes