You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, 'forwarding to device' debug message is logged.
However, in the device handler - there is nothing logged.
// Send message to the Bridge
def deviceNotification(message) {
log.debug "MBH: deviceNotification: '${message}'" // <<==== WE NEVER GET HERE
if (device.hub == null) {
log.error "Hub is null, must set the hub in the device settings so we can get local hub IP and port"
return
}
log.debug "Sending '${message}' to device"
setNetworkAddress()
def slurper = new JsonSlurper()
def parsed = slurper.parseText(message)
if (parsed.path == '/subscribe') {
parsed.body.callback = device.hub.getDataValue("localIP") + ":" + device.hub.getDataValue("localSrvPortTCP")
}
def headers = [:]
headers.put("HOST", "$ip:$port")
headers.put("Content-Type", "application/json")
// this action will "POST" the "parsed.body" to the MQTT server "parsed.path"
log.debug "MBH: deviceNotification(): parsed.path='${parsed.path}'"
log.debug "MBH: deviceNotification(): parsed.body='${parsed.body}'"
def hubAction = new physicalgraph.device.HubAction(
method: "POST",
path: parsed.path,
headers: headers,
body: parsed.body,
callback: calledBackHandler // I ADDED THIS, but it's not triggered
)
hubAction
}
How can I force / debug the connection from the SmartApp to the DeviceHandler?
The text was updated successfully, but these errors were encountered:
I [mostly] followed the README with mosquitto running natively on rpi3.
pub and sub work from other computers in the house, to it seems to be fine.
The server.js is also running on the rpi3, listening on port 8085.
I created a Sim Switch, and linked the SmartApp to the on/off Switch
Ok, the bridge is not NULL, but it's just the name of the bridge... I would expect it to be an object
When I trigger a Sim Switch, I can see the ST live log
As you can see, 'forwarding to device' debug message is logged.
However, in the device handler - there is nothing logged.
How can I force / debug the connection from the SmartApp to the DeviceHandler?
The text was updated successfully, but these errors were encountered: