Having recently installed new solar heater panels, for hot water production, in my camping site, I required a way to comfortably control the system, keep things under control when I am not around, and activate or disattivate some items from remote.
What’s Connected
I have used an Arduino Uno board, with a W5100 network shield. To this I have attached 5 DS18B20 temperature sensors and a 4 relay board.
Triggers & Alerts
I have not yet completed all the trigger and alert that I envisage I will require, but this will be done by the way, as the system gets working and I will get the hang of things.
So far I have set some triggers to shut down some elements of the heating system, should the temperature of particular items should drop lower than some set limits. This is done mainly to preserve energy and hot water.
Alerts are going to ve very important to warn me should some temperature drop to values considered too low, thus indicating a fault somewhere in the system, or rising too high. In case of temperature too low, it is a question of limiting problems to the customers before the issue even becomes a problem. In case of temperature too high, not only it preserve from overlooking system faults, but it should warn me of potential dangerous situations.
Scheduling
Scheduling is active to turn off some items at night, when people do not usually use much hot water, here too it is done to preserve energy and limit waste.
Dashboard Screenshots
(Paste screenshots of dashboard, triggers & alerts, Scheduling)
Hi, I will sure do that, but I did not managed to find out how to post images. I am a little slow on this things, so I will need some time, or guidance, to be able to do that.
As I had to move to a new account, I have waited for the MQTT changeover and I have then completed the migration. The project is now moved to the “Camping” account.
I am encountering some important issue on the new MQTT setup. Some slow response of the dashboard and, most important and critical, the fact that relays command do not keep as set in case of Arduino reset o power down. This is extremely critical and, if not resolved, it will cancel the entire project as it is crucial that settings remain even in case of (frequent) momentary power cut.
I have already posted a bug report for this issue, with the Camping account.
Regards, Giorgio
you can store the value of eeprom and on reset write the value to the relay as well to the dashboard. do a search of eeprom in community and you will find plenty of topics on it
Hi, I have tried to do that, but it did not seem to work. Plus I am still experiancing a very, very, very, slow response from the dashboard…
This is the code of the setup after modification to do “… assigned to both cayenne dashboard and relay in void setup ,”.
void setup()
{
// set digital pin to output
pinMode(RELAY_DIGITAL_PIN1, OUTPUT);// relè pin
pinMode(RELAY_DIGITAL_PIN2, OUTPUT);// relè pin
pinMode(RELAY_DIGITAL_PIN3, OUTPUT);// relè pin
digitalWrite(RELAY_DIGITAL_PIN1, LOW);// set relay to off at startup
digitalWrite(RELAY_DIGITAL_PIN2, HIGH);// set relay to off at startup
digitalWrite(RELAY_DIGITAL_PIN3, HIGH);// set relay to off at startup
Sorry, just saw my own error (I must be getting tired…).
Here is the correct code, and it seems to work:
void setup()
{
// set digital pin to output
pinMode(RELAY_DIGITAL_PIN1, OUTPUT);// relè pin
pinMode(RELAY_DIGITAL_PIN2, OUTPUT);// relè pin
pinMode(RELAY_DIGITAL_PIN3, OUTPUT);// relè pin
digitalWrite(RELAY_DIGITAL_PIN1, LOW);// set relay to off at startup
digitalWrite(RELAY_DIGITAL_PIN2, HIGH);// set relay to off at startup
digitalWrite(RELAY_DIGITAL_PIN3, HIGH);// set relay to off at startup
first remove all the widget from your dashboard, add 3 button on dashboard from add new > widget/device > custom widget > button and use correct channel (7, 8 , 9).
then in your code change this
Hello shramiksalgaonkar,
I have tried your suggestion but I seem to get a very strange and erratic behavior.
If I reset the Arduino, then the dashboard seem to get in line OK, but then, if I refresh the browser, the widgets all fall back into OFF position, regardless of what was their original state.
Moreover, I still experience a very, very, very slow response from dashboard commands. That is, if I click on one of the actuator icons, it can act immediately or it can take lots of seconds, even one minute, before it sends the relevant command back to Arduino. Much, much to slow.
Finally, I can get the App of the smartphone (Android) and the dashboard on the PC totally misaligned . So I can have, for example, all icon on the off state on the dashboard and some on some off on the Applet. This is totally confusing and creates problems. In short, I will never be sure of what the situation is from a remote location, I may believe the pump is ON while in fact it is off or vice versa. This, if not fixed, makes the system totally useless.
I believe Cayenne staff should not have force the move over to the new system until all such aspect where fixed, it was, in may view, a little rushed decision that could really cause lots of unhappy users, such as myself
Do hope a complete fix is done or that they consider rolling back to the previous system until a more stable situation is found.
Sorry, cannot be optimistic as for now.