phifogg / ioBroker.sainlogic

An IoBroker Adapter for Sainlogic based weather stations
MIT License
20 stars 11 forks source link

Warning after Upgrade to jscontroller 3.2.16 #53

Closed Boronsbruder closed 3 years ago

Boronsbruder commented 3 years ago

Following warning is display in log: State "sainlogic.0.info.last_listener_update" has no existing object, this might lead to an error in future versions

Adapterversion 0.6.4

phifogg commented 3 years ago

Reason for this is in main.js around line 213:

            this.verify_datapoint(attr, this, my_attr_def[0], my_attr_def[0].channels[0].name); // allways channel 0 as primary attribute name

            this.setStateAsync(attr, { val: display_val, ack: true });

verify_datapoint will create the data point if needed, but this happens asynchronously and the datapoint might not be created fast enough before the first setState is called. Need to think how to rework this....

phifogg commented 3 years ago

This should be solved now in 0.6.6 - can you confirm?

phifogg commented 3 years ago

closed as confirmed in other thread.