Announcement

Collapse
No announcement yet.

Thermostat via mqtt?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Thermostat via mqtt?

    I have a Daikin mini-spirit that has a WiFi interface, that I can connect to via node-red. Any way to make a Homeseer thermostat device (so it appears as a thermostat in the mobile interface) that talks mqtt via the plugin?


    Sent from my iPhone using Tapatalk

    #2
    Sure, just give me the details. in particular what is the mqtt message received from node-red? What controls do you want available in HS?

    Comment


      #3
      Hi!
      I also have a Daikin AC (Multisplit 4MXM68N outdoor with 2x FTXM 25N, FTXM 42N and FVXM 25F indoor) with WiFi interface and would like to control the indoor-devices via Homeseer and HSTouch.
      I dont know how the WiFi-Interfaces communicate with the mobile-App and have never heard of "mqtt" or "node-red". If you tell me how, I will gladly post the mqtt message.
      The available controls wanted in HS would be:
      - current temperature of the room (only for information)
      - set wanted temperature
      - on/off
      - fan speed

      ;-)

      Comment


        #4
        Let us start with a browser and set the URL as shown below where the IP address of the unit is shown in red. Change the red text to whatever the IP is of the Dalkin.
        Code:
        http://[COLOR=#FF0000]192.168.0.123[/COLOR]/aircon/get_control_info
        I obtaine this from https://github.com/ael-code/daikin-control I am not a node-red user, but it looks as if node-red has the API implemented so the approach in post #1 is the lowest risk where the actual communication with the unit is via node-red and the info you want available in Homeseer is sent via MQTT. I can setup a Thermostat set of HS devices based upon the content of the MQTT JSON payload.

        Comment


          #5
          Here you go:

          ret=OK,pow=1,mode=4,adv=,stemp=12.0,shum=0,dt1=25.0,dt2=M,dt 3=25.0,dt4=12.0,dt5=12.0,dt7=25.0,dh1=AUTO,dh2=50,dh3=0,dh4= 0,dh5=0,dh7=AUTO,dhh=50,b_mode=4,b_stemp=12.0,b_shum=0,alert =255,f_rate=A,f_dir=0,b_f_rate=A,b_f_dir=0,dfr1=5,dfr2=5,dfr 3=5,dfr4=A,dfr5=A,dfr6=5,dfr7=5,dfrh=5,dfd1=0,dfd2=0,dfd3=0, dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0

          Comment


            #6
            Looks surprisingly basic... there's a node (not node-red, just NPM) library out there for Daikin control. I can't use it with my node-red install since it's a docker and I'm not patient/smart enough to do my own docker build and maintain it: https://github.com/Apollon77/daikin-controller

            Comment


              #7
              I should be able to provide the interface to expose:

              - current temperature of the room (only for information)
              - set wanted temperature
              - on/off
              - fan speed

              Obviously testing will need to be by those that have the Daikin.

              Comment


                #8
                I finally made some progress with node-red (surprisingly easy actually once I sat down and did it) and have it publishing mode, current temp, set temp, fan speed, and fan swing mode.

                Ideally if there was a way mcsMQTT could provide a "generic" thermostat device that had:
                - Current temp
                - Setpoint A (A and B are for the auto mode where it will keep the room between a high/low temp using heat or cool)
                - Setpoint B
                - On/Off
                - Mode (Auto/Heat/Cool at a minimum, or arbitrary values from mqtt since these units support dehumidify and a few others)
                - Bonus points, or make these optional:
                * Fan mode
                * Fan speed
                * "Swing" mode (you can turn the motorized vanes to swing horizontal, vertical, or both)
                * Last update time (I send in the MQTT payload, this would allow for some debugging if connections are lost somewhere)

                Happy to help test and if you could allow mcsMQTT to build the HS Thermotat device, and provide some sort of config facility to do the "wiring" in the plugin that would be awesome, and presumably make this work for more than just Daikin.

                I can do things like set the mode and temp with regular HS devices and mcsMQTT, but it sure would be nice to have a single thermo device that HS sees as such so it shows up property in the UI and events.

                Comment


                  #9
                  I implemented the Daikin protocol in version 5.2.0.0 of mcsMQTT. It is at http://mcsSprinklers.com/mcsMQTT_5_2_0_0.zip. You need HSPI_MCSMQTT.exe into HS folder and mcsMQTT_2020.dll into the \bin\mcsMQTT folder. There is also a .pdf update which is primarily in Section 12.2.

                  Setup is from the TCP page, Daikin tab. Enter the IP address of each unit.

                  Click image for larger version

Name:	Capture1.PNG
Views:	295
Size:	11.9 KB
ID:	1366809

                  The unit is polled every 15 seconds. When it responds the mandatory HS devices are created as below

                  Click image for larger version

Name:	Capture2.PNG
Views:	273
Size:	102.3 KB
ID:	1366810
                  Also available to map into HS are other parameters that will be status only devices. Some of them are shown below.

                  Click image for larger version

Name:	Capture3.PNG
Views:	287
Size:	98.0 KB
ID:	1366811

                  I do not have a unit, but I did test the communication with what I expect using postman. Let me know of any issues. If there is an issue with communication with the unit then there will be info in the debug log \data\mcsMQTT_debug.txt.

                  I did not create a specific Thermostat device, but just implemented the protocol and created devices in HS similar to what was done for Hubitat thermostats.




                  Attached Files

                  Comment


                    #10
                    Hi!
                    Thanks for your great work.
                    I installed the plugin and copied HSPI_MCSMQTT.exe into HS folder and mcsMQTT_2020.dll into the \bin\mcsMQTT folder. What about all the other files included in the ZIP-file? Are they useless?
                    My 4 Daikin units now appear in the devicelist, but I cant control them. I only tried turning them on by pushing the "ON-Button" in the devicelist but nothing happened.
                    ;-)

                    Comment


                      #11
                      The expectation is that the plugin is installed from the HS3 updater and then manually update the new files. I'm surprised you got as far as you did without the ..config.exe file also present.

                      There is a debug option on the MQTT page, General tab at the top. Set this, try to control you unit and then post the debug txt file that is \Data\mcsMQTT folder.

                      Comment


                        #12
                        Hi!
                        I installed the plugin with the HS3 updater and only changed the two files (HSPI_MCSMQTT.exe and mcsMQTT_2020.dll) and was wondering about all the other files, that I didnt use, exiting in the zip-file.
                        This ist the debug-file:
                        07.03.2020 13:15:15 53234334 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                        07.03.2020 13:15:15 53234336 | Updating Device from 0 PayloadNumeric=False
                        07.03.2020 13:15:30 53249554 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                        07.03.2020 13:15:30 53249556 | Updating Device from 0 PayloadNumeric=False
                        07.03.2020 13:15:46 53264773 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                        07.03.2020 13:15:46 53264775 | Updating Device from 0 PayloadNumeric=False
                        07.03.2020 13:16:01 53280001 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                        07.03.2020 13:16:01 53280004 | Updating Device from 0 PayloadNumeric=False
                        07.03.2020 13:16:05 53283742 | SetIOMulti 485, oCAPI.ControlType=Button
                        07.03.2020 13:16:05 53283747 | ParentCount 1
                        07.03.2020 13:16:05 53283759 | ParentRef 483
                        07.03.2020 13:16:16 53295220 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                        07.03.2020 13:16:16 53295222 | Updating Device from 0 PayloadNumeric=False
                        07.03.2020 13:16:31 53310439 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                        07.03.2020 13:16:31 53310441 | Updating Device from 0 PayloadNumeric=False
                        07.03.2020 13:16:46 53325657 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                        07.03.2020 13:16:46 53325659 | Updating Device from 0 PayloadNumeric=False
                        07.03.2020 13:17:02 53340879 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                        07.03.2020 13:17:02 53340881 | Updating Device from 0 PayloadNumeric=False
                        07.03.2020 13:17:17 53356097 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                        07.03.2020 13:17:17 53356099 | Updating Device from 0 PayloadNumeric=False

                        Comment


                          #13
                          I added additional trace information including the actual commands being sent. It will be in the same debug. Update of the two files is at http://mcsSprinklers.com/mcsMQTT_5_2_0_3.zip

                          Also confirm that the status reported in the HS devices does reflect the status of the unit. The debug now contains the request for status and the data returned.

                          Comment


                            #14
                            Originally posted by Michael McSharry View Post
                            I added additional trace information including the actual commands being sent. It will be in the same debug. Update of the two files is at http://mcsSprinklers.com/mcsMQTT_5_2_0_3.zip

                            Also confirm that the status reported in the HS devices does reflect the status of the unit. The debug now contains the request for status and the data returned.

                            I didnt find where to confirm this.

                            The Log without confirmation:
                            08.03.2020 13:18:18 526927 | HSEvent VALUE_CHANGE| 1024| S08| 350| 349| 585
                            08.03.2020 13:18:19 527918 | HSEvent VALUE_CHANGE| 1024| S08| 351| 350| 585
                            08.03.2020 13:18:20 528918 | HSEvent VALUE_CHANGE| 1024| S08| 352| 351| 585
                            08.03.2020 13:18:21 529920 | HSEvent VALUE_CHANGE| 1024| S08| 353| 352| 585
                            08.03.2020 13:18:22 530924 | HSEvent VALUE_CHANGE| 1024| S08| 354| 353| 585
                            08.03.2020 13:18:23 531935 | HSEvent VALUE_CHANGE| 1024| S08| 355| 354| 585
                            08.03.2020 13:18:24 532949 | HSEvent VALUE_CHANGE| 1024| S08| 356| 355| 585
                            08.03.2020 13:18:25 533951 | HSEvent VALUE_CHANGE| 1024| S08| 357| 356| 585
                            08.03.2020 13:18:26 534951 | HSEvent VALUE_CHANGE| 1024| S08| 358| 357| 585
                            08.03.2020 13:18:27 535965 | HSEvent VALUE_CHANGE| 1024| S08| 359| 358| 585
                            08.03.2020 13:18:28 536967 | HSEvent VALUE_CHANGE| 1024| S08| 360| 359| 585
                            08.03.2020 13:18:29 537982 | HSEvent VALUE_CHANGE| 1024| S08| 361| 360| 585
                            08.03.2020 13:18:30 538983 | HSEvent VALUE_CHANGE| 1024| S08| 362| 361| 585
                            08.03.2020 13:18:31 539983 | HSEvent VALUE_CHANGE| 1024| S08| 363| 362| 585
                            08.03.2020 13:18:31 540080 | Daikin SubGet URL http://192.168.178.58/aircon/get_control_info
                            08.03.2020 13:18:31 540151 | Daikin SubGet URL http://192.168.178.59/aircon/get_control_info
                            08.03.2020 13:18:31 540186 | Daikin SubGet Return ret=OK,pow=0,mode=6,adv=,stemp=--,shum=--,dt1=25.0,dt2=M,dt3=20.0,dt4=25.0,dt5=25.0,dt7=25.0,dh1=AUTO ,dh2=50,dh3=0,dh4=0,dh5=0,dh7=AUTO,dhh=50,b_mode=6,b_stemp=--,b_shum=--,alert=255,f_rate=3,f_dir=0,b_f_rate=3,b_f_dir=0,dfr1=5,dfr2 =5,dfr3=3,dfr4=5,dfr5=5,dfr6=3,dfr7=5,dfrh=5,dfd1=0,dfd2=0,d fd3=0,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0,dmnd_run=0,en_deman d=0
                            08.03.2020 13:18:31 540186 | Update Accepted 589 to -- StatusType=3 Payload= -- RegExValue=--
                            08.03.2020 13:18:31 540188 | Updating Device from 0 PayloadNumeric=False
                            08.03.2020 13:18:31 540191 | Daikin SubGet URL http://192.168.178.58/aircon/get_sensor_info
                            08.03.2020 13:18:31 540268 | Daikin SubGet Return ret=OK,pow=0,mode=6,adv=,stemp=--,shum=--,dt1=25.0,dt2=M,dt3=19.0,dt4=25.0,dt5=25.0,dt7=25.0,dh1=AUTO ,dh2=50,dh3=0,dh4=0,dh5=0,dh7=AUTO,dhh=50,b_mode=6,b_stemp=--,b_shum=--,alert=255,f_rate=3,f_dir=0,b_f_rate=3,b_f_dir=0,dfr1=5,dfr2 =5,dfr3=A,dfr4=5,dfr5=5,dfr6=3,dfr7=5,dfrh=5,dfd1=0,dfd2=0,d fd3=0,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0,dmnd_run=0,en_deman d=0
                            08.03.2020 13:18:31 540269 | Daikin SubGet URL http://192.168.178.59/aircon/get_sensor_info
                            08.03.2020 13:18:31 540300 | Daikin SubGet Return ret=OK,htemp=22.0,hhum=-,otemp=11.0,err=0,cmpfreq=0
                            08.03.2020 13:18:31 540375 | Daikin SubGet Return ret=OK,htemp=22.0,hhum=-,otemp=11.0,err=0,cmpfreq=0
                            08.03.2020 13:18:32 540996 | HSEvent VALUE_CHANGE| 1024| S08| 364| 363| 585
                            08.03.2020 13:18:32 541255 | Daikin SubGet URL http://192.168.178.60/aircon/get_control_info
                            08.03.2020 13:18:32 541393 | Daikin SubGet Return ret=OK,pow=0,mode=6,adv=,stemp=--,shum=--,dt1=25.0,dt2=M,dt3=25.0,dt4=25.0,dt5=25.0,dt7=25.0,dh1=0,dh 2=50,dh3=0,dh4=0,dh5=0,dh7=0,dhh=50,b_mode=6,b_stemp=--,b_shum=--,alert=255,f_rate=3,f_dir=0,b_f_rate=3,b_f_dir=0,dfr1=A,dfr2 =5,dfr3=5,dfr4=5,dfr5=5,dfr6=3,dfr7=A,dfrh=5,dfd1=0,dfd2=0,d fd3=0,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0,dmnd_run=0,en_deman d=0
                            08.03.2020 13:18:32 541394 | Daikin SubGet URL http://192.168.178.60/aircon/get_sensor_info
                            08.03.2020 13:18:32 541497 | Daikin SubGet URL http://192.168.178.61/aircon/get_control_info
                            08.03.2020 13:18:32 541509 | Daikin SubGet Return ret=OK,htemp=20.0,hhum=-,otemp=11.0,err=0,cmpfreq=0
                            08.03.2020 13:18:32 541605 | Daikin SubGet Return ret=OK,pow=0,mode=6,adv=,stemp=--,shum=--,dt1=25.0,dt2=M,dt3=19.0,dt4=25.0,dt5=25.0,dt7=25.0,dh1=AUTO ,dh2=50,dh3=0,dh4=0,dh5=0,dh7=AUTO,dhh=50,b_mode=6,b_stemp=--,b_shum=--,alert=255,f_rate=3,f_dir=0,b_f_rate=3,b_f_dir=0,dfr1=5,dfr2 =5,dfr3=3,dfr4=5,dfr5=5,dfr6=3,dfr7=5,dfrh=5,dfd1=0,dfd2=0,d fd3=0,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0,dmnd_run=0,en_deman d=0
                            08.03.2020 13:18:32 541606 | Daikin SubGet URL http://192.168.178.61/aircon/get_sensor_info
                            08.03.2020 13:18:32 541715 | Daikin SubGet Return ret=OK,htemp=23.0,hhum=-,otemp=11.0,err=0,cmpfreq=0
                            08.03.2020 13:18:33 541997 | HSEvent VALUE_CHANGE| 1024| S08| 365| 364| 585
                            08.03.2020 13:18:34 543013 | HSEvent VALUE_CHANGE| 1024| S08| 366| 365| 585
                            08.03.2020 13:18:35 544015 | HSEvent VALUE_CHANGE| 1024| S08| 367| 366| 585
                            08.03.2020 13:18:36 545014 | HSEvent VALUE_CHANGE| 1024| S08| 368| 367| 585
                            08.03.2020 13:18:37 546028 | HSEvent VALUE_CHANGE| 1024| S08| 369| 368| 585
                            08.03.2020 13:18:38 547029 | HSEvent VALUE_CHANGE| 1024| S08| 370| 369| 585
                            08.03.2020 13:18:39 548030 | HSEvent VALUE_CHANGE| 1024| S08| 371| 370| 585

                            Comment


                              #15
                              I tried to turn unit 192.168.178.60 on

                              Comment

                              Working...
                              X