Maslow Home Maslow Community Garden Newsletter

WebControl Open Beta


#81

That’s good to know.
I have to say I am super impressed that you put this together. My coding skills are very limited, and my time constraints these days have not facilitated my ability to expand my knowledge, so I really appreciate all the time you’ve put into this.


#82

Please count -1 for the votes webcontrol. I just wanted to try if I can choose both and clicked webcontrol fist :man_facepalming:
I have not tested it enough to feel secure using it in the workshop.
I can’t imagine how I could follow the terminal, run a tail on the log in another terminal and send commands to the firmware in a third terminal while debugging, using webcontrol. And there are still bugs to find in the FW and GC.
It is beautiful and a great contribution, that i will try to learn to use, but i can’t decide for one or the other.
A bit to early to make it default from where i stand. I’d like both for now.
(Offtopic: Is the log.txt written to the SD-card?)


#83

I am a software developer and currently manage a team of professional software developers and I too am super impressed with the speed of execution and the quality of @madgrizzle’s work. Making a quality product like WebControl in only a few weeks is a rare feat! We’re very fortunate to have @madgrizzle in this community.

Really good points @Keith we definitely want to make sure to not raise the required technical bar for people to get started. We should be able to wrap WebControl in something like Electron.js and distribute it similarly to how we distribute GroundControl. Then people who want to use it directly from a Windows/Linux/macOS laptop can still do that. I’ll start investigating that.

All that said, I think WebControl is a superior product and it would benefit the community to move development in the direction of WebControl. Here’s why:

  • Kivy is not a bad cross-platform UI framework, but judging from the project’s slowness to adopt Python3, I’m not very confident that project is going to continue to be developed. Web technologies (HTML/JS/CSS), on the other hand, are the original cross-platform UI framework and they are clearly going to be around for a long while
  • Related to the above, there are a lot of great JavaScript libraries that we can leverage. This is how @madgrizzle was able to do the 3-D G-Code view. Python is a great language but not known to be very strong for building UIs.
  • Also related to the above: there are a lot more folks out there who are familiar with HTML/JS/CSS than there are who are familiar with Kivy
  • (Hypothetical but worth considering) Based on the newsletter, @Bar is working on a web based collaboration platform. Might be easier to integrate that with a web-based control platform
  • And of course all the other features related to being a web server: Multiple displays, smartphone support, cut doesn’t stop if your computer crashes, etc

#84

Yes, the SD card is used for all the storage. There’s a .WebControl directory under the user’s home directory that contains the log files, the uploaded gcode, and the webcontrol.json file.


#85

This is all possible over ssh I think. I’d be interested to know more about what exactly you need for debugging. Maybe we can add features to make it easier


#86

Is the log cleaned up from the pos-reports or made round-robin ? I’m i bit worried of the increasing file size and the read/write cycles, as well as the lifespan of the SD. What can be expected?


#87

It’s a good question. @madgrizzle does it write logs when not in use?

I think if we’re only writing logs when webcontrol is actively being used we should be fine. For my Home Assistant home automation Pi I murder SD cards every 9 months, but that’s writing multiple things to the database every minute 24/7. I think if we’re only writing to a log when WebControl is in use (user interaction, running a cut) I would expect an SD card to last for years


#88

There’s a setting webcontrol you can enable to stop writing after a 30 second (I think) period of inactivity… it starts up again once you start using webcontrol. Handy feature to have. There’s also two logs, an abridged log (alog.txt) that filters out all the position messages from the controller and an unabridged log (log.txt) that has everything.


#89

Might be worth making this the default if it’s not already


#90

I looked and apparently I made the inactivity timer length configurable… It defaults to 0 seconds (i.e., disables the time). The only reason I made it default to 0 is to avoid situations where people are unfamiliar with it start to wonder why the log is stopping and thinking maybe there’s a controller problem. Dunno?


#91

I did a quick search for the biggest log i could find in my history of GC.
The winner is GC 1.10 with amazing 27.9MB and 812305 entries.
How would that translate to " The ‘average’ SD card has a read / write life of 100,000 cycles" ?


#92

What about adding a usb hard drive to the RPi? I’m sure I could make the filepath for where .WebControl is stored configurable.


#93

I did that with an arduino->RPi greenhouse control long back.
As far as i remember, i even managed to mount the swap partition of the linux there. Not sure though, i did attempt it. SD cards several years back are not what they are today, limiting or eliminating writes to it was a primary goal in the setup.


#94

I think we’re over-optimizing here. There’s a lot of talk about SD card wear on the internet, but unless you’re continuously writing the the card all the time, the SD card is unlikely to be the weakest link in the system. And worst case you buy a new $10 SD card and then directly copy the old sd card to the new sd card (since reads continue to work when SD cards wear out)


#95

So turn the logging ‘off’ default and ‘on’ as option?

Edit: The log could use a clean-up, in GC at least.
Would a feature request for setting based ‘verbose levels’ be placed in the FW or GC?


#96

I think @madgrizzle’s solution is good – stop logging after a period of inactivity and log while a user is active. Even the most active amongst us are probably using our Maslows no more than 5% of time. I doubt we are going to run into the limits of an SD card


#97

Does that include a 6 hour cut?


#98

I would say log whenever gcode is being processed, or the user is clicking things in WebControl


#99

The logger goes into idle when the user doesn’t do anything for the given period of time AND the machine isn’t sending gcode to the controller.


#100

Definitely agreeing with John on this. The log goes idle whenever the user isn’t active on the system. You can also follow this guide to access 192.168.1.18. Neither the gcode is transmitted to the controller.