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

[Model Certification] - Electricity Energy Monitor PJ-1203A Dongguan Pnija Technology #17

Closed
IW2FAG-11 opened this issue Nov 2, 2023 · 32 comments
Assignees
Labels
Looking for feedback/confirmation Looking for feedback/confirmation

Comments

@IW2FAG-11
Copy link

PJ-1203A Dongguan Pnija Technology
1. Provide the URL where you have purchase the device

Current A & Current B
Power A & Power B
Power Factor A & Power Factor B
Forward Energy A & Forward Energy B
Frequency
Voltage

export.json

Thanks for Great Job You are doing

pipiche38 added a commit that referenced this issue Nov 2, 2023
@pipiche38
Copy link
Collaborator

I'm currently waiting for an other model ( see #16 ), but in between you might want to try

git checkout wip-stable7-1-005
sudo python3 -m pip install -r requirements.txt --upgrade

then restart the plugin and redo the pairing (make sure that there is no remaining of the device)

@pipiche38 pipiche38 changed the title Electricity Energy Monitor [Model Certification] - Electricity Energy Monitor PJ-1203A Dongguan Pnija Technology Nov 2, 2023
@IW2FAG-11
Copy link
Author

IW2FAG-11 commented Nov 2, 2023 via email

@IW2FAG-11
Copy link
Author

Looks working only if I stay on stable 7 with database 2.125
If Upgrade to wip-stable7-1-005 with database 2.125, device look not pairing

@pipiche38
Copy link
Collaborator

pipiche38 commented Nov 3, 2023

Any messages in the Domoticz or Plugin logs ?

when upgrading, you must do

sudo python3 -m pip install -r requirements.txt --upgrade

@IW2FAG-11
Copy link
Author

As You write i do :
git checkout wip-stable7-1-005 in mine plugind domoticz folder
sudo python3 -m pip install -r requirements.txt --upgrade
Then i restarted all mine Rpi 3.
In this case pairing was not workig.
Then i downgrade
git checkout stable7 in mine plugind domoticz folder
sudo python3 -m pip install -r requirements.txt --upgrade
rebooted mine Rpi3
Now pairing was ok.

Now i delete all device
redo upgrade
git checkout wip-stable7-1-005 in mine plugind domoticz folder
sudo python3 -m pip install -r requirements.txt --upgrade
Then i restarted all mine Rpi 3.
In this case pairing was not workig.
Down here recursive message on domoticz during pairing tentative
2023-11-03 10:21:53.110 Zigate: Assisted Pairing: Polling: []
2023-11-03 10:21:53.110 Zigate: --> Empty queue

@pipiche38
Copy link
Collaborator

please provide the file Logs/PluginLog-xx.log

@IW2FAG-11
Copy link
Author

@pipiche38
Copy link
Collaborator

doesn't work !

@IW2FAG-11
Copy link
Author

IW2FAG-11 commented Nov 3, 2023 via email

@pipiche38
Copy link
Collaborator

If Voltage is ok, would you mind providing once more the export.json with the device info

@IW2FAG-11
Copy link
Author

export.json
export(1).json

@IW2FAG-11
Copy link
Author

IMG_2487

@IW2FAG-11
Copy link
Author

_PluginZigbee_09(1).zip
Now with attatched power probe.
Some message with only prob A, and then with every two probe

@pipiche38
Copy link
Collaborator

I think we should fine tune , did you know what was the power expected on A ?

@IW2FAG-11
Copy link
Author

image

Current is 1000 time to big
Power is 10 time to big

@pipiche38
Copy link
Collaborator

ok, try to update the database and simply restart the plugin.

For Power Factor. Is that something requires / important ?

@IW2FAG-11
Copy link
Author

IW2FAG-11 commented Nov 3, 2023 via email

@pipiche38
Copy link
Collaborator

Ok. I did implement PowerFactor ;-)

git pull
sudo python3 -m pip install -r requirements.txt --upgrade

If you want to prevent having to repair, you can do the following:

  • Remove all related widget minus one. Keep one widget (so the device is not removed)
  • Go to WebUI > Provisioning > Recreate widget(s) of existing device
    => It will re-create all widgets and the Power Fcator. You will have only the widget you have not removed duplicated.

@IW2FAG-11
Copy link
Author

Good morning, I am sorry to disturb you again.
I am doing some more tests.

  • I delete all the widgets on the new Tuya_601, start with stable and then upgrade to certified device 2.123, the device is paired and I see some widgets.
  • I delete all but one widget, update to wip-stable7-1-005, update to certified device 2.123, have the missing widgets recreated and they show up as for stable7, but I still don't see the one for PoweFactor.
  • I delete all the widgets, staying with wip-stable7-1-005, try to pair the meter and the Domoticz log shows ......

2023-11-04 10:02:21.524 Zigate: Assisted Pairing: Polling: []
2023-11-04 10:02:21.524 Zigate: --> Empty queue

