That IP address is from a datacenter in France. Are you hosting your MQTT server in the cloud?
Yes. Using MQTT Explorer on a Mac
Is the MQTT server connected with a constant VPN to your location running ratgdo?
Negative. I do not have that set up. Is that a requirement?
You'll need your MQTT server to be able to reach the ratgdo hardware at all times. I wouldn't suggest hosting this in the cloud as you could potentially give unintended access to your location.
Do you know of any good tutorials on how to set this up? I appreciate the information.
@deserthillsdrive do you have an always-on machine at home? Maybe a raspberry pi, a Synology NAS or some old server?
I have an always on old iMac
@ady624 Thank you for your support on this integration. I recently got my ratgdo installed and this integration was super helpful. I do have a few observations:
- In the doParseState() function the "contact" state is getting set to NULL since it only gets set when the motor is idle as the "contact" variable isn't set otherwise
- The device is rather chatty with the position attribute and I personally modified the code to only set position when the motor is idle versus logging every position change.
- I made the following code changes to fix this and wanted to share in case you interested in using them:
Code Changes
if (state.doorKey as Long == message.key) {
String value
switch (message.currentOperation) {
case COVER_OPERATION_IDLE:
value = message.position > 0 ? 'open' : 'closed'
sendDeviceEvent("contact", value, type, "Contact")
int position = Math.round(message.position * 100) as int
sendDeviceEvent("position", position, type, "Position")
break
case COVER_OPERATION_IS_OPENING:
value = 'opening'
break
case COVER_OPERATION_IS_CLOSING:
value = 'closing'
break
}
if (device.currentValue("door") != value) {
sendDeviceEvent("door", value, type, "Door")
}
return
}
Do anyone know if the Motion status of the wall control is made available from the ratdgo? Would be nice to have that available in Hubitat.
For a Sec+1.0 device, I don't believe the Motion Status is directly presented, at least in the MQTT topics. - That said, the light, and obstruction sensor ARE present. - And the light can be used to indirectly infer motion (the light is triggered by motion, or manually turned on).
From a Sec+ 1.0 device:
For a Sec2.0, MotionState is indeed, exposed via MQTT and I believe a recent change, made the MQTT topic, "non-retained", as there is never a signal to "clear" motion, there is just an event when it's triggered - See: Motion state MQTT message is retained message · Issue #74 · ratgdo/mqtt-ratgdo · GitHub
For Sec+2.0, the motion Topic is defined as:
String motionStatusTopic = ""; // will be mqttTopicPrefix/deviceName/status/motion
String motionStates[2] = {"clear","detected"};
This is from the source: mqtt-ratgdo/src/ratgdo.h at 2.5 · ratgdo/mqtt-ratgdo · GitHub
Search on motionstate, to understand what's happening. I would have to double check the HE driver to verify if that's exposed on a Sec+2 device.
Not sure of your specifics to know if that helps or not.
Great information, thanks!
I am using Sec+2.0. Since Motion is present in the ratgdo firmware, it is not availabe in HE, at least not in the MQTT driver that I am using by "edasque".
I'm not a driver author, but should be able to be added?
Hi Dale,
there is a motion detection that I can see the device sending. I hadn't noticed it before. I'll make a code change to take it into action. The only difficulty is that it doesn't seem to clear at least on mine so I'd have to do something there to revert it after say 30 seconds.
If you have MQTT Exporer or something similar, can you confirm you see it as well and that it doesn't clear for you either?
I can absolutely take a look at that. I will try to get to it later today and post back.
Motion=detected ONLY appears if I have the motion sensor enabled from the wall control. I was really hoping it would respond even if disabled.
and it never clears.
Per the GITHub issue #74, that I linked to above, that is the expected behavior (a motion event as fired), and since it never clears, it is NOT a retained MQTT topic.
You can easily setup a RM hold timer to latch the motion event, and then clear after some defined period without motion.. Basically the same as how the GDO light works.
If you really want to detect motion, just install a Zwave or Zigbee PIR sensor.
I am using @ady624's driver and the switch attribute gets updated on and off based on the status of the GDO light. So it does work at least with this driver. But I would agree the motion attribute never gets updated.