Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


3 Screenshots

About This File

This is JavaScript code, which displays debug information (in parallel to code development) at full screen on desktop (supports HC2 and HC3 controllers)

Main purpose is to support scenes where debug information is in HTML format, like  All-in-One Scene, Z-wave monitor/viewer, Z-Range analyzer . All other formats will be displayed in same format as in debugger window.

Since HTML format is not supported by HC3 and debugger window is too small, it could be a helpful alternative for better view and debug your code.

In many cases variables values include a lot of information (like jSON table) and it couldn't be reviewed by HC interface, this application offers to display Global variables (including QuickApp variables) on "big" screen.

Follow information and features are supported:

  1. Display debug information of selected scene. (HC2)
  2. Display scenes debug information filtered by messages tags including levels (trace, warning,error). (HC3).  Note: Currently all scenes print info in same debugger. Issue reported to Fibaro Group - in Progress.
  3. Start scene. (HC2/3)
  4. VD main and buttons' debug information. (HC2)
  5. Select and Press VD button. (HC2)
  6. Display current value of selected global variable. (HC2/3)
  7. QuickApp debug information. (HC3) . Note: Currently when debug info is loaded it clears debug info from HC3 debugger window.
  8. Display current value of selected QuickApp variable. (HC3)
  9. Turn On/Off (toggle method) QuickApp (HC3)
  10. Select and Press QuickApp button. (HC3)

Note: Since HC3 doesn't support HTML format anymore, this is the only option to view and analyze information on upcoming All-in-One Scene and Z-wave monitor applications.

After downloading the file  please remove .txt extension.

Currently supported browser are  Firefox, Chrome or IE browsers.

Recently Java Scripts are blocked by Cross-Origin Resource Sharing (CORS) mechanism, please download Disable CORS file  for further instructions how to disable CORS.

 

How it works:

Before execution, open the file to define HC IP-address and HC3 transfer protocol at User Configurable Parameters

// ============= USER CONFIGURABLE PARAMETERS ================
var hcip={"HC3":"192.68.0.10","HC2":"10.0.0.69"}
var protocol={"HC3":"https"}

On first run, login information will be required. (To keep your credentials secured, login data is not stored in file )

Application interface is very simple and self-guided.

Select controller: HC2 or HC3

Select item : Scene, V Device, Variable, QuicpApp...

Select item of previous selected section.

Press "Reload" button to load debug information.

By checking debug checkbox, API executed commands are shown.

1. If scene selected "Start" button appears.

Spoiler

Capture.PNG.c4e927d533dcd5b54216ed7fb8e98b20.PNG

 

2. If V Device  selected list of available buttons shown and "Press"  button appears.

Spoiler

Capture.thumb.PNG.69215c5ce11db1ff5707aaf7495a4d8e.PNG

 

3. If QuickAppDevice selected, list of available buttons shown.

"Press" and "Toggle" buttons appear. By pressing "Toggle" button, QuickApp will turned ON or OFF in sequential order.

Spoiler

Capture.thumb.PNG.77fd9048aece24ba60663ef6b494c938.PNG

 

4. If Variables selected,list of available variables shown. By selecting the variable, his current value displayed.


What's New in Version 3.0   See changelog

Released

Per users requests:

  1. On startup local IP is used.
  2. When page loaded, stay on top of the page.

 

 



User Feedback

Recommended Comments

Working on that.... Need to borrow MAC from my wife... not an easy task.

Link to comment
Share on other sites

Don't know if it works, but have found tip how to disable CORS on Sfafri:

Later versions of Safari allow you to Disable Cross-Origin Restrictions. Just enable the developer menu from Preferences >> Advanced, and select "Disable Cross-Origin Restrictions" from the develop menu.

No idea if it works...

Is anyone has knowledge how to do it, please share with forum.

Thanks

Link to comment
Share on other sites

Guest Sankotronic

Posted

Hi @cag014 ,

 

I have done as you instructed on my iMac Safari v13.0.1 and I can report that it works.

 

Since I have already enabled Develop menu I just disable Cross-Origin restrictions, then I edited your html document by entering HC2 and HC3 IP address. After loading script to Safari I had to select V device and back Scene to get selection of scene and then Safari asked me to login to HC2. The rest is working nicely.

 

Thank you again for the great tool! ?

  • Thanks 1
Link to comment
Share on other sites

Guest cag014

Posted (edited)

Thank you for approving that it works on iMAC Safari.

Yeah, I saw this behavior on Firefox as well. The browser remembers the last selection, but the code works onChange() action. This requires to choose something else and then go back.

Will fix it on next release.

Thank again

Edited by cag014
Link to comment
Share on other sites

Hi @cag014,

running here on Firefox Windows 10.

After installing CORS Everywhere, the code runs on HC2, but on HC3 i still get  (Cross-Origin Request Blocked) error.

Link to comment
Share on other sites

Guest cag014

Posted (edited)

Interesting... I'm trying to simulate somehow this error, without success

Could you please open "web developer"  and post network and console screens?

What Firefox version you're using?

 

Edited by cag014
Link to comment
Share on other sites

Guest cag014

Posted (edited)

@Bodyart

Did you set correctly HC3 protocol in code? It should match your setup in HC3->network.

https or http

In code

Spoiler

Capture.PNG.8ca1cf11bae0b90bddc80beff0c3cd8c.PNG

In controller

Spoiler

Capture.PNG.bc41a8f53e390cc653448a7f0da03fe6.PNG

 

Edited by cag014
Link to comment
Share on other sites

Oops.. 74 is a new release... there is a new security policy.. are you sure HC2 works?

Link to comment
Share on other sites

Guest cag014

Posted (edited)

Firefox (74.xx) has blocked http request while running on local files "file:///"...

No workaround have found... yet. I exchange few emails with Cors anywhere developer and looks like it part of browser design and couldn't be disabled.

Three options:

1. Use Chrome (as recommended)

2. Use IE (as recommended)

3. If you can somehow to run the file from local server. In my case I use router as as file server  (https://cag014.asus.com.com/RT-AC87U/MediaHD/hcWebEye.html).  My file located on hard-disk which connected to the router.

 

Many users have submitted tickets to disable this option, hope next Firefox release will have this option.

Let me know if you'll find a workaround for that?

Edited by cag014
Link to comment
Share on other sites

New Firefox release (75.0) works from local file, so no server required.

Hope they will continue to support this in the future

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...