Daikin SkyFi Plugin Beta UI5 only

Update 0.116
Changed mode nine (9) to Autochangover suggestion from cybrmage in post http://forum.micasaverde.com/index.php/topic,34854.msg268492.html#msg268492

Hi all
Beta SkyFi plugin for UI5 only at this point: -

This is only early beta so not in app store, please do not use if you are expecting smooth sailing. If you are willing to beta test please feedback your issues and suggestions.

Todo: -
Add installation instructions.
Add usage instructions.
Renaming zones.
Get more info on API (wl=4.00.1,lc=0,af=0,ls=0)?
List error code descriptions (requires documentation).
Handle different hardware setups.

I’ve just moved into my new home and am waiting on the air con install guys to come back as I’m not able to connect to the SkiFi thingy. Will test soon, but I am considering upgrading to UI7; what would/wouldn’t work if I upgraded?

Sent from my SM-G928I using Tapatalk

@Homer
Should work but may not display very well. I will get back to finishing UI7 once life returns to normal.

Hi Zoot!

Thanks for the plugin - thought it’d never happen, being an Oz only product (I think)!

I note that you haven’t had time to do install instructions, but assume they are similar to your other thread on this? My only question is the “damper” modules - are these for zone control?

Oh, and BTW, you wouldn’t have an interest in developing a plugin for Indigo by any chance - uses Python (I think). Details at:

indigo_5_documentation:plugin_extending_tutorial [Indigo Domotics]?

Regrettably, my software skills are zero :-X

@mclass[quote=“mclass, post:4, topic:189758”]Thanks for the plugin - thought it’d never happen, being an Oz only product (I think)![/quote]

Yes, I believe it is.

Yes installation is similar. I have included auto discovery so should find IP address if your device is connected to the local wifi network you will just need to input the device code in the altid field. And yes damper is zone control.

Sorry no, Indigo is for MAC OS only and I don’t have a MAC.

We all have to start somewhere and my coding skills are fairly basic. Have a go you might be pleasantly surprised. I have documented what I have found so far here: -
https://github.com/zoot1612/plugin-daikin-skyfi/blob/master/DaikinSkyfiAPI

Thank you Zoot for working on this. Very excited about the potential to create scenes and alerts.
I installed on UI7 (I know) and it’s working - but not 100%

I can control the skyfi - but it’s not totally reliable.
The buttons don’t always seem to update to the current status. i.e. it can display as off when it’s on cool mode and Fan speed isn’t highlighted at all. Any advice?

Happy to beta test.

This is from Vera’s log file - but its shown in red - does that mean it’s an error?

06 02/03/16 15:34:19.121 Device_Variable::m_szValue_set device: 178 service: urn:micasaverde-com:serviceId:HaDevice1 variable: LastUpdate was: 1454477599 now: 1454477659 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2dd84680> 01 02/03/16 15:34:19.122 luup_log:178: SkyFiPlugin::Configuring plugin ... <0x2dd84680> 01 02/03/16 15:34:19.124 luup_log:178: SkyFiPlugin::Configuring zone controller ... <0x2dd84680> 01 02/03/16 15:34:19.124 luup_log:178: SkyFiPlugin::Getting controller status ... <0x2dd84680>

Thanks again.

@delbz
Might not be the latest code, will have a look tonight and double check.

Having said that I know there are some issues with modes as I have not sorted them all out yet. The main one is a “9” which I think means reached set point but not 100% sure as yet.

Thanks Zoot,

I had a play with it today. The Vera device seems to respond and update when using Vera’s web page to control it, however when I use the Official Daikin Skyfi app or wall controller a change does not seem to be automatically detected and so the status not updated.

The log output I posted above is the regular check to see if anything has changed - so that’s OK, but I’m not sure why the code doesn’t sense a value change when made outside of the Vera device control.

Just speculation… BUT…
It appears that the mode may be a bitmap… The raw info from the linked GitHub page shows…
0000 0000 = 0 = Off (0),
0000 0010 = 2 = HeatOn (2),
0000 0011 = 3 = AutoChangeOver (3),
0000 0100 = 4 = Dry (4),
0000 1000 = 8 = CoolOn (8),
0000 1001 = 9 = unknown (9),
0001 0000 = 16 = Fan (16)

