jneilliii / OctoPrint-PrintScheduler

MIT License
10 stars 2 forks source link

ghost scrolling schedule date and GPIO integration enhancement #1

Closed markdavidjohnson closed 3 years ago

markdavidjohnson commented 3 years ago

When editing the start-at-time, if using the popout calendar and its time scrollers, the times have a residual scroll event after scrolling is completed. After scrolling a lot I saw the minute scroller move continuously by itself. Repeatable.

I also use the GPIO Control plugin to turn the actual printer on. I'd love to include in the schedule a GPIO set to on command. Is there a good way to do this?

jneilliii commented 3 years ago

I'm only using standard html input tags of type datetime-local, so this to me almost sounds like a browser related implementation issue, or it just doesn't quite work as expected in general. Which browser are you using, as I'm finding out now that all browsers do not support that type.

https://www.w3schools.com/tags/att_input_type_datetime-local.asp

markdavidjohnson commented 3 years ago

Platform: Brave Browser (Version 1.24.85 Chromium: 90.0.4430.212 (Official Build) (x86_64)). The time scrollers don't appear in Safari Version 14.1.1 (15611.2.7.1.6, 15611) so there isn't a problem there. Time scrollers work great on Brave Browser on iPhone (Chromium)

Link to video: https://photos.app.goo.gl/DwpYx3VEd2TsXCBg6

markdavidjohnson commented 3 years ago

Oh nice, I did't know about that input tag. So testing using the w3schools link, i get the same single fantom scroll (looks like it is just trying to not display any partial times for some reason) but i wasnt able to get it to do the multiple fantom scrolls. It's harder to get that fail mode to manifest though, so i wouldn't say it only happens in the plugin. I do think youre right. At least the single fantom scroll is a bigger issue, and the multiple fantom scrolling is also probably not your code. Thanks for checking!

If you have any thoughts on the GPIO integration I'd love to hear. My hope today was to have it send a request to the GPIO Control plugin to turn that output pin on high, connect to the printer, wait 10 seconds, and start the print, all a few minutes before my alarm clock went off this morning. I'd be able to roll over when the alarm clock went off and check that everything was working before getting ready for the day (or snoozing), but I didn't want to leave the fans running all night, so that use case currently doesn't work.

jneilliii commented 3 years ago

I'm going to be looking into a different date/time selector in the near future as it turns out firefox doesn't support it at all (#3).

jneilliii commented 3 years ago

I think I might have this working now with the above commit. You can test it by switching the plugin's release channel to Release Candidate in OctoPrint's software update settings and upgrade when prompted.

as for the GPIO related question, I'm not familiar enough with that stuff, but that is the reason for the before print start options in the settings. you might be able to use that to control the GPIO via system commands.