tobof / openhab-addons

The next-generation open Home Automation Bus (openHAB)
Eclipse Public License 2.0
39 stars 30 forks source link

Sending a message through expert mode not works with smartsleep #117

Open kruemelro opened 6 years ago

kruemelro commented 6 years ago

Hi

i would like to send Messages to some nodes through the expert mode. I've taken the example and changed the Message to my needs. The Destination node use smartsleep.

When i start the example rule, the message is send instant and not after the destination node wakes up.

Thanks Phil

ChrisWharton2 commented 6 years ago

There might be a better way, but the workaround that i used was to check returned message for the sensors heartbeat and then send the command message. e.g. if (mySMsg01.state.toString.contains ("45;255;3;0;22;")){ sendCommand(mySMsg01, "45;0;3;0;13;0") vRunOnce.postUpdate("YES") logInfo("Watch ; ", "Writing to Sensor" ) }

kruemelro commented 6 years ago

I've got your point. It works but makes no sense if you want to send a message to many nodes. I've solved it another way. I created a customSensor in the node firmware and mapped a item to VAR1. This way it works.

Maybe the Smartsleep property of the MyMessage type should be removed cause its confusing.

openhab2-addons/addons/binding/org.openhab.binding.mysensors/ESH-INF/thing/SMyMessage.xml `

            <description>Does this node support Smartsleep? A message to the node is only send in response to a heartbeat!</description>
            <default>false</default>
        </parameter>`