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
stewbow
 
 
Posts: 11
Joined: Sun May 14, 2023 6:57 am

Fire Alarm Test logger

Post by stewbow »

Hi, this is my 1st post, please be gentle : :D
I visit approximately 100 properties each week to test their fire alarm systems, and put an entry into their log books.
What I would like to create is a simple 'log in and store the time and date for each visit at each property' web site.
I was thinking that a QR Code mounted on each fire alarm panel could be scanned, this would take me to a web page for that particular property, a box is ticked and off I go to the next property.
Then at the end of the day all of the properties that I have visited would each have a web page showing the time and date of that visit.
As the weeks and months go on, I would like to be able to display and print a list of all of the visits showing the time and dates.

I have seen a site that sells complete on line log books, but it covers far to much information for what I need, I basically only want to Scan, Click and Leave.

I would be incredibly grateful for any advise or help as to how this could be achieved

Stuart
wwonderfull
 
 
Posts: 1255
Joined: Fri Aug 21, 2020 8:27 am

Re: Fire Alarm Test logger

Post by wwonderfull »

Do you have any example of what kind of site you are wanting? I just think this might require custom scripts.
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: Fire Alarm Test logger

Post by BaconFries »

The initial layout of your site and its pages can be created using one of the following methods.
Which layout mode should I choose?
viewtopic.php?t=76722
As you mentioned a login see the following links
Adding a login to your web siteRelated
https://www.wysiwygwebbuilder.com/login_basics.html
Getting started with the Login Tools
https://www.wysiwygwebbuilder.com/login_tools.html
The above two links will assist with the login but you will need apply a custom script for what you write Scan the QR, Save to the likes of a database then call this from the database to be displayed on each of the pages. With this you will need knowledge of php and database programming as this is outwith the scope of the forum to assist with and if unsure you may need to pay/hire for this.
User avatar
onlye
 
 
Posts: 366
Joined: Sun Jun 17, 2018 12:36 am
Location: Gluckstadt, MS USA
Contact:

Re: Fire Alarm Test logger

Post by onlye »

Not to oversimplify, but you need an input form that saves to a database. Then you need to report or list the records from the database.
It might be as simple as creating a MySQL database and using one of the CRUD (Create, Read, Update, Delete) extensions to maintain the records. You would then use one of the DataTable extensions search capabilities to search and sort the records. Say search by Location ID and sort by date.

I have done something similar on several sites to display a list of organization members via DataTable and maintain the members via CRUD.

While not a full-blown application, this approach would probably take just a few hours to set up. Be happy to assist.

https://wysiwygwebbuilder.com/datatables.html
https://wysiwygwebbuilder.com/mysqlcrud.html
onlye
Gluckstadt, MS USA
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: Fire Alarm Test logger

Post by BaconFries »

To carry on from this with the need to scan the QR Code first then send to a database for displaying in the page using one of the extensions mentioned by onlye. See this example of a form using a single input and a qr reader that when you select scan qr code it opens your cell/mobile camera to scan any qr code you choose to tryout and on submit the information is sent. Note this is only an example for demonstration to what I wrote so show how it could be achieved.

Another note for this if you can implement something similar using a QR Code reader (the form) I would place on a protected page that only you can access with a login so that only you can scan codes and no-one else to simply protect data in the database.

https://form.jotform.com/83523881079970
User avatar
onlye
 
 
Posts: 366
Joined: Sun Jun 17, 2018 12:36 am
Location: Gluckstadt, MS USA
Contact:

Re: Fire Alarm Test logger

Post by onlye »

BaconFries wrote: Sun May 14, 2023 1:34 pm To carry on from this with the need to scan the QR Code first then send to a database for displaying in the page using one of the extensions mentioned by onlye. See this example of a form using a single input and a qr reader that when you select scan qr code it opens your cell/mobile camera to scan any qr code you choose to tryout and on submit the information is sent. Note this is only an example for demonstration to what I wrote so show how it could be achieved

https://form.jotform.com/83523881079970
Taking BaconFries a bit further, here is a jotform with a location field and an auto-populate for the date and time. The QR code at each location could be the location code. So open the form (saved in your browser on your phone) The first field is the location, so scan the QR code. Then hit submit and you have created a record in the database with Location, Date, and Time.

https://form.jotform.com/231333638175052
onlye
Gluckstadt, MS USA
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: Fire Alarm Test logger

Post by BaconFries »

Excellent onlye. As you can see stewbow it is possible but as previously it will require a custom code to achieve. The two examples are not of the software unfortunately but are from jotforms but any external scripts can easily be implemented into the program using the following tool HTML Object and onlye has kindly offered his help if you require it.
stewbow
 
 
Posts: 11
Joined: Sun May 14, 2023 6:57 am

Re: Fire Alarm Test logger

Post by stewbow »

onlye wrote: Sun May 14, 2023 1:58 pm
BaconFries wrote: Sun May 14, 2023 1:34 pm To carry on from this with the need to scan the QR Code first then send to a database for displaying in the page using one of the extensions mentioned by onlye. See this example of a form using a single input and a qr reader that when you select scan qr code it opens your cell/mobile camera to scan any qr code you choose to tryout and on submit the information is sent. Note this is only an example for demonstration to what I wrote so show how it could be achieved

https://form.jotform.com/83523881079970
Taking BaconFries a bit further, here is a jotform with a location field and an auto-populate for the date and time. The QR code at each location could be the location code. So open the form (saved in your browser on your phone) The first field is the location, so scan the QR code. Then hit submit and you have created a record in the database with Location, Date, and Time.

https://form.jotform.com/231333638175052
Wow
Thank you so much for taking time out to give your assistance.
These examples would be perfect. I do agree that there needs to be some restriction of access.

Moving forward, I don't have the time or brain capacity to learn how to do this.
Is there a way that anybody could help with the creation of such a web site?

I am absolutely happy to pay, or donate to a charity of someones choice or whatever!

Stuart
User avatar
onlye
 
 
Posts: 366
Joined: Sun Jun 17, 2018 12:36 am
Location: Gluckstadt, MS USA
Contact:

Re: Fire Alarm Test logger

Post by onlye »


Wow
Thank you so much for taking time out to give your assistance.
These examples would be perfect. I do agree that there needs to be some restriction of access.

Moving forward, I don't have the time or brain capacity to learn how to do this.
Is there a way that anybody could help with the creation of such a web site?

I am absolutely happy to pay, or donate to a charity of someones choice or whatever!

Stuart
Stuart, as BaconFries and I kept knocking this around it sorta developed. I'd be happy to help you with it. Do you have a hosting account for the website? please contact me at eric@onlye.org and we can discuss.
onlye
Gluckstadt, MS USA
User avatar
onlye
 
 
Posts: 366
Joined: Sun Jun 17, 2018 12:36 am
Location: Gluckstadt, MS USA
Contact:

Re: Fire Alarm Test logger

Post by onlye »

Ok, here is the rough draft: two pages, one to log a test and one to view the logs.
On the log page, manually enter a location, then submit. The date/time defaults to current, so there is no need to enter it.
Going to research how to scan a QR code for the location. My first Wizzy form so not sure if/how to do that. Jotform has a widget for that.

https://onlye.org/postweb/fire/index.php
onlye
Gluckstadt, MS USA
MGD4me
 
 
Posts: 287
Joined: Tue May 02, 2017 11:56 pm
Location: British Columbia, Canada

Re: Fire Alarm Test logger

Post by MGD4me »

Going to research how to scan a QR code for the location
Perhaps an alternate approach would be to create a QR code for each location, which would simply contain the URL to the form, PLUS the location code.

Eg: http://domain.com?location=XXXX

Just use the normal phone camera, or a QR reader to scan the QR code at each location. This would pass the location code to the form, which could be read back into the form. Press submit... done.

Just a thought. :D
User avatar
mfirlotte
 
 
Posts: 141
Joined: Tue May 12, 2020 5:09 pm
Location: Quebec, Canada

Re: Fire Alarm Test logger

Post by mfirlotte »

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.
====
Mitch
====
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: Fire Alarm Test logger

Post by BaconFries »

@mfirlotte Very nice indeed...
User avatar
mfirlotte
 
 
Posts: 141
Joined: Tue May 12, 2020 5:09 pm
Location: Quebec, Canada

Re: Fire Alarm Test logger

Post by mfirlotte »

Thanks BaconFries.

The Create and SCAN QR Codes section were quite challenging. PHP libraries for Create are numerous and freely available. However there seems to be only ONE Scan library and it's quite complex to use and took me a few days to get it where it is on my test app.

Fun though.
====
Mitch
====
User avatar
jerryco
 
 
Posts: 826
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: Fire Alarm Test logger

Post by jerryco »

If it helps saying, great respect for seeing this as a community project/challenge!
// 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 »

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