#linuxcnc Logs

Oct 19 2018

#linuxcnc Calendar

02:02 AM Deejay: moin
02:47 AM miss0r: mornin'
02:50 AM miss0r: turning a new valve piston on the lathe right now. This thing is very long and thin... :-/
02:51 AM miss0r: almost to a point where I need to setup the steady rest. I might need to
04:57 AM jthornton: this linux mint box is getting impossible to wake up
05:03 AM XXCoder: why?
05:03 AM jthornton: if I knew that I'd fix it lol
05:04 AM jthornton: I spend 3-4 minutes tapping on the keyboard and moving the mouse before the damn thing wakes up
05:04 AM jthornton: screen saver is turned off
05:06 AM jthornton: down to 11h 8m of daylight got to hurry up and get my algorithm figured out for the chicken door/lights
05:11 AM XXCoder: strange
05:11 AM XXCoder: I wonder if theres something capturing keypresses
05:11 AM jthornton: hmm and the mouse too?
05:11 AM XXCoder: would be strange
05:13 AM jthornton: so the upshot of the chicken algorithm is if the natural light is getting shorter each day when it reaches 10h start adding 5 minutes per day up to 14h then hold until natural daylight is 14h then open at dawn
05:13 AM jthornton: make sense?
05:14 AM XXCoder: so turnaround for bottom out at 10h, turnaround on top is 14 hours
05:14 AM jthornton: yea, and I need to be able to restart at any time and be back in sync
05:15 AM XXCoder: each day value should be calculable so sould be fine
05:15 AM XXCoder: or even table with date lookup though thats bit bigger binary size
05:16 AM jthornton: on a reboot I need to calculate the position it's in and the start date for extra light if at all
05:17 AM rmu: jthornton: regarding waking up the mint box, did you try pressing the power button?
05:18 AM jthornton: let me see if this keyboard has one
05:18 AM rmu: no on the pc
05:19 AM jthornton: no, I have not tried that as I don't want to reboot
05:19 AM rmu: i got a monitor with built in usb hub, and the monitor deactivates the usb hub when it is in sleep mode (i.e. there is no picture), so you can't wake up the PC with a keyboard/mouse connected to monitor hub
05:19 AM rmu: one short press of the power button should not reboot
05:20 AM rmu: but that depends on your configuration
05:20 AM XXCoder: my keyboard is a usb hub also lol
05:20 AM XXCoder: my mouse usb dongles been there so long sometimes its mystery where it is.
05:21 AM jthornton: the mouse and keyboard are a USB one and the dongle is in the PC, but strange as I've been running this PC for some time now and the problem is just starting a few days ago
05:21 AM rmu: this monitor hub thing is very stupid, you can't even unblank the display. screensaver activates -> usb hub shuts off
05:22 AM XXCoder: crazy
05:22 AM rmu: what do you need a dongle for? wireless keyboard/mouse?
05:22 AM jthornton: aye
05:22 AM rmu: probably dead batteries ;-)
05:23 AM jthornton: in both the keyboard and the mouse?
05:23 AM jthornton: but they both work..
05:24 AM rmu: hmm. i would check with wired keyboard, just to be sure
05:24 AM rmu: in german we used to say "wer funk kennt nimmt kabel"
05:24 AM rmu: ;-)
05:24 AM jthornton: good idea, I have one next to me for the Raspberry Pi
05:25 AM rmu: perhaps there is some kind of interference on the wireless link
05:26 AM XXCoder: didnt think of that but wouldnt it also affect regular use
05:26 AM jthornton: yea it's something that has changed lately for sure
05:38 AM jthornton: https://paste.ubuntu.com/p/HxxP98hfhy/
05:41 AM XXCoder: gap at lower tha 10h but increasing
05:42 AM XXCoder: it will evenually happen at spring
05:42 AM XXCoder: maybe 14 hours - (5 minutes * days backwards from first 14h day)
05:42 AM jthornton: yea if daylight is increasing hmm that means it's after the winter solstice
05:44 AM jthornton: actually I want to add 5 minutes per day from the day that has 10h of daylight and this year it's about Nov 23
05:44 AM XXCoder: lemme make a quick graphic
05:44 AM jthornton: and I just picked that number out of my head for some reasno
05:47 AM XXCoder: https://imgur.com/a/0Czt52W
05:48 AM XXCoder: flat lines is 14 hours and 10 hours sunlight time
05:48 AM XXCoder: curved line starts at summer, decreases till winter then rises again
05:48 AM jthornton: yep that's pretty much the idea
05:48 AM XXCoder: the slope is where your code adjusts time till it is 14 hours and stays there
05:48 AM jthornton: yep
05:49 AM XXCoder: so theres only short dip
05:49 AM jthornton: well there is a longer dip, the dip is to allow them time to moult and some rest time
05:50 AM XXCoder: so youyr code dont have any handling for area after max 14 hours is reached agaib
05:50 AM jthornton: after 14h of natural daylight the door opens and the lights come on at dawn
05:50 AM XXCoder: over 14 and under 10 is already handled, so are area decreasing and slope area
05:51 AM XXCoder: honestly you dont need seperate "decreasing" and "increasing" hours I think
05:51 AM jthornton: there are two sectors, one when daylight is transitioning from 14h+ down to 10h and one from 10h to 14h
05:54 AM XXCoder: yeah so your code really just needs to calculate number of days since 10h then set 14h if its over that
05:54 AM XXCoder: if natural is longer whole code dont run it just runs on sunlight timne
05:55 AM XXCoder: or even better, just make "spring" come for example 200 days earlier
05:55 AM XXCoder: so it would have natural daylight curve like spring
05:55 AM XXCoder: till it hits 14 hours it freezes till actual goes past that
05:56 AM XXCoder: note I just made up 200 days up not sure how many days would be best
05:57 AM jthornton: that's what I'm doing... when natural daylight in the decreasing mode reaches 10h start adding 5 minutes a day for the next 48 days
05:57 AM miss0r: Valve piston complete. That thing took damn near three hours to do ! https://imgur.com/a/zE01dGg
05:57 AM XXCoder: yeah though if my method is used you dont need to do anything more than just bring spring time earlier
05:58 AM jthornton: natural light will get down to 9h 30m during the winter solstice and rise back up through 10h again
05:58 AM XXCoder: call daylight time for for exampke 150 days later
05:58 AM miss0r: jthornton: Thats not alot of difference :)
05:58 AM XXCoder: then trim if more than 14 hours
05:58 AM jthornton: miss0r: I had to pick some time to start extra light lol
05:59 AM XXCoder: your code does api call to get daylight time right? or is it info gathered during day?
05:59 AM jthornton: XXCoder: I'm not following your algorithm, dunno when 150 days earlier is
06:00 AM miss0r: Our shortest day 'round here is 6 hours, where as the longest one is around 17 hours
06:00 AM jthornton: I use astral to get the times each night but at boot up I need to get my position in the cycle
06:00 AM XXCoder: oh well for example oct 19th is current day, your program calls for daylight time in march 17th 2020
06:00 AM jthornton: your a lot further north than me :)
06:00 AM XXCoder: then if that day happens to be at over 14 hours dauylight (doubtful) then trim it to 14 hours
06:01 AM XXCoder: pretty stupid simple
06:01 AM jthornton: how does the program know what date to call?
06:01 AM XXCoder: current date + 150 days
06:01 AM XXCoder: your board does have date?
06:01 AM jthornton: yea I'm heavy into datetime lol
06:02 AM XXCoder: lets do quick graphic draft see if my idea makes sense
06:02 AM jthornton: ok
06:02 AM XXCoder: inkscape this time lol
06:08 AM XXCoder: okay reload imgur
06:08 AM XXCoder: yellow is regular, and blue is shifted by X days
06:09 AM jthornton: how do you arrive at X days?
06:09 AM XXCoder: scales isnt very accurate. yeah thats the issue also, easier if have accurate graph to decide on days
06:09 AM jthornton: but yea that is how the light will look when graphed
06:10 AM jthornton: I've decided on the day, the first day of decreasing light that is 10h
06:10 AM XXCoder: blue is same (ignore stuff overlapped) but sifted left by N days, and maybe even shifted downwards by max hours day length - 14 hours
06:10 AM jthornton: the problem is at boot up determining where I am and what I need to do
06:11 AM miss0r: question: Can't you just get an astro watch(timer) ?
06:11 AM jthornton: I'm using astral in python to get accurate sun times each day and can find the sun times for any date with it
06:12 AM miss0r: alright :) I guess that works as well.
06:12 AM miss0r: I've done alot of 'outside lighting' with astro watches, that just fit nicely on a din rail
06:14 AM jthornton: adding light at night?
06:14 AM miss0r: Yeah
06:14 AM jthornton: in this case it's chickens and their light needs for laying eggs
06:15 AM miss0r: Schneider electric makes a realy nice watch, where you can tell it to turn the light on from xx:xx to xx:xx IF its dark out. or simply if its dark
06:15 AM miss0r: (sundown)
06:16 AM jthornton: in the case of chicken lights you want to add light in the morning only and allow natural sunset be their trigger for going to the roost
06:17 AM miss0r: that is also possible with the timer :)
06:17 AM jthornton: yea sure if you want to futz with it each day lol and I've been there done that lol
06:17 AM miss0r: hmm...
06:18 AM miss0r: Why would you need to do that?
06:18 AM jthornton: I'm working on an algorithm that magically follows my light rules, I have one now that I manually set the amount of extra light
06:19 AM jthornton: a timer does not change but the daylight does...
06:19 AM miss0r: that is the beauty of the astro watch.
06:19 AM miss0r: It knows the sunset and sunrise each day
06:19 AM jthornton: which is nice but does not fit the chicken light needs
06:20 AM miss0r: Hehe, I guess it does not :]
06:20 AM jthornton: astral also knows the dawn, sunrise, sunset, dusk and moon times
06:20 AM miss0r: They 'should' make a chicken edition :)
06:21 AM jthornton: lol
06:22 AM jthornton: XXCoder: graph is spot on what needs to happen, I just need to find the algorithm that fits the graph :)
06:24 AM XXCoder: its simple math trick, shift graph down and to left
06:24 AM jthornton: https://paste.ubuntu.com/p/cMmpBHrjs7/
06:24 AM XXCoder: time(date + 150 days?) - 1.5h maybe
06:24 AM jthornton: that code works fine but I have to set the start date for extra light
06:25 AM XXCoder: how long do chickens need to rest and molt?
06:26 AM XXCoder: maybe below 10h + chicken time days
06:26 AM jthornton: I'm not exactly sure, some of my neighbors chickens and turkeys are molting now
06:27 AM jthornton: I think it is a fall thing which is why I want to just have normal daylight in the fall up to mid winter then ramp them up to 14h to get egg production going a bit faster
06:28 AM XXCoder: "If you use a lamp in your coop to extend daylight hours, Oregon State Extension suggests leaving it off for six weeks during the fall or winter will help your birds completely finish a molt and start laying again at top production."
06:28 AM XXCoder: https://farmingmybackyard.com/chickens-molting/
06:28 AM XXCoder: so starting from start of fall, 6 weeks
06:29 AM jthornton: yea that's pretty much what I've read
06:29 AM XXCoder: or from below 10h maybe
06:29 AM jthornton: below 10h here only lasts a few weeks
06:29 AM jthornton: I don't think the moult in the deep winter or they would freeze to death
06:30 AM XXCoder: that same site cations against timing of molt in winter yeah lol
06:31 AM jthornton: if you have a bigger operation you just get new chicks each year as the pullets (females less than a year old) will lay through the winter cause they are too dumb to not lay when there is no chance for the egg to hatch
06:31 AM jthornton: 15m till the door opens
06:31 AM XXCoder: and older turns into meat I guess
06:33 AM jthornton: well the French had cure for old cocks it's called coq au vin
06:33 AM jthornton: mine I know by name and they will go to a retirement home lol
06:34 AM jthornton: https://paste.ubuntu.com/p/YsQny5Yq6J/
06:35 AM jthornton: I think this will work...
06:35 AM jthornton: hmm no I see a flaw
06:36 AM XXCoder: lemme edit it a second
06:37 AM XXCoder: https://paste.ubuntu.com/p/FMr4Rzj9cS/
06:38 AM jthornton: if over 14h is handled by the first if statement
06:39 AM XXCoder: no, if you keep adding 5 minutes a day evenually it will go over 14h I think?
06:39 AM jthornton: yes, I follow you now https://paste.ubuntu.com/p/4xKVY2GZjs/
06:39 AM XXCoder: 48 hours to increase 10h to 14h
06:39 AM XXCoder: err 48 DAYS
06:40 AM jthornton: yea
06:40 AM XXCoder: only point im not sure about is why there is difference between decreasing day hours and increasing
06:41 AM jthornton: if I find the previous 10h day and daylight is increasing then I'm off by several weeks from the original start point
06:42 AM XXCoder: interesting.
06:42 AM jthornton: 10h of daylight happens twice once before winter solstice and once after
06:42 AM XXCoder: ahh yeah makes sense
06:43 AM jthornton: so I picked the first 10h as my start point for some reason unknown to me lol
06:43 AM XXCoder: sometimes decisions is artistic
06:43 AM XXCoder: or instactive
06:43 AM jthornton: aye
06:51 AM XXCoder: well hopefully that should work
07:04 AM jthornton: and now how to test it out lol
07:09 AM XXCoder: :)
07:10 AM jthornton: I did figure out how to use the nice digole 2.1" color lcd thingy
07:10 AM XXCoder: heh apparently you can buy OLPC XO really cheap now
07:10 AM XXCoder: it has fairly large TFT display
07:10 AM XXCoder: its very readable in sunlight but faded colors
07:10 AM jthornton: OLPC?
07:10 AM XXCoder: yeah one laptop per child
07:11 AM XXCoder: https://www.ebay.com/itm/OLPC-XO-1-One-Laptop-Per-Child-Laptop-Computer-with-Charger/292768643434
07:11 AM XXCoder: old project dunno if its still made doubtful
07:22 AM jthornton: hmm I can pick dates in time and test each rule
07:23 AM XXCoder: run it for all 365 days graph it :)
07:29 AM Loetmichel: MAAAN, ordering things from dasfilament.de is like going grocery shopping while hungry... wanted to order a single spool of black PLA because nearly empty... got 5 spools of PLA (yellow, red dark green, gray, black) , 2 spools of PETG (transparent red, transparent geen, natur) and 2 sample rings (flexfilament und glow in the dark green). At least they deliver quick... ordered less than 20
07:29 AM Loetmichel: hours ago... -> http://www.cyrom.org/palbum/main.php?g2_itemId=17220&g2_imageViewsIndex=1
07:30 AM XXCoder: lol
07:31 AM Tom_L: you can print all weekend now
10:35 AM fragalot: Hey
10:35 AM jthornton: hay
10:42 AM fragalot: y'know
10:43 AM fragalot: labeling my isopropanol bottle using an alcohol based permanent marker may have been a mistake
10:49 AM * jthornton wonders what is the best way to dry my sock filled with desiccant is?
10:53 AM jthornton: this looks reasonable
10:53 AM jthornton: https://vemco.com/reactivate-desiccant-packs/
10:58 AM SpeedEvil: pour into oven tray heat to 180C for couple hours
10:58 AM SpeedEvil: Remove sock first.
10:59 AM JT-Shop: lol
11:00 AM JT-Shop: I wonder why most hits say < 300F
11:00 AM JT-Shop: 350F is the melting point I think
11:00 AM SpeedEvil: Of silica gel?
11:00 AM SpeedEvil: I think it's way higher than that
11:02 AM JT-Shop: not sure it is desiccant used in test strip bottles for blood sugar
11:03 AM fragalot: FinboySlick: because I know you care: turns out that if you remove the vertical head from a schaublin, and re-install it a week later, the thing is still in tram within 0.005mm
11:04 AM SpeedEvil: :)
11:04 AM fragalot: the fit & finish on this 60yr old hunk of steel continues to amaze me
11:55 AM * FinboySlick barely contains his envy.
12:01 PM JT-Shop: getting a chill in here I think a small fire is in order
12:06 PM JT-Shop: damn cell phone keeps telling me I'm out of data and to get unlimited click here lol
12:11 PM fragalot_: ads have gotten out of hand haven't they
12:12 PM JT-Shop: aye
12:13 PM JT-Shop: nothing like a cold rain to dampen your outdoor activities
12:13 PM fragalot_: with the new GDPR thing happening i've been going out of my way to make sure everyone that's ever contacted me knows not to do it again
12:13 PM fragalot_: i'm like the marketing guy's worst nightmare :D
12:13 PM JT-Shop: what is GDPR?
12:14 PM fragalot_: european privacy regulations
12:14 PM JT-Shop: we need that for cell phones
12:14 PM fragalot_: they can not keep or process information about you without your explicit permission
12:14 PM JT-Shop: it's getting to be a pain in the ass
12:14 PM JT-Shop: nice
03:43 PM XXCoder: JT-Shop: I wonder if google fi works in your area
03:43 PM XXCoder: its 10 dollar per gb till it reaches 6 gb then its slower unlimited from that point on
03:53 PM JT-Shop: nothing works in my area except satellite lol
03:54 PM JT-Shop: good morning, I got the 3rd rule sorted out so the last one will be a piece of pie
03:54 PM XXCoder: forgot which is third? :)
03:56 PM JT-Shop: iirc winter time... daylight < 10h and daylight getting shorter each day or something like that lol
03:56 PM XXCoder: ahh yea the shortest section
03:56 PM XXCoder: isnt there also < 10h and increasing
03:56 PM JT-Shop: geez it's the third time I've reconciled this damn account
03:57 PM JT-Shop: aye and I have that one sorted out in my mind
03:57 PM XXCoder: as thats where turnaround point is
03:57 PM XXCoder: nice
03:58 PM JT-Shop: it's still raining out or I'd show you the output
03:59 PM XXCoder: here its way not raining enough :(
03:59 PM XXCoder: its rainforest biome without rain
04:00 PM JT-Shop: the idea of using a seed date for each test worked out very well
04:00 PM JT-Shop: I didn't have to wait a year to test the code lol
04:00 PM XXCoder: indeed
04:01 PM XXCoder: you could even graph it. run it for all 365 days and output times it decided to open/close
04:01 PM XXCoder: then graph those times
04:07 PM Deejay: gn8
04:08 PM Tom_L: tried to rain here earlier but it looks like you're gettin it all now
04:11 PM JT-Shop: tomorrow is supposed to be real nice sunny and 67°F
04:12 PM JT-Shop: yea the missing check showed up from August lol
04:12 PM XXCoder: mailed July? ;)
04:13 PM XXCoder: **sept
04:13 PM Tom_L: better get your bike out
04:15 PM JT-Shop: invoice date was 7/23 but the payables girl screwed up and lost it
04:15 PM * JT-Shop has all the bikes inside lol it freaking cold and raining
05:03 PM jthornton: XXCoder: https://paste.ubuntu.com/p/5xRzm8T3YG/
05:04 PM XXCoder: middle is bit odd, it says less than 14 hours but natural light is 14:24
05:06 PM jthornton: yea used the wrong variable for that line, fixing it now
05:08 PM XXCoder: lol yea can happen
05:09 PM jthornton: https://paste.ubuntu.com/p/jQqCww8VBc/
05:09 PM jthornton: had a whole bunch of crap in the code from trying to wake up the stupid pc...
05:11 PM XXCoder: looks good I think
05:11 PM jthornton: yea just one more puzzle to solve for that
05:12 PM jthornton: test if natural daylight is less than 10h and increasing
05:12 PM XXCoder: yeah that'd cover the last section.
05:37 PM jthornton: I'm thinking just keep backing up until the daylight starts to increase then check for 10h to get my start date for extra light
05:49 PM XXCoder: cool :)
05:51 PM jthornton: but I think now I need to check for less than 14h and increasing each day...
08:36 PM XXCoder: https://www.youtube.com/watch?v=6JcxijRuNqs minecraft torch
09:59 PM Tom_L: can f-engrave do raised letters instead of engraved letters?
09:59 PM Tom_L: ie cut the pockets instead of the letter
10:32 PM XXCoder: Tom_L: should be. not too sure
10:33 PM XXCoder: f-engrave could do inlays so yeah probably able to do so