Closed Joeknx closed 1 year ago
Can I just confirm status following your last message? You said you can not send JSON? So is this now working or not?
In your example:
actions.publishMQTT(„device/fe001/Status“, '[{ "clientId": "fe001", "connected": 1, "version": "v1.0 ALPHA", "services": {"t1": "temperature"} }]')
You have incorrectly surrounded the payload in array square brackets. the payload is an object not an array.
It is working now. Thank you!
val actions = getActions("mqtt", "mqtt:broker:VenusOS") actions.publishMQTT("device/fe001/Status", '{ "clientId": "fe001", "connected": 1, "version": "v1.0 ALPHA", "services": {"t1": "temperature"} }')
But i am still struggling with the value.
actions.publishMQTT("W/XXXXXX/temperature/<device instance>/Temperature", '{"value": 24.91}')
What is the device instance? t1?
Thank you!
No, the device instance is the number you get back from the dbus by sending the registration message. You need to subscribe to device/<client id>/DBus
before you publish the connect message. Please read the registration protocol section within the docs.
Thank you. It is working now. I tried to understand the readme, but did not quit get it.
Sorry for the beginner questions!
No problem. I'm glad you got it working. I'm always happy to receive suggestions that improve the documentation.
Thank you for the great tool. Exactly what I need.
I have a working keep alive rule (DSL rule)
val actions = getActions("mqtt", "mqtt:broker:VenusOS") actions.publishMQTT("R/xxxxxxxx/keepalive", '["grid/40/Ac/Frequency", "grid/40/Ac/Energy/Forward"]') logInfo("Solar", "CCGX MQTT Keep Alive Timer fired!!")
I can't manage to send the JSON
Example:
actions.publishMQTT(„device/fe001/Status“, '[{ "clientId": "fe001", "connected": 1, "version": "v1.0 ALPHA", "services": {"t1": "temperature"} }]')
...is not working.
actions.publishMQTT(„device/fe001/Status“, '{ "clientId": "fe001", "connected": 1, "version": "v1.0 ALPHA", "services": {"t1": "temperature"} }')
also not.