Skip to content
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

[FEATURE REQUEST] - unplugged device / send this status #15

Closed
S474N opened this issue Aug 5, 2020 · 16 comments
Closed

[FEATURE REQUEST] - unplugged device / send this status #15

S474N opened this issue Aug 5, 2020 · 16 comments
Labels
invalid This doesn't seem right wontfix This will not be worked on

Comments

@S474N
Copy link

S474N commented Aug 5, 2020

Have Sonoff Tasmota device. When I unplugged in from power outlet, there will be state in Nodered "Neaktivni" (Not active) with warn red square. But the node don't send this information. Is it possible to add this feature?

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 24, 2020

Hi,
just enable the "Send enable/disable message" in the node config,
then it will send a messagge on every LWT status changes (online/offline)

Hope this is what you are asking
Best regards

@S474N
Copy link
Author

S474N commented Sep 25, 2020

Have checked all time. It will send via msg.payload or msg.status? Thanks for reply.

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 25, 2020

it should be msg.enabled, or maybe just enabled, one of the 2, I don't remember well :)

@S474N
Copy link
Author

S474N commented Sep 25, 2020

msg.enabled is normal undefined, when unplug off, then is "false".

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 25, 2020

{msg.enabled: true} is sent when the device goes online
{msg.enabled: false} is sent when the device goes offline (after a variable amount of seconds)

it works perfectly here

@S474N
Copy link
Author

S474N commented Sep 25, 2020

But there is another problem. It will send {msg.enabled: false} again and again when Deployed.

EDIT: and never is msg.enable: true. Now tested.

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 25, 2020

hmm, this seems something wrong with your mqtt broker, or maybe the device itself.

The msg.enabled messagges are sent every time the node receive a tele/device-id/LWT messagge on mqtt,
the node just translate and forward the mqtt message to a node-red message.

I suggest you try to add a standard mqtt-in node to your flow and subscribe to tele/device-id/LWT to understand what is happening

@S474N
Copy link
Author

S474N commented Sep 26, 2020

Have absolutelly standard eclipse-mosquitto server as broker.

Device is Sonoff RFR3 with Tasmota 8.5.0.1

In MQTT IN in nodered:

  • if device is online, payload is:
    {"topic":"tele/sonoff-rfr3-bazen/LWT","payload":"Aktivní","qos":0,"retain":true,"_topic":"tele/sonoff-rfr3-bazen/LWT","_msgid":"d684945b.611fa8"}
  • then offline:
    {"topic":"tele/sonoff-rfr3-bazen/LWT","payload":"Neaktivní","qos":1,"retain":false,"_topic":"tele/sonoff-rfr3-bazen/LWT","_msgid":"74d53ab3.cc2e84"}
  • and next online:
    {"topic":"tele/sonoff-rfr3-bazen/LWT","payload":"Aktivní","qos":0,"retain":false,"_topic":"tele/sonoff-rfr3-bazen/LWT","_msgid":"c50647d8.117778"}

Tested also with MQTT.fw:

  • subscribed to tele/sonoff-rfr3-bazen/LWT
  • when is online, it has Aktivní (it means Active in English)
  • next offline, it changed to Neaktivní (it means non-active in English)
  • when is next online, it has Aktivní (it means Active in English)

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 26, 2020

Ok, I understand the issue now !
The problem is that the node expect Online/Offline as the LWT payload, not Aktivní/Neaktivní

TBH it seems crazy to me that a protocol string is translated, there is no way for a controller to understand the LWT payload if it change between different languages.

Now the question is: why your tasmota behave different than mine? did you changed in some way the LWT payload?
or maybe you are using a translated release of Tasmota?

@S474N
Copy link
Author

S474N commented Sep 26, 2020

I'm using standard genuine Tasmota, but as you wrote - translated Czech version.

http://ota.tasmota.com/tasmota/
tasmota-CZ.bin.gz | http://ota.tasmota.com/tasmota/tasmota-CZ.bin.gz | 424k | tasmota-CZ.bin | http://ota.tasmota.com/tasmota/tasmota-CZ.bin | 598k | 20200926 11:17

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 26, 2020

Well, this seems to me a Tasmota issue, IMHO the LWT payload should always be Online/Offline, regardless of the user language. Protocols should never be translated!
It is not possible to add any possible language to the node code.

Can you please open an issue at Tasmota? Maybe they have already addressed this issue in the past or have a workaround

Of course you can just install the english Tasmota to your device to fix the issue

@S474N
Copy link
Author

S474N commented Sep 26, 2020

Tested flashing to original english Tasmota and everything is OK :)

But opened new issue at Tasmota:
arendst/Tasmota#9395

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 26, 2020

Great, lets see how it goes there
thanks for testing and reporting :)

@S474N
Copy link
Author

S474N commented Sep 26, 2020

So I made pull request with czech language file, but this is global problem of Tasmota also with another translations.

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 26, 2020

Yep, I'm following the Tasmota issue you opened.
Those 2 strings should not be translatable at all, I also voted for the last comment from Jason2866.

If you agree we can close this issue

@S474N
Copy link
Author

S474N commented Sep 26, 2020

Of course, thank you for cooperating!

@S474N S474N closed this as completed Sep 26, 2020
@DaveMDS DaveMDS added invalid This doesn't seem right wontfix This will not be worked on labels Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants