Jump to content

Reading Homewizard P1 meter API v2


Tom Eilers

Recommended Posts

Posted

I have a Homewizard P1 meter, from which I want to read only the power in Watt with LabView. There API version 2 see: https://helpdesk.homewizard.com/en/articles/5935977-integrating-energy-with-other-systems-api uses HTTPS. They have an example to read the P1 with curl (curl https://<IP ADDRESS>/api/measurement --insecure -H "Authorization: Bearer EXAMPLE-TOKEN". With system exec I can read the P1 meter values. My question is it possible to do this in pure LabView HTTP Get/Set and Header vi's and How. In my case I use url:  https://192.168.178.109/api/measurement --insecure -H "Authorization: Bearer 010183D11FD0A5F08990D911BBFF3995"

P1 meter API v2.vi

Posted

--insecure is a curl argument. You don't need to include that in the headers.

You can do the equivalent of --insecure by setting verify server to False when creating the HTTP session.

 

Posted
1 hour ago, Phillip Brooks said:

--insecure is a curl argument. You don't need to include that in the headers.

You can do the equivalent of --insecure by setting verify server to False when creating the HTTP session.

 

Should never do this. Anyone can sit between you and the server and decode all your traffic. The proper way is to add the certificate (public key) to a trusted list after manually verifying and checking it.

What's the point of using HTTPS if you are going to ignore the security?:frusty:

Posted

Thank you. Setting verify server to false did it.

Why Home wizard made there API V2 this way, is not to me. There API version 1 was not HTTPS, but they made new version 2 with HTTPS.

Anyhow if you want to read my electricity meter you need a token first, what is send by the Home wizard P1 meter device after pressing the button on the HW P1 device.   See https://api-documentation.homewizard.com/docs/getting-started

 

P1 meter labview.vi

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   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...

Important Information

By using this site, you agree to our Terms of Use.