Comments (4)
To me the telling part of this is here:
{"topic":"tuya/xxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxx/192.168.x.xxx/command","action":"command",_ "message":"100"_,"options":{"id":"xxxxxxxxxxxxxxxxxxxx","key":"xxxxxxxxxxxxxxxxxxxx","ip":"192.168.x.xxx"}}
and here:
TuyAPI:device set: 100 +29ms
The "message" should be the set command {"set":"1"}, but instead it is 100, which is absolutely an invalid message and certainly not JSON. Now, I'm not sure why OpenHab is sending that, but it's obviously not the correct JSON data being sent.
I would suggest trying it with mosquitto_pub from command line:
mosquitto_pub -t tuya/xxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxx/192.168.x.xxx/command -m '{"set": 1}'
There does seem to be a bug in the handling of quotes in the value string, but the command above works for me and I'm going to guess it will work for you and show that tuya-mqtt works fine if it receives the correct message.
from tuya-mqtt.
I know that the number is set as a percentage of the roller shutter process closing
How can i do remove is from the MQTT object
I can't use 100 or 0 for opening or closing - just open, close , stop
from tuya-mqtt.
mosquitto_pub -t tuya/xxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxx/192.168.x.xxx/command -m '{"set": 1}'
Works
\NJStuya as well when I do it form the hand
but I need to have object in Openhab with 3 butttons; Open, stop, close
I can;t find any object exept Roller shutter which uses percentage as well ;(
from tuya-mqtt.
This should works, tuya-mqtt can set any DPS value, just a matter of getting the transforms correct in OpenHAB. I don't use OpenHAB but the community there should be able to help. If you work out the ways to set the DPS values and the transforms it should be no issue.
from tuya-mqtt.
Related Issues (20)
- tuya-mqtt correctly publishes state, but fails on command messages HOT 5
- Empty Data Returned After Publishing get-states HOT 3
- TypeError: Cannot set property 'updated' of undefined HOT 9
- Problem installing on Synology RS914 HOT 32
- Home Assistant integration how? HOT 2
- tuya-mqtt publishes states only when app is opened. HOT 22
- What mqtt broker HOT 3
- Disconnected from device and never connects again ... HOT 6
- Samples for nodejs script HOT 9
- New Maintainer Needed HOT 4
- Not sure when you went into Maintenance mode HOT 3
- Command Syntax for friendly topics HOT 3
- Setting switch state of a smart switch (custom template) HOT 11
- zombe state reconnecting issue? HOT 1
- Switch w/ Energy: DPS values reported only once at tuya-mqtt startup HOT 3
- Sudenly wrong responses from tuya device HOT 1
- tuya-mqtt not working (OpenHab) HOT 7
- Tuya bulb stopped working from tuya-cli, tuja-mqtt HOT 9
- Devices behind zigbee gateway available with tuya-cli but not tuya-mqtt HOT 1
- Different names after service restart HOT 9
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 tuya-mqtt.