Is it possible to reduce the polling frequency by values?
Is it possible to make a "request" from the API via script in LUA or Pyton Domoticz to the device and update as required by the user ?

§§ Another question, I see that with Domoticz Version: 2023.2 (build 15589)
messages appear

2023-11-04 10:04:07.800 [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.0.100)

I looked at my LUA & Py scripts and I don't seem to be using the old API format, does it come from the Domoticz-Zigbee plugin?

Thanks

@IW2FAG-11
Copy link
Author

_PluginZigbee_09.log
During failing pairing

@pipiche38
Copy link
Collaborator

Good morning, I am sorry to disturb you again. I am doing some more tests.

* I delete all the widgets on the new Tuya_601, start with stable and then upgrade to certified device 2.123, the device is paired and I see some widgets.

* I delete all but one widget, update to wip-stable7-1-005, update to certified device 2.123, have the missing widgets recreated and they show up as for stable7, but I still don't see the one for PoweFactor.

* I delete all the widgets, staying with wip-stable7-1-005, try to pair the meter and the Domoticz log shows ......

2023-11-04 10:02:21.524 Zigate: Assisted Pairing: Polling: [] 2023-11-04 10:02:21.524 Zigate: --> Empty queue

This looks very strange, and I do not see any issue on the log. Sniffing would be good to understand, what is happening.
I'll try to do some testing on my side.

Is it possible to reduce the polling frequency by values? Is it possible to make a "request" from the API via script in LUA or Pyton Domoticz to the device and update as required by the user ?

The device itself is doing the reporting, I know that there is an Update Frequency mecanism, but I'm waiting for the similar device as you to understand how it works with teh Tuya GW.

§§ Another question, I see that with Domoticz Version: 2023.2 (build 15589) messages appear

2023-11-04 10:04:07.800 [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.0.100)

I looked at my LUA & Py scripts and I don't seem to be using the old API format, does it come from the Domoticz-Zigbee plugin?

Normaly the plugin z4d should be clean. Did you check also your dzVents scripts ?

@pipiche38
Copy link
Collaborator

pipiche38 commented Nov 4, 2023

There is a bug on ZNP which prevent pairing with the current working branch. Sorry, I need to fix it before moving forward

zigpy/zigpy-znp#231

@IW2FAG-11
Copy link
Author

IW2FAG-11 commented Nov 4, 2023 via email

@pipiche38
Copy link
Collaborator

You should be able to pair now with the updated wip-stable7-1-005

@IW2FAG-11
Copy link
Author

Yehaaaa now pairing is ok.
Still some problem on data..... I'll try to test.

@IW2FAG-11
Copy link
Author

I did some tests, now it's pairing but I see some problems.
Without loads I read PowerFactor 100% and it matches, then I see Power (usage) at 100W while it should be at '0' as it reads in the device log.
Putting a load of about 450W, I see that the current is shown at 1.9A, the PowerFactor goes to 90% while the Power (usage) which I guess is the instantaneous one shows 90W. It seems that the Power widget still shows the powerfactor.
Reading again in the log, the processed data seems to be correct.

Then paying closer attention, I notice that .....
Voltage refresh occurs, current, for a fraction of time it reads 400W in the Power which is then rewritten with the powerfactor value.

def ts0601_power_factor(self, Devices, nwkid, ep, value):
self.log.logging( "Tuya0601", "Debug", "ts0601_current - Current %s %s" % (nwkid, ep, value), nwkid, )
MajDomoDevice(self, Devices, nwkid, ep, "PowerFactor", value)
store_tuya_attribute(self, nwkid, "PowerFactor_%s" %ep, value)

Does it return or is there a mismatch in the argument list ?

@pipiche38
Copy link
Collaborator

I have updated the code, it was just a mistake in the logging (bad copy paste).
I also think that I understand the issue of mixing Power and PowerFcator

Just pushed an update. So if you can simply do a git pull that would be enough

@IW2FAG-11
Copy link
Author

Ok, now all widget are responsive.
Tomorro i'll test if they are calbrated.
I already know that voltage is perfect but frequency isn't.

@pipiche38 pipiche38 added the Looking for feedback/confirmation Looking for feedback/confirmation label Nov 8, 2023
@pipiche38 pipiche38 self-assigned this Nov 8, 2023
@pipiche38
Copy link
Collaborator

@IW2FAG-11 what is the out come ?

@IW2FAG-11
Copy link
Author

Sorry i have had some problem and i'd never do any precision measure.
Item looks like ok.

@pipiche38
Copy link
Collaborator

so we can close the issue ?
I think in all case measuring the PowerFactor with the clamp is not the best way ...

@IW2FAG-11
Copy link
Author

IW2FAG-11 commented Nov 15, 2023 via email

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

No branches or pull requests

2 participants