Hi Dan,
you can use a esp8266 wifi module with relay like wemos D1 mini loaded with espeasy firmware which should include also mqtt import plugin. The module will be set to receive via mqtt the active power production. In the rule page you have to write a rule to activate the gpio output connected to the relay when the P>3000. This will work 100%, it is already tested by me. I switched to the next level to control the heating power in order to not feed any excess power in the grid.
i hope it helps
I have been doing this with the WiFi relay from the OEM store for about a year now to turn my EVSE on and off when the amount of solar generated exceeds the “break even” level versus using E7 overnight. I used a node-red flow and had a bunch of triggers with differing delays based on amount of solar generation.
I would advise deciding what cycling delays are acceptable as you probably don’t want the relay on/off/on/off over a few seconds continually.
I went with things like “over break even for 5 minutes, on” - “under break even for 10 minutes, off” - with shorter “on” delays when the output got above the 16A I needed for the EVSE.
I have now moved to a different scheme where I vary the advertised power to the car using an RS485 control link on the EVSE and now the relay is just there to turn on the EVSE when I have just enough power generation to be interesting - but still with a 30 minute off delay.
Thanks for the reply, Looks like i will order a wifi relay from the OEM store and have a play!
Any screen shots of how you setup your Node-red flow? or general concept! No idea about this stuff yet!
I use two triggers in series as a filter to ensure that the incoming level remains high enough (or low enough) for a period but allows peaks and troughs without switching the relay too many times:
into
Which says “Once the solar reaches threshold, send 1s and but allow it to drop for at least one minute before sending a 0; then wait for it to remain high for at least 5 minutes before turning power on”.
Conversely, the “off” side has an identical first switch component but the second send a 0 (instead of a 1) after 15 minutes of “low” solar.
I’m still hacking at the “Adaptive Amps” function as I don’t like the way it oscillates just over the total solar leading to a little exporting. More on that soon.
You have to add a “1” to the end of the MQTT topic - “emon/heating/control/1” - as there is a version of the same system that has 3 relays to drive (but not on the store).
And no, “2” would only work if you had a single WiFi relay device with multiple relays on the board controlled by the same controller.
To address a second WiFi relay you will need to change the MQTT topic and may put the unit number in that, e.g. “emon/heating/control2/1” - and publish to that topic too - does that make sense?
Working like a dream! Sending Excess power to underfloor heating. Will use the second relay for a extra element in the hot water! Feels like I’m winning!
Ok… So little problem when trying to make 2nd WIFI relay work.
To me it seems the MTQQ rx in the relay is stubborn!
I am using “emon/hotwater/control/relay/1” to try and trigger the relay. Sending it a 1. I can see it in the debug being set. But the relay status stays at “0”.
Any ideas would be great! Im addicted I want to control everything now!!
Does the relay work from the Relay Control menu page? i.e. click on the Off / On button and hear it change?
Update - I think you need to remove the “relay/” part of the topic from the node-red flow. The relay just consumes the topic followed by a number for the relay.
Thanks for the help, Yes the relay works when using the control page. Just seems the MTQQ topic is a little confused. I have tried a million difference addresses. I cant even get the Status messages now!
You have reminded me that I am in turn doing something wrong in my own node-red flows, so thanks! I am subscribing to the control topic for relay state and not the actual state as published by the relay! Oops.