Arduino and Home Designer

Hello,
I am currently using another app to communicate with arduino mega, but the administrators have decided to close the servers at the end of this year. So I was forced to migrate to another communication program and that’s how I found the home remote designer. I’ve been using the program for a month and I like it. I managed to add a tcpplugin (default tcp plugin from home remote site) and create a TCP connection with arduino. I added some switches to send commands.

Unfortunately I got stuck with reading the states of the switches that should come from the arduino. I added in onChangeRequest a tcp.send () function that sends a request to arduino for the state of the switches. Arduino is receiving this request and send back the current state. This state is displayed in home designer log, but the problem is that I don’t know how to implement it in the switch designer.

Another problem is related to the slider. I managed to control the light but I got stuck again reading the light state when you start the application (the slider should start from the current light value) When I send manually the command -get brightness- to arduino, I get back the light value but I don’t know how to implement it in slider(how to request the light value, read the value and update the slider to current value position).

Please help me with some ideas or examples.
Thank you

I managed to implement status reading for slider with dataTrigger and device Binding, but now the slider no longer transmits the value to the arduino. If I remove DataTrigger from the Trigger list or uncheck IsRegularExpression, the slider transmits the value to the arduino but no longer read the current value.

Here are some TCPClient plugin examples that might help

https://community.thehomeremote.com/search?q=TCPClient%20category:7

Don’t request status in “onChangeRequest”. You will typically process status in “onConnect” & “onPoll”. Again, look at some of the examples. Here’s one I wrote a little while back. This device automatically sends status updates when they happen so we only have to request status when we 1st connect. That’s why it is only sending the status requests in “onConnect”. If your device doesn’t send updates automatically then you should also send the requests in “onPoll”.