Fire Alarm Test logger

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
wwonderfull
 
 
Posts: 1255
Joined: Fri Aug 21, 2020 8:27 am

Re: Fire Alarm Test logger

Post by wwonderfull »

jerryco wrote: Mon May 22, 2023 8:35 pm If it helps saying, great respect for seeing this as a community project/challenge!
I think I did some experiment, and I was able to do it in wysiwyg web builder using the file attachment tool. Although custom scripts had to be used all the input fields and buttons where from wysiwyg so it had no connection outside other than the scanning script which I can also do it local too. It filled up date and time automatically and even had qr reader which could read qr code and get text and that text would then on click get transferred to a box and SUBMIT. It uses built in camera so no hassle and another thing is that it can take pictures from phone storage and scan too. The database then gets the date, time and tracked qr code. Was an interesting challenge which I liked to scratch the head for :D
stewbow
 
 
Posts: 11
Joined: Sun May 14, 2023 6:57 am

Re: Fire Alarm Test logger

Post by stewbow »

mfirlotte wrote: Mon May 22, 2023 1:49 pm I took this on as a challenge as scanning and creating QR Codes is NOT a simple matter.

The "Create a Property' button asks for a few inputs and optionally asks for a picture of the 'property'. If none is uploaded, a dummy image is used. When submitted, the form automatically creates a Web Page for that property and automatically creates the QR Code. The page also has a placeholder section on the bottom for 'Visits to Date' that automatically updates when the property QR code is next scanned. Then it automatically displays the property page. All of the property data is saved to a CSV file.

The 'View or Scan a Property' button lists all created properties with two buttons. The 'View' button displays that property page along with the listing of any scans to date. The 'Scan' button brings up a QR Code scanner page that opens a scanner, requests permission to access the camera (can also change which camera like front or back on a mobile) and a Start/Stop button. As the QR Code comes into the rectangle, it's frame will flash green then automatically load that property's web page with the 'Visits to Date' section on the bottom updated to include this scan. All of the visit data is saved to a CSV file.

The 'Reports' button provides some crude reports such as 'All Properties', 'All Visits', 'All Visits by Date', 'All Visits Between Dates', and finally, 'Print a QR Code'. For the last report, it prints out all properties and their QR Code. Once displayed, one would only have to print this page then cut out and tape the QR Code to the alarm or property.

Not perfect but I wanted to see if I could create and scan QR Codes. Quite the challenge.

Note that the test site listed below is only a test and may not stay where it is for too long.

Here is my 'test' application: https://www.firlottecreations.com/firea ... index.html

NOTE: I did not make this responsive to save time so best viewed in LANDSCAPE on a mobile.
Hi

This is very very good and basically does what I had in mind, thank you so much for the time and effort that guys are putting in.
So lets take it a bit further!!

How about a page that lists all of the Properties with maybe a Tick Box next to each one.
Ideally there would be a "week commencing" display and as each property is visited and scanned the tick box would automatically show ticked.
The weeks could then be searched, saved and printed if necessary.

Also would it be possible edit the property and other details and could they be deleted if required and finally........Could access to the results be restricted or controlled?

Stuart
User avatar
jerryco
 
 
Posts: 826
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: Fire Alarm Test logger

Post by jerryco »

Nothing beats a good thorough customization especially when you already know what will work.
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->

Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
wwonderfull
 
 
Posts: 1255
Joined: Fri Aug 21, 2020 8:27 am

Re: Fire Alarm Test logger

Post by wwonderfull »

stewbow wrote: Tue May 23, 2023 6:33 am Hi

This is very very good and basically does what I had in mind, thank you so much for the time and effort that guys are putting in.
So lets take it a bit further!!

How about a page that lists all of the Properties with maybe a Tick Box next to each one.
Ideally there would be a "week commencing" display and as each property is visited and scanned the tick box would automatically show ticked.
The weeks could then be searched, saved and printed if necessary.

Also would it be possible edit the property and other details and could they be deleted if required and finally........Could access to the results be restricted or controlled?

Stuart
MySQL CRUD or CSV CRUD is the only tool available to edit tables in database and data tables viewer can view them. Both has some kind of filtering option but checkbox automatically checked may not be possible according to the extensions capability.

Pages can be restricted with single page protect or even login.
User avatar
mfirlotte
 
 
Posts: 141
Joined: Tue May 12, 2020 5:09 pm
Location: Quebec, Canada

Re: Fire Alarm Test logger

Post by mfirlotte »

Hi stewbow.

My code was just an experiment and a challenge to test coding of creating and scanning QR Codes.

I do not plan to extend it or add to it.

As a retired application developer...I always told my clients that before one starts coding, one needs well defined and quite complete User Requirements. Without these, the coder is just guessing what the client wants and ends up writing code that's hard to fix thereafter as it was not planned out and functions are being added or changed adhoc.

My advise would be to write good User Requirements and then find a developer to execute for you. Or hire the developer first and work through the User Requirements together.

Most of us here are prototyping without having detailed User Requirements and then the developer ends up with what we used to call "spaghetti code".

An example of detailed User Requirements could look like (https://web.cse.ohio-state.edu/~bair.41 ... ample.html). Some are less detailed. It all depends on the scope of the application requirements.

Thanks for the encouragement.
====
Mitch
====
stewbow
 
 
Posts: 11
Joined: Sun May 14, 2023 6:57 am

Re: Fire Alarm Test logger

Post by stewbow »

mfirlotte wrote: Tue May 23, 2023 6:05 pm Hi stewbow.

My code was just an experiment and a challenge to test coding of creating and scanning QR Codes.

I do not plan to extend it or add to it.

As a retired application developer...I always told my clients that before one starts coding, one needs well defined and quite complete User Requirements. Without these, the coder is just guessing what the client wants and ends up writing code that's hard to fix thereafter as it was not planned out and functions are being added or changed adhoc.

My advise would be to write good User Requirements and then find a developer to execute for you. Or hire the developer first and work through the User Requirements together.

Most of us here are prototyping without having detailed User Requirements and then the developer ends up with what we used to call "spaghetti code".

An example of detailed User Requirements could look like (https://web.cse.ohio-state.edu/~bair.41 ... ample.html). Some are less detailed. It all depends on the scope of the application requirements.

Thanks for the encouragement.
Hi Mitch
Sorry, I've got a huge apology to make to you.
I've suggested additional functions before I have delved into what you have already achieved, lots that I hadn't noticed, once again sorry!!

The program is great.
Is there a way that we can come to an arrangement wheras I can use it?
At the moment I chose View or Scan Property, allow the camera permission and select the camera to use.
I have printed off a couple of the QR codes, but when I scan them my phone does a search of the ID Number of the property, it doesn't take me to the property page.

Stuart
User avatar
mfirlotte
 
 
Posts: 141
Joined: Tue May 12, 2020 5:09 pm
Location: Quebec, Canada

Re: Fire Alarm Test logger

Post by mfirlotte »

Hi stewbow...
Is there a way that we can come to an arrangement wheras I can use it?
At the moment I chose View or Scan Property, allow the camera permission and select the camera to use.
I have printed off a couple of the QR codes, but when I scan them my phone does a search of the ID Number of the property, it doesn't take me to the property page.
1st Question. Yes...I will wrap it up in an extension and post it here for you to use....FREE. But I do not plan to enhance it further or add further functionality. Basically it's a use as-is with no warranty. Once you have it published via WYSIWYG Web Builder to your server, you can always go to the 'properties/' directory via FTP to view and or edit the '-properties.csv' or '_visits.csv' files. They are simply text files with one row per entry with the data elements separated by commas. The extension when 1st published will place empty CSV files into this directory...so no properties and no visits. Same for property pages. They are only created and saved when you "Create a property'.

2nd Question: Works fine for me BUT...I did note an error. In the "_properties.csv", which is the database for this app (as noted above), I noticed that 'The Haven' property was entered twice, the 2nd entry caused an error as it was a duplicate and the web page was not created. An error I did not trap. As I mentioned, I simply opened the '_properties.csv' file and deleted that line. Try it again.

As you test your properties, you can always start FRESH by using the 'RED" button (DANGER) that I added to the index page that will flush the properties directory and reset the properties and visits databases to empty.

I will post the extension shortly for you to use.

And thanks for the apology...no problem.
====
Mitch
====
stewbow
 
 
Posts: 11
Joined: Sun May 14, 2023 6:57 am

Re: Fire Alarm Test logger

Post by stewbow »

Thank you, can't say it enough

Stuart
User avatar
mfirlotte
 
 
Posts: 141
Joined: Tue May 12, 2020 5:09 pm
Location: Quebec, Canada

Re: Fire Alarm Test logger

Post by mfirlotte »

Hi Stuart...

Okay...I loaded it up into an extension and added a Demo project. There is a README.txt in the zip file with some instructions and my previous disclaimer.

I hope it works for you. If not, it'll give you an idea of what can be done.

Download zip file from here: https://www.mediafire.com/file/lufum7en ... r.zip/file

A temporary Login User Name/Password is in the README file.

Enjoy.

Small Note: I removed the "Flush Database" button/function from the app as it created several ripple bugs that I do not have time to fix. To start again with empty databases, simply republish the project or if you're comfortable with FTP, just drag/drop the "_properties.csv" and "_visits.csv" files from your local computer to the "properties/" directory on your server. And to really cleanup so you do not create duplicate property, image, or QR Code files, you should also delete any other page or image from this directory but DO NOT delete any of the 4 files that start with an underscore (_).

UPDATE: Found the "Flush" button bug so put it back into the app. Download link above has been changed to this updated version of the app. SO now, if you wish to start testing over, the "Flush" button will delete everything from the properties directory and return it to its defaults. This way, you do not have to republish the entire app to get back to ground zero.
====
Mitch
====
stewbow
 
 
Posts: 11
Joined: Sun May 14, 2023 6:57 am

Re: Fire Alarm Test logger

Post by stewbow »

Ok, done the download, but ran out of time, the wife's just come home :D
cheers
Stuart

I'll keep you informed
stewbow
 
 
Posts: 11
Joined: Sun May 14, 2023 6:57 am

Re: Fire Alarm Test logger

Post by stewbow »

Hi Again
I'm still learning and struggling to get the program to work.
This is the process that I have gone through.
I have uploaded to http://www.abbey.me.uk/mf-test-scanner/
Hitting the Login Button takes me to http://www.abbey.me.uk/mf-test-scanner/access.html
The, selecting Start Property WQ Sanner takes me to http://www.abbey.me.uk/mf-test-scanner/mf-start.html and says 404 NOT FOUND.

I'm obviously doing something that isn't quite right

Stuart
User avatar
mfirlotte
 
 
Posts: 141
Joined: Tue May 12, 2020 5:09 pm
Location: Quebec, Canada

Re: Fire Alarm Test logger

Post by mfirlotte »

Try to Republish and ensure you have options for 'Entire Web Site' selected as well as "Publish all files" selected.

I just uploaded and ran the demo for myself and it works just fine.

Can you FTP to that directory and see the mf-start.html file? If not, then republishing should fix it.
====
Mitch
====
stewbow
 
 
Posts: 11
Joined: Sun May 14, 2023 6:57 am

Re: Fire Alarm Test logger

Post by stewbow »

Yep, Got it, apparently I was only uploading the html files instead of all files, or something like that.

thanks

again

Stuart
stewbow
 
 
Posts: 11
Joined: Sun May 14, 2023 6:57 am

Re: Fire Alarm Test logger

Post by stewbow »

Asking for camera permissions it tells me Camera access is only supported in secure context like https or localhost.
User avatar
mfirlotte
 
 
Posts: 141
Joined: Tue May 12, 2020 5:09 pm
Location: Quebec, Canada

Re: Fire Alarm Test logger

Post by mfirlotte »

Yeah. Your web site needs to be secure (https) to access the camera. You’ll need an SSL certificate from your web host. I can’t fix that.
====
Mitch
====
Post Reply