Hello,
I flashed a TUYA D06 windows sensor with tasmota.
It is working fine, but it sends on/off (Power) depending on the window state.
Which is the best way, to integrate it into Homey? I believe I should map it somehow to true/false in MQTT Hub, but I can not figure out, how to do it.
Any help would be highly appreciated!
To be honest, no, and I won’t.
It never worked for me, not for a single switch or energy monitoring device, of which I have plenty. They have never been discovered. I gave up on this.
Anyway, i need to translate an MQTT Power status to a contact alert. I doubt, that this can be done with it.
Regards, Metatron.
Yes, this is, what I am trying to do.
So I try to define a flow to set the virtual device “contact”. Currently, it is not clear to me, how to use the trigger “MQTT Client
Trigger when a message is received on”
I can not find any documentation/example for this?
Thanks, that is what I thought. Where can I find examples or a documentation, how to set a MQTT Device on true or false based on on/off, and furthermore, same device, the battery level?
In the meantime, I tried to set up a virtual device, trying to set it with flows. However, I am not able to write any values to this device, at least not my way:
Or leave the input & output templates empty. After creating the device, go to the advanced device config and select ‘on/off’ for the ‘on/off values’ setting (true/false in screenshot), this will automatically convert boolean values to ‘on’ & ‘off’ in both directions.
Just add another capability ‘measure_battery’?
By default the value will be translated from [0…100] (external; the rest of the world) to [0…1] (homey). This can also be configured from the advanced device config if needed; the ‘percentage scaling’ option. And again, a simple calculation can be used to transform values if needed (e.g. value / 255).
Eventually I’ll probably remove these two advanced device config options (for new devices). They’re kind of hidden and deprecated since the introduction of the input & output templates per capability. It can also result in unexpected behavior (e.g. percentage values being devided by 100). I thought about inserting the demo templates as default value, when selecting boolean or percentage capabilities in a future release.
good point. Assuming, I wanted to do it, at least as a working example. Where would I document it? In the forum? There it is (see above). How about a Homey wiki? I am used to work with wikis, and it will give more overview then a forum, only.
Another suggestion: It would be nice to be able to change the MQTT device icon after it has been set up. Would that be possible. please?