kodi2mqtt
kodi2mqtt copied to clipboard
Addon doesn't work after resuming the machine from suspend state
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
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
Done: #23
Done: #23
this should definitely be merged. With this change the add-on works much better. I verified it with the windows store app.
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 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?
Sure, why not? Actually I didn't know that issues are disabled by default :) Done already