-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support publishing custom value for relay processing #1085
Comments
hi, do you have a template smartthings device handler for espurna? I'm new to mqtt. |
SmartThings events have to through a SmartApp/DeviceHandler into MQTT world through a bridge (https://hub.docker.com/r/stjohnjohnson/smartthings-mqtt-bridge/) to interact with Espurna device. My device is just of the type "Virtual Switch". The ST MQTT messages just end with on/off to indicate the state as well as the action and I was able to get this working by defining "smartthings/Device Name/switch" as the grouper, this felt quite odd but works and adjusting switch in ST gets reflected in Espurna device. But now the other way around since the outgoing messages have 1/0. So I locally end up creating 2 defines MQTT_TOPIC_RELAY_ON/MQTT_TOPIC_RELAY_OFF and used it in homeassistant.ino and relay.ino. I can request a pull if you want to look at it. |
You can use "ON" and "OFF" (and "TOGGLE") for incoming MQTT messages. If you also want it to output strings instead of 0/1 you can use the latest dev branch and change the RELAY_MQTT_ON and RELAY_MQTT_OFF settings in |
Thank you, that is pretty much what I did. In addition, I also modified
homeassistant._haSendSwitch to use the same.
…On Mon, Aug 13, 2018 at 6:11 AM Xose Pérez ***@***.***> wrote:
You can use "ON" and "OFF" (and "TOGGLE") for incoming MQTT messages. If
you also want it to output strings instead of 0/1 you can use the latest
dev branch and change the RELAY_MQTT_ON and RELAY_MQTT_OFF settings in
general.h
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1085 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGKRfk3h2JNalLs0jDr5YF3w7kY7PsGTks5uQV7rgaJpZM4VlAlD>
.
|
Good idea, but I'd prefer to use a different setting for that. |
- remove "platform" key, see #1440. this implicitly sets schema to "basic". pending some other clean-up regarding json and mqtt queueing, other schema can be added down the line - updated ws module queue elem to capture callbacks list, allows to pass more than one callback (for example, when they are generated on the fly as lambdas, see ha wsPost usage) - modified method to send ha config to use global ws queue, fix #1762 problem with empty topics and ensure json allocation is consistent. - use existing defines to set mqtt payload options. amend #1085, #1188, #1883 to use the set payload value. drop HOMEASSISTANT_PAYLOAD... defines. - update MQTT_STATUS_ONLINE/OFFLINE and RELAY_MQTT_ON/OFF with runtime configuration - filter payload strings so that the resulting yaml value is not interpreted as bool (python True, False) - helper method for settings to streamline string values manipulation
It would be nice if on/off can be sent instead of 1/0. Incoming on/off messages are handled but only 1/0 get sent out. This will make interfacing and automating with Smartthings easier. I had prototyped introducing MQTT_TOPIC_RELAY_ON/MQTT_TOPIC_RELAY_OFF with default value 1/0 and custom value in hardware.h, and that seemed to work well.
The text was updated successfully, but these errors were encountered: