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

Create objects for Message.Timeout, Message.Type and Message.Text in io-package.json #229

Open
klein0r opened this issue Jun 9, 2024 · 0 comments

Comments

@klein0r
Copy link
Contributor

klein0r commented Jun 9, 2024

2024-06-09 13:00:44.139  - warn: enigma2.0 (103210) State "enigma2.0.Message.Timeout" has no existing object, this might lead to an error in future versions
2024-06-09 13:00:44.139  - debug: enigma2.0 (103210) enigma2 command Message Type: 1
2024-06-09 13:00:44.140  - warn: enigma2.0 (103210) State "enigma2.0.Message.Type" has no existing object, this might lead to an error in future versions
2024-06-09 13:00:44.181  - debug: enigma2.0 (103210) enigma2 message Text: text
2024-06-09 13:00:44.182  - warn: enigma2.0 (103210) State "enigma2.0.Message.Text" has no existing object, this might lead to an error in future versions

ioBroker.enigma2/main.js

Lines 95 to 108 in 1ebf0b2

adapter.log.debug(`enigma2 message Timeout: ${parseFloat(JSON.stringify(obj.message.timeout).replace(/"/g, ''))}`);
await adapter.setStateAsync('Message.Timeout', {
val: parseFloat(JSON.stringify(obj.message.timeout).replace(/"/g, '')),
ack: true
});
adapter.log.debug(`enigma2 command Message Type: ${parseFloat(JSON.stringify(obj.message.msgType).replace(/"/g, ''))}`);
await adapter.setStateAsync('Message.Type', {
val: parseFloat(JSON.stringify(obj.message.msgType).replace(/"/g, '')),
ack: true
});
adapter.log.debug(`enigma2 message Text: ${JSON.stringify(obj.message.message).replace(/"/g, '')}`);
await adapter.setStateAsync('Message.Text', {val: JSON.stringify(obj.message.message).replace(/"/g, ''), ack: false});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant