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

Change nodeid for inputs when renaming node #36

Open
emrysr opened this issue Jan 25, 2019 · 1 comment
Open

Change nodeid for inputs when renaming node #36

emrysr opened this issue Jan 25, 2019 · 1 comment

Comments

@emrysr
Copy link
Contributor

emrysr commented Jan 25, 2019

When re-naming a node (screenshot); the node's inputs are not adjusted to use the new node name. The old node is then re-created when the next input data is received.

delwedd

Node field above is the device.nodeid field in MySQL
Name field above is the device.name field in MySQL

MySQL data structure: device.nodeid == input.nodeid

Would be good to add the check for node inputs and editing their input.nodeid property in the following lines: https://github.com/emoncms/device/blob/master/device_model.php#L435

As inputs is a Module in https://github.com/emoncms/emoncms it would be better to use the input controller to achieve this without having to change the input Module directly.

@adminde
Copy link
Contributor

adminde commented Feb 13, 2019

Hi guys,

I will make a forum post and/or pull request about this as soon as possible. Our current protocol driver integration contains this change for quite a while now, hence any work regarding this from anybody else would be doubled effort. I wanted to conclude these changes as a whole package that can be tested as a whole with some documentation but I will hurry up now^^

As inputs is a Module in https://github.com/emoncms/emoncms it would be better to use the input controller to achieve this without having to change the input Module directly.

while I completely agree, the whole template structure heavily depends on the Input/Feed classes and never uses the controller for any of the input or feed creation. This should be a separate issue 😄

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

No branches or pull requests

3 participants