ysimonx / node-red-contrib-melcloud

node-red node for mitsubishi with melcloud API
MIT License
15 stars 5 forks source link

Send data with msg.device not working #8

Closed fmonera closed 8 months ago

fmonera commented 2 years ago

I have an Air-To-Water unit (ECODAN) that I can manage with MelCloud.

It seems this node-red project can only manage Air-to-Air devices, but in theory, according to the documentation I can send direct commands through msg.device.

I am trying to set the heat flow temperature on the zone 1. It used to work on Python with an ancient version of pymelcloud with this code:

import pymelcloud
token = await pymelcloud.login("email", "password")
devices = await pymelcloud.get_devices(token)
device = devices[pymelcloud.DEVICE_TYPE_ATW][0]
await device.zones[0].set_target_heat_flow_temperature(42)

This is a screenshot of what I want to accomplish. Is it possible to do this way? (it isn't working)

image

ysimonx commented 2 years ago

Hello

Can you send me the documentation please ?

Le 21 févr. 2022 à 01:09, fmonera @.***> a écrit :

I have an Air-To-Water unit (ECODAN) that I can manage with MelCloud.

It seems this node-red project can only manage Air-to-Air devices, but in theory, according to the documentation I can send direct commands through msg.device.

I am trying to set the heat flow temperature on the zone 1. It used to work on Python with an ancient version of pymelcloud with this code:

import pymelcloud token = await pymelcloud.login("email", "password") devices = await pymelcloud.get_devices(token) device = devices[pymelcloud.DEVICE_TYPE_ATW][0] await device.zones[0].set_target_heat_flow_temperature(42) This is a screenshot of what I want to accomplish. Is it possible to do this way? (it isn't working)

https://user-images.githubusercontent.com/11884756/154870416-3b8587a0-7087-4560-a735-3205bad008d2.png — Reply to this email directly, view it on GitHub https://github.com/ysimonx/node-red-contrib-melcloud/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALB7CYRW4V2CSYWZZYV2QDU4F7B7ANCNFSM5O5DOCEQ. You are receiving this because you are subscribed to this thread.

fmonera commented 2 years ago

Hello,

The Pymelcloud project is here: https://github.com/vilppuvuorinen/pymelcloud

In case you need help to test my Air-to-Water unit, just ask. This is the JSON received by the "melcloud-connect" node:

{
                     "ID":98765,
                     "Name":"Sala Maquinas",
                     "BuildingId":123456,
                     "FloorId":12345,
                     "AccessLevel":4,
                     "DirectAccess":false,
                     "EndDate":"2500-01-01T00:00:00",
                     "MinTemperature":0,
                     "MaxTemperature":40,
                     "Expanded":true,
                     "Devices":[
                        {
                           "DeviceID":12345678,
                           "DeviceName":"Aerotermia",
                           "BuildingID":123456,
                           "BuildingName":null,
                           "FloorID":44444,
                           "FloorName":null,
                           "AreaID":55555,
                           "AreaName":null,
                           "ImageID":-1,
                           "InstallationDate":null,
                           "LastServiceDate":null,
                           "Presets":[
                              {
                                 "Power":true,
                                 "EcoHotWater":false,
                                 "OperationModeZone1":1,
                                 "OperationModeZone2":1,
                                 "SetTankWaterTemperature":55,
                                 "SetTemperatureZone1":30,
                                 "SetTemperatureZone2":20,
                                 "ForcedHotWaterMode":false,
                                 "SetHeatFlowTemperatureZone1":30,
                                 "SetHeatFlowTemperatureZone2":20,
                                 "SetCoolFlowTemperatureZone1":20,
                                 "SetCoolFlowTemperatureZone2":20,
                                 "ID":777777,
                                 "Client":888888,
                                 "DeviceLocation":99999999,
                                 "Number":1,
                                 "Configuration":"<settings><pw>true</pw><eh>false</eh><o1>1</o1><o2>1</o2><st>55</st><t1>30</t1><t2>20</t2><fh>false</fh><sh1>30</sh1><sh2>20</sh2><sc1>20</sc1><sc2>20</sc2></settings>",
                                 "NumberDescription":"Calor suave"
                              }
                           ],
                           "OwnerID":null,
                           "OwnerName":null,
                           "OwnerEmail":null,
                           "AccessLevel":4,
                           "DirectAccess":false,
                           "EndDate":"2500-01-01T00:00:00",
                           "Zone1Name":null,
                           "Zone2Name":null,
                           "MinTemperature":0,
                           "MaxTemperature":40,
                           "HideVaneControls":false,
                           "HideDryModeControl":false,
                           "HideRoomTemperature":false,
                           "HideSupplyTemperature":false,
                           "HideOutdoorTemperature":false,
                           "BuildingCountry":null,
                           "OwnerCountry":null,
                           "AdaptorType":-1,
                           "LinkedDevice":null,
                           "Type":1,
                           "MacAddress":"48:eb:62:ac:9f:fe",
                           "SerialNumber":"2008777777",
                           "Device":{
                              "PCycleActual":0,
                              "ErrorMessages":"",
                              "DeviceType":1,
                              "FTCVersion":1100,
                              "FTCRevision":"r0",
                              "LastFTCVersion":0,
                              "LastFTCRevision":null,
                              "FTCModel":3,
                              "RefridgerentAddress":0,
                              "DipSwitch1":38,
                              "DipSwitch2":140,
                              "DipSwitch3":80,
                              "DipSwitch4":0,
                              "DipSwitch5":62,
                              "DipSwitch6":0,
                              "HasThermostatZone1":true,
                              "HasThermostatZone2":true,
                              "TemperatureIncrement":0.5,
                              "DefrostMode":0,
                              "HeatPumpFrequency":0,
                              "MaxSetTemperature":45,
                              "MinSetTemperature":30,
                              "RoomTemperatureZone1":22.5,
                              "RoomTemperatureZone2":-39,
                              "OutdoorTemperature":7,
                              "FlowTemperature":30.5,
                              "FlowTemperatureZone1":25,
                              "FlowTemperatureZone2":25,
                              "FlowTemperatureBoiler":25,
                              "ReturnTemperature":31,
                              "ReturnTemperatureZone1":25,
                              "ReturnTemperatureZone2":25,
                              "ReturnTemperatureBoiler":25,
                              "BoilerStatus":false,
                              "BoosterHeater1Status":false,
                              "BoosterHeater2Status":false,
                              "BoosterHeater2PlusStatus":false,
                              "ImmersionHeaterStatus":false,
                              "WaterPump1Status":false,
                              "WaterPump2Status":false,
                              "WaterPump3Status":false,
                              "ValveStatus3Way":false,
                              "ValveStatus2Way":false,
                              "WaterPump4Status":false,
                              "ValveStatus2Way2a":false,
                              "ValveStatus2Way2b":false,
                              "TankWaterTemperature":46.5,
                              "UnitStatus":0,
                              "HeatingFunctionEnabled":true,
                              "ServerTimerEnabled":false,
                              "ThermostatStatusZone1":false,
                              "ThermostatStatusZone2":false,
                              "ThermostatTypeZone1":0,
                              "ThermostatTypeZone2":2,
                              "MixingTankWaterTemperature":25,
                              "CondensingTemperature":40.57,
                              "DemandPercentage":100,
                              "ConfiguredDemandPercentage":null,
                              "HasDemandSideControl":false,
                              "DailyHeatingEnergyConsumed":30.11,
                              "DailyCoolingEnergyConsumed":0,
                              "DailyHotWaterEnergyConsumed":6.5,
                              "DailyHeatingEnergyProduced":116.8,
                              "DailyCoolingEnergyProduced":0,
                              "DailyHotWaterEnergyProduced":17.21,
                              "EffectiveFlags":0,
                              "LastEffectiveFlags":0,
                              "Power":true,
                              "EcoHotWater":false,
                              "OperationMode":0,
                              "OperationModeZone1":1,
                              "OperationModeZone2":1,
                              "SetTemperatureZone1":28,
                              "SetTemperatureZone2":20,
                              "SetTankWaterTemperature":55,
                              "TargetHCTemperatureZone1":41,
                              "TargetHCTemperatureZone2":20,
                              "ForcedHotWaterMode":false,
                              "HolidayMode":false,
                              "ProhibitHotWater":true,
                              "ProhibitHeatingZone1":true,
                              "ProhibitHeatingZone2":true,
                              "ProhibitCoolingZone1":false,
                              "ProhibitCoolingZone2":false,
                              "ServerTimerDesired":false,
                              "SecondaryZoneHeatCurve":false,
                              "SetHeatFlowTemperatureZone1":41,
                              "SetHeatFlowTemperatureZone2":20,
                              "SetCoolFlowTemperatureZone1":19,
                              "SetCoolFlowTemperatureZone2":20,
                              "DECCReport":false,
                              "CSVReport1min":false,
                              "Zone2Master":false,
                              "DailyEnergyConsumedDate":"2022-02-20T00:00:00",
                              "DailyEnergyProducedDate":"2022-02-20T00:00:00",
                              "CurrentEnergyConsumed":0,
                              "CurrentEnergyProduced":0,
                              "CurrentEnergyMode":null,
                              "HeatingEnergyConsumedRate1":0,
                              "HeatingEnergyConsumedRate2":0,
                              "CoolingEnergyConsumedRate1":0,
                              "CoolingEnergyConsumedRate2":0,
                              "HotWaterEnergyConsumedRate1":0,
                              "HotWaterEnergyConsumedRate2":0,
                              "HeatingEnergyProducedRate1":0,
                              "HeatingEnergyProducedRate2":0,
                              "CoolingEnergyProducedRate1":0,
                              "CoolingEnergyProducedRate2":0,
                              "HotWaterEnergyProducedRate1":0,
                              "HotWaterEnergyProducedRate2":0,
                              "ErrorCode2Digit":0,
                              "SendSpecialFunctions":0,
                              "RequestSpecialFunctions":0,
                              "SpecialFunctionsState":0,
                              "PendingSendSpecialFunctions":0,
                              "PendingRequestSpecialFunctions":0,
                              "HasZone2":false,
                              "HasSimplifiedZone2":false,
                              "CanHeat":true,
                              "CanCool":true,
                              "HasHotWaterTank":true,
                              "CanSetTankTemperature":true,
                              "CanSetEcoHotWater":true,
                              "HasEnergyConsumedMeter":true,
                              "HasEnergyProducedMeter":true,
                              "CanMeasureEnergyProduced":false,
                              "CanMeasureEnergyConsumed":false,
                              "Zone1InRoomMode":false,
                              "Zone2InRoomMode":false,
                              "Zone1InHeatMode":true,
                              "Zone2InHeatMode":true,
                              "Zone1InCoolMode":false,
                              "Zone2InCoolMode":false,
                              "AllowDualRoomTemperature":false,
                              "IsGeodan":false,
                              "HasEcoCuteSettings":false,
                              "HasFTC45Settings":true,
                              "HasFTC6Settings":true,
                              "CanEstimateEnergyUsage":true,
                              "CanUseRoomTemperatureCooling":true,
                              "IsFtcModelSupported":true,
                              "MaxTankTemperature":60,
                              "IdleZone1":true,
                              "IdleZone2":true,
                              "MinPcycle":1,
                              "MaxPcycle":1,
                              "MaxOutdoorUnits":255,
                              "MaxIndoorUnits":255,
                              "MaxTemperatureControlUnits":0,
                              "ModelCode":"027a",
                              "DeviceID":11712287,
                              "MacAddress":"48:eb:62:ac:9f:fe",
                              "SerialNumber":"200877777",
                              "TimeZoneID":121,
                              "DiagnosticMode":0,
                              "DiagnosticEndDate":null,
                              "ExpectedCommand":1,
                              "Owner":null,
                              "DetectedCountry":null,
                              "AdaptorType":-1,
                              "FirmwareDeployment":null,
                              "FirmwareUpdateAborted":false,
                              "LinkedDevice":null,
                              "WifiSignalStrength":-59,
                              "WifiAdapterStatus":"NORMAL",
                              "Position":"Unknown",
                              "PCycle":2,
                              "PCycleConfigured":null,
                              "RecordNumMax":1,
                              "LastTimeStamp":"2022-02-21T00:20:00",
                              "ErrorCode":8000,
                              "HasError":false,
                              "LastReset":"2022-02-10T15:16:12.522",
                              "FlashWrites":2,
                              "Scene":null,
                              "TemperatureIncrementOverride":0,
                              "SSLExpirationDate":"2037-12-31T00:00:00",
                              "SPTimeout":1,
                              "Passcode":null,
                              "ServerCommunicationDisabled":false,
                              "ConsecutiveUploadErrors":0,
                              "DoNotRespondAfter":null,
                              "OwnerRoleAccessLevel":1,
                              "OwnerCountry":211,
                              "HideEnergyReport":false,
                              "ExceptionHash":null,
                              "ExceptionDate":null,
                              "ExceptionCount":null,
                              "Rate1StartTime":null,
                              "Rate2StartTime":null,
                              "ProtocolVersion":0,
                              "UnitVersion":0,
                              "FirmwareAppVersion":19000,
                              "FirmwareWebVersion":0,
                              "FirmwareWlanVersion":0,
                              "EffectivePCycle":1,
                              "MqttFlags":9,
                              "HasErrorMessages":false,
                              "Offline":true,
                              "Units":[
                                 {
                                    "ID":1,
                                    "Device":0,
                                    "SerialNumber":"999999",
                                    "ModelNumber":839,
                                    "Model":"ERST30C-VM2ED",
                                    "UnitType":1,
                                    "IsIndoor":true
                                 }
                              ]
                           },
                           "DiagnosticMode":0,
                           "DiagnosticEndDate":null,
                           "Location":3980,
                           "DetectedCountry":null,
                           "Registrations":656,
                           "LocalIPAddress":null,
                           "TimeZone":121,
                           "RegistReason":"STARTUP",
                           "ExpectedCommand":1,
                           "RegistRetry":0,
                           "DateCreated":"2020-10-18T10:00:34.59Z",
                           "FirmwareDeployment":null,
                           "FirmwareUpdateAborted":false,
                           "Permissions":{
                              "CanSetForcedHotWater":true,
                              "CanSetOperationMode":true,
                              "CanSetPower":true,
                              "CanSetTankWaterTemperature":true,
                              "CanSetEcoHotWater":false,
                              "CanSetFlowTemperature":true,
                              "CanSetTemperatureIncrementOverride":true
                           }
                        }
                     ]
                  },
mengi69 commented 2 years ago

Hello,

I also have an Ecodan Aerotermia and I can't get it to send the change for the temperature of the Sanitary Hot Water Tank.

He was able to fix it.

It has 2 Objects: Hot water tank, Outlet for underfloor heating and Outlet for Fancoils, but it gives me an error....

Error

IDID

IDCC