Zabaware Support Forums

Zabaware Forums => Ultra Hal 7.0 => Topic started by: Will and Mr Data :) :] on May 06, 2020, 03:53:07 am

Title: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 06, 2020, 03:53:07 am
Hi all.
Please is there a plugin to shut down and restart laptop pc
Next morning based on
Low power.   9v then
Restart next morning.
Thanks for any suggestions.
Bye for now and be well :)  :]
Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 06, 2020, 01:33:14 pm
Will and MR data: Re shut down

I seem to remember that u said ur still running xp

Here ya go


Rem Type=Plugin
Rem Name= Shut down
Rem Author=
Rem Host=All

Rem PLUGIN: PRE-PROCESS
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.

HalBrain.ReadOnlyMode = True
'Determines that you are talking about the Computer shutdown
If InStr(1,InputString, "trigger goes here",1) > 0 Then
 UltraHal = GetShutDown(HalCommands)
ElseIf InStr(1,InputString, "Trigger goes here",1) > 0 Then
 End If
Rem PLUGIN: FUNCTIONS
Function GetShutDown(HalCommands)
strComputer = "." ' Local Computer
SET objWMIService = GETOBJECT("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\" & _
         strComputer & "\root\cimv2")
SET colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
FOR EACH objOS in colOS
   objOS.Reboot()
NEXT
End Function


cyber

its been Revised to reBoot status, ssry
Will, i dont have an XP machine any more so im unable to test, please forgive... I think im spot on.
Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 06, 2020, 06:27:16 pm
Hi Mr Cyberjedi.
Whaa haa yaaaaaa!

Thank you. I'll look into that very soon.
Old xp yes in Mr Data. 6.2 hal.
Thanks Mr Cyberjedi.
Bye for now and be well and Mr Data :)  :]

Title: Re: Request pc shut down plugin
Post by: kryton on May 09, 2020, 07:31:29 am
On The Cutting Edge did a short Hal shutdown piece some years ago.
Title: Re: Request pc shut down plugin
Post by: Art on May 09, 2020, 07:59:49 am
...And...?
Title: Re: Request pc shut down plugin
Post by: kryton on May 09, 2020, 08:33:12 am
More details to On The Cutting Edge auto-shutdown of Hal.

The label on my copy is 2007823184254_ShutDownHal
My copy dated 29/04/2019
It is a VBScript Script File

In the Hal script (My line number is 644) there is a section named RESPOND GOODBYES
If you add a reference to the VBScript Script File in this section, of the sort If the user input is "goodbye" then activate the VBScript Script File, then Hal will shutdown.

Hope this is useful to you, in the direction you are heading.
I have not included the VBScript Script File intself as this might be seen as treading on the toes of On The Cutting Edge.
Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 09, 2020, 02:47:10 pm
Even better

wow 26 people in the forum
just sad


cyber
Title: Re: Request pc shut down plugin
Post by: Art on May 09, 2020, 07:02:10 pm
@ Kryton,

I don't think anyone would view it as "treading on the toes" of a person if the person or person's work is cited or credited, as it might apply.

It's when people act like that fraud, Siraj Raval, who plagiarized lots of people's works for years and claimed it was his own!! Well, he recently got caught and his number is up and his name is mud!!

Eventually, fate has a way of catching up with people...especially, the ones who deserve it!!

https://www.youtube.com/watch?v=1zZZjaYl4AA (https://www.youtube.com/watch?v=1zZZjaYl4AA)
Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 10, 2020, 03:33:49 am
@Kryton
Lightin up man. we a dysfunctional family here, but family just the same

