DELETED - OLD/ARCHIVED [APP] Homewizard Energy (stable: v0.1.7 beta: v0.1.7)

Does it have the same name (Homewizard_energy) or is it integrated into the Homewizard App (also made by you)
I can’t find it under the same name, also not with the browser

It is not integrated, it is a whole new app “Homewizard Energy”.
Check the link in the opening post. I keep that post updated with changes and added the Homey app store link.

Got it. Thanks

I’m getting the http: error. It is in the same subnet

Hm that is odd. No spaces behind the ipaddress when you enter it in the app?
I see you have Ubiquiti do you allow wlan inter traffic (WiFi clients are allowed to see each other?
Another test you can do is:

http://192.168.2.159/api/v1/data in a browser (WiFi tablet or laptop browser) and see if the dongle respond with metrics

Hi Jeroen,

No spaces behind the ip.
The inter lan is enabled. I use more WiFi connected devices with homey so that should not be the problem. When I go to http://192.168.2.159/api/v1/data in my browser it says connection refused. But it is connected succesfully to the HomeWizard energy app that reads data from it.

Had the same till I set gebruik ledring on and then it worked don’t know why. But you can always try

I saw your answer in the above topic an tried several times but i get the same error😢

Could you sent me a private message with the /api/v1/data output to me? Checking if there is a difference in the output

There is no output. Only saying “connection refused” when i go to http://192.168.2.159/api/v1/data

But strange enough the HomeWizard Energy is able to read data from it so it is online😅

Same situation here, I found a solution. My p1 meter was first only powered by the smart meter, now I have powered it by a USB in wall outlet. Hope it will solve ur issue too!

1 Like

Sound like there is a (reverse)proxy in action. But can’t explain why that would affect local subnet traffic or do you force stuff via DHCP server with attributes?

Yeah good call, I had to power it as well due to splitter I had to use (yes old Energylink still alive)

I don’t force anything with my dhcp server. It is just a simple kpn experiabox v10 which is giving the addresses. Also not using any proxy’s at all here😢

@RW_Schouten mine is already powered by a USB adapter… I will give another cable/adapter a try!

This is the pairing code, checking if I get http status 200 OK then I check the payload if the smr_version from the P1 port is not NULL (ie. It has a value). Only then I proceed. As you get a denied on the request it will fail on the first check.

var url = ‘http://’ + device.settings.homewizard_ip + ‘/api/v1/data’;

        console.log('Calling '+ url);

        request(url, function (error, response, body) {
            if (response === null || response === undefined) {
                        socket.emit("error", "http error");
                        return;
            }
            if (!error && response.statusCode == 200) {
                var jsonObject = JSON.parse(body);
                console.log (jsonObject);
                if (jsonObject.smr_version != null) {
                    console.log('Call OK');

                    devices[device.data.id] = {
                        id: device.data.id,
                        name: device.name,
                        settings: device.settings,
                        capabilities: device.capabilities
                    };
                    homewizard.setDevices(devices);

                    callback( null, devices );
                    socket.emit("success", device);
                }
            }
        });

It is working fine for some reason now. I checked and the device updated itself from 1.38fw to 1.48 as i far as saw. Could saw it wrong but I think this is the reason that it is working now. Could it be that the 1.38fw was not working with the api? I took the p1 meter out of the box today and tried to connect it instantly. Maybe it took some time to get the update and get it working with the api.

As expected the response to the /api/v1data works fine now.

Maybe some interesting information to check!

Thanks for confirming. The firmware might definitely be the issue. Homewizard only just recently opened the API by firmware so yeah the older version was probably not supporting the API call. The firmware version is not part of the API response payload so cant check. But will make a note that firmware of the dongle must be 1.48.

I read on tweakers forum that eventually the kWh meter for solar panels will get an API as well but Homewizard doesnt know when yet. But will investigate when it will.

1 Like

That’s good news, thx @Jeroen_Tebbens!

Unfortunately, I may have found (if others have it too) found a small bug.

When the dongle is not connected I get an error and the app is stopped unexpectedly.

I am trying to find a working P1 splitter, so at the moment the HW dongle is not always connected… :frowning:

Not sure how to handle.

Kind regards / groet,
Jeroen