ha-bridge icon indicating copy to clipboard operation
ha-bridge copied to clipboard

UDP requests end in Alexa saying {device} is not responding

Open dinkybluebug opened this issue 3 years ago • 14 comments

Hi - I still cant fix this - I have about 11 devices added to HABRIDGE.

Ive updated to 5.4.1RC1 and my light that is controlled by UDP packets now is causing a problem. It works..... but alexa says "Sorry {device} appears to be malfunctioning" ..... Ive simplified the off command for testing to just one entry, but Alexa still says its malfunctioning - any ideas why?

Ive removed delays, set No state to True.... but still it errors.... any ideas?

image

dinkybluebug avatar Dec 29 '21 15:12 dinkybluebug

could you turn on trace state and post the log. need to see the timing on execution of the commands

bwssytems avatar Jan 01 '22 18:01 bwssytems

Hi - yes can do ---- but when I try and turn logs onto trace and click update - it goes back to INFO again.... ive tried this a few times.... why might this be?

dinkybluebug avatar Jan 01 '22 19:01 dinkybluebug

I can change this to DEBUG, or WARN or INFO but it wont change to TRACE - it says its been updated, but it doesnt update

dinkybluebug avatar Jan 01 '22 20:01 dinkybluebug

Sorry, trace state is a selection in the bridge control tab. This log has too much in it for me to get through

bwssytems avatar Jan 08 '22 17:01 bwssytems

Got it - sorry.... here it is @bwssytems

Jan 9 16:15:08 plex java[595]: 2022-01-09 16:15:08,393 [main] INFO com.bwssystems.HABridge.upnp.UpnpListener - Traceupnp: send upnp discovery template 1 with response address: 192.168.1.12:80 to address: 192.168.1.12:33425 Jan 9 16:15:11 plex java[595]: 2022-01-09 16:15:11,377 [qtp9282944-86] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: hue state change requested: 0ea0254ea66e484db3b2ef0c09745bc1 from 192.168.1.136 body: {"on":true} Jan 9 16:15:11 plex java[595]: 2022-01-09 16:15:11,378 [qtp9282944-86] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling on-off as requested: true Jan 9 16:15:11 plex java[595]: 2022-01-09 16:15:11,379 [qtp9282944-86] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Decode Json for url items: [{"item":"udp://192.168.1.10:8899/0x450055","type":"udpDevice","delay":"0","count":"1"},{"item":"udp://192.168.1.10:8899/0x4B0055","type":"udpDevice","delay":"0","count":"1"}] Jan 9 16:15:11 plex java[595]: 2022-01-09 16:15:11,382 [qtp9282944-86] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : udpDevice Jan 9 16:15:11 plex java[595]: 2022-01-09 16:15:11,484 [qtp9282944-86] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : udpDevice

dinkybluebug avatar Jan 09 '22 16:01 dinkybluebug

So it looks like around 100ms per call so 200-220ms total. And that is all in the udp call which should be quick. I'll look into the call. Your devices should still operate, it's Alexa just saying it timed out on the response from the habridge.

bwssytems avatar Jan 10 '22 16:01 bwssytems

Even if I just have one UDP call - it still times out.

dinkybluebug avatar Jan 10 '22 16:01 dinkybluebug

Maybe similar to: https://github.com/bwssytems/ha-bridge/issues/1351 ?

jayjupdhig avatar Jan 13 '22 17:01 jayjupdhig

I have the same issue (sending HTTP message though), but only ever when switching things on. I thought it might be because of the time the http call was taking (its repeating Harmony commands via another service), but I've replaced that with a quick "instant return" nodejs app and Alexa still says the same thing about it not responding.

This log shows the on and the off both completing (I think anyway?) in what seems to be super fast time:

05-20-2022 12:21:50.027 INFO Tracestate: Calling on-off as requested: true com.bwssystems.HABridge.hue.HueMulator
05-20-2022 12:21:50.030 INFO Tracestate: Decode Json for url items: [{"item":"http://127.0.0.1:8989/doit","type":"httpDevice","httpVerb":"POST","contentType":"application/json"}] com.bwssystems.HABridge.hue.HueMulator
05-20-2022 12:21:50.035 INFO Tracestate: Calling Home device handler for type : httpDevice com.bwssystems.HABridge.hue.HueMulator
05-20-2022 12:22:22.374 INFO Tracestate: hue state change requested: 6caadadf0307442a900c0c6aaef7e3b3 from 192.168.50.170 body: {"on":false} com.bwssystems.HABridge.hue.HueMulator
05-20-2022 12:22:22.379 INFO Tracestate: Calling on-off as requested: false com.bwssystems.HABridge.hue.HueMulator
05-20-2022 12:22:22.382 INFO Tracestate: Decode Json for url items: [{"item":"http://127.0.0.1:8282/hubs/new-hub/devices/fire/commands/power-off/","type":"httpDevice","httpVerb":"POST","contentType":"application/json"}] com.bwssystems.HABridge.hue.HueMulator
05-20-2022 12:22:22.387 INFO Tracestate: Calling Home device handler for type : httpDevice com.bwssystems.HABridge.hue.HueMulator

grumpydev avatar May 20 '22 11:05 grumpydev

Better forget that crap and use Virtualsmarthome... :-) You will save A LOT of time!!! -> https://www.virtualsmarthome.xyz/

jayjupdhig avatar May 20 '22 14:05 jayjupdhig

@jayjupdhig people like you make authors of FOSS abandon their projects. I know, that it is from time to time frustrating if things do not work as expected and I saw that you asked a lot of times without success. But it is completely up to the community, if somebody want's to help or not. People don't get money for it. Normally you get help, when you try to provide enough info. But even then it's up to the community. So go ahead, use whatever you want. But don't be rude to people who provide helpful code for free.

steviehs avatar May 20 '22 14:05 steviehs

@steviehs Thank you for getting it. Also, we cannot fix every issue for every environment. Works for the majority. Also, as a community, I have not had that many pull requests for contributed work. I will take whatever people want to give.

bwssytems avatar May 20 '22 21:05 bwssytems

@steviehs Thank you for getting it. Also, we cannot fix every issue for every environment. Works for the majority. Also, as a community, I have not had that many pull requests for contributed work. I will take whatever people want to give.

I'd take a look at it myself, but I haven't done Java since 1998 so I'd probably do more harm than good 😂😂 It used to all work fine, so I imagine its on the Alexa side as the logs seem to show a pretty instant response, the device does still switch on fine, which is the main thing.

grumpydev avatar May 21 '22 04:05 grumpydev

@grumpydev my comment was not meant for your post but as a reply to @jayjupdhig 's comment.

steviehs avatar May 21 '22 08:05 steviehs