It may be that bit zero is the autochangeover flag… If the bit is set the unit is in autochangeover mode, and the remaining bits indicate the mode that the unit is currently operating in…

which would make the modes:
0000 0000 = 1 = AutoChangeOver Active,
0000 0010 = 2 = HeatOn,
0000 0100 = 4 = Dry,
0000 1000 = 8 = CoolOn (8),
0001 0000 = 16 = Fan (16)

Which would make a value:
0 = Autochangeover off, no modes active = Off
3 = Autochangeover on, HeatOn
9 = Autochangeover on, CoolOn
etc…

Since many of the portable A/C and heater units encode there modes in IR packets in a similar manner, it may be worth looking into…

This is the log file when I changed fan speed using the Vera web page. Works perfectly.
It just doesn’t seem to detect a change when using the wall controller or Daikin iOS app.

[code]08 02/06/16 9:23:02.828 JobHandler_LuaUPnP::HandleActionRequest device: 178 service: urn:upnp-org:serviceId:FanSpeed1 action: SetFanSpeed <0x2f44b680>
08 02/06/16 9:23:02.829 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=178 <0x2f44b680>
08 02/06/16 9:23:02.829 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:FanSpeed1 <0x2f44b680>
08 02/06/16 9:23:02.830 JobHandler_LuaUPnP::HandleActionRequest argument action=SetFanSpeed <0x2f44b680>
08 02/06/16 9:23:02.830 JobHandler_LuaUPnP::HandleActionRequest argument NewFanSpeedTarget=3 <0x2f44b680>
01 02/06/16 9:23:02.832 luup_log:178: SkyFiPlugin::http_request: request: http://192.168.0.223:2000/set.cgi?pass=XXXXX&p=0&t=27.000000&f=3&m=0&lv=0 <0x2f44b680>

01 02/06/16 9:23:09.339 luup_log:178: SkyFiPlugin::http_request: Client: 1. Code: 200. Status: HTTP/1.0 200 OK. <0x2f44b680>
01 02/06/16 9:23:09.340 luup_log:178: SkyFiPlugin::parseBody: key=opmode value=0. <0x2f44b680>
01 02/06/16 9:23:09.341 luup_log:178: SkyFiPlugin::Air Coditioner Power Mode: Off <0x2f44b680>
06 02/06/16 9:23:09.342 Device_Variable::m_szValue_set device: 178 service: urn:upnp-org:serviceId:SwitchPower1 variable: Status was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:0xd18388/NONE duplicate:1 <0x2f44b680>
06 02/06/16 9:23:09.342 Device_Variable::m_szValue_set device: 178 service: urn:upnp-org:serviceId:HVAC_UserOperatingMode1 variable: ModeStatus was: Off now: Off #hooks: 2 upnp: 0 skip: 0 v:0xf4ace8/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.343 luup_log:178: SkyFiPlugin::parseBody: key=units value=… <0x2f44b680>
01 02/06/16 9:23:09.344 luup_log:178: SkyFiPlugin::Units Connected: yes <0x2f44b680>
06 02/06/16 9:23:09.344 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: UnitsConnected was: . now: . #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.345 luup_log:178: SkyFiPlugin::parseBody: key=settemp value=27.0. <0x2f44b680>
01 02/06/16 9:23:09.346 luup_log:178: SkyFiPlugin::AC Temperature Set Point: 27.0 <0x2f44b680>
06 02/06/16 9:23:09.347 Device_Variable::m_szValue_set device: 178 service: urn:upnp-org:serviceId:TemperatureSetpoint1 variable: CurrentSetpoint was: 27 now: 27 #hooks: 1 upnp: 0 skip: 0 v:0xf4b1a0/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.347 luup_log:178: SkyFiPlugin::parseBody: key=fanspeed value=3. <0x2f44b680>
01 02/06/16 9:23:09.348 luup_log:178: SkyFiPlugin::Fan Speed: 3 <0x2f44b680>
06 02/06/16 9:23:09.349 Device_Variable::m_szValue_set device: 178 service: urn:upnp-org:serviceId:FanSpeed1 variable: FanSpeedStatus was: Unknown now: 100 #hooks: 0 upnp: 0 skip: 0 v:0xf4bb08/NONE duplicate:0 <0x2f44b680>

01 02/06/16 9:23:09.392 luup_log:178: SkyFiPlugin::parseBody: key=fanflags value=1. <0x2f44b680>
01 02/06/16 9:23:09.392 luup_log:178: SkyFiPlugin::Fan Operational Mode: 1 <0x2f44b680>
06 02/06/16 9:23:09.393 Device_Variable::m_szValue_set device: 178 service: urn:upnp-org:serviceId:HVAC_FanOperatingMode1 variable: Mode was: ContinuousOn now: ContinuousOn #hooks: 0 upnp: 0 skip: 0 v:0xc45b88/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.394 luup_log:178: SkyFiPlugin::parseBody: key=acmode value=0. <0x2f44b680>
01 02/06/16 9:23:09.394 luup_log:178: SkyFiPlugin::Air Coditioner Operational Mode: 0 <0x2f44b680>
06 02/06/16 9:23:09.395 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: ModeStatusNo was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:0xf130d0/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.396 luup_log:178: SkyFiPlugin::AC is off, opmode: Off. <0x2f44b680>
01 02/06/16 9:23:09.396 luup_log:178: SkyFiPlugin::parseBody: key=tonact value=0. <0x2f44b680>
01 02/06/16 9:23:09.397 luup_log:178: SkyFiPlugin::Time On Active: 0 <0x2f44b680>
06 02/06/16 9:23:09.397 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: TimeOnActive was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.398 luup_log:178: SkyFiPlugin::parseBody: key=toffact value=0. <0x2f44b680>
01 02/06/16 9:23:09.399 luup_log:178: SkyFiPlugin::Time Off Active: 0 <0x2f44b680>
06 02/06/16 9:23:09.399 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: TimeOffActive was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.400 luup_log:178: SkyFiPlugin::parseBody: key=prog value=0. <0x2f44b680>
01 02/06/16 9:23:09.408 luup_log:178: SkyFiPlugin::Program: 0 <0x2f44b680>
06 02/06/16 9:23:09.409 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: Program was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.410 luup_log:178: SkyFiPlugin::parseBody: key=time value=19:56. <0x2f44b680>
01 02/06/16 9:23:09.410 luup_log:178: SkyFiPlugin::Time: 19:56 <0x2f44b680>
06 02/06/16 9:23:09.411 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: ACTime was: 19:18 now: 19:56 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2f44b680>
01 02/06/16 9:23:09.412 luup_log:178: SkyFiPlugin::parseBody: key=day value=6. <0x2f44b680>
01 02/06/16 9:23:09.417 luup_log:178: SkyFiPlugin::Day: 6 <0x2f44b680>
06 02/06/16 9:23:09.418 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: ACDay was: 6 now: 6 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.419 luup_log:178: SkyFiPlugin::parseBody: key=roomtemp value=30. <0x2f44b680>
01 02/06/16 9:23:09.419 luup_log:178: SkyFiPlugin::Current Room Temperature: 30 <0x2f44b680>
06 02/06/16 9:23:09.420 Device_Variable::m_szValue_set device: 178 service: urn:upnp-org:serviceId:TemperatureSensor1 variable: CurrentTemperature was: 26 now: 30 #hooks: 1 upnp: 0 skip: 0 v:0xd44280/NONE duplicate:0 <0x2f44b680>
06 02/06/16 9:23:09.431 Device_Variable::m_szValue_set device: 154 service: urn:rts-services-com:serviceId:ProgramLogicC variable: ObjectStatusMap was: {{name = ‘SunsetToSunrise’, state = false, seq = 1454657927.1004, oseq = 1454700163.0034},{name = ‘CoolerOutside’, state = false, seq = 1454704375.6576, oseq = 1454706175.6649},{name = ‘IndoorTemp’, state = ‘26%2E2’, seq = 1454714414.715, oseq = 1454713815.4087},{name = ‘OutdoorTemp’, state = ‘25%2E7’, seq = 1454714414.6437, oseq = 1454713815.3534},{name = ‘HotterOutside’, state = false, seq = 1454470931.7901, oseq = 1454495212.901},{name = ‘HotInside’, state = false, seq = 1454458931.733, oseq = 1454472132.0421},{name = ‘WarmerMonths’, state = false, seq = 0, oseq = 0},{name = ‘IndoorHumidity’, state = ‘87’, seq = 1454714414.6784, oseq = 1454713216.0951},{name = ‘OudoorHumidity’, state = ‘83’, seq = 1454714414.6233, oseq = 1454713815.3332},{name = ‘ACModeStatus’, state = ‘Off’, seq = 1454710339.8246, oseq = 1454478399.9948},{name = ‘ACCurrentSetPoint’, state = ‘27’, seq = 1454478371.548, oseq = 1454478365.078},{name = ‘ACCurrentTemperature’, state = ‘26’, seq = 1454710339.8715, oseq = 1454478365.117},{name = ‘ACPowerOff’, state = true, seq = 1454710339.7876, oseq = 1454478399.9592},{name = ‘ACCoolOn’, state = true, seq = 1454482589.7852, oseq = 1454482460.3739},} now: {{name = ‘SunsetToSunrise’, state = false, seq = 1454657927.1004, oseq = 1454700163.0034},{name = ‘CoolerOutside’, state = false, seq = 1454704375.6576, oseq = 1454706175.6649},{name = ‘IndoorTemp’, state = ‘26%2E2’, seq = 1454714414.715, oseq = 1454713815.4087},{name = ‘OutdoorTemp’, state = ‘25%2E7’, seq = 1454714414.6437, oseq = 1454713815.3534},{name = ‘HotterOutside’, state = false, seq = 1454470931.7901, oseq = 1454495212.901},{name = ‘HotInside’, state = false, seq = 1454458931.733, oseq = 1454472132.0421},{name = ‘WarmerMonths’, state = false, seq = 0, oseq = 0},{name = ‘IndoorHumidity’, state = ‘87’, seq = 1454714414.6784, oseq = 1454713216.0951},{name = ‘OudoorHumidity’, state = ‘83’, seq = 1454714414.6233, oseq = 1454713815.3332},{name = ‘ACModeStatus’, state = ‘Off’, seq = 1454710339.8246, oseq = 1454478399.9948},{name = ‘ACCurrentSetPoint’, state = ‘27’, seq = 1454478371.548, oseq = 1454478365.078},{name = ‘ACCurrentTemperature’, state = ‘30’, seq = 1454714589.4211, oseq = 1454710339.8715},{name = ‘ACPowerOff’, state = true, seq = 1454710339.7876, oseq = 1454478399.9592},{name = ‘ACCoolOn’, state = true, seq = 1454482589.7852, oseq = 1454482460.3739},} #hooks: 0 upnp: 0 skip: 0 v:0xeeda78/NONE duplicate:0 <0x2f44b680>
01 02/06/16 9:23:09.439 luup_log:178: SkyFiPlugin::parseBody: key=outsidetemp value=0. <0x2f44b680>
01 02/06/16 9:23:09.440 luup_log:178: SkyFiPlugin::Current Outside Temperature: 0 <0x2f44b680>
06 02/06/16 9:23:09.440 Device_Variable::m_szValue_set device: 178 service: urn:upnp-org:serviceId:TemperatureSensor1 variable: OutsideTemperature was: na now: na #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.441 luup_log:178: SkyFiPlugin::parseBody: key=louvre value=0. <0x2f44b680>
01 02/06/16 9:23:09.442 luup_log:178: SkyFiPlugin::Louvre: 0 <0x2f44b680>
06 02/06/16 9:23:09.442 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: Louvre was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:0xf24288/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.443 luup_log:178: SkyFiPlugin::parseBody: key=zone value=0. <0x2f44b680>
01 02/06/16 9:23:09.444 luup_log:178: SkyFiPlugin::Zone: 0 <0x2f44b680>
06 02/06/16 9:23:09.445 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: Zones was: 0000 now: 0000 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.446 luup_log:178: SkyFiPlugin::parseBody: key=flt value=0. <0x2f44b680>
01 02/06/16 9:23:09.446 luup_log:178: SkyFiPlugin::Filter: 0 <0x2f44b680>
06 02/06/16 9:23:09.447 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: Filter was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.447 luup_log:178: SkyFiPlugin::parseBody: key=test value=0. <0x2f44b680>
01 02/06/16 9:23:09.448 luup_log:178: SkyFiPlugin::Test: 0 <0x2f44b680>
06 02/06/16 9:23:09.449 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: Test was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.449 luup_log:178: SkyFiPlugin::parseBody: key=errcode value=. <0x2f44b680>
01 02/06/16 9:23:09.450 luup_log:178: SkyFiPlugin::parseBody: ERROR: Not handled parameter type:errcode value=. <0x2f44b680>
01 02/06/16 9:23:09.451 luup_log:178: SkyFiPlugin::parseBody: key=sensors value=1. <0x2f44b680>
01 02/06/16 9:23:09.451 luup_log:178: SkyFiPlugin::Sensors: 1 <0x2f44b680>
06 02/06/16 9:23:09.452 Device_Variable::m_szValue_set device: 178 service: urn:zoot-org:serviceId:SkyFi1 variable: Sensors was: 1 now: 1 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2f44b680>
01 02/06/16 9:23:09.452 LuaInterface::CallFunction_Job device 178 function SFanSpeed1_FanSpeed1_SetFanSpeed_run took 7 seconds <0x2f44b680>

06 02/06/16 9:23:31.101 Device_Variable::m_szValue_set device: 178 service: urn:micasaverde-com:serviceId:HaDevice1 variable: LastUpdate was: 1454714551 now: 1454714611 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2d342680>

01 02/06/16 9:23:31.141 luup_log:178: SkyFiPlugin::Configuring plugin … <0x2d342680>
01 02/06/16 9:23:31.142 luup_log:178: SkyFiPlugin::Configuring zone controller … <0x2d342680>
01 02/06/16 9:23:31.143 luup_log:178: SkyFiPlugin::Getting controller status … <0x2d342680>[/code]

I don’t think the SkyFi pushes out updates so I have set it to be polled (default one minute). You can change this in on the Vera in the advanced tab if you want a quicker updates. If there is something else wrong can you please send me the logging from plugin startup.

Edit: I have realised that I hadn’t checked if it pushed out updates. If this is the case I need to make substantial changes (for the better)

[quote=“cybrmage, post:9, topic:189758”]Just speculation… BUT…
It appears that the mode may be a bitmap… The raw info from the linked GitHub page shows…
0000 0000 = 0 = Off (0),
0000 0010 = 2 = HeatOn (2),
0000 0011 = 3 = AutoChangeOver (3),
0000 0100 = 4 = Dry (4),
0000 1000 = 8 = CoolOn (8),
0000 1001 = 9 = unknown (9),
0001 0000 = 16 = Fan (16)

It may be that bit zero is the autochangeover flag… If the bit is set the unit is in autochangeover mode, and the remaining bits indicate the mode that the unit is currently operating in…

which would make the modes:
0000 0000 = 1 = AutoChangeOver Active,
0000 0010 = 2 = HeatOn,
0000 0100 = 4 = Dry,
0000 1000 = 8 = CoolOn (8),
0001 0000 = 16 = Fan (16)

Which would make a value:
0 = Autochangeover off, no modes active = Off
3 = Autochangeover on, HeatOn
9 = Autochangeover on, CoolOn
etc…[/quote]

Looks good to me, will update code to reflect.

Thanks

Edit: I have realised that I hadn't checked if it pushed out updates. If this is the case I need to make substantial changes (for the better)

Hi. Yeah - My testing seems to show that the plugin only updates status if it has been changed using the Vera interface(s).
All I want to do initially is get a notification when the AC is switched on and off from the wall controller (or Skyfi app) - but this only worked when I use Vera apps/web page.

FYI for others … The lua code for Vera alerts is:

luup.call_action("urn:richardgreen:serviceId:VeraAlert1", "SendAlert", {Message = "AirConditioning Cooling is ON and set to {Device([178].service[urn:upnp-org:serviceId:TemperatureSetpoint1].CurrentSetpoint)}? at {DateTime(CurrentTime,%H:%M on %A %B %d, %Y)}{sound=gamelan}", Recipients = "Pushover"}, 16)