dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.89k stars 496 forks source link

MoesGo (Tuya) Smart Thermostat BRT-100 #5153

Closed alinfulgusin closed 2 years ago

alinfulgusin commented 3 years ago

Device

Screenshots

https://zigbee.blakadder.com/Beca_BRT-100.html https://www.amazon.de/-/en/Thermostat-Operated-Radiator-Regulator-Compatible/dp/B0972YM58R/ref=sr_1_5?dchild=1&keywords=heizk%C3%B6rperthermostat+moesgo&qid=1626946864&sr=8-5

Basic

Identify

Alarms

Device Temperature

Groups

Scenes

On/Off

Level Control

Color Control

Simple Metering

Diagnostics

Other clusters that are not mentioned above

Mimiix commented 3 years ago

Missing all screens. Closing.

alinfulgusin commented 3 years ago

Missing all screens. Closing.

how - but I don't know how to add them :) This is the reason I put URLs

Mimiix commented 3 years ago

You need to own the device :)

alinfulgusin commented 3 years ago

You need to own the device :)

But I have the device. Actually I have 2. I am trying to pair with deconz (conbee 2) but cannot find them.

WhatsApp Image 2021-07-22 at 17 40 22

Smanar commented 3 years ago

And nothing visible on deconz when trying to include the device ? You need to set the permit mode "add new sensor" in phoscon, but look for the device in deconz.

If I m right this device is not net in the API (manu = _TZE200_b6wax7g0) ?

alinfulgusin commented 3 years ago

Hi Smanar,

Thank you for your message.

And nothing visible on deconz when trying to include the device ?

yes. nothing visible. I have few sensors - but this one doesn't want to pair. I also installed the latest docker for deconz

You need to set the permit mode "add new sensor" in phoscon, but look for the device in deconz

I used the button "add new sensor" in phoscon (many time) - but it doesn't find anything. I don't know how to look for the device in deconz.

If I m right this device is not net in the API (manu = _TZE200_b6wax7g0) ?

I think is a new device - this is the reason why is not paired - and probably it has to be integrated.

Best Regards, Alin

Smanar commented 3 years ago

I think is a new device - this is the reason why is not paired - and probably it has to be integrated.

New device are not visible in the API, but deconz support ALL zigbee device, you need to see it in the deconz application.

I don't know how to look for the device in deconz.

You just see a new node in the application

Are you sure for the reset procedure on the device ?

alinfulgusin commented 3 years ago

I have the deconz on docker/Raspberry Pie and I don't know how to start the deconz GUI :D

Smanar commented 3 years ago

Ha ok, so I understand better, you realy need the GUI to see information about the device to include it in the API.

I can't explain how to do on docker, but you have not a PC to take the capture ? you will just need to switch the conbee 10 mn.

alinfulgusin commented 3 years ago

Ok I can do this. Question: Once I will put it back on Raspberry it will work as nothing was changed - or I have to reset everything and to re-pair the current devices?

Smanar commented 3 years ago

No don't worry, network config is on the gateway, so if you have configured the conbee on the docker OS, you will have same setting on the PC The devices database is on the host, so on the PC you will see devices already paired trying to connect with missing name (you will have 0x1234 as name) because on the Pc you will have an empty database.

And when you return to the docker install, you can see the TRV trying to connect it but no more changes.

alinfulgusin commented 3 years ago

Hi,

I installed deconz on Windows and I connected the conbee stick This is what I see. Any other infio required? image image image

Thank you!

Smanar commented 3 years ago

Nope, perfect, will add it today. Have you a linux machine with full OS to make test ?

Smanar commented 3 years ago

Ok so have started the code, but realy need test, this device have specific working mode.

You have the procedure here https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Compiling-the-REST-plugin-for-device-specific-testing So for you, after having installed deconz :

sudo apt install deconz-dev
git clone --branch trv41 https://github.com/Smanar/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

ATM (if it work, TRV can need 2 inclusions without deleting to be included)

alinfulgusin commented 3 years ago

Hi Smanar,

First of all thank you for your support. I've installed a VM with Ubuntu. There is an error when I execute "qmake && make -j2"

firmware_update.cpp: In member function ‘void DeRestPluginPrivate::checkFirmwareDevices()’: firmware_update.cpp:548:73: error: ‘instance’ is not a member of ‘deCONZ::DeviceEnumerator’ 548 | deCONZ::DeviceEnumerator *devEnumerator = deCONZ::DeviceEnumerator::instance(); | ^~~~ make[1]: [Makefile.Release:1002: release/firmware_update.o] Error 1 make[1]: Waiting for unfinished jobs.... make[1]: Leaving directory '/home/fare/deconz-rest-plugin' make: *** [Makefile:42: release] Error 2

