Efergy 2 or more sensors

I have an Efergy hub and 2 transmitters but in the efergy module I can only see 1 of them.
Even in the demo you can check that you can have more than 1 sensor.

And here: https://engage.efergy.com/#solar
You could get solar generation and consumption, so it would be great to be able to turn on switches when you get extra solar energy.

Yes, I too have the same issue. Can anyone help on this? @miniconfig?
Thanks!

This should be doable, but I only have one hub and one transmitter, so I’ll need someone else to test it. Can one of you post the output of these (sanitized of your token and any other personal data)

curl https://engage.efergy.com/mobile_proxy/getInstant?token=<your token>
curl https://engage.efergy.com/mobile_proxy/getStatus?token=<your token>

The API is mostly undocumented, and I can’t find an example of what it looks like with more than one device.

{“age”:10,“last_reading_time”:1485806891000,“reading”:257}

{“hid”:“a0a28e4babed652b66c6393bc8e4ecb5”,“listOfMacs”:[{“listofchannels”:[{“assoc”:1,“cid”:“cid.MACADDRESS”,“reading”:null,“ts”:1485806906,“tsDelta”:8,“tsHuman”:“Mon Jan 30 20:08:26 2017”,“type”:{“battery”:5,“falseBattery”:0,“id”:null,“name”:“EFCT”}}],“mac”:“MACADDRESS”,“personality”:“E1”,“status”:“on”,“ts”:1485806906,“tsDelta”:8,“tsHuman”:“Mon Jan 30 20:08:26 2017”,“type”:“EEEHub”,“version”:“3.7.0”}]}

Hmm. Taking a closer look at their demo, it looks like the only thing that would give a per-device value would be the Real Time Usage (budget and cost are per-household). The getInstant call returns a per-household value (that is, presumably, a SUM of all devices), so there’s only one value there. Can you try
curl https://engage.efergy.com/mobile_proxy/getCurrentValuesSummary?token=<your token>

[{“cid”:“PWER”,“data”:[{“1485808571000”:308}],“sid”:“SID-OF-FIRST-UNIT”,“units”:“kWm”,“age”:2},{“cid”:“PWER”,“data”:[{“1485695742000”:1808}],“sid”:“0”,“units”:“kWm”,“age”:112831},{“cid”:“PWER_GAC”,“data”:[{“1485808559000”:0}],“sid”:“SID-OF-SECOND-UNIT”,“units”:null,“age”:14}]

It looks like you have the info of the two transmitters there, right ?

That looks like 3, except that one has an sid of 0. Mine with one transmitter only shows one:

[{"cid":"PWER","data":[{"1485819854000":7610}],"sid":"<sid>","units":"kWm","age":4}]

I’m assuming the first and third here are the ones that correspond to the actual values you’re interested in…Do you know what the second is? Or why the units of the third is “null”?

It’s null because it’s solar power and it’s really late, no sun right now :wink:

Ah, yes, I guess that would make sense. I was expecting it to have a unit regardless, but I guess if it could change based in the value, they might not have a default units. I’ll work on a change.

1 Like

Awesome! Thanks @miniconfig! Let us know when you need some testing! :slight_smile:

[{“cid”:“PWER”,“data”:[{“1485853183000”:218}],“sid”:"",“units”:“kWm”,“age”:3},{“cid”:“PWER”,“data”:[{“1485695742000”:1808}],“sid”:“0”,“units”:“kWm”,“age”:157444},{“cid”:“PWER_GAC”,“data”:[{“1485853181000”:312}],“sid”:"",“units”:null,“age”:5}]

This one is with a little bit of sun

Just a heads-up, it probably won’t be up until this weekend. My weekday development time is somewhat limited.

2 Likes

Any news? or can I help with something ?

Sorry for the delay, I’m still working on it. I’m trying to wrap my head around the test framework as I work on it, so that’s delaying me a bit more than I expected.

don’t worry, just let me know if you need anything.

Hey @miniconfig how are you doing with this ?

1 Like

@miniconfig Any blockers that we can help?

1 Like

Sorry for being so unresponsive guys. I think I’ve got the test stuff straightened out, the only blocker right now is a big deadline at work coinciding with my son’s birthday party, which hasn’t left a lot of time for HomeAssistant the past couple weeks. I hope to have something next week. Maybe as soon as Sunday, if I survive the party :wink:.

2 Likes

I’ve opened a PR for these changes. @pblgomez and @joaoasilva , can you please test this out and let me know how it works in real life?

2 Likes

@miniconfig Thank you so much!
Seems to be working, just detected a minor issue, the values needs to be converted from watts to kilowatts like the energy_usage.
Can you also add the prefix ‘efergy_’ + sid when naming the identities?
Easier to find the sensor and also because of this bug: https://github.com/home-assistant/home-assistant/issues/6503

Thank you again! :slight_smile: