Skip to content

Initial support for Sinope Smart in-wall outlet – Zigbee (SP2610ZB)#4889

Closed
ericvandamme wants to merge 3 commits intodresden-elektronik:masterfrom
ericvandamme:master
Closed

Initial support for Sinope Smart in-wall outlet – Zigbee (SP2610ZB)#4889
ericvandamme wants to merge 3 commits intodresden-elektronik:masterfrom
ericvandamme:master

Conversation

@ericvandamme
Copy link
Contributor

Tested and working with Sinope Smart in-wall outlet – Zigbee SP2610ZB (https://www.sinopetech.com/en/product/smart-in-wall-outlet-zigbee/). Should address issue #4880 as well.

Initial support for Sinope Smart in-wall outlet – Zigbee (SP2610ZB)
Initial support for Sinope Smart in-wall outlet – Zigbee (SP2610ZB)
@manup manup added this to the v2.12.0-beta milestone May 19, 2021
@joelwener
Copy link

joelwener commented May 20, 2021

Hi @ericvandamme , would these changes resolve #4870 and #4871 as well?

@ericvandamme
Copy link
Contributor Author

Hi @ericvandamme , would these changes resolve #4870 and #4871 as well?

I cannot confirm. I only tested with my Sinope device. So the two devices you mentioned I couldn't test. Because it could impact other people's implementations if it is merged, I generally don't assume "works as intended" and a create a merge request.

I have uploaded a compiled for deCONZ v2.11.05-raspian-buster-beta; if you trust such a file from a stranger on the internet. It should work just fine. Just need to extract and copy it to the appropriate directory (/usr/share/deCONZ/plugins/). You may wish to make a backup of the old file first. If it works, I can submit those changes too to catch the next release.

libde_rest_plugin.zip

@joelwener
Copy link

joelwener commented May 20, 2021 via email

@joelwener
Copy link

joelwener commented May 20, 2021

While testing the data validity, I came across an issue with the RMS Current Reading :
RM3250ZB:

It is showing 63568, as the value for current, but in deCONZ, it is showing 848 -> 0.848 amps.

Should be pulling from field 0x0508 | u16 and divided by 1000.

"3": {
"config": {
"on": true,
"reachable": true
},
"ep": 1,
"etag": "778f4487e04823adde47f3ca6f8dc6b6",
"lastseen": "2021-05-20T04:46Z",
"manufacturername": "Sinope",
"modelid": "RM3250ZB",
"name": "Power 3",
"state": {
"current": 63568,
"lastupdated": "2021-05-20T04:46:27.627",
"power": 215,
"voltage": 248
},
"type": "ZHAPower",
"uniqueid": "50:0b:91:40:00:01:30:0e-01-0b04"
},


For the plugs with SP2610ZB, the RMS voltage value located in 0x0505 needs to be divided by 100 to get the proper reading. It currently is read as: "voltage": 12333, which should be 123.33 volts (The RM3250ZB currently shows the value directly/correctly, so no modification is necessary for the RM3250ZB).

The current value as displayed: current": 5464, is read as 71 in deCONZ. So I am not sure how the value for current is derived. There is something wrong with the RMS Current translation as with the RM3250ZB .

ZHAPower

**************************** Object info *****************************
{
"config": {
"on": true,
"reachable": true
},
"ep": 1,
"etag": "e02f6bf637f41744d6f8cb1236474b5d",
"lastseen": "2021-05-20T04:54Z",
"manufacturername": "Sinope",
"modelid": "SP2600ZB",
"name": "Power 9",
"state": {
"current": 5464,
"lastupdated": "2021-05-20T04:50:08.308",
"power": 626,
"voltage": 12333
},
"swversion": "SW Release",
"type": "ZHAPower",
"uniqueid": "00:0d:6f:00:15:66:20:ec-01-0b04"
}
************************* End Object info ***************************

Regards
Joel Wener

Copy link
Collaborator

@SwoopX SwoopX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising the PR. The current changes would require some monir corrections as per my comments. Furthermore, as it has been previously mentioned, the values reported by the API are off and require some additional changes in electrical_measurement.cpp. Lastly, to no expose instantaneous demand (as the device doesn't support it, so power in the ZHAConsumption sensor to be more precise), it should be explicitly excluded in de_web_plugin.cpp, L6789 and database.cpp, L3451.

With that taken into account the device should do just fine.

if (modelId == QLatin1String("SmartPlug") || // Heiman
modelId == QLatin1String("902010/25") || // Bitron
modelId == QLatin1String("SKHMP30-I1") || // GS smart plug
modelId == QLatin1String("SP2610ZB") || // Sinope smart in-wall outlet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your screenshots, the device doesn't support instantaneous demand, so this line should be removed.

rq.maxInterval = 300;
if (modelId == QLatin1String("SmartPlug") || // Heiman
modelId == QLatin1String("SKHMP30-I1") || // GS smart plug
modelId == QLatin1String("SP2610ZB") || // Sinope smart in-wall outlet
Copy link
Collaborator

@SwoopX SwoopX May 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your screenshot, I doubt this is the correct reportable change, which should reflect the value of 1 Wh. On the other hand, multiplier and divisor for the value are both 1, which would conclude a value of 56636 kWh going purely by the math, however, attribute 0x0303 is also not yet taken into account (which basically tells you where to set the decimal point).

grafik

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value being stored in the Z2610ZB in this field is in Wh, even though it is configured as if it is in kWh. The value being sent seems to be correct.

@SwoopX SwoopX linked an issue May 20, 2021 that may be closed by this pull request
@joelwener
Copy link

@ericvandamme I am ready to test any changes this evening so that the final version can be submitted for tomorrow's deadline.

@ericvandamme
Copy link
Contributor Author

I will certainly be able to look at it this long weekend, I don't think I will have time before the deadline tomorrow.

I will also be seeking out something with a fixed power draw to test the results.

@manup
Copy link
Member

manup commented May 22, 2021

Hi, thanks for the work on this and no rush :) There are quite some more betas coming out in roughly 1 week intervals so the PR can be added in v2.12.1-beta or v2.12.2-beta.

@manup manup modified the milestones: v2.12.0-beta, v2.12.1-beta May 24, 2021
@joelwener
Copy link

I will certainly be able to look at it this long weekend, I don't think I will have time before the deadline tomorrow.

I will also be seeking out something with a fixed power draw to test the results.

Thank you. Have a great long weekend.

@ericvandamme
Copy link
Contributor Author

It looks as if @joelwener has taken to completing the changes with all devices which he can test independently. I am closing my PR to avoid conflicts.

@BabaIsYou
Copy link
Contributor

Hi,

Just to be sure, is SP2610ZB fully supported (including power report) ?
I installed version 2.13.04 of deConz on Raspberry and included one of this device but no consumption or power metric retrieved. Just On/Off state can be viewed and controlled.

Did I miss something ?

@Smanar
Copy link
Collaborator

Smanar commented Jan 29, 2022

This PR was closed to use instead #4943
And the second one is not yet validated, so for the moment faster to use DDF.

@BabaIsYou
Copy link
Contributor

Your right. Using DDF we can go further than just On/Off control. Thanks

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

Successfully merging this pull request may close these issues.

SINOPE SP2610ZB Wall Smart-Plug

6 participants