Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domoticz sends SYNCID after RFLink string #35

Open
urkelbundy opened this issue May 18, 2022 · 1 comment
Open

Domoticz sends SYNCID after RFLink string #35

urkelbundy opened this issue May 18, 2022 · 1 comment

Comments

@urkelbundy
Copy link

Hi all,

This may be the wrong place to ask but I will try it anyway.

Using espRFLinkMQTT for about a day now with Domoticz 2022.1.
Receiving sensors works great but switching a switch doesn't seem to work.

I used the mosquitto client to subscribe to rflink/out to see what Domoticz is sending when a switch was switched ON.
What I expected to see is for example: 10;NewKaku;1234567;1;ON;
What was sent by Domoticz is: 10;NewKaku;1234567;1;ON;SYNCID=65fdd29e;

The RFLink doesn't respond to the string received because of the SYNCID=65fdd29e; part, so the switch is not switched to ON.

What is that SYNCID=65fdd29e; part doing there? Why is Domoticz sending it?
I use Domoticz in a docker pulled from docker hub from LinuxServer.io

Is there something wrong with my Domoticz docker or is espRFLinkMQTT missing something that filters the SYNCID part?

Best regards

@urkelbundy
Copy link
Author

urkelbundy commented May 19, 2022

I found it in the Domoticz code in RFLinkMQTT.cpp
sstr << msg << "SYNCID=" << std::hex << m_syncid << ";\n";

In esp32-rflinkmqttgateway I noticed some code that deals with this SYNCID

if( (p = strstr( payloadstr , "SYNCID=" )) != NULL )
{
   ........
    syncback = true;
}

// Remove the SYNC ID
memcpy( rflinkpacket , payload , len );

if( syncback == true &&
    rflinksplitpacket( payloadstr , ";", params , MAX_RFPACKET_FIELDS , &len ) == MAX_RFPACKET_FIELDS &&
    len < (sizeof(rflinkpacket)-24)
)
{
    sprintf( rflinkpacket , "20;00;%s;ID=%s;SWITCH=%s;CMD=%s;%s;", params[1] , params[2] ,params[3] ,params[4] , params[5] );
    MQTTPublish( RFLINK_RECEIVE_TOPIC , rflinkpacket );
}

So it looks like some sort of acknowledgement and that part is missing in the espRFLinkMQTT code.
Request for adding the missing code to espRFLinkMQTT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant