Comments (16)
Hi Jens,
i also have troubles with the conversion mapping.
On a Comet DECT Thermostat the mapping is:
0 -> Auto
1 -> OFF
2 -> ON
from iobroker.yahka.
With the current master you can try it with a custom conversion function (script).
I think, the problem from the issue owner is solved. Close
from iobroker.yahka.
I know that there are some issues with the HeatingCooling state.
Could you please check which value your "Control_Mode" state can have?
The Conversion currently does the following: (Homematic -> Homekit)
0 -> AUTO
1 -> HEAT
2 -> HEAT
3 -> HEAT
else -> OFF
from iobroker.yahka.
OK that explains it. Because even if its off control mode is still 1 :( maybe its possible to also include the set temperature? Because if its set to 4,5 that means its „OFF“
from iobroker.yahka.
Are you able to sketch out some kind of "specification"? I'm currently busy but if you give me some kind of mapping/process to map the values, I could maybe implement it
from iobroker.yahka.
OK that explains it. Because even if its off control mode is still 1 :( maybe its possible to also include the set temperature? Because if its set to 4,5 that means its „OFF“
Same here,
Mode OFF in Homekit sets to 0 = Auto Mode <-- this means not off --> off is manu mode below 4.5 °C
Mode Heating in Homekit sets to 1 = Manu Mode
Mode Cooling in Homekit sets to 0 = Auto Mode
Mode Automatic in Homekit sets to 0 = Auto Mode
any way to implement this?
from iobroker.yahka.
Got the same struggle like @Bono1969
Hi Jens,
i also have troubles with the conversion mapping.
On a Comet DECT Thermostat the mapping is:
0 -> Auto
1 -> OFF
2 -> ON
Is there an easy way for different mapping?
from iobroker.yahka.
With the current master you can try it with a custom conversion function (script).
from iobroker.yahka.
With the current master you can try it with a custom conversion function (script).
Ok, I got the workaround with two additional states (https://forum.iobroker.net/viewtopic.php?f=20&t=8187#p200509).
My Code is a little different and for DECT of course.
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="on" id="ZE/S-9iNmQ6,jH5ldNTC" x="38" y="13">
<field name="OID">fritzdect.0.Comet_117950531104.YAHKA-Input_to_DECT</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="EFr6iA.DGMa*EGgjd,An">
<mutation elseif="3"></mutation>
<value name="IF0">
<block type="logic_compare" id="w_co?|lraw]UCJn|c(,s">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="qc]sa(qT+d*B;8|o%7;j">
<field name="VAR">value</field>
</block>
</value>
<value name="B">
<block type="math_number" id="H3QEAK?eXD}}Vt=mN:L]">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="comment" id="1Ai1ke9)t`HU4[a-`q7x">
<field name="COMMENT">AUS</field>
<next>
<block type="control" id="ONFjA/EgzBX2hJLrfVY6">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.Comet_117950531104.mode</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="k!?lgrfj15y*}eBxIq`(">
<field name="NUM">1</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="9?vVqj.gndg?tmp[+@GW">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="DPt9V8w`|Ku[#E;7@*2F">
<field name="VAR">value</field>
</block>
</value>
<value name="B">
<block type="math_number" id="*AB2t:ZX?dOLUsl`D7#8">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="comment" id="fF,qImRNe*C`J@g9Lmy`">
<field name="COMMENT">HEAT</field>
<next>
<block type="control" id="oeb}GlJFm~Wq^K99:tRA">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.Comet_117950531104.mode</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="Tfj[)qH![}b#0;UiWB~/">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="control" id=")(gG=@A/8VS*?*?5=zR6">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.Comet_117950531104.targettemp</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="H4W%sB]TxNE40v=MWd%0">
<field name="NUM">24</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<value name="IF2">
<block type="logic_compare" id="?C[vDW6u9;KV9wY~:BQ7">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="R-6%mZLxF4n+K[-Vmtf7">
<field name="VAR">value</field>
</block>
</value>
<value name="B">
<block type="math_number" id="6QOcWV[F2wnNisb|i%Pu">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<statement name="DO2">
<block type="comment" id="0)=Pc/AGjFbPST/0QL)Q">
<field name="COMMENT">COOL</field>
<next>
<block type="control" id="P*q`C8.DpILun8CAS^;K">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.Comet_117950531104.mode</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="dUjxVc-|}~Ez?W9S@W%@">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="control" id="(bV=6{F`V6_w,.#Fr4bp">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.Comet_117950531104.targettemp</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="bTIciEb1bD99iE-T*Riv">
<field name="NUM">16</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<value name="IF3">
<block type="logic_compare" id="+D(@!~?N0tDsn,RPEsSd">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="oF;h~;;..1Op6;AJ)3f6">
<field name="VAR">value</field>
</block>
</value>
<value name="B">
<block type="math_number" id="*I,rWi-3N/JFH%R#[RHa">
<field name="NUM">3</field>
</block>
</value>
</block>
</value>
<statement name="DO3">
<block type="comment" id="}MT*/6:P.EuqTFKV4i[U">
<field name="COMMENT">AUTO</field>
<next>
<block type="control" id="c6/,KcWQB(J;=A3Sl5h@">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.Comet_117950531104.mode</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="l(BY_)k/d%QdF!f7T])P">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</xml>
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="on" id="#ZW+c(RR#6LH%l}=oAKX" x="38" y="-62">
<field name="OID">fritzdect.0.Comet_117950531104.mode</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="mCHw%0*:TErPb{BLVZ6U">
<mutation elseif="2"></mutation>
<value name="IF0">
<block type="logic_compare" id="BDOnoU:4iXPR(a`aKT*0">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="PNd5SxR.%q?#DndPHHCJ">
<field name="VAR">value</field>
</block>
</value>
<value name="B">
<block type="math_number" id="k5y)lT~6um,,f~Z@o9Vk">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="comment" id="j,P@rIUy9i9RBc]E=;li">
<field name="COMMENT">AUTO</field>
<next>
<block type="control" id="Z0x3w]x36`@3y?D{s|:F">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.Comet_117950531104.YAHKA-Mode_Output_from_DECT</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="Md]zCs_Y0A]EYwM_cPhx">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="#{C}x3Xqevn:Y5|n;QH%">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="5AP)5@MCE)P#WIrSNiI#">
<field name="VAR">value</field>
</block>
</value>
<value name="B">
<block type="math_number" id="?EI;Wl#l;wOz[j|NturJ">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="comment" id="tR5XrK;4-freLw]kA3%,">
<field name="COMMENT">COOL</field>
<next>
<block type="control" id=":Yc!_PE@MYSPXP_0L,.}">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.Comet_117950531104.YAHKA-Mode_Output_from_DECT</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="~uR]cpikkzw}QR-j3VHi">
<field name="NUM">2</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF2">
<block type="logic_compare" id="c-!rI7|frDnO7)%ADS/y">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="-1ZXMOol47?|H@m*7kaF">
<field name="VAR">value</field>
</block>
</value>
<value name="B">
<block type="math_number" id="lGJ|9*?!_%gQKwvDYkYc">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<statement name="DO2">
<block type="comment" id="MXl1nN[F6zknL2kbTV36">
<field name="COMMENT">HEAT</field>
<next>
<block type="control" id="oR|%;~5IS#Ka4!q+?{dY">
<mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.Comet_117950531104.YAHKA-Mode_Output_from_DECT</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="g8Jf;`i#@ln:+7I}d616">
<field name="NUM">1</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</xml>
from iobroker.yahka.
see also: https://forum.iobroker.net/viewtopic.php?f=20&t=8187&p=219501#p217610
from iobroker.yahka.
With the current master you can try it with a custom conversion function (script).
I know this is an old issue, but how can I read another value (current temperature) inside the custom conversion function?
And if I want to turn the thermostat off, I need to set 2 Values. Is this possible as well with the custom conversion function?
from iobroker.yahka.
@oklimberg Did you find a solution using other values inside the JS function?
from iobroker.yahka.
I think it is not really supported from what I found, but could be achievable.
All methods for reading and setting values work asynchronously using callbacks, whereas the conversion function has to return the converted value 'directly'.
I did not dig deep enough into the code to figure out if there is some elegant way to wait for the async methods to return before doing the conversion, like with future objects in Java.
You could use busy waiting with a while loop inside the conversion function using a boolean variable which will be set inside the async callback of the getter/setter but this is really ugly.
from iobroker.yahka.
Did you know the getter Fucntions? Did read something about getState()
and setState()
but this results in javascript error.
from iobroker.yahka.
You need to use this.adapter.setForeignState('ID-value', value, function (err) { });
and this.adapter.getForeignState('ID-value', function (err, state) { });
since the states you want to use are outside of the adapter. To read or set the temperature state of one of my thermostats I would have to use 'maxcube.0.devices.thermostat_XXXXX.temp'. You can find this under objects of ioBroker
from iobroker.yahka.
I got my problem solved by using an own data object for my Homekit Button and listening to changes by the JavaScript Adapter. On change I trigger the Homekit Button, on change the Homekit Button I trigger the Roomba/Denon AVR.
Seems to work.
Thanks!
from iobroker.yahka.
Related Issues (20)
- Yahka 1.0.3 nicht kompatibel mit js-Controller 5.0 HOT 1
- Mehrere Geräten/attribute in einer device mit unterschiedlichen Namen HOT 1
- Nach Upgrade von HomeKit kann Yahka keine HomeKit Datenpunkt setzen HOT 1
- Please fix issues reported by adapter checker
- ServiceType: Lockmechanism not working
- Update von 0.17.0 auf 1.0.3 nicht möglich
- Keine Verbindung HomeKit -> Yahka, Geräte schalten nicht HOT 2
- Bridge kann nicht hinzugefügt werden - nicht kompatibel / Verbindung verloren
- Probleme nach dem Update 1.0.3 HOT 13
- Konvertierung scaleint ohne Angabe von min-Werten...
- Export and import of all devices
- No longer works correctly with iOS 17 HOT 15
- terminated with code 6 (UNCAUGHT_EXCEPTION) -> Cannot read properties of null (reading 'val') HOT 2
- Please update test-and-release workflow
- Feature Request: Search Field in top of the entities.
- Dropdown Auswahl "Kategorie" ist leer
- CurrentDoorState wird nicht aktualisiert HOT 1
- AppleTV Doorbell
- Some Yakah Instances not working after js-controller upgrade to 5.x.x HOT 2
- Feature Request: Weather station implementation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iobroker.yahka.