FIBARO Choice

Created At

Sep 01, 2020

Last Update

Jan 13, 2023

Platforms

HC 3 Lite, Z-box Hub, Yubii Home Pro, Yubii Home, Venture WISE, HC 3

Views

5839

Download

549

Type Quick App

Setup:

1. change dataLoggerSN variable to your data logger serial number (this can be found in solarman application)

2. In case of connection problems change inverterIp variable to your sofar inverter IP in your local wifi network  (it should work in auto mode but if not send me a message)

3. If  you still have some problems pleas enable debugs - change debug variable value to true and send me logs from HC user interface with description.

 

v1.3

 

29 Comments,  Want to add comment please login
8e8fdf0c369a69c907067cf4923096df

Bonjour et merci d'avance pour votre aide. 27.02.2024] [22:25:01] [ ERREUR ] [QUICKAPP484] : QuickApp a planté [27.02.2024] [22:25:01] [ ERREUR ] [QUICKAPP484] : Une erreur inconnue s'est produite : void connect(TCPSocket&,std::string const&,int)

9aa9419bf5df4dd3f68c01c0aa3fe5eb

Hello and thank you in advance for your help. After installing the sofar solar quick app on an HC3, I cannot get the data from the sofar hyd-6000 inverter. I followed the installation procedure. I will send you a copy of my parameters and the details of the log. THANKS. [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: starting... [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: SofarProductionPowerMeter init 206 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: SofarProductionEnergyMeter init 207 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: Child devices count: 2 room id: 234 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: Devices Map count: table: 0xaaab01e54840 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: Stored devices count: 2 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: Sofar Child devices: [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: [ 206 ] Sofar Production Power , type of: com.fibaro.powerMeter [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: [ 207 ] Sofar Production Today , type of: com.fibaro.energyMeter [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: hc3 ip: 192.168.1.145 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: connect to ip: 192.168.1.123 [16.02.2024] [17:00:00] [ERROR] [QUICKAPP205]: QuickApp crashed [16.02.2024] [17:00:00] [ERROR] [QUICKAPP205]: Unknown error occurred: void connect(TCPSocket&,std::string const&,int)

9aa9419bf5df4dd3f68c01c0aa3fe5eb

Bonjour et merci d'avance pour votre aide. Après l'installation de la quick app sofar solar sur une HC3, je n'arrive pas à avoir les données de l'onduleur sofar hyd-6000. J'ai suivi la procédure d'installation. Je vous mets en copie mes paramètres et le détail du log. Merci. [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: starting... [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: SofarProductionPowerMeter init 206 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: SofarProductionEnergyMeter init 207 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: Child devices count: 2 room id: 234 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: Devices Map count: table: 0xaaab01e54840 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: Stored devices count: 2 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: Sofar Child devices: [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: [ 206 ] Sofar Production Power , type of: com.fibaro.powerMeter [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: [ 207 ] Sofar Production Today , type of: com.fibaro.energyMeter [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: hc3 ip: 192.168.1.145 [16.02.2024] [17:00:00] [DEBUG] [QUICKAPP205]: connect to ip: 192.168.1.123 [16.02.2024] [17:00:00] [ERROR] [QUICKAPP205]: QuickApp crashed [16.02.2024] [17:00:00] [ERROR] [QUICKAPP205]: Unknown error occurred: void connect(TCPSocket&,std::string const&,int)

8e8fdf0c369a69c907067cf4923096df

function QuickApp:createDataFrame() return self:createV5RequestFrame(self.loggerSN) end function QuickApp:createV5RequestFrame(loggerSN) --frame = (headCode) + (dataFieldLength) + (contrlCode) + (sn) + (sn) + (command) + (checksum) + (endCode) self:dbg("createV5RequestFrame: loggerSN:", loggerSN, "<") local frame_hdr = self:fromhex('a5170010450000') local dataFieldPrefix = self:fromhex('020000000000000000000000000000') local command = self:fromhex('01030000002705d0') local defchk = self:fromhex('d8') local endCode = self:fromhex('15') local sn = self:decTohex(loggerSN) sn = sn:sub(9, 10) .. sn:sub(7, 8) .. sn:sub(5, 6) .. sn:sub(3, 4) .. sn:sub(1, 2) sn = self:fromhex(sn) local checkData = self:tohex((frame_hdr .. sn .. dataFieldPrefix .. command):sub(2)) local defchk = 0 for i = 1, string.len(checkData), 2 do defchk = defchk + tonumber(checkData:sub(i, i + 1), 16) end self:dbg("createV5RequestFrame: defchk:", defchk % 256, "<") local defchk = self:fromhex(self:decTohex(defchk % 256)) local frame = frame_hdr .. sn .. dataFieldPrefix .. command .. defchk .. endCode return frame end function QuickApp:fromhex(str) return (str:gsub('..', function (cc) return string.char(tonumber(cc, 16)) end)) end function QuickApp:tohex(str) return (str:gsub('.', function (c) return string.format('%02X', string.byte(c)) end)) end function QuickApp:decTohex(str) return string.format('%02X', tonumber(str)) end --------------------------------------------------------------------------------------------------------------------------- QuickApp.offset = { 1, --#1, len(1) --Inverter Data Address table 2, --#2 Operating state 4, --#3 Fault1 6, --#4 Fault2 8, --#5 Fault3 10, --#6 Fault4 12, --#7 Fault5 --#PV Input Message 14, --#8 PV1 voltage Unit:0.1V 16, --#9 PV1 current Unit:0.01A 18, --#10 PV2 voltage Unit:0.1V 20, --#11 PV2 current Unit:0.01A 22, --#12 PV1 power Unit:0.01kw 24, --#13 PV2 power Unit:0.01kw --Output Grid Message 26, --#14 Output active power Unit:0.01kW 28, --#15 Output reactive power Unit:0.01kVar 30, --#16 Grid frequency Unit:0.01Hz 32, --#17 A-phase voltage Unit:0.1V 34, --#18 A-phase current Unit:0.01A 36, --#19 B-phase voltage Unit:0.1V 38, --#20 B-phase current Unit:0.01A 40, --#21 C-phase voltage Unit:0.1V 42, --#22 C-phase current Unit:0.01A --Inverter Generation message 44, --#23 Total production hi Unit:1kWh 46, --#24 Total production low 48, --#25 Total generation hi Unit:1 hour 50, --#26 Total generation low 52, --#27 Today production Unit:0.01kWh 54, --#28 Today generation time --Inverter inner message 56, --#29 Inverter module temperature 58, --#30 Inverter inner temperature 60, --#31 Inverter Bus voltage Unit:0.1V 62, --#32 PV1 voltage sample by slave CPU Unit:0.1V 64, --#33 PV1 current sample by slave CPU Unit:0.01A 66, --#34 Count-down time 68, --#35 Inverter alert message 70, --#36 Input mode 0x00: in parallal 0x01: in dependent 72, --#37 Communication board inner message 74, --#38 Insulation of PV1+ to ground 76, --#39 Insulation of PV - to ground 78, --#40 Country } -- Energy generated by inverter today in kWh function QuickApp:getTodayEnergy() return self:getShort(QuickApp.offset[27], 100) --Divide by 100 end function QuickApp:getTotalEnergy() return self:getLong(QuickApp.offset[23], 1) --Divide by 1 end function QuickApp:getCurrentEnergy() return self:getShort(QuickApp.offset[14], 100) --Divide by 100 end function QuickApp:getOperatingStateInt() return self:getShort(QuickApp.offset[2], 1) --Divide by 1 end function QuickApp:getOperatingState() local state = self:getOperatingStateInt() if state == 0 then return 'Wait' elseif state == 1 then return 'Check' elseif state == 2 then return 'Normal' elseif state == 3 then return 'Fault' elseif state == 4 then return 'Permanent' end end function QuickApp:getShort(begin, divider) local a_string = self.msgBody:sub(begin, begin + 1) local an_integer = string.unpack(">i2", a_string) if an_integer > 32767 then return float(-(65536 - an_integer)) / divider else return an_integer / divider end end function QuickApp:getLong(begin, divider) local a_string = self.msgBody:sub(begin, begin + 3) return string.unpack(">i4", a_string) end

8e8fdf0c369a69c907067cf4923096df

Je pas arriver à connecté

© 2024. Nice-Polska Sp. z o.o.Privacy policyTerms & ConditionsFeedback