Toggle only works in simulator

I’ve implemented the RPi Garage Monitor Device Type by rich@richlynch.com and have it working fine with a Raspberry Pi Zero W connected to 2 magnetic switches as sensors. The simulator changes the ‘contact’ tile when they’re open, as does the app on my Android phone.

The problem is that the code I’ve added to signal my GPIO pins to trigger a relay to actually open the garage doors only works in the simulator! It’s a ‘toggle’ tile that triggers a web call to 192.168.x.x/action which is the IP of the Pi. When running from the simulator all is good, I press the toggle tile, I see my log files update and I see the relay trigger.

When running the same from the Android phone, the toggle tile does nothing - the Live Log shows nothing.

I thought it might be an internal LAN IP issue, but the status query is on the same IP and port, so that can’t be it.

Scratching my head … any pointers?

Update: here’s my send code (IP redacted for what it’s worth!)

def sendAction(port) {
		//def port = getDataValue("port")
        //port = convertHexToInt(port)
        log.debug("Activating for port ${port}")
		try {
            sendHubCommand(new physicalgraph.device.HubAction(
                method: "GET",
                path: "/action",
                headers: [
                    HOST: "192.168.x.x:8080",
                ]                
            ))
        } catch (all) {
            debug "Error executing internal web request: $all", null, "error"
        }
}

Do you mind share your setup? I did install the rpi_garage_smartthings but I can’t add it into my smartthings. It says “In the SmartThings iOS app, tap the “+” at the bottom to create a new Device. Under My Apps, tap on RPi Garage Connect. Select the garage doors then tap Done.”, but I don’t have such things in SmartThings iOS app. I can add device from the web console but it doesn’t work.

Thanks

Alex

Do you have the code running on your Pi? You have to have the Python app running on the Pi to recognise the broadcast request from ST. In the default configuration of the code it’s setup for 2 sensor switches running on the Pi. When you add the App in ST on your phone it should find those 2 switches.

Just figured out this morning. It turns out my ap is blocking the ssdp. Changed the setting and I am good to go.

Thanks

Alex

Did you figure out the smartthings part?

I didn’t use his code to open the door in smartthings.

I used [RELEASE] Raspberry Pi Relay Controller (WebIOPi) and it works fine.

Thanks