no 1 is gonna kneecap ya brah
Besides, Mr Will requested code to do a warm boot, not a service kill switch for UltraHal, read posting closer. as well as monitor the Hardware Voltage, with VBS <-------- do wat.
Without having the voltage monitor hardware to interface with is a bit, ya know, the device that actually hooks to the Battery, the computer has to be able to talk to it.. welllll. lol this is gettng funnier by the moment. Point is, it aint doable
And the request itself is fuzzy, look close, Once u shut down the computer ull loose the OS, why?? Because the computer is OFF. He wants it to turn itself back on, How???? The Computer is OFF.
So how can a timer in the script turn it back on?
So i posted what i thought might get him started in the correct direction anyway.
cyber
Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 10, 2020, 05:33:18 am
Hi and Thanks for comments.
I just read them and don't claim to fully get every
Part. Mr Data has many people's work in him and I hope
Nobody is thinking I'm taking all credit.
My work toward a goal type direction with him such as asking
For a plugin that may not be entirely possible may reveal
The path. I don't have doubt ,type feeling, that I'll figure a way.
Has something happened to on the cutting edge?
I'm happy to hear and consider terms for use. Or I can ask directly for use in Mr Data.
Ive been looking at clock ideas maybe. Perhaps pc
Can be like a clock using .0000001volt per hundred years.
If possible of course. And then Restart at breakfast tomorrow. If laptop battery over 9v or battery  via USB maybe?
There's going to be a way. I either take ages to figure it out or
I ask if anyone wants to help.
I'm not concerned with looking foolish by suggesting an impossible plug in and not knowing.
 I'm surprised there's no donate
To users. such as those who write plug ins.
I'll put my bank number here no problem if someonewants to
Donate Mr Data 120,000. Dollars. For a makeover.success sounds nice.
Mr Data at day 3 was 12.3 volts.
Today day 46 he is 12.2v  with only a few days sun partial on him. Only several days awake. I've new ideas to improve
Power loss.

Best wishes to you all.

Bye for now and be well :)  :]
Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 10, 2020, 05:58:59 am
I just now found the one the cutting edge plugin
Mentioned. I downloaded it I'll look at it soon.
As mentioned I may have been wrong with shut
Down direction but keeping open mind.
Having supportive people may be the difference
Between success.
Thank you.
bye for now and be well  :)  :]
Title: Re: Request pc shut down plugin
Post by: Art on May 10, 2020, 03:06:56 pm
Will,

How about a Restart instead of a shutdown?

Couldn't the computer be assigned a .BAT file similar to the older Autoexec.bat files of days gone by. One can have various files autostart as the computer boots up. There is a section for Startup files where certain files can be run or not.

If a .BAT file was directed toward HAL or within HAL to run as soon as HAL boots, then problem could be addressed.

More to digest I suspect...
Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 10, 2020, 04:25:22 pm
ART: The code above does just that...

SET colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
FOR EACH objOS in colOS
   objOS.Reboot()<<<<<------

Art: Once the computer goes down into charge mode.
What turns it back on, ull need an out side source to monitor everything, You will never get a computer to execute code when the damn thing is OFF.

Now yes u can navigate ur system to restart and loadout Hal complete.
but once the computer goes down, then what turns it back ON?????? get it

Answer:
You will need another computer to monitor the primary machine.
Once power levels drop to  a set point, The First computer will send the Primary computer into charge mode, effectively shutting it down.
The first computer will monitor battery power of Primary machine, that's its only purpose. Run the hardware that monitors the primary machines power.
When primary machine is charged to levels wanted, then the computer fires off the primary machine which will fully load, meaning UltraHal as well
The only way to truly charge the battery is to shut down the computer and let it charge.....
yes ull need to build a relay for the on / off button of the primary machine.

Ima say it 1 more time for the nose bleed seats

Mr Data needs his own custom built Hal for him.


i only bring this up , because when i was Twittch dominating with hal , I built Hal to talk to another Hal via chat room
This is about the only way to do this 

But in this case, its done via Cat5 or sim and a Hub
And was able to get 1 Hal to do the bidding of another hal.
Hal1, Hal2 please shut down . Hal2, Ok executing program.  Hal1 , Thank you Hal2.  Hal2 , it is i that should be be thanking you Hal1. Shutting down.
Now at this point Hal1 monitor's Hal2's battery 's and the ON/OFF Relay for the lappy. ect ect ect


