@iahim67 . Got tied up some stuffs. I gave DzVents a try as I am totally new to it. Ran some basic stuffs and works perfectly. Will gather some more time and do a full run on this
Posts made by Joe13
-
RE: MySensors - Get Temperature value from another node through the Gateway
-
RE: MySensors - Get Temperature value from another node through the Gateway
@iahim67 Thanks for this. I will definitely give it a try and provide a feedback on this. I am still new to this, but your code is well commented to provide a good guide
-
RE: MySensors - Get Temperature value from another node through the Gateway
@rejoe2 thanks works perfectly now.
-
RE: MySensors - Get Temperature value from another node through the Gateway
As an update.
Finally after wrapping my head around the topic and knowing that you cant just send a value from one node in a VAR1 and expect it to just retain that value and get it in another node, i used the node - node communication and it worked!!!.so my send sketch is
send(pcMsg.setDestination(1).setSensor(101).set(temperature,1));
and receive sketch is
void loop() { request(0, V_VAR1); } void receive(const MyMessage &message) { if (message.type==V_VAR1) { if (message.sensor==101) { // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print("\n"); Serial.print(", New status: "); Serial.println(message.getFloat()); } }
I am able to get the value from the second node. But was just wondering why '0' is used in the request(0, V_VAR1) call when the value is being directly sent from the 1st node to the 2nd node
-
RE: MySensors - Get Temperature value from another node through the Gateway
Thanks for all the info. I have not yet started scripting in the Controller. But what you guys have mentioned above makes sense, that passing value from Node A to VAR1 needs to be transferred to Node B VAR1 through the controller. Let me play around with all the info provided above. Probably looks like i would have to do node-node. But my understanding has improved now.
@kimot is that request code that you mentioned to be part of the MySensors code in the node or is that a Domoticz input? -
RE: MySensors - Get Temperature value from another node through the Gateway
@rejoe2 Completely understand and thanks for your time on all this. Probably i am not getting something very basic here.
this is the code that i am using to send the data to GW. i juse put in a constant num to send for VAR 1MyMessage pcMsg(0,V_VAR1); send(pcMsg.set(50));
and in my LCD node, which doesnt have any physical sensor, trying to get that VAR1 value like below
request(0, V_VAR1); void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type==V_VAR1) { // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getLong()); } }
but the Serial monitor always shows 0 and just trying to figure out why. I am quite sure that it is probably a really minor change that needs to be done
Requested temp from gw VAR1223055 TSF:MSG:READ,0-0-1,s=0,c=2,t=24,pt=0,l=0,sg=0: Incoming change for sensor:0, New status: 0
-
RE: MySensors - Get Temperature value from another node through the Gateway
@rejoe2 i got to understand quite some things from all what you have shared and thanks for that. just a bit more confusion left.
so i have node 1N/child id 1C to send the temp value to the LCD node 4N / child id 4C, so is the below correct.send(1N.setDestination(4).setSensor(4C).set(temperature, 1));
And if node 1N / child id 1C is to send the temp value to GW(DOMOTICZ), is the below correct and how can node 4/child 4C (LCD) retreive this value from GW.
MyMessage pcMsg(1C,V_VAR1); send(pcMsg.set(TEMP from this sensor))
-
RE: MySensors - Get Temperature value from another node through the Gateway
@kimot that part i missed. thanks for pointing that out. I will give this option also a try. its just that the other sensors that are in the other rooms are already set in place and I do not want to pluck them out and recode them. So pulling the values from the GW would have been an advantage. But anyways, if that is the way to go, then Ill probably do that.
Thanks everyone for your inputs -
RE: MySensors - Get Temperature value from another node through the Gateway
anyone who has tried pulling value from GW or controller to a different node, please let me know on how you did it. thanks
-
RE: MySensors - Get Temperature value from another node through the Gateway
@gohan thanks, but i do not have much knowledge on ESP8266 and mqtt but will give the a try to push data from the node to the LCD node
-
RE: MySensors - Get Temperature value from another node through the Gateway
@gohan i did convert it to the 2.1V but the result is the same. so if you were to do something like this, show all the temps from different rooms(nodes) on a central LCD placed in the hall, how would you go about it. I am just a beginner so an ideal way would be great.
The Pulse energy meter code tell " Received last pulse count from gw:" so could it be possible to get values from GW. -
RE: MySensors - Get Temperature value from another node through the Gateway
@gohan Yes that would be great. i have Domoticz running and the temp shows up there. could you let me know how I can get the temp from the controller.
I found this link and that is the code that i initially tried https://www.domoticz.com/forum/viewtopic.php?t=9708
but gives an O/P of 0 -
RE: MySensors - Get Temperature value from another node through the Gateway
@gohan but isn't there a way to get the Temp from the Gateway. I am getting some sort of Receive msg (based on the my initial post) but the value is 0.
in this way, i can request the temp from the GW whenever required and not ask the node to send the data every few mins -
RE: MySensors - Get Temperature value from another node through the Gateway
Hi @mfalkvidd thanks. Yes my first post.
I did try that, however, there is no response in the Receive part in the Serial Monitorvoid loop() { delay(10000); request(12, V_VAR1,3); Serial.print("Requested temp from gw VAR1"); } void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type==V_VAR1) { // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getFloat()); } }
Serial monitor output after setting Node id (3) instead of Gateway(0)
Requested temp from gw VAR122279 !TSF:MSG:SEND,1-1-0-3,s=12,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=NACK: Requested temp from gw VAR132287 TSF:MSG:SEND,1-1-0-3,s=12,c=2,t=24,pt=0,l=0,sg=0,ft=1,st=OK: Requested temp from gw VAR142296 TSF:MSG:SEND,1-1-0-3,s=12,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: Requested temp from gw VAR152303 TSF:MSG:SEND,1-1-0-3,s=12,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: Requested temp from gw VAR162311 TSF:MSG:SEND,1-1-0-3,s=12,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
-
MySensors - Get Temperature value from another node through the Gateway
Hi Everyone,
I did search for this in several place, however could not find a solution.
I have a node that gets the temp and hum in Room1 and sends these data to the Domoticz controller.
Now i have another node with LCD in Room2. How can i display the temp and hum of Room1 node onto the Room2 LCD.So far it I have put the below code, but the value comes in as 0. The Room1 temp child Id is 12
void loop() { delay(10000); request(12, V_VAR1, 0); Serial.print("Requested temp from gw VAR1"); } void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type==V_VAR1) { // Change relay state // digitalWrite(RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF); // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getInt()); } }
Serial monitor Output
517420 TSF:MSG:SEND,1-1-0-0,s=12,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: Requested temp from gw VAR1517427 TSF:MSG:READ,0-0-1,s=12,c=2,t=24,pt=0,l=0,sg=0: Incoming change for sensor:12, New status: 0
Hope someone can provide some insight on this.
thanks