The dollhouse is equipped with a photovoltaic system. The current power is measured and can be subscribed to in the local network under the topic meinHaus/Dach/Solarzelle/Leistung
.
Electric energy is notoriously difficult to store. This leads to many homeowners with photovoltaic systems having to sell their surplus electricity very cheaply to their grid operator. However, there may be devices in the house that can serve as energy storage:
Or devices that can be switched on flexibly in terms of time:
We want to turn on the electric boiler in the dollhouse when more than 70% power is available from the solar cells. Of course, in practice, the current consumption in the house would also have to be measured, but we simplify this in this school example.
Proceed as follows:
mqtt in
node into the flow area and configure it:meinHaus/Dach/Solarzelle/Leistung
switch
node into the flow area.
number
(default is string
) and specify it without '%'.number
(default is string
) and specify it without '%'.Drag two change
nodes into the flow area, connecting them to output 1 and output 2 of the switch
node, respectively. Change the payload of the current message to “on” or “off,” whichever makes sense to you.
Check with a debug node whether the logic works.
Now drag an mqtt-out
node into the flow area.
Send “on” or “off” via MQTT to the boiler with the topic meinHaus/UG/Boiler/Heizung
. Choose the local MQTT Broker for this.
Test with a flashlight and by covering the solar cell to see if anything happens at the boiler.
At the end, your flow should look like that: