kodi2mqtt icon indicating copy to clipboard operation
kodi2mqtt copied to clipboard

Addon doesn't work after resuming the machine from suspend state

Open bodiroga opened this issue 8 years ago • 8 comments

Hi Oliver!

Great job with the addon, works great and it's an easy way to integrate Kodi with any system that speaks Mqtt. Congratulations!

I don't know if I'm the only one, but in my Kodi installation (custom made HTPC with Libreelec) the addon doesn't work after resuming the machine from the suspend state (S3). It doesn't publish the "connected" message and I don't see no message being published when some video is played. Is it a normal behavior? If it's not, I will try to collect some useful debug log files for you.

Many again for your help and keep up with the great work.

Best regards,

Aitor

bodiroga avatar Nov 23 '16 17:11 bodiroga

I have been doing some more tests and now it seems to be sending playback messages fine, but I haven't changed anything. Anyway, the "connected" message wasn't being sent after resume and to fix it I have moved the "mqc.publish(topic+"connected",2,qos=1,retain=True)" call to the connectHandler function. For me, it makes more sense to place that call in the connectHandler, because it will be called just when the client is connected to the broker, so we can be sure that the publish method will not fail.

I will provide a PR soon, because it's a couple line change.

Best regards,

Aitor

bodiroga avatar Dec 02 '16 20:12 bodiroga

Done: #23

bodiroga avatar Dec 02 '16 20:12 bodiroga

Done: #23

this should definitely be merged. With this change the add-on works much better. I verified it with the windows store app.

gahujipo avatar Sep 12 '19 20:09 gahujipo

I've tried to accept pull request for this (and some other issues) and published a 0.14 release under my fork at https://github.com/eschava/kodi2mqtt/releases/tag/0.14

eschava avatar Oct 31 '19 11:10 eschava

@eschava this is great. finally the first publish after the playback starts works; that's amazing. Would you think about enabling the issues on your forked repo?

gahujipo avatar Nov 12 '19 20:11 gahujipo

Sure, why not? Actually I didn't know that issues are disabled by default :) Done already

eschava avatar Nov 13 '19 08:11 eschava