Mariano-Github/Edge-Drivers-Beta

Add fingerprint for MCOHome MH7H-WH and MH7H-EH thernostats

maricjosko opened this issue · 57 comments

Dear Mariano,
can you, please, add these fingerprints to your z-wave thermostat mc driver.
Manufacturer code 015F-0712-5102
Model: 0712-5102
It is for this device https://mcohome.com/MH7H-WH-MH7H-EH-PG3894186

I apologize if I this request is not properly written :-)

Thanks!
Josko Maric

I apologize for the inconvinience but I've found out (looking at another active issue) that I've needed to add more details in my request, so here they are:
Device Laberl: "Z-Wave Thermostat"
Device Profile: "Thermostat No Battery"
Manufacturer: "MCOHome"
Model: "MH7H-WH/EH"
Hopefully now it's better - sorry for not being more precise when opening an issue.

Hi, Josko

I'll look at the manual to see what I can do.

Thermostats are not easy to integrate. Each manufacturer uses different commands to perform functions

What driver does the thermostat use that still works?

Hi Josko,

Added to this driver version

Try if it works as the other thermostat

───────────────────────────────────────────────────
 Driver Id    ae1317ad-ba10-4f8b-9926-986101f2b849 
 Name         Z-Wave Thermostat Mc
 Package Key  zwave-thermostat
 Version      2023-12-28T22:30:31.829398025        
───────────────────────────────────────────────────
- id: "015F/0712/5102"
    deviceLabel: MCOHome MH7H-WH/EH
    manufacturerId: 0x015F
    productType: 0x0712
    productId: 0x5102
    deviceProfileName: base-thermostat-without-battery

Hi Josko,
I'm glad it works.

The fact that smartthings recognizes it as a switch is a smartthings problem. Since the fingerprints are not in the driver, it matches it according to the zwave command class that the device has and gives preference to the switch command class without taking into account other matches.

It may be that the assigned profile, which is the generic one, has some extra capability such as coolingSetPoints, fan control.
If that produces errors, I can remove them from the profile so that they do not cause errors.

You don't need to make a donation, but if you want to buy me a beer, I'll have it for your health.
This is the link to my paypal.
http://paypal.me/MarianoColmenarejo
Thank you

Hi Josko,

So you don't need me to remove any capabilities from the device profile?

Hi Josko,

This version of the driver is assigned a profile only for heating and without a fan.

───────────────────────────────────────────────────
 Name         Z-Wave Thermostat Mc
 Version      2023-12-31T10:32:40.102918549        
───────────────────────────────────────────────────
- id: "015F/0712/5102"
    deviceLabel: MCOHome MH7H-WH/EH
    manufacturerId: 0x015F
    productType: 0x0712
    productId: 0x5102
    deviceProfileName: heat-thermostat-without-battery

For the new profile to take effect you have to re-pair devices with this driver, but so you don't have to do that I have created a temporary version "Mc-T" of the driver:

───────────────────────────────────────────────────
 Name         Z-Wave Thermostat Mc-T
 Version      2023-12-31T10:29:58.914899205        
───────────────────────────────────────────────────

  • Install this temporary version of the driver on your hub
  • Change the thermostat driver to this temporary "Mc-T" version. The new profile will be assigned.
  • When you no longer have thermostats paired with the old Mc driver, then delete old driver from your Hub and install the new Mc version
  • Make a driver change to the new version of the Mc driver
  • When you have made the change on all thermostats, delete the T version from your hub

I wish you a happy new year!!

Hi Josko,

If I am sincere, I have never used the CLOCK, TIME or TIME PARAMERERS.

EDGE drivers cannot communicate with external web, for security, in fact they do not know the local time, only the UTC of the system.
In the dirver stock there is only one example of the synchronization of the clock with the Command Class Clock, but this device does not use that Command Class, uses Time and Time_Parameters.

In the example of the Command Class Clock, time, minutes and day of the week are sent.

In the Comad Class Time_Parameters, year, month, day, minutes and seconds are sent, it is not sent day of the week.

I don't know if this would official.

The problem is that I have no device to test and purify if errors in the implementation are produced.

You should install the CLI smartthings on a PC in the location where the hub is and send me the driver logs with the CLI to be able to debug it

Hi Josko,
Do you mean that humidity information is not displayed?
I saw in the manual that it also reported humidity and I added it.
Some device parameters may need to be configured?

Did you change the driver to Z-Wave Thermostat Mc-T and then return to the Z-Wave Thermostat Mc driver, as I told you?

For the new profile to be assigned correctly you must do this or exclude the device and include it again.

Yes, this is the way to see the logs.

When I have a version ready to read and set the time, I'll let you know so you can capture it and send it to me.

You can delete these logs, if you want

We are going to do a first test to read the date and time of the thermostat to see if it will help us how to set it.

Install this version of the driver with this CLI command:
───────────────────────────────────────────────────
Name Z-Wave Thermostat Mc
Version 2024-01-07T17:49:13.497157761
───────────────────────────────────────────────────

  • open a window with the CLI and execute this command
    smartthings edge:drivers:install
  • Follow the steps indicated on the CLI screen.
    It will take almost a minute to driver install and you can see the installation process if you have another window open with the CLI to see the driver logs.

When installed:

  • Choose a thermostat in the App, the one you want:
  • Have the window ready to see the logs
  • Refresh the thermostat by sliding your finger down in App
  • In the log window the refresh command will be sent and the responses from this thermostat will be received.
  • Capture the responses and publish them, let's see what they send

Sorry, I do not see the log.txt files

Sorry,
Reply to me via github instead of email.

These are the logs from 13:57, they are already repeated 3 times, every time you reply by email they are republished on github

The installation logs are not necessary, only the thermostat refresh logs

ooops, I wasn't aware that our emails are published on github 😊 - sorry about that - here is the Girl's Bathroom Thermostat refresh log - have in mind I refreshed it more than once
Girl's Bathroom Thermostat Refresh - log.txt

The thermostat response is 22:43:49 UTC and sends a value of 0 for the year, month and day.

The true UTC time is that of the log 19:37:21

Does the thermostat have the date and time set correctly?

2024-01-07T19:37:21.813054073+00:00 INFO Z-Wave Thermostat Mc <ZwaveDevice: 3c78d994-6a21-42bc-93dc-2089ad8d35c0 [0E] (Girl's Bathroom Thermostat)> received Z-Wave command: {args={day=0, hour_utc=22, minute_utc=43, month=0, second_utc=49, year=0}, cmd_class="TIME_PARAMETERS", cmd_id="REPORT", dst_channels={}, encap="NONE", payload="\x00\x00\x00\x00\x16\x2B\x31", src_channel=0, version=1}

This driver version GET the command class TIME too when perform the refresh

───────────────────────────────────────────────────
Name Z-Wave Thermostat Mc
Version 2024-01-07T22:52:26.4107673
───────────────────────────────────────────────────

Hi Josko,

I have done a TEST version of the driver:

  • Has a preference in settings to enter the offset of the local time with the UTC time (-12 to 12)
preferences:
  - name: "localTimeOffset"
    title: "Local Time Offset to UTC (-12 to 12)"
    description: "Select Your Local Time Offset to UTC Time Hours (-12 to 12)"
    required: true
    preferenceType: integer
    definition:
      minimum: -12
      maximum: 12
      default: 0
  • When installing it, you must enter the local time offset where the thermostat is located

  • App will Shows the thermostat time in a capability.

  • When the driver is installed, the thermostat time is read and a timer is started that reads the thermostat time every minute.

  • Now, for testing, every minute it sends the system UTC time + the offset UTC entered in settings to the device to synchronize them.

  • If everything works well, the synchronization can be done every 1 or 2 hours, or once a day.

  • Install this version of the driver on your Hub

  • Choose a thermostat to carry out the tests and change the driver to the TEST driver

  • Send me the logs to see if the time commands are sent and accepted or if there are any errors

───────────────────────────────────────────────────
 Driver Id    ed4aaf05-13fe-48d9-90f8-5274b1373883 
 Name         Z-Wave Thermostat Mc-TEST
 Package Key  zwave-thermostat-TEST
 Version      2024-01-09T17:39:22.535430406        
───────────────────────────────────────────────────

Many thanks Mariano! I'll try to find time to test it tomorrow - the day after tomorrow the latest.

Hi Mariano! I've just tested it - changed driver to Z-wave Thermostat Mc-TEST for one of my thermostats (Main Entrance Hall Thermostat). I've set "Local Time Offset to UC (-12 to 12)" to 1 (because I am in UTC+1 timezone). In app now I can see "Local Date and Time" capability and there is static time shown - by static I mean time shown here is always the same, no matter how many times I've exit and re-enter that thermostat tile in the app. And time on the thermostat itself (physical device) is not synchronized automatically - at least it wasn't until I've refreshed device in the app (by pulling down finger on the device page in app - but than, thank you Mariano, it is refreshed (to current time) both, in the app and on the (physical) device as well. So this is definitely huge step forward (THAAAANK YOOUUU)! Still, again if it is not much of trouble for you, I think it would be great:

  1. if time is really sent to the thermostat itself every (as you've suggested) hour or two. Perhaps this does work - but as far as I can understand - it seems to me that it works only in case when I refresh the device (by pulling my finger in the app) - but I hope you'll be able to confirm this from the logs I am attaching here; and it would be nice

Hi,

I do not can see the logs files

(sorry - I've pressed ctrl + enter by mistake), so and
2. every time when I enter device page in the app, it would be nice that device is refreshed, time to be sent to the thermostat, and shown in the app within this new capability (Local Date and Time) - as it already works but only in case I manually refresh the device
3. it would be nice that time shown in "Local Date and Time" in the app shows hh:mm format, meaning to have leading zero when hour value, or minute value, is less then 10. For instance at 23:09, time shown in the app was 23:9 :-)

In attached log you'll find that I've, couple of times, refreshed the device within the app - so you'd be able to conclude something from there as well :-)
Main Entrance Hall Thermostat - log.txt

Again, this is HUGE step forward already - THANK YOU!

Hi,

I do not can see the logs files

You are really to efficient! 😊

Install this driver version with CLI.

When driver installed the Thermostat hour in App will be updated every 1 minute without perform refresh manually.

Horu will be shown in hh:mm format

I need see 3 or 4 minutes of logs to see if the timer to get thermostat hour is running

If it works I will change so that the system time send to the thermostat every 2 or three hours

───────────────────────────────────────────────────
 Driver Id    ed4aaf05-13fe-48d9-90f8-5274b1373883 
 Name         Z-Wave Thermostat Mc-TEST
 Package Key  zwave-thermostat-TEST
 Version      2024-01-10T23:01:04.145907247        
───────────────────────────────────────────────────

I'll see it tomorrow, I'm going to sleep

Hi Mariano! It seems it works even without I've updated the driver - I suppose it updated automatically (is this assumption correct)? So, first attached log is log prior to my driver update - in app I can see Local Date and Time capability is updating automatically every 1 minute as you've said. Here it is:
Main Entrance Hall Thermostat, befor driver update - log.txt

I don't know commands to update driver via Smartthings CLI so I've, through ST mobile app, changed driver to Z-wave Thermostat Mc, then deleted the driver Z-wave Thermostat Mc-TEST, verified on the device tile settings that driver has changed (no Local Date and Time capability), and after that I've installed Z-wave Thermostat Mc-TEST again, and then changed the device driver in app (from Z-wave Thermostat Mc) to Z-wave Thermostat Mc-TEST - and again - it seems it works just fine - Local Date and Time capability is updating every minute, showing the correct hh:mm format (for instance 09:03)...so it seems you've done it again!! BRAVO!
Attached is log after above described device driver update procedure.
Main Entrance Hall Thermostat, after driver update - log.txt

Hi Josko,

Okay,

Yes, driver updates automatically in 12 hours maximum.

I have seen that the thermostat only supports the time, I also send it the date, but it does not support it, it keeps sending 0 for year, month and day.

I will make the final version so that the thermostats are synchronized every 3 hours, in a staggered manner, so that all the commands are not sent at the same time, since you have 11 thermostats and could create momentary saturation of the zwave network.

I will also add some settings in preferences so that you can customize the humidity reporting parameters with wider intervals and not have as much zwave traffic.

Understood - many thanks for your effort!

Hi Josko,

I have made a definitive Mc version of the driver:

  • Shows the thermostat time in a new capability called "Thermostat Local Time".
  • When the driver is installed, the thermostat time is read and a timer is started that reads the time every minute.
  • Every 3 hours + a random time of up to 25 minutes, the system UTC time + the offset entered in settings is sent to the device to synchronize them.
  • I have added parameters 2, 3, 4 and 5 in preference settings so that you can adjust the temperature or humidity reports to your liking.
    You can leave the temperature ones as they are by default (30 sec or changes of 0.5ºC) so that the temperature of the thermostat and the app are synchronized

image

  • Install this version of the driver on your Hub
  • In preferences, enter the local time offset to UTC on all thermostats and the time on each thermostat will be synchronized.
  • On the thermostat with the TEST driver, change the driver to the definitive Mc version.
  • You can delete the TEST version of your Hub
  • If you want, you can send me a log, if you see that something is not working well or if you see an error in the logs
───────────────────────────────────────────────────
 Name         Z-Wave Thermostat Mc
 Version      2024-01-11T17:18:11.235000144        
───────────────────────────────────────────────────

Many thanks Mariano! I'll test it on all thermostats in next couple of days and report to you!

Hi Mariano,
I hope this message finds you in both good health and mood! :-)
Again I have one favor to ask - in my other apartment I have same thermostats but with slightly different fingerprint – „015F-0702-5102“ (instead of “015F/0712/5102” which I have in my main apartment and which works perfectly with your driver). Since I can see no difference between these two thermostats, can you, please, add this fingerprint as well?
Best regards!

Hi Josko,

I already have it modified the driver, but right now the smartthings servers have been broken and the channels and drivers cannot be accessed.

I have also modified the synchronization time of the thermostat clocks from 3 hours to 12 hours or by refreshing the App, to avoid too many writes to the thermostat's flash memory.

When I can publish the new version of the driver I will let you know.

Published new drivr version
───────────────────────────────────────────────────
Driver Id ff05b575-c664-487b-a3c4-f2cb95265c54
Name Aplicaciones Virtuales Mc
Package Key virtual-switches-v2
Version 2024-02-01T16:40:23.516138839
───────────────────────────────────────────────────

Many thanks Mariano! Prompt and efficient as always !

The correct Id of the driver is this ae1317ad-ba10-4f8b-9926-986101f2b849
Yesterday with smartthings issue created different driver id with the same name

This ID mus be the driver you was installed in yours previous thermostats
───────────────────────────────────────────────────
Driver Id ae1317ad-ba10-4f8b-9926-986101f2b849
Name Z-Wave Thermostat Mc
Package Key zwave-thermostat
Version 2024-02-02T18:54:02.621665635
───────────────────────────────────────────────────

Thanks Mariano! I've checked - my devices are using drivers with proper driver ids.