General area when it fits no where else

Moderator: Mmiscool

User avatar
By Electroguard
#52242 Hopefully this should sort your problem Joe...

Code: Select alludpwrite netIP & "255" , val(udpport) , upper("Node146") & " " & upper("ON")

Three things changed, no dot in front of the 255, udport needs to be a number not a string, no spaces between the upper and ().

I've added & " " to insert a space between your transmitted node name and its following On or Off command.
User avatar
By joeman2116
#52244 Electroguard,


Yep, that did it. I looked around for various syntax but never hit the right one.

Node210 (master) ------> to Node146 (slave)
Now when Node210 (master) turns on or off the relay it sends the correct udp with proper message in the udp bugger.

192.168.1.210:5001 NODE146 ON.

Now, is there anything that has to be done in the slave Node146? In order for it to turn on/off the actual relay? or a certain stat?

I checked the node146 when the commands went out but did not see my relay go on or off

Thanks again..
Joe
User avatar
By Electroguard
#52249 Before getting into that, update the udpwrite line in {BROADCAST] on both nodes to add val(udpport), then you can use the Broadcast message window of one node to manually send commands to the other node, and/or to the debugger, and check for results.

Code: Select all[BROADCAST]
if instr(upper(shoutmsg),"LOCAL") == 1 then goto [LOCAL]
udpwrite netIP & "255", val(udpport), shoutmsg
wait

Similarly but different, use the usb debugger send window to send ALL ON and ALL OFF and check that both nodes receive and acknowledge the commands.

Obviously if you just want to check that one node is receiving commands and acting on them, use its specific node name in the debugger send window (instead of ALL), and again check for a received acknowledgement.

Let me know if you still can't get things working how you wish.

NOTE - please bear in mind that this project was abandoned mid-development after the release of V3, but I have just updated the original relay posting to incorporate these few bug fixes, so let me know if you come across any others and I'll do the same for them.
User avatar
By joeman2116
#52293
Electroguard wrote:Before getting into that, update the udpwrite line in {BROADCAST] on both nodes to add val(udpport), then you can use the Broadcast message window of one node to manually send commands to the other node, and/or to the debugger, and check for results.

Code: Select all[BROADCAST]
if instr(upper(shoutmsg),"LOCAL") == 1 then goto [LOCAL]
udpwrite netIP & "255", val(udpport), shoutmsg
wait

Similarly but different, use the usb debugger send window to send ALL ON and ALL OFF and check that both nodes receive and acknowledge the commands.

Obviously if you just want to check that one node is receiving commands and acting on them, use its specific node name in the debugger send window (instead of ALL), and again check for a received acknowledgement.

Let me know if you still can't get things working how you wish.

NOTE - please bear in mind that this project was abandoned mid-development after the release of V3, but I have just updated the original relay posting to incorporate these few bug fixes, so let me know if you come across any others and I'll do the same for them.


Electroguard,

It worked. I see the proper codes from the NODE210 sending the node146 and node140 ON / OFF commands. -
When NODE210 is toocold it turns on a local relay and the NODE146 SLAVE. - working!

NODE210 is master - NODE146 is slave - WORKS!

NODE140 is slave (new one just added) I just copy / pasted code onto a new module.

The problem is the new slave NODE140 does not work. - udp debugger does display NODE140 ON being broadcast from NODE210.
If i locally / manually turn on / off button relay does work.. but does not respond from a udp?


CODE: ON NEW SLAVE NODE140

[BROADCAST]
if instr(upper(shoutmsg),"LOCAL") == 1 then goto [LOCAL]
udpwrite netIP & "255", val(udpport), shoutmsg
wait

Is the only coded added. - since the NODE140 code is a dupe of NODE146.

Any ideas?

Thanks
Joe