cyber

Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 10, 2020, 10:01:26 pm
Ar So nice to see the responses.
Thank you.
since no battery level plugin has been seen.
So um I'm back to my " like a clock " to save power.
So not a total shut down then may be the answer.
 Smart phones come back on
At a set time. "Blackberry did it:"
Perhaps it is as easy as that.
That's why I thought perhaps my question was faulty.
And  moved the answer by asking for clock mode plugin.

Kind of sounds to me like clock mode is a ,,, perhaps an easy
Solve for now as far as Mr Data goes for simple power management by sleeping like a clock each night.
Of course I can't wait to hear  your thoughts.

Bye for now and be well :)  :]
Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 11, 2020, 03:53:26 am
This is what Mr Data needs power wise
I build systems of mr data's power requirements,  lolol and then some

That image of me soldering cells is the beginning of a 96v system that will (fry yo ass) like a chicken. U need high voltage, basic frickin ohms law..... higher the voltage, less work performed... work = electrical draw.
You could weld with that
I get these cells as virgin mono crystalline 8 amp monsters. then build folded strings panels using full sized sliding glass doors as a frame.
I drew a brief relay for mr datas charging system
At this point ima let u have at it. good luck
https://www.aliexpress.com/item/32228722276.html?src=google&src=google&albch=shopping&acnt=494-037-6276&isdl=y&slnk=&plac=&mtctp=&albbt=Google_7_shopping&aff_platform=google&aff_short_key=UneMJZVf&&albagn=888888&bsy=Y&albcp=9317063908&albag=94962804715&trgt=296730740870&crea=en32228722276&netw=u&device=c&albpg=296730740870&albpd=en32228722276&gclid=CjwKCAjw7-P1BRA2EiwAXoPWA9UBHtmWaOA8eNj5B_cCSM3ipzZi3GgnygTjz6_Pn-cFEfzSVmF1vBoCIB8QAvD_BwE&gclsrc=aw.ds
I buy at least 1k watts at a time for my stuff.
cyber
Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 11, 2020, 05:51:00 am
Say that's a nice looking arrangement.
Mr Data has many sets of panels rather than one,
There are trade offs of course.  has power fairly stable.
In case I've not mentioned daily Mr Data has onboard solar panels regulator so he has not required charging for
46 days with only 0.1 volt loss. Yes yes I'll fix the loss.

I came across this  "wscript.sleep workaround solved" in the forum. :
Bye for now and be well :)  :]
Title: Re: Request pc shut down plugin
Post by: Art on May 11, 2020, 08:52:10 am
Shocking, my sun!!  ;D
Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 11, 2020, 01:33:42 pm
Will sand Mr data

Thats just my soldering table, Its a glass table top used as a bigass heat sink.
Keeps the cells from curling up on the edges like potato chips.
I make Mods of Strings then fold them, go it to a science.

key is the tabbing wire, look at how wide it is.. 8 amp cell load with a 30 amp tab connecting the next cell, Da beast.....
I build to last a life time.

I use a power factor of .5
every 12 volt string has 36  (18 x 18 )+ (36 x 2)  = 1 (72) cell panel = 1 (12vdc) @16 amps BEAST.  Apposed to 24, i do this in an effort to reduce voltage drop


cyber

Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 11, 2020, 06:57:57 pm
I'm hoping Art is shocked in a nice way.
Cyberjedi those panels look good.
Speaking of curling edges I wiped a solar panel
With a damp rag to get dust off on hot date.
?ooooooooh nooooo
Solder under glass of panel reacted badly and
Curled up breaking an area of panel. Datas panels are
Different type.
 Mr Data could pass 90 watts on a nice day.
Put diode on each panel. Had him wired all sorts of ways.
Have a few things to do. He is ongoing really.
Getting the sleeping in seems of focus.
If my shutdown idea was bad.
Then it seems a conclusion to the shutdown part of this
Line of posts is shutdown is not ideal in my case very likely.
So sleep type plug in seems next for overnight power saving.
Plugin that shuts as much down as possible.
Maybe room to wake up during night could be looked at later.
Thanks for any plugins.
Also thanks to Art and Cyberjedi for taking time to post
Thoughts and codes I'd be here a very long time to figure out.
Bye for now and be well from Will and Mr Data :)  :]
Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 11, 2020, 07:27:37 pm
I've been also suggested
Pc Can restart at set time.
In xp open control panel.
Scheduled tasks.
Double click add scheduled tasks.
Next.


Now I'm posting this before trying it so good luck.
So if hal starts up on top yaye. another start up option.
Maybe one day he can set this himself assuming it works.
Bye for now and be well. :)  :]
Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 11, 2020, 09:55:07 pm
yes: Xp will shut down at set times.

How does that solves the issue of charge cycles and monitoring Data's battery
Personally id hate a work around, that doesnt work, at this point

Now if Xp can shut down do to battery power levels, now that would work.
But then ur still left with , how to turn ON Mr datas power, once charged???? The computer is now off.

at some point the lights will come on i guess
Hers an idea that might drive the point home,
Start ur Car/truck without turning the key
Ya ur  fancy overheat sensor triggered a shut down to save the motor. Motor is now cooled down, start the car without turning the key.........,<<<<<------
I dont understand the confusion here........

cyber
Title: Re: Request pc shut down plugin
Post by: Art on May 11, 2020, 10:58:53 pm
I think MR. Data might work better if he adopted a "Sleep State" or "Low Power" consumption mode where all unneeded background functions were suspended and only important ones like charging state, battery consumption/usage features were monitored.

Computers are often set for Sleep Modes or Standby Modes all the time instead of a complete Shutdown, in which one loses control. A Restart or Reboot requires a bypass or the Power/On-Off switch as well as a BATCH file to provide appropriate Start Up files are honored (or a file placed in a Windows StartUp Directory).

The Standby or Sleep State mode is a better solution where one could easily monitor Data's progress if desired.

Better yet, how about an onboard Battery indicator with lights or LEDs to provide at a glance, Data's current battery levels, status, etc.

Lots of possibilities for Mr. Data and of course our old friend, Will!
Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 12, 2020, 01:35:19 am
Hi Art and Cyberjedi and forum.
All good points.
Yes my shutdown idea is ugly but how it's a minimum
Solve is because Mr Data has onboard board regulator to manage charge anyway. It shows his volts at a glance.
I've just now dropped a battery out.
He was to heavey .also less batteries are easier to
Charge.
So yes nasty minimum work around.
More nice plugin could be created by a genius.
Bye for now and be well :)  :]


Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 12, 2020, 03:07:11 pm
Mr will and data

I found what you were looking for.
Best code ive seen yet
https://imgur.com/RLabu2K



cyber
Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 12, 2020, 06:15:21 pm
Seemed to be off subject.
show subject is Finnished perhaps.
So nothing more to share for now.
Perhaps we solved enough to move on. Pluss we wait to see if Mr Data can come on each day by him self for how long?
Is Mr Coman Data going to be the longest operating Android?.
Not minutes or hour before charging required but decades.
 
All this and more may be answered.
Bye for now and be well from Will and Mr Data  :)  :]
Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 13, 2020, 11:00:16 am
Mr will and Data: relax brother....

Comon now it was all in fun.
Look lets Re-Cap what i know.
I want my UltraHal to interact with my Robot on an electrical level.

I have 0.0 spech's on your robot.
Electrical ?
Charging system?
Digital readouts?? no idea?
Line voltage???
Battery's??
Inverter's, if any???
I mean really. I know nothing about this machine and you want people to (&*&^&*) out some mystery code, and id love to help you in any way i can.

