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

Support for multiple sensors #227

Open
s-01010011 opened this issue May 23, 2023 · 1 comment
Open

Support for multiple sensors #227

s-01010011 opened this issue May 23, 2023 · 1 comment

Comments

@s-01010011
Copy link

s-01010011 commented May 23, 2023

Is your feature request related to a problem? Please describe.
I have two Power Sensors, one for solar generation and the other for total consumption. The integration seems to show both sensors in HomeAssistant as one sensor with the value oscillating between both sensor values continuously when I check the value against the phone app in real time which makes the output not that useful.

Describe the solution you'd like
Could the integration be modified to see the two sensors as different devices based on the Mac addresses and listed in HomeAssistant as two different devices so the values can be used separately?

Describe alternatives you've considered
I don't know enough to be able to suggest any code changes.

Additional context
Power Sensor kit with the single plug and two sensors, one for solar generation wrapped around the AC from Solar Inverter and the other attached in the meter box as per typical single sensor installation. Both sensors seem to have unique Mac addresses when I look at the devices in the app. I am not sure why the solar generation is currently showing a -neg value (it's rainy today so won't be generating much) so could be parasitic draw from grid to keep Inverter powered from mains. Slight differences in the values displayed due to timing for the screenshots.
Screenshot 2023-05-23 at 3 16 19 pm
Screenshot 2023-05-23 at 3 15 18 pm
IMG_3638

@s-01010011
Copy link
Author

s-01010011 commented May 23, 2023

Sorry didn't notice the "add multiple sensors" on the TODO at the top of the readme. Please feel free to close this if it's already a known issue/planned work.

Here's some output from the HA debug log if it's helpful for future development.

2023-05-23 15:43:29.339 DEBUG (MainThread) [custom_components.dius] Received message json: {'mac': 'xxxxxxxxxxx98', 'device': 'plug', 'count': 13, 'summation': 870297.8916346187, 'duration': 1.043084, 'starttime': 1684827782.12031, 'voltage': 241.16953998301784, 'power': 0.01750727790054708, 'reactive_current': 0.0001273792983164376, 'type': 'instant_power', 'current': 0.09901780762590465, 'unit': 'W', 'source': 'BLE', 'active_current': 0.00010582280167827124}

2023-05-23 15:43:29.841 DEBUG (MainThread) [custom_components.dius] Received message json: {'mac': 'xxxxxxxxx67', 'device': 'sensor', 'summation': 2140102151, 'duration': 1, 'type': 'instant_power', 'batteryMicrovolt': 3831776, 'unit': 'w', 'starttime': 1684827782, 'power': -33}

2023-05-23 15:43:30.344 DEBUG (MainThread) [custom_components.dius] Received message json: {'mac': 'xxxxxxxxx66', 'device': 'sensor', 'summation': 25011500, 'duration': 1, 'type': 'instant_power', 'batteryMicrovolt': 3889120, 'unit': 'w', 'starttime': 1684827782, 'power': 520}

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

1 participant