Comments (10)
Hi,
nice to know the plugin generally works for you.
Two remarks: 1) tasmoticz only does the detection of tasmota devices and creates domoticz devices from it. It has nothing to do with the operation of the switch. It could be you would have problems detecting new devices. Have you checked this?
2) There seems to be a json message arriving via mqtt from the updated tasmota devices that my plugin does not properly cope with. It will help to see mqtt messages that are sent from tasmota at the time the error message appears.
from tasmoticz.
hi discover something,
https://tasmota.github.io/docs/PCF8574/#pcf8574-in-sensor-message
PCF8574 in SENSOR message~
Enabling USE_PCF8574_SENSOR adds a PCF8574-xx field into the JSON payload of the tele/topic/SENSOR message. The form of the message is:
13:19:07.459 MQT: tele/tasmota_156/SENSOR = {"Time":"2021-05-12T13:19:07","PCF8574-1":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":1,"D5":1,"D6":1,"D7":1,"PCF8574-2":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":0,"D5":1,"D6":1,"D7":1}}
i try to compile again the firmware but this time inside my_user_config.h
i not enable :
#define USE_PCF8574_SENSOR // enable PCF8574 inputs and outputs in SENSOR message
in this case i do not receive the errors.
But maybe could be fixed the usage of tasmota "sensor" option inside tasmoticz?
could be useful to listen also at "tele/%topic%/SENSOR" to menage also this new implementation?
from tasmoticz.
I suspect a world record here: fastest time in delivering requested log output :)
The SENSOR message is the culprit - it actually is not valid JSON. A curly brace after the first sensor data is missing.
I'm sure the people over at tasmota can help you with that.
from tasmoticz.
I suspect a world record here: fastest time in delivering requested log output :)
ahahah no no it is just lucky that we was write simultaneously i suspect :D
The SENSOR message is the culprit - it actually is not valid JSON. A curly brace after the first sensor data is missing.
I'm sure the people over at tasmota can help you with that.
mmm sorry where is the curly brace missing!?
13:19:07.459 MQT: tele/tasmota_156/SENSOR = {"Time":"2021-05-12T13:19:07","PCF8574-1":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":1,"D5":1,"D6":1,"D7":1,"PCF8574-2":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":0,"D5":1,"D6":1,"D7":1}}
thanks
from tasmoticz.
I suspect a world record here: fastest time in delivering requested log output :)
ahahah no no it is just lucky that we was write simultaneously i suspect :D
:)
mmm sorry where is the curly brace missing!?
13:19:07.459 MQT: tele/tasmota_156/SENSOR = {"Time":"2021-05-12T13:19:07","PCF8574-1":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":1,"D5":1,"D6":1,"D7":1###right here###,"PCF8574-2":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":0,"D5":1,"D6":1,"D7":1}}
thanks
from tasmoticz.
I guess, this is how it should look like:
echo '{"Time":"2021-05-12T13:19:07","PCF8574-1":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":1,"D5":1,"D6":1,"D7":1},"PCF8574-2":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":0,"D5":1,"D6":1,"D7":1}}' | python -m json.tool
{
"Time": "2021-05-12T13:19:07",
"PCF8574-1": {
"D0": 1,
"D1": 1,
"D2": 1,
"D3": 1,
"D4": 1,
"D5": 1,
"D6": 1,
"D7": 1
},
"PCF8574-2": {
"D0": 1,
"D1": 1,
"D2": 1,
"D3": 1,
"D4": 0,
"D5": 1,
"D6": 1,
"D7": 1
}
}
from tasmoticz.
sorry for that, now i perfectly understand, and you are fully right!
i will try to talk with tasmota.
do you think that ones it will be fixed could be useful for your plugin use the "sensor" json?
from tasmoticz.
hi, now the json is fixed:
previous (wrong)
13:19:07.459 MQT: tele/tasmota_156/SENSOR = {"Time":"2021-05-12T13:19:07","PCF8574-1":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":1,"D5":1,"D6":1,"D7":1,"PCF8574-2":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":0,"D5":1,"D6":1,"D7":1}}
new(correct)
18:41:59.537 MQT: tele/tasmota_156/SENSOR = {"Time":"2021-05-12T18:41:59","PCF8574-1":{"D0":1,"D1":0,"D2":1,"D3":1,"D4":1,"D5":1,"D6":1,"D7":1},"PCF8574-2":{"D0":1,"D1":1,"D2":1,"D3":1,"D4":1,"D5":1,"D6":1,"D7":1}}}
thanks for help me on recognize the error.
i tested with tasmoticz plugin and now it works without any issue.
i take the take advantage of this topic and json issue to ask, if it's possible and feasible to look at json of shutter in tasmota to menage in domoticz.
it could be great!!!!
inside json there is the percentage and we can link domoticz blinde with percentage to firmware with tasmota.
here an example of json from tasmota for blind:
19:04:12.913 MQT: stat/tasmota_blind_new/RESULT = {"POWER2":"ON"}
19:04:12.917 MQT: stat/tasmota_blind_new/POWER2 = ON
19:04:12.921 MQT: stat/tasmota_blind_new/RESULT = {"ShutterPosition1":37}
19:04:12.980 MQT: stat/tasmota_blind_new/RESULT = {"Shutter1":{"Position":57,"Direction":-1,"Target":37}}
19:04:13.724 MQT: stat/tasmota_blind_new/RESULT = {"Shutter1":{"Position":52,"Direction":-1,"Target":37},"Shutter2":{"Position":27,"Direction":0,"Target":27}}
19:04:14.728 MQT: stat/tasmota_blind_new/RESULT = {"Shutter1":{"Position":45,"Direction":-1,"Target":37},"Shutter2":{"Position":27,"Direction":0,"Target":27}}
19:04:15.758 MQT: stat/tasmota_blind_new/RESULT = {"Shutter1":{"Position":38,"Direction":-1,"Target":37},"Shutter2":{"Position":27,"Direction":0,"Target":27}}
19:04:15.951 MQT: stat/tasmota_blind_new/RESULT = {"POWER2":"OFF"}
19:04:15.958 MQT: stat/tasmota_blind_new/POWER2 = OFF
19:04:16.466 MQT: stat/tasmota_blind_new/SHUTTER1 = 37
19:04:16.473 MQT: stat/tasmota_blind_new/RESULT = {"Shutter1":{"Position":37,"Direction":0,"Target":37}}
what do you think?
tasmoticz could look at:
19:04:16.466 MQT: stat/tasmota_blind_new/SHUTTER1 = 37
stat/%topic%/SHUTTER1 = 37
=> shutter1 is at 37% to update domoticz when command is issued by tasmota
and when the command is send by domoticz, :
nValue=0-->total Closed
nValue=1-->>total Opened
nValue=2-->>level=sValue
so tasmoticz should send for set percentage (level):
cmnd/<topic>/shutterposition <svalue1>
svalue1 contain the percentage of positioning
when total close or total open domoticz use (looking at nValue
):
cmnd/<topic>/shutterOpen <number of blind to control>
cmnd/<topic>/shutterClose <number of blind to control>
could be used to expand the functionality of tasmoticz?
from tasmoticz.
ciao @joba-1 i tested the new release of tasmota, and now they fixed the output json and it's working with your plugin tasmoticz :)
thanks for highlight the mistake inside tasmota :)
did you get the chance to have a look at second part of my post?
can you look at json response of blind state?
can tasmoticz plugin menage also this ? :)
from tasmoticz.
good to know that it works now.
Adding shutter/blinds support is definitely possible, but my time schedule does not allow me to add new features - especially if I don't have devices to test it with (and since some time already). So if there is a PR I‘ll certainly evaluate it but other than that I can just fix bugs and add new sensor types occasionally.
from tasmoticz.
Related Issues (20)
- Device naming in German? HOT 8
- Cant switch on/off a offline device HOT 2
- Athom device incorrectly handled HOT 1
- Better handling of humidity sensors HOT 7
- Domoticz Switch State not updated after switching HOT 8
- Error: Tazmoticz: AttributeError: type object 'Collection' has no attribute 'Mapping' with Python 3.10.4 HOT 5
- Deletion of some devices when used with a damaged Domoticz installation HOT 8
- Support for Tasmota 12.1 and Tasmota Discovery / hatasmota HOT 5
- Error message every 12hrs but everything works HOT 7
- Pb Maj Domoticz 2022.2/2023.1 HOT 14
- More than 255 devices error -> filtering ? HOT 10
- Create device for LWT messages. HOT 4
- Incorrect electricity data being sent to Domoticz. HOT 2
- I am asking for two separate blocks in domoticz HOT 23
- Another malfunction related to the energy indicator. HOT 3
- Tasmota 13.0.0 and PZEM 004 HOT 2
- Athom Tasmota RGB(WW) LED Strip Controller HOT 2
- Can I make a DevkitV1 esp32 working with tasmoticz HOT 4
- typeDb contains keys in different languages HOT 2
- Switches/buttons not detected HOT 1
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 tasmoticz.