Menu

Start windows App with command line and execute connect automatically

molino
2021-08-14
2021-09-01
  • molino

    molino - 2021-08-14

    Hello Robert,

    with the goal of achieving pure automation, I want to start my weather monitor (mySQM+) a couple of hours before the night sets in.
    I would like to read info from the boltwood file and for that matter, the windows app needs to be running, thus, is there any way I can start the app and order it to connect automatically in order to get the boltwood file updated in the intervals chose in the app?

    Long story short, a script would be executed to start the app and the app would connect automatically to the hardware, updating the files as previously set up.

    Thanks
    Miguel

     
  • brownrb

    brownrb - 2021-08-15

    Did you read all of the pdf?

    We already can do that.
    Please see mySQMPLUSTCPIPLOGGER which will automate the logging of data to a cloud sensor II file.

    You can just leave it running.

    It only makes a connection to get the data then closes the connection.
    It runs on a timer interval
    If the controller is not running it does not matter - it will keep trying at the log interval waiting for the controller to come back on line

     
  • brownrb

    brownrb - 2021-08-16

    trying to invoke these from a command line is not an easy task.

    These are all microsoft one-click applications. Microsoft stores the files all over the place and in different folders.

    It is not something I would recommend doing.

    There is no harm in leaving the tcp/ip logger app running. It will only attempt a conection to a controller at the interval time specified in the logging tab. If it cannot find a controller, it just goes to sleep till the next interval time. No data is logged if there is no connection. Yes, it generates a CSII file, again that would not be updated until the controller comes on line.

     
  • brownrb

    brownrb - 2021-08-20

    I had another look at this today.
    I used the start menu, when dow to mySQMPRO, highlighted mySQMPLUS and right clicked and that gave me the file location
    C:\Users\rob\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\mySQMPRO

    I then created a batch file runmysqmplus.bat which had these details

    c:
    cd C:\Users\rob\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\mySQMPRO
    mySQMPLUS.appref-ms

    and saved it.
    I then opened a command prompt,
    I then went to the drive/folder where the runmysqmplus.bat was saved
    I then on the command line typed
    runmysqmplus.bat
    and hit enter....

     
  • molino

    molino - 2021-08-20

    Robert,

    I appreciate you help. I confess that the logger skipped me in the pdf since I built your project a while ago and I didn't need this feature by that time. I'll give it a shot with both solutions you presented and let you know the outcome.

    One last thing, my project version has BME280, MLX90614 and rain sensor. I did create a small container for this configuration that I could print in my 3D printer. I'm willing to share either the fusion360 model or a ready to print STL file.

    Are you interested in making this available to the community as another option?

    Best
    Miguel

     
  • brownrb

    brownrb - 2021-08-21

    Hi Miguel
    yes, if you can zip it and then you can add it as an attatchment to the discusson window that would be great. (there is a "add attachemnts" link just above the Post button.

    Cheers Robert

     
  • molino

    molino - 2021-08-31

    Robert,

    sorry, didn't have the time to put the files here until now. STL and SKP files attached. And I didn't test your solution yet. Here it goes, any questions, let me know.

    Cheers
    Miguel

     
  • brownrb

    brownrb - 2021-09-01

    Many thanks

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.