Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch with Power usage for sonoff pow #170

Open
frnandu opened this issue May 30, 2018 · 7 comments
Open

Switch with Power usage for sonoff pow #170

frnandu opened this issue May 30, 2018 · 7 comments

Comments

@frnandu
Copy link

frnandu commented May 30, 2018

Imperihome seems to have the widget of a switch with its current power consuption showing under.
I'm wondering if it would be possible to use 2 domoticz devices (one switch + 1 usage electric) to create ONE imperihome widget which allows to switch on/off and shows the current usage.
This is specially usefull for sonoff pow devices which have to be configures in 2 domoticz devices.
Thanks for any help on this subject

@empierre
Copy link
Owner

That device doesn't exist in Imperihome ISS API sadly ;-(

@frnandu
Copy link
Author

frnandu commented May 30, 2018

from http://dev.evertygo.com/api/iss:
screen shot 2018-05-30 at 13 42 46
Isn't the Energy parameter (in watts) exactly for that?

@empierre
Copy link
Owner

my bad, I did forget that, the problem is on the other side (there is another discussion here) where we can't match both except under certain conditons where we already did it see #73

@empierre empierre reopened this May 30, 2018
@empierre
Copy link
Owner

can you see if your match the criteria ?

@frnandu
Copy link
Author

frnandu commented May 30, 2018

Don't match.
When using sonoff pow with tasmota it uses 2 idx devices to post the switch state and it's power usage, and both are dummy completely unrelated (except if you name them apropriately).
I'm thinking maybe a possibility would be to have a section on /etc/mydomoathome/config.json where one can group them by idx or names. One way or another I will do something to have the values (even if hardcoded in mdah.js), since I really don't want to have 2 dashboards screen (one for switches and another for power usages).
Would be better of course if you could include some way of grouping them manually for people that want to do that.
What do you think?

@empierre
Copy link
Owner

that could be a possibility yes

@jonferreira
Copy link
Contributor

Yes this would work I reckon.
Personally what I'm doing is to use node-red as a "proxy" for MDAH and I edit the MDAH response grouping devices by name.

So basically if I have a LivingRoomLights device I search for a LivingRoomLightskWhMeter and if exists then "group" them if that makes sense. Works perfectly fine but ofc it's not for everyone.

One option would be to do this at MDAH itself so add a setting like "watt meter suffix" that would make MDAH try to group device_name and device_name_watt_meter_suffix as one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants