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

add exposes to Sinope thermostats and fix energy report on Sinope Plugs #5376

Merged
merged 2 commits into from
Jan 23, 2023

Conversation

MattL0
Copy link
Contributor

@MattL0 MattL0 commented Jan 20, 2023

…inope plugs

@MattL0 MattL0 requested a review from Koenkk January 23, 2023 05:58
@Koenkk Koenkk merged commit 334abcd into Koenkk:master Jan 23, 2023
@Koenkk
Copy link
Owner

Koenkk commented Jan 23, 2023

Thanks!

@Montreal666
Copy link

Hi MattL0, thanks for all the great work on the Sinope devices! =)

is there a hardware related issue why "energy" is not exposed on the TH1300ZB?
I'm no expert but did some testing based on another user feedback which would confirm data availability?

image

Would you mind confirming / Any chance to add it ?
I have a number of these thermostats installed so am available for testing.

Let me know what you think,

PS: guess you are the same MattL0 who used to run Homeseer ?
Thx! Yann aka 123qweasd from Montreal / Homeseer forums.

Cheers!

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 14, 2023 via email

@Montreal666
Copy link

Great! Thanks for the prompt response, looking forward to testing it :)

Thought you had moved to Home assistant...

Salutations de la Rive-Sud Pistache ;)

@MattL0 MattL0 deleted the patch-1 branch February 15, 2023 00:51
@MattL0
Copy link
Contributor Author

MattL0 commented Feb 15, 2023

Can You try to add the attribute currentsumdelivered to the semetering cluster in the reporting page?

618EE3EE-354C-495A-95FC-4755D9EEEF1A

Do you get any error in the log?

@Montreal666
Copy link

Montreal666 commented Feb 15, 2023 via email

@Montreal666
Copy link

image

@Montreal666
Copy link

Montreal666 commented Feb 15, 2023

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 15, 2023

pretty sure the pull request from @cloutierjo can be merged like that

@Montreal666
Copy link

Montreal666 commented Feb 15, 2023

Do you know the update interval for "energy"? The updated Sinope.js ( @cloutierjo ) has been running since yesterday evening and all thermostats still show N/A...

is it a cumulative value or hourly, daily, other,... ?

Thx

Screenshot_20230214_235203_Chrome

@Montreal666
Copy link

Montreal666 commented Feb 15, 2023

Based on the doc from another Sinope, seems like it's cumulative:

Energy (numeric)
Sum of consumed energy. Value can be found in the published state on the energy property. It's not possible to read (/get) or write (/set) this value. The unit of this value is kWh.

so something must be wrong unless the value gets updated every day/24h ?

Let me know what you think,

Thx

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 15, 2023

could you try to set the report interval to 300 , and the "min rep change" to 0,1 ( not 0.1).

yes this is cumulative. I do not know a method to reset it. Setting theses value into the dev console is suposed to reset the value to 0 according to zigbee3.0 specs.., but here it is soft resetting the thermostat as a hole.
If this was working, it would be easy to send an mqtt message to reset to comulative very week/day or wtv.

@Montreal666
Copy link

Montreal666 commented Feb 15, 2023

Testing. stay tuned.

manipulating the data to get the desired values is not overly complicated but would be nice to have some type of MQTT command to reset it.

@Montreal666
Copy link

300 for minimum or maximum report interval?

@Montreal666
Copy link

the "min rep change" field will only let me use period "." not comma ","

@Montreal666
Copy link

Montreal666 commented Feb 16, 2023

Ok here's what I'm testing now.
(The mobile version does show a comma )
Not sure if this is relevant but the set reporting values do not survive a device refresh and have to be re-entered.

Energy still shows N/A

Screenshot_20230215_231359_Chrome

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 16, 2023

I have made a pull request for this. #5480

this is copy pasted from

#5474

If it is like the th112*zb it will work.
You’ll have to install the dev build of zigbee2mqtt when this is merged. If this does not work, it’ll be easier to test from that point.

@Montreal666
Copy link

Ok will test this morning, stay tuned.

@Montreal666
Copy link

Montreal666 commented Feb 16, 2023

is the dev build available under windows ? not running Linux....

https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html#linux

Or any workaround for me to test under windows?
Thx!

@Montreal666
Copy link

Worst case I will install a portable Linux; let me know what the options are. Thanks again!

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 17, 2023

is the dev build available under windows ? not running Linux....

https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html#linux

Or any workaround for me to test under windows? Thx!

Yes there is one (replacing the sinope.js file directly). But, this should be done only after a backup of the zigbee2mqtt folder.

First , what is your zigbee2mqtt version installed? http://yourIP:port/#/settings/about

@Montreal666
Copy link

Version 1.30.1
yes no problem replacing the sinope.js file;
Making progress, no errors in log, energy does show in "exposes", but stays at N/A state.
let me know if you have a revision to test or anything I should validate.
Will reconnect to the original Sinope bridge this weekend to ensure all thermostats firmwares are updated.
Maybe missing something from a recent update?
Unless prior testing excludes this possibility ( the fact that it responds positively to "currentSummdelivered" for instance)
Thanks!

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 21, 2023

can you try with this code ? remove ".txt"

sinope.js.txt

Didn't see the divisor readind was not in the code.

@Montreal666
Copy link

testing. stay tuned. thx

@Montreal666
Copy link

Back with the original log error/issues

....

Zigbee2MQTT:info 2023-02-20 21:14:38: Currently 14 devices are joined:
Zigbee2MQTT:info 2023-02-20 21:14:38: SINOPETH1300ZB5 (0x500b91400002848c): Not supported (Router)
Zigbee2MQTT:info 2023-02-20 21:14:38: SINOPETH1300ZB7 (0x500b9140000272be): Not supported (Router)
Zigbee2MQTT:info 2023-02-20 21:14:38: SINOPETH1300ZB3 (0x500b914000026e9f): Not supported (Router)
Zigbee2MQTT:info 2023-02-20 21:14:38: SINOPETH1300ZB2 (0x500b9140000264f8): Not supported (Router)
Zigbee2MQTT:info 2023-02-20 21:14:38: SINOPETH1300ZB4 (0x500b9140000282c8): Not supported (Router)
Zigbee2MQTT:info 2023-02-20 21:14:38: SINOPETH1300ZB11 (0x500b9140000264e0): Not supported (Router)
Zigbee2MQTT:info 2023-02-20 21:14:38: SINOPETH1300ZB6 (0x500b914000028480): Not supported (Router)
Zigbee2MQTT:info 2023-02-20 21:14:38: SINOPETH1300ZB8 (0x500b9140000266eb): Not supported (Router)
....

Zigbee2MQTT:warn 2023-02-20 21:15:27: Received message from unsupported device with Zigbee model 'TH1300ZB' and manufacturer name 'Sinope Technologies'
Zigbee2MQTT:warn 2023-02-20 21:15:27: Please see: https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html
Zigbee2MQTT:warn 2023-02-20 21:15:30: Received message from unsupported device with Zigbee model 'TH1300ZB' and manufacturer name 'Sinope Technologies'
Zigbee2MQTT:warn 2023-02-20 21:15:30: Please see: https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html
Zigbee2MQTT:warn 2023-02-20 21:15:35: Received message from unsupported device with Zigbee model 'TH1300ZB' and manufacturer name 'Sinope Technologies'
Zigbee2MQTT:warn 2023-02-20 21:15:35: Please see: https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html
....

@Montreal666
Copy link

Montreal666 commented Feb 21, 2023

Just to ensure I'm not missing something:

-Stopped Z2M
-deleted Sinope.JS and replaced it with your newest version
-Restarted Z2M

other Zigbee devices work normally.

@Montreal666
Copy link

Montreal666 commented Feb 21, 2023

BTW I don't if this can help troubleshoot, but once I restart with your modified sinope.js, I can't roll back to the original sinope.js; it returns the same errors "Not supported (Router)"; I have to call "npm ci" from command line to make it work again.

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 21, 2023

could you test this one ? https://github.com/MattL0/zigbee-herdsman-converters/blob/master/devices/sinope.js

This should at least set your thermostats in a working state.

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 21, 2023

Also what is the value of the divisor attribute for the seMeteting cluster?

@Montreal666
Copy link

File test : same errors.
checking value hold on

@Montreal666
Copy link

1000

image

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 21, 2023 via email

@Montreal666
Copy link

Not that I know of. everything is stock. how can I double check?

@Montreal666
Copy link

checked my configuration.yaml
no external converters.

using Zemismart rollerblinds and Yale locks.
Frontend.
homeassistant: false
availability: true
permit_join: false
device_options:
expose_pin: true

that's it

@MattL0
Copy link
Contributor Author

MattL0 commented Feb 21, 2023 via email

@Montreal666
Copy link

Thanks for the efforts, will report back once the release is available.
Cheers

@Montreal666
Copy link

BTW since the release is not out yet, I've noticed this other issue with the TH1300ZB integration:

for "Enable outdoor temperature display": "on" "true" "false" work but "off" doesn't.

Not sure if this is an easy fix or not but it also affects the frontend control (can't be turned off) so maybe it's worth fixing it.

Let me know what you think.

Cheers,

Yann

@Montreal666
Copy link

Hi Matt, Just installed Z2M latest release and unfortunately, energy still doesn't show ...
image
Let me know if you can help with troubleshooting,
Thx,

@MattL0
Copy link
Contributor Author

MattL0 commented Mar 9, 2023

Hi Yan,

I have to prepare for an important interview I have this monday(13th). I will come back to you shortly after that.

@Montreal666
Copy link

No problem, keep me posted
good luck with the interview 🙂

@VerbalP
Copy link

VerbalP commented Mar 9, 2023

Hello,

Thank you very much for this!

I had twelve TH1300ZB running on ZHA. Those on firmware 1.0.8 ( I guess 1008 in Zigbee2MQTT) were not reporting energy.

I updated them all to current firmware 1.1.9 (1109) via Sinope GT130 (took a few days for all to receive the update) then added them to Zigbee2MQTT 1.30.1. No energy reported.
(@homeseer666 : DMed you on Discord then to ask if you achieved it )

When 1.30.2 was released, I applied the update. Still no energy reported. I tried to reconfigure and re-interview to no avail (maybe me, I'm new to Zigbee2MQTT/learned a lot during that week).
I then deleted and added them back : energy is properly reported after a few minutes of heating. 👍

@homeseer666 : would be be able to test deleting/adding back one to your Zigbee2MQTT and see if energy gets reported after a few minutes?

@MattL0 : Is there a smarter way to do this without deleting/adding them back? (I'm quite sure that was not the smartest move on my end :-P )

@MattL0 : I have two TH1300ZB connected to an auxiliary output TR1310 :

Thanks again for this update!

@Montreal666
Copy link

Montreal666 commented Mar 9, 2023

Thanks for the heads up! You are right, after a while, it does start logging energy =)
I didn't have to delete/add devices. Great news, Thx.

Only bug left on my end is minor / detailed here:
#5376 (comment)
@VerbalP can you confirm if you have the same behavior/bug on your end?

Cheers,

@Montreal666
Copy link

Montreal666 commented Mar 15, 2023

@VerbalP

Do your "energy" values get updated?
Mine now show and get reported regularly for all thermostats, but they never change value....

If yours work, I guess I'll try do deinstall/reinstall all of them.

Keep me posted, thx

@VerbalP
Copy link

VerbalP commented Mar 15, 2023

@VerbalP

Do your "energy" values get updated? Mine now show and get reported regularly for all thermostats, but they never change value....

Yes, they do.
No issues since I deleted/added them all back. ;-)

@Montreal666
Copy link

Ok thank you, I'll try do delete/add one of the thermostats to see if it resolves the issue.

Would you also mind confirming your reporting parameters (portal-device-reports):

Screenshot_20230315_101756_Chrome
Thx

@Montreal666
Copy link

Ok got it, first issue was the missing "min rep change".
also since my thermostats have been running for a while, the hourly changes vs total energy were minimal so had to add decimals in order to track daily/hourly KWh changes.

Still, can you confirm 2 last items:

1: reporting parameters you are using:

#5376 (comment)

2: can you reproduce this bug (Ie: switching "enable_outdoor_temperature" to OFF doesn't work and generates an error / manually sending "false" does work.)
#5376 (comment)

@MattL0
Copy link
Contributor Author

MattL0 commented Mar 15, 2023

I will come back tomorrow. It seems part of the issues are resolved now?

@Montreal666
Copy link

Montreal666 commented Mar 16, 2023

Yes, will gather some more data but so far so good.
just a small bug detailed above.
Thanks!

#5376 (comment)

Screenshot_20230315_212546_Chrome

@Montreal666
Copy link

Montreal666 commented Jan 4, 2024

Hi @MattL0,

Quick question, still related to TH1300 exposed features.

Unless there is hope to get them added/merged, is there a way to poll unsupported features via MQTT/Z2M?

I'd like to create temperature sensors in Home assistant for current floor and room temperatures.

Currently Z2M only exposes "LocalTemperature" (either floor or room , based on active mode)
But I would need both values, no matter which mode is selected.

Screenshot_20240104_001916_Chrome

This is achievable, by polling 2 other clusters (separate temperatures)

Screenshot_20240104_002029_Chrome

They are accessible with ZHA but not sure how to access it with Z2M.
At a minimum I would just need a method to read the data, I will create template sensors in HA.

Any help would be greatly appreciated.

Thank you and happy new year!

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.

4 participants