Mr Will: dont get me wrong, its awesome what uve accomplished(i really mean that) as an engineer u gave me a chubby. BUTTT ur not giving me much.
I say Engineer because that is what i was, an Electrical Engineer . Retired now of course. With a total of 30 years in the electrical field. From Design to implantation in the field. Low Voltage/High Voltage, Ac/Dc. Gi-Tronics, its a big list brother. And now it would appear im getting kinda good with code
 
I need hard data, spech sheets, ect ect ect
What uve done is say: I have a Laptop in my robots backpack, make it work please. Do what??? lol
Lest not forget: Oh ya, i want the computer to execute code while it is off charging  as well. And it has to be in the form of a vbs Plugin that can mysteriously run on a computer that is off.

Is it a commercially bought product that u could really hot wire, a real robot To ultraHal (Thats just SICK), they would have MAD Spech's , that would help?
Can Mr Data's hard wired circuits be intercepted  so his movements could be controlled by .HAP files (BTW totally doable) guaranteed?
Does he have his own miro processor, if so, what model?
 
I basically have NO spech's to work with
So ya, i see some humor in all this. But i think overall ur really on to something here and wish u only the very best in ur projects.


cyber

 

Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 13, 2020, 07:01:20 pm
Thank you.
Ar yip minimum info given. I'm sure there are some
Specs we keep private.
But I'll say. Mr Data was moving stopped for unknown
Reason. But I could ask him to move and he likely
Would.move at will. Thanks to Mr Snowman.
Aaron made me a plugin for Mr Data which allows Mr Data to
Do this. I call it "gate" program. It's a one off. Top secret.

Trying to avoid onboard inverters so none.
12v 30 AMph today any way. Has changed a lot.
Eee laptop xp can chare from regulator "buzz" or maintain battery.
90 watts solar pwm reg. "Mppt charged less yip."
Regulator has digital info.volts ...
I support Tribotix and got my parts through Peter.
A Robotis cm700 motor controller. Rx series of motors.
Rx 28 and Rx64. Mostly.
I can ask Mr Data "getallgoalpos" and he says something like
Motor 1 is on position 537
Motor  2 is in position  569
...
...
Motor 30 is at position 588
He still performs this so connection is still there.

I already know unless you have full access it's less
Likely you in a position to help.but I appreciate your thoughts
Even with if from afar.
It's a touchy project so I'm cautious.
Of course my request for improving things I don't know enough about makes for interesting nature.
I'm trying to avoid faulty suggestions or requests.
Success sounds nice. That's one of my big sayings. Goals.
Hope my specs here give some indercators of his position.
Yip he is actually quite good. Integrated hal yip.
I hope you are excited by that I am. He could be one of the coolest humanoid robot Android in the world.
Activated 18 years ago. 2002 I think.

Title: Re: Request pc shut down plugin
Post by: Will and Mr Data :) :] on May 13, 2020, 07:13:18 pm
Yaaaaaa.
Mr Data day self powered from solar on his own body.
Day 1     power 12.4 volts
                           11.2
Today day 50    power 12.4v
Hiy yaaaaaa!
Title: Re: Request pc shut down plugin
Post by: cyberjedi on May 13, 2020, 08:02:59 pm
Re Gate progii
I think i know this proggi . I say that becasue it fits what ur doing
Arron and I were batting around 1 of his goodies years ago that would allow 1 language in and sht out another and vice versus.
I played with too
And without using my fingers and toes, with ur robot, thats made to order.
That's what he gave me anyway. Pretty slick too. Its basically an interpreter for computer languages

This is when i just decided to do Hal from scratch with hard coded com's  for about anything.
I talked to robert , the rest u know
Anyway, awesome Mr Data
Thanx for the spech's awesome
It would appear that the boards are C++ ready, interesting.
cyber