Update to add MQTT(PlugIn.Helper) publish support (issue #39)#40
Update to add MQTT(PlugIn.Helper) publish support (issue #39)#40jcassel wants to merge 3 commits intotechman83:mainfrom jcassel:MQTT
Conversation
techman83
left a comment
There was a problem hiding this comment.
Only one minor question! I would like to keep the format related changes in a separate commit at the very least, but preferably a separate PR. But the project really could use porting to Black, and really appreciate this contribution.
Overall looks great, I'll try and do a sanity check at some point today. If it goes well, I'll cut a release!
|
I'll need to do some further debugging, I do get it seeing that mqtt is available and the mqtt plugin is publishing But I'm not getting any weights show up. Though just need to rule out an issue with the load cell! |
|
I was looking at this again.. Just noted that I reused the timer t for the new MQTT method. I am making an update. I also looked harder in my shop and found a good load cell and board. I have it hooked up. Let me work this a little and I will update later today I hope. |
|
OK, with the last commit, I think it is all worked out. I should not have submitted the changes without having tested it fully. Including hooking up a load cell. Lessons learned. Anyway I have connected a load cell and done a full test. Seems to be good now. Issue was mostly the Timer reuse but also had found a conversion need for the value int to str. Hope this tests out well for you as well. |
|
@jcassel - I combined your commits into #41 if you'd like to take a look. I noticed that it didn't show the correct weight. I originally ported the existing library from python2 -> python3, and it has a few quirks as a result. Things I fixed/changed over in my PR
If you would like to give it a once over, I'll get a release out the door! |

Update to add MQTT(PlugIn.Helper) publish support for last known weight value.
I have to be honest, I did not have a load cell to test this on. So the only value for the last known weight was "Error" but I did not change any of the functional code for the PlugIn.. I simply added the hook to the MQTT PlugIn and then setup a Publish to it if it was found. I did thoroughly test the MQTT Sections. If you think it should be sending some other value or if you think I need to add some additional checks around the value of "lastknownweight" let me know, I will make an update.