For temperature control I use Node-RED and a temperature sensor.
I configure the relays to "Manual’.
With the for relays dedicated Node I can control only relays number #2.
Every day there is a charge and a discharge cycle to earn on hourly electricity prices. The daily cycle leads to fan-cooling during those times. However, in the log I see relays #2 switching unexpected on.
Two periods, the right ones, are perfectly ok. The few times on the left is on moments the temperature is low.
I do also not understand why there is a difference between relays #1 en relays #2. Relays #1 seems not to react at all on the Node_RED-node. In the UI on my phone the relays can both be switches on and off via VRM.
Node-RED program sets at he moment relays #2 every 10 seconds to the correct state.
How can I determine that no other process is controlling the relays ?
Hello! If Relay 2 is configured as manual there is only two things that could be turning it on… Node-Red Logic and Manual control.
If you want to be sure that only the node-red logic controls the Relay, you could generate a temporary log file (Saved on /data/home/nodered) that saves an entry everytime that the relay 2 status has changed. In that file you could save something as the relay status and the logic expected output, so you could compare.
Regarding Relay 1 and 2, there is no difference in them. I have controlled both without problems. Perhaps something in the configuration of them by de GX side?
Logging is a good idea, Thnx!
Logging on GX, requires some study. I see maintenance and problems emerge as media-space can become full, disabling the other functions of the GX.
I have other devices attached, via MQTT. I prefer to log on those, to start with. (As I’ve build them myself I am more confident modifying these targets instead modifying Linux a based device.)
The flow controlling the fan is now also logging on MQTT. I wait some time on this:
Yes! media-space is always something you would want to watch, but you could watch the filesize of the log and delete the oldest record if it surpasses some value… It’s not easy but it’s possible. Anyways, I think your solution is way more elegant!
Besides that… Did you check the logic of the function node? Could it be an unexpected input that turn the relay on?