Code Monkey home page Code Monkey logo

Comments (8)

joba-1 avatar joba-1 commented on May 31, 2024

Can you please provide some proof for that claim? Domoticz logs of when this is happening?
Can you please provide the exact domoticz version you are using?
Any other plugins active at the same time?

My code only ever creates devices and updates values. There is no code that deletes devices under any circumstances in it at all.

Also devices of a plugin are independent of other plugins or native devices - I have my manually created domoticz devices coexisting with tasmoticz devices (for the same tasmota device) for years with no influence in either direction - I just don't use them anymore because the tasmoticz devices create zero admin effort.

My guess is that if anything, this is a weird domoticz bug where my plugin has no influence on. But I'm happy to help tracking this down with you and domoticz devs if you want. Just leave a link to the relevant domoticz issue here so I can find it.

Other than that: yes, doing backups is always a good idea! My domoticz installation does this automatically without my intervention. I think that's the default.

from tasmoticz.

thatguyinoz avatar thatguyinoz commented on May 31, 2024

Hi
I rolled my data base back to a previous hour to recover, but im happy to do the process again and document it.
more info shortly.

from tasmoticz.

thatguyinoz avatar thatguyinoz commented on May 31, 2024

I started with a copy of the database backed up before the initial attempt at using the plugin, I added the plugin again and let it detect devices.
Attached are the list of devices from the initial database and the list of devices from the database after the detection process.
Although there a number of devices in the db that are changed or deleted two good examples are ID 230 "Snake Light" (deleted) and IDs 253 and 254 which are deleted and recreated as different device IDs 323 and 324 respectively.

Relevant log entries seem to be
Aug 18 18:04:37 BFree-Otto user.info domoticz: Tasmoticz discovery: Worker thread started. Aug 18 18:04:37 BFree-Otto user.notice domoticz: Tasmoticz discovery: Entering work loop. Aug 18 18:04:37 BFree-Otto user.notice domoticz: Tasmoticz discovery: Started. Aug 18 18:04:37 BFree-Otto user.notice domoticz: Tasmoticz discovery: Initialized version 1.3.1, author 'Joachim Banzhaf' Aug 18 18:04:37 BFree-Otto user.info domoticz: Tasmoticz discovery: MqttClient::onConnect: MQTT Server: localhost:1883 as tasmoticz

Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::createSensorDevice: ID: 18, Name: snake DS18B20-1 Temperatur, On: snake, Hash: 516D6B9E Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::createSensorDevice: ID: 19, Name: snake DS18B20-2 Temperatur, On: snake, Hash: 516D6B9E Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 17, from: snake POWER, to: snakemote Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 18, from: snake DS18B20-1 Temperatur, to: snakemote Temperatur Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 19, from: snake DS18B20-2 Temperatur, to: snakemote Temperatur

Aug 18 18:04:55 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::createStateDevice: ID: 13, Name: st2992 POWER1, On: st2992, Hash: 87EDAACC Aug 18 18:04:55 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::createStateDevice: ID: 14, Name: st2992 POWER2, On: st2992, Hash: 87EDAACC Aug 18 18:04:55 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 13, from: st2992 POWER1, to: lightwell 1 Aug 18 18:04:55 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 14, from: st2992 POWER2, to: lightwell 2
after_tasmoticz.txt
before_tasmoticz.txt

from tasmoticz.

thatguyinoz avatar thatguyinoz commented on May 31, 2024

Status: Domoticz V2022.1 (c)2012-2022 GizMoCuz
Status: Build Hash: c9526851b, Date: 2022-01-31 16:34:32

from tasmoticz.

joba-1 avatar joba-1 commented on May 31, 2024

Thanks for taking the time!

Relative to yours my domoticz version is ancient.

Version: 2020.2 (build 12173)
Build Hash: 1263a966d-modified
Compile Date: 2020-06-15 14:52:11

Things could have changed on the Domoticz side and as it seems not to the better. Not amused...

I'l try to find hints in release notes regarding plugin api changes.
Do you know which is the most active channel to reach domoticz devs? https://www.domoticz.com/forum?

from tasmoticz.

joba-1 avatar joba-1 commented on May 31, 2024

please try not to loose line breaks, it is enough if you loose devices :)

Aug 18 18:04:37 BFree-Otto user.info domoticz: Tasmoticz discovery: Worker thread started. 
Aug 18 18:04:37 BFree-Otto user.notice domoticz: Tasmoticz discovery: Entering work loop. 
Aug 18 18:04:37 BFree-Otto user.notice domoticz: Tasmoticz discovery: Started. 
Aug 18 18:04:37 BFree-Otto user.notice domoticz: Tasmoticz discovery: Initialized version 1.3.1, author 'Joachim Banzhaf' 
Aug 18 18:04:37 BFree-Otto user.info domoticz: Tasmoticz discovery: MqttClient::onConnect: MQTT Server: localhost:1883 as tasmoticz

Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::createSensorDevice: ID: 18, Name: snake DS18B20-1 Temperatur, On: snake, Hash: 516D6B9E 
Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::createSensorDevice: ID: 19, Name: snake DS18B20-2 Temperatur, On: snake, Hash: 516D6B9E 
Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 17, from: snake POWER, to: snakemote 
Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 18, from: snake DS18B20-1 Temperatur, to: snakemote Temperatur 
Aug 18 18:06:30 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 19, from: snake DS18B20-2 Temperatur, to: snakemote Temperatur

Aug 18 18:04:55 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::createStateDevice: ID: 13, Name: st2992 POWER1, On: st2992, Hash: 87EDAACC 
Aug 18 18:04:55 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::createStateDevice: ID: 14, Name: st2992 POWER2, On: st2992, Hash: 87EDAACC 
Aug 18 18:04:55 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 13, from: st2992 POWER1, to: lightwell 1 
Aug 18 18:04:55 BFree-Otto user.info domoticz: Tasmoticz discovery: tasmota::updateStatusDevices: idx: 14, from: st2992 POWER2, to: lightwell 2

from tasmoticz.

joba-1 avatar joba-1 commented on May 31, 2024

Unfortunately I cannot read something unusual from the logs. My plugin creates several devices (13, 14, 18, 19) and updates them as soon as it receives more data about the tasmota devices via mqtt. Exactly like it should be.
I miss create message of #17, but I guess it actually exists in your log.

As you can see, there is no relation between those ids and the ids >200 that got lost. Plugins see and use different ids from those domoticz uses globally. So my plugin can't do much about it. To keep track of that correlation is Domoticz's job. It would really help if you could tell them. Hard for me, because I cannot back that claim with own data.

from tasmoticz.

thatguyinoz avatar thatguyinoz commented on May 31, 2024

Ive repeated the process of restoring the db and reapplying the plugin, and I get the same results each time. However my Domoticz installation has stopped sending MQTT data on the topic /domoticz/out for a number of devices, with or without the plugin loaded.

I'm now of the opinion that this issue is strongly related to a fault in my initial Domoticz installation, not your rather useful plugin.

Sorry to to have muddied the waters, and thank you fr your responses, and sanity check. :-)

from tasmoticz.

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.