Smanar commented 3 years ago

This error is classic, you are using an old dev package I think.

pi@raspberrypi:~ $ sudo apt install deconz-dev
deconz-dev is already the newest version (2.12.00-raspbian-stretch-beta).

You probably need to upadate your package list.

alinfulgusin commented 3 years ago

Hi,

I've just installed the ubuntu and deconz...so I suppose are the latest versions. I run the above commands:

fare@ubuntu:~$ sudo apt install deconz-dev [sudo] password for fare: Reading package lists... Done Building dependency tree Reading state information... Done deconz-dev is already the newest version (2.11.05-ubuntu-focal-stable). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Smanar commented 3 years ago

2 possibilities

https://phoscon.de/en/conbee2/install#ubuntu


sudo apt update
sudo apt full-upgrade
alinfulgusin commented 3 years ago

Hi,

Using the last 2 commands - the qmake and make worked. Now trying to start deconz app it's just crashing and trying to start again. Do you need any logs? (just let me know where I can find them :) )

Smanar commented 3 years ago

I have checked the code again, and I don't think the restart problem is from me, changes are realy basic. You have compiled the file on the same machine you are using it ? (the compilation is host dependant)

Can need to use (in the folder deconz-rest-plugin) make clean

To clear tempory files compiled with older version.

If you have crash at startup, the only way to have them is using command line https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/deCONZ-debug-flags

alinfulgusin commented 3 years ago

I re-installed everything (ubuntu,deconz..). Now it's working but still it's not pairing this smart thermostat. Should I check/test something ? image

Smanar commented 3 years ago

Oups, my bad. Have updated the code

cd deconz-rest-plugin
git pull
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

And remember you need 2 inclusion without deleting the device, it will a plug (in "light") at first inclusion and you will have the sensor entry at second nclusion (in "sensor")

alinfulgusin commented 3 years ago

Hi,

There are some signs - but still doesn't work to pair. If am I am trying to use Lights doesnt' find it. But it does find something when I am using Sensors (see second foto) - but if I am closing the window I dont see anthing in the list image image

Smanar commented 3 years ago

Thermostat are not visible in phoscon, you need to check direcly in the API.

What is your third app (home automation app that use deconz)?

alinfulgusin commented 3 years ago

I am using home assistant. How can I check directly in the api?

Smanar commented 3 years ago

Can use HA too, you just need to configure it to use your "developpment deconz instance". Else can use http://phoscon.de/pwabeta in help/api information.

alinfulgusin commented 3 years ago

is it OK?

image

Smanar commented 3 years ago

Yep it s this one ^^ I think :

Do you need to use a mode or preset command to use this device ? If yes, just set the command manualy and give me the logs (taken with deconz with "info" and "info_l2" to mimic the command you do manualy).

But will be easier for you to use it with HA nope ? Don't want to broke your "production setup" ?

alinfulgusin commented 3 years ago

Hi,

Yes, I would like to see the temperature and set one. I will try to get the logs Currently, I used HA and I added the deconz You can see below the devices – I see the Thermostat 2 there pic1

I added this entity to the overview screen. But it seems there are not too much to see – beside the temperature – (which is correct – 22 is also on the screen)

pic2

Smanar commented 3 years ago

Ha ? Temperature is working finaly ?

To change the heatsetpoint using Curl command you can use

curl -H 'Content-Type: application/json' -X PUT -d '{"heatsetpoint": 3200}' http://192.168.127.130:8080/api/47270DF5F5/sensors/2/config

Perhaps it s not displayed because the value is "null", but it s strange for other settings, and I don't use HA on my side. I will ask to someone.

I m seing too "Heat" on your widget. Generaly I m using "mode" for TRV and "preset" for wall thermostat. I don't know your device, do you have (manualy command) to set a "mode" to heat / boost / off / auto ? Or perhaps 1 command by "mode" ?

alinfulgusin commented 3 years ago

I am not familiar with the thermostat - I just receive it. I can set manually the mod heat / boost ... I set the hetsetpoint

pic3

Smanar commented 3 years ago

Ha ok, so the setheatpoint is just displayed close to the mode. It s strange, some other user have this one HAthermostat

Have asked on the discord what they have do to have it.

I can set manually the mod heat / boost

Perfect, I think it s the last thing I need. Can you enable log (can do with deconz in help/debug view) with "info" and set thoses mode one by one ?

You will see in log lines like

Tuya debug 4 : Address: 0x%016llX Command: %u Payload: %s\n
Tuya debug 5 : Status: %u Transid: %u Dp: %u (0x%02X,0x%02X) Fn: %u Data %ld\n

Don't worry for order, I already have value, it s just to be sure about the device working mode.

Smanar commented 3 years ago

Hello, no news about the working mode ?

github-actions[bot] commented 3 years ago

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

Smanar commented 3 years ago

Hello, still alive ^^ ?

alinfulgusin commented 3 years ago

Hi

Yes...Sorry...I tried to configure de log..but got an error. Later I had an issue with my laptop and I have to re install all again...but I didnt have the time...Let you know once I will re test

d0ugal commented 2 years ago

I also have one of these devices. Is there anything I can help test?

Mimiix commented 2 years ago

@d0ugal https://github.com/dresden-elektronik/deconz-rest-plugin/issues/5153#issuecomment-887776645 :)

github-actions[bot] commented 2 years ago

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

github-actions[bot] commented 2 years ago

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

laparca commented 2 years ago

Hi, I recently bought some units of this thermostat. I'll try to check @Smanar changes on HA.

Mimiix commented 2 years ago

@Smanar

laparca commented 2 years ago

Hi, I'm sorry for the delay. This is the information I get from manual and deCONZ traces:

  1. In the user manual there are four operational modes: manual, programming, holiday and temporary manual.
  2. Press the menu button image
  3. Changes between modes (the marked text is when the button is pressed to switch on the screen, the next part is the output when the mode is changed): 3.1. From manual mode to programming mode image 3.2. From programming mode to holiday mode image 3.2. From holiday mode to manual mode image
  4. In my installation of Home Assistant only two icons are show: a flame and the power. Both do nothing when pushed, but when target temperature is changed I can see the mechanism moving: image

I'm not sure if you need more information.

Best Regards, Sam

Smanar commented 2 years ago

So mode is 0x04 0x01

Have added config/mode to the device. But problem, your device support

                            if (data == 0) { mode = QLatin1String("auto"); } //programming
                            else if (data == 1) { mode = QLatin1String("manual"); } //manual
                            else if (data == 2) { mode = QLatin1String("temporary_manual"); } //temporary_manual
                            else if (data == 3) { mode = QLatin1String("holiday"); } //holiday

And HA use "auto" "off" and "heat". So what is the "manual" mode ? Can we use the "heat" command ? (and I can be wrong for the "auto", I have take the mode "programming")

cd deconz-rest-plugin
git pull
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

To update your branch.

laparca commented 2 years ago

So mode is 0x04 0x01

Have added config/mode to the device. But problem, your device support

                            if (data == 0) { mode = QLatin1String("auto"); } //programming
                            else if (data == 1) { mode = QLatin1String("manual"); } //manual
                            else if (data == 2) { mode = QLatin1String("temporary_manual"); } //temporary_manual
                            else if (data == 3) { mode = QLatin1String("holiday"); } //holiday

And HA use "auto" "off" and "heat". So what is the "manual" mode ? Can we use the "heat" command ? (and I can be wrong for the "auto", I have take the mode "programming")

Not sure what should be the better match for HA :-/ We can start trying your solution and, after that, it can be fixed to the better fit.

Maybe the instructions can solve the doubts: image image

cd deconz-rest-plugin
git pull
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

To update your branch.

I'll check it.

Thanks you!

laparca commented 2 years ago

Hi,

I upgraded the environment to match the version. After this, and compile the new code, I removed one of the thermostats and I included it (two times without removing).

In the next image you can see one thermostat included previously, Thermostat 4, and the one removed and included, Thermostat 6:

image

The cluster thermostat is missing.

Best Regards, Sam

fmaestre69 commented 2 years ago

@Smanar Do know which firmware to update to have it detected (at least not listed as unknown ) ? . I am currently running 2.12.6 Commit: d39d01 Firmware : 0x26660700 Thx

Smanar commented 2 years ago

@fmaestre69 you need to use that https://github.com/dresden-elektronik/deconz-rest-plugin/issues/5153#issuecomment-886041215

@laparca Don't worry for the thermostat cluster, the device is still working ? Tuya can his the cluster, so deconz don't detect it immediately, but it s not a problem, this device don't use the thermostat cluster, but the tuya cluster, it can only make problem for detection.

About this device, if you are agree with that, I think I will remove the "config/mode" and use "config/preset". You have too much mode available, and the basic one used by HA or not realy compatible (no "off" for exemple)

laparca commented 2 years ago

Hi @Smanar ,

You're correct, it is still working. I had some problems with home assistant at the beginning.

About this device, if you are agree with that, I think I will remove the "config/mode" and use "config/preset". You have too much mode available, and the basic one used by HA or not realy compatible (no "off" for exemple)

It sounds good to me.

BR

Smanar commented 2 years ago

Done, you can try the last code. So "mode" is removed and instead you have preset = auto/manual/temporary_manual/holiday, Not sure all are available in HA, can change name if needed for exemple "away" = "holiday"

No need to re-include it, I think the restart will be enought.