Remote connect to MySQL server

Here you are welcome to post Push2Run feature requests
Post Reply
Sandbird
Posts: 5
Joined: Fri May 15, 2020 9:06 am

Remote connect to MySQL server

Post by Sandbird »

It would be really nice if the app could connect to a MySQL database to get the cards. This way the app could be integrated with multiple OpenAI home platforms (like https://www.home-assistant.io/).
You could for example create a webpage in a local apache server to edit/add commands to a lan database using php or NodeJS etc. You could even create a drag and drop type of interface that in the end will produce the mysql query to insert the requested card to the database.
Possibilities are endless. You have a main pc that runs push2run and from then on you can create dynamic interfaces to control it, all through a mysql database. (maybe a reload settings input variable after Xms would also help...in order to 'catch' new changes to the db)
RobLatour
Site Admin
Posts: 1003
Joined: Mon Feb 19, 2018 11:43 am

Re: Remote connect to MySQL server

Post by RobLatour »

The Push2Run database has been built in SQL Lite format, there is nothing preventing you from accessing it now.

However, you will notice all entries are encrypted. This so that the privacy of the database can be safeguarded if copied from one machine to another and in support of the program's password protection feature - which helps maintain the confidentiality of the Push2Run cards. esp. those that have 'keys to send' sequences included, used perhaps by some to send users id, passwords and other potentially confidential information.
Sandbird
Posts: 5
Joined: Fri May 15, 2020 9:06 am

Re: Remote connect to MySQL server

Post by Sandbird »

Yeah, i saw that the db was encrypted which of course is a great thing. I always protect data with SALT keys and md5 encryptions as well.
The only thing is that there is no obvious way on how we can dynamically create rows in the db, not to mention that it is located locally. Via a webserver we can have the same kind of obfuscation AND host the db into a LAN server runing php/nodejs or anything else really providing all the above but also integration with other platforms. Of course all the above would be optional...mysql or mssql.
RobLatour
Site Admin
Posts: 1003
Joined: Mon Feb 19, 2018 11:43 am

Re: Remote connect to MySQL server

Post by RobLatour »

As for dynamically creating a row in the table, the program already automatically opens up .p2r files as Push2Run cards, in the same way Excel opens up .xlsx files for use in Excel.

So one way might be to exploit this to help in the creation of a card for a system (database entry).

For example, click on one of your cards on the main window and while holding the mouse down drag it to the desktop.

Next copy that file to a folder of your choice, for example, c:\temp\test.p2r

Then from the command line, for the purpose of showing how it works, just type the filename

C:\>cd temp
C:\temp>test.p2r

and Push2Run should pop-up the card which the user can click on 'OK' to accept and save in the database, or 'Cancel' to reject.

Of course, the same thing happens if you just double click on the file, but it's perhaps a way to make it a semi-automated process.
Sandbird
Posts: 5
Joined: Fri May 15, 2020 9:06 am

Re: Remote connect to MySQL server

Post by Sandbird »

That would work like you said semi-automated, it would be nice if there was an option to not press OK and it will just import it automatically (like a checkbox in settings)...and then of course a way to delete it by using a console command as well if needed. That would be a neat way of adding commands to it programmatically in a 'hacky' way i guess.
getgonged
Posts: 10
Joined: Fri May 01, 2020 11:14 am

Re: Remote connect to MySQL server

Post by getgonged »

Just wanted to add to this gentleman's response, I wish there was an option in the program to not have the mysql database encrypted. I'm not too worried about encryption for my cards.

The other thing is, it's very difficult to export all the cards. I have to one by one drag each one which takes a very long time. In addition it is a little tricky because for some reason the drag n drop isn't all that responsive so you have to click and drag a few times before a single entry actually drags.
RobLatour
Site Admin
Posts: 1003
Joined: Mon Feb 19, 2018 11:43 am

Re: Remote connect to MySQL server

Post by RobLatour »

Should have posted here some time ago. A feature was added in October 2020 to allow you to export all cards at once as follows:

Main Window - File - Select a directory - Ok.
Post Reply