Control of a Central Heating System = sending data from many to 1 device?


#1

I want to do a project with my central heating system.
One WeMos D1 mini in each room as a thermostat connected to Cayenne with MQTT that can be controlled by the user using the Cayenne Dashboard (temperature setting, timings …)
These WeMos D1 mini units will ALL send to Cayenne a digital signal ON/OFF = 1/0 as it needs heat or not.
One EXTRA WeMos D1 mini will be connected to the central heater to start and stop it on demand by ALL the WeMos units in the rooms. … however …
I can’t figure out HOW Cayenne can send all the digital signals from all the individual Room-WeMos thermostats to 1 central WeMos D1 mini (on the central heater-burner) using MQTT ?
… hoping for the golden tip … :wink:


#2

If I’m understanding the project correctly, I think you can tie each of the individual room unit digital data to a 2-State widget. A statement like:

virtualWrite(5, individualRoomStatus, "digital_sensor", "d") would send the 0/1 value of variable individualRoomStatus to Cayenne on MQTT channel 5.

Then make a trigger (one for each 2-State widget) where “IF individual room == 1 THEN heater == ON”


#3

Thanks @rsiegel, this is what I do today … sending digital signals to Cayenne. (and getting setpoints back)
The problem for me is getting the signals from different WeMos devices back from Cayenne into 1 OTHER WeMos device.
Suppose WeMos #1 sends its signal to Cayenne with the above write statement to channel 5 …
Suppose 3 other WeMos devices #2 #3 #4 are doing the same to THEIR channel 5 too (4 different devices report to 4 different dashboards … )
… how can I get or send back all 4 digital signals from these 4 “#5 channels” from Cayenne into a 5e “WeMos #5” ? … so that #5 can switch on and of the heater burner ?
With other words, How can a MQTT query be done from a device with a clientID[] = “aaa” (that is reporting data using MQTT to Cayenne) to get the status of Channel 5 of SEVERAL ANOTHER DEVICES with clientID[] = “xxx” clientID[] = “yyy” clientID[] = “zzz” (that are reporting their own channel 5 to Cayenne) ? … is this possible ?
Thanks


#4

@Jodi you can try this.
wemos #1 to wemos #4 will create 4 two state widget on 4 cayenne dashboard.
now on your #5 wemos create a button. go to add new > devices/widget > custom widget > button widget and fill all the details with channel 1 selected.
on your #5 wemos run this code where it reads the value of button and turns on the relay which turns on the heater connected to it.

CAYENNE_IN(1)
{
int currentValue = getValue.asInt();
if (currentValue == 1)
{
digitalWrite(4,HIGH);
}
else
{
digitalWrite(4,LOW);
}

Next you will need to add triggers. go to add new > triggers and fill the details.
if two state widget on Wemos #1 becomes 1 then turn on the button widget on wemos#5
similarly add for wemos #2 3 and 4


#5

Dear @shramiksalgaonkar, thank you very much.
I missed the point that Triggers can also influence things in other Dashboards from other Devices.
I thought they could only send an SMS or eMail.
With that, my problem is solved ! … :wink:
Tested it and works fine ! … Thanks Again.


#6

@Jodi great to hear that it is working as you want. if need help, let us know.
once done submit your project. :slightly_smiling_face: