Code Monkey home page Code Monkey logo

Comments (25)

arendst avatar arendst commented on June 4, 2024 1

As designed, domoticz/out (or any user defined DOMOTICZ_OUT_TOPIC) overrules the rule subscribe functionality. If you want to act on domotics/out/idx you will need to configure the index for the relay in the tasmota domoticz GUI config screen or use command DzIdx<relay number> <domoticz index>.

from tasmota.

soif avatar soif commented on June 4, 2024

Hi, thanks for the fast answer 😎

I've put (above) some very basic rules (to ease fast understanding of the issue) but in fact, i want to grab some sensor values from Domoticz (ie temperature, humidity, wind speed etc....) and then display them on a Tasmota powered Oled display.
So DzIdx is not relevant in this case.

When values come from other Tasmotas, it's work perfectly well by subscribing to tele/otherTasmota/sensor , but for others sensors (ie: RF, MySensors, EspEasy, other non MQTT sensors,etc...) I've no other choice than using the domoticz/out topic to grab them.

(I know I could always make a custom Domoticz script to do that, but its' a bit overkill for such simple tasks)

Being supported directly in Tasmota, would be a lot easier. (if it's too complicated to change the code to receive domoticz/out both for relays AND for subscribing, it could also be implemented as a compilation flag that switches between one of the 2 behaviors)

Makes sense?

from tasmota.

arendst avatar arendst commented on June 4, 2024

In that case compile your own binary disabling Domoticz and you're free to use subscribe as you like.

from tasmota.

soif avatar soif commented on June 4, 2024

will do. thanks for the tips. 👍

As designed, domoticz/out (or any user defined DOMOTICZ_OUT_TOPIC) overrules the rule subscribe functionality.

This information would actually deserve to be noted in the documentation at :
https://tasmota.github.io/docs/MQTT/#subscribe

Would you like if i submit to this page something like:

!!! tip "Domoticz Users"
As designed, domoticz/out (or any user defined DOMOTICZ_OUT_TOPIC) overrules the rule subscribe functionality. This means that you can't subscribe to this topic, except if you had disabled the USE_DOMOTICZ flag when compiling your own firmware

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024

mmm is there perhaps someone that have a simple how to.. windows noob here.
Will use the 8 channels, with domoticz, only perhaps can i work with mqtt or node red..?

from tasmota.

sfromis avatar sfromis commented on June 4, 2024

Last question related to #21066

from tasmota.

arendst avatar arendst commented on June 4, 2024

Let's keep the conversation here where I will allow users to add additional DzIdx relation kept in RAM to be executed once at start by a rule. No subscribe needed.

from tasmota.

arendst avatar arendst commented on June 4, 2024

So try latest dev branch.

This allows to configure additional relays5 until 32 with domoticz command DzIdx<relay> <domoticz_idx>.

To make the relation persistent add following rule where 403 and 1234 are known Domoticz idx for relay5 (=power5) and relay6 (=power6):

rule1 on system#boot do backlog DzIdx5 403; DzIdx6 1234 endon
rule1 1

As a bonus to this change no more restarts needed if configuring Domoticz parameters ;-)

from tasmota.

soif avatar soif commented on June 4, 2024

This allows to configure additional relays5 until 32 with domoticz command DzIdx <domoticz_idx>.

Many Thanks for this smart addition. While it doesn't change anything, about the initial question to subscribe to Dz sensors, it is a very helpful feature for project (like a couple of mines, but certainly a lot of other users too) when we need to handle more than 4 "relays", easily. 😎 👍

Regarding my proposal of amending the documentation regarding Dz/out subscribe limitations, I'm gonna pull a PR, for you to decide to accept or reject it.

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024

THANKS for the great work...
Likt to test, only is there ota link for upgrade to the relaease?

from tasmota.

sfromis avatar sfromis commented on June 4, 2024

You do not need to wait for next release, fresh development builds are here:
https://ota.tasmota.com/tasmota/
And you can copy/paste from the "OTA URL" column for an upgrade.
(Do not copy the https links from the "OTA Firmware" column).

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024

this are teh realese?
Not the development ota, or am i wrong

from tasmota.

sfromis avatar sfromis commented on June 4, 2024

No, the link I posted is development, and the timestamp shows how fresh they are. Also, the header clearly says "Development binaries".

If you wanted release instead: https://ota.tasmota.com/tasmota/release/

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024

So try latest dev branch.

This allows to configure additional relays5 until 32 with domoticz command DzIdx<relay> <domoticz_idx>.

To make the relation persistent add following rule where 403 and 1234 are known Domoticz idx for relay5 (=power5) and relay6 (=power6):

rule1 on system#boot do backlog DzIdx5 403; DzIdx6 1234 endon
rule1 1

As a bonus to this change no more restarts needed if configuring Domoticz parameters ;-)

theo,
Test the new channel 5 and 6 [ and i hope 7 and 8 :-) ]

Did a update to latstest dev.
ScreenShot072

in the consule i did:

rule1 on system#boot do backlog DzIdx5 8077; DzIdx6 8078endon
rule1 1

10:14:59.469 CMD: rule1 on system#boot do backlog DzIdx5 8077; DzIdx6 8078endon rule1 1 10:14:59.474 RUL: Stored uncompressed, would compress from 63 to 46 (-27%) 10:14:59.479 MQT: stat/homeassistant/RESULT = {"Rule1":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":63,"Free":448,"Rules":"on system#boot do backlog DzIdx5 8077; DzIdx6 8078endon rule1 1"}} 10:15:27.247 MQT: tele/homeassistant/STATE = {"Time":"2024-04-01T10:15:27","Uptime":"0T00:05:10","UptimeSec":310,"Heap":25,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":21,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","POWER5":"OFF","POWER6":"ON","POWER7":"ON","POWER8":"ON","Wifi":{"AP":1,"SSId":"D.M.","BSSId":"C8:7F:54:47:66:A0","Channel":9,"Mode":"11n","RSSI":60,"Signal":-70,"LinkCount":1,"Downtime":"0T00:00:04"}} 10:16:54.061 CMD: rule 1 10:16:54.069 MQT: stat/homeassistant/RESULT = {"Rule1":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":63,"Free":448,"Rules":"on system#boot do backlog DzIdx5 8077; DzIdx6 8078endon rule1 1"}}

Only the channel 5 and 6 are not switching. when i use the switch [ with 8977 or 8078] in domoticz
Also not after a reboot.

Where do i go wrong

from tasmota.

sfromis avatar sfromis commented on June 4, 2024
rule1 on system#boot do backlog DzIdx5 8077; DzIdx6 8078endon
rule1 1

That's broken. First, you need a space before endon, otherwise you have no rule. Second, you cannot copy/paste independent commands in one operation, but have to issue two separate commands. As you only used one copy/paste, your output shows the bad result.

10:14:59.479 MQT: stat/homeassistant/RESULT = {"Rule1":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":63,"Free":448,"Rules":"on system#boot do backlog DzIdx5 8077; DzIdx6 8078endon rule1 1"}}

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024
rule1 on system#boot do backlog DzIdx5 8077; DzIdx6 8078endon
rule1 1

That's broken. First, you need a space before endon, otherwise you have no rule. Second, you cannot copy/paste independent commands in one operation, but have to issue two separate commands. As you only used one copy/paste, your output shows the bad result.

10:14:59.479 MQT: stat/homeassistant/RESULT = {"Rule1":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":63,"Free":448,"Rules":"on system#boot do backlog DzIdx5 8077; DzIdx6 8078endon rule1 1"}}

sorry, first time using rules....

So this should be good?
rule1 on system#boot do backlog DzIdx5 8077 endon rule1 1

Perhaps otherwise an good example rule, please

from tasmota.

arendst avatar arendst commented on June 4, 2024

I suggest you start to read here https://tasmota.github.io/docs/Rules/ and continue from there.

In short, this is the valid rule:

rule1 on system#boot do backlog DzIdx5 8077 endon

followed by a one-time command rule1 1 enterd by you.

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024

I suggest you start to read here https://tasmota.github.io/docs/Rules/ and continue from there.

In short, this is the valid rule:

rule1 on system#boot do backlog DzIdx5 8077 endon

followed by a one-time command rule1 1 enterd by you.

WORKS!!!! only after a reboot.

Only now swiths 6:
rule2 on system#boot do backlog DzIdx5 8078 endon [ enter]

rule2 2 [ enter ]?
Or rule2 1 ?

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024

And for the future,how to reset a rule?

Ps i read the rules pages, only a windoows noob here from early 60's :-)

from tasmota.

sfromis avatar sfromis commented on June 4, 2024

You need both DzIdx commands at the same time, just like what you originally had. No one was suggesting you to only have one of those, just to fix the errors in the rest of the line.

from tasmota.

arendst avatar arendst commented on June 4, 2024

No excuse not to to try to understand the docs. You managed Nodo in the past, Tasmota is no different.

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024

No excuse not to to try to understand the docs. You managed Nodo in the past, Tasmota is no different.

nodo that was very hard to get for me.. A long time ago
And yes i did try that also, only then there was domoticz..:-) And then there was espeasy, and finaly tasmota :-)

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024

Did:

16:07:00.227 CMD: DzIdx0 0 
16:07:00.233 MQT: stat/Houthok_midden/RESULT = {"Command":"Error"}

Found something other stranges....
The relais are not working like they says in to the template explanation:
image
in this setting relais 6 and 8 are not working.

With this setting are all relais working:
image
When i use the webui....

After this cms:
rule1 on system#boot do backlog DzIdx5 8078; DzIdx6 8105; DzIdx7 8080; DzIdx8 15822 endon

Almost all the idx with domoticcz are woring only 6 not.
idx 8105 not working from domoticz, when i push the webui button working fine..

Try a lot of other settings, only DzIdx6 8105; is not working... with teh template setting like the website says

from tasmota.

sfromis avatar sfromis commented on June 4, 2024

Using DzIdx0 0 would only be valid after updating to the very most recent build.

from tasmota.

Dylantje avatar Dylantje commented on June 4, 2024

Is it not possible te set an switch to a other gpio?
I think there is something wrong in the template.

All working only relay 7 is not..
GPIO 4
image
All other gpio are not working, this is the only config that is working.
Strange is that with the rule code, the 7 is not working with a idx from domoticz, and in the webui from the wifiboard the swicht is working well.

Hope someone hava a idea.

from tasmota.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.