Global Replace Feature


#1

I’m pretty sure this doesn’t exist. Although, it was discussed here…

Just had a WSD200+ crap out on me. The status LEDs were being set by several different pistons. Now, I have to change them each individually.

Even global find would be helpful.


#2

@ipaterson


#3

Replacing devices is on the roadmap for the restore from backup file feature. As planned it’s not quite the same as replacing devices in existing pistons, but maybe it could be done in a way that also works for existing pistons.

We’ve talked about this global search idea a bit internally but I don’t think anyone is working on it yet. Recently while working on support for restoring from backup files I realized that the backup file data format would make a good datasource for a piston search. The data for each piston that you want to search has to be loaded individually from ST and the backup process does exactly that.

A search would be required anyway to find the device name inside expressions for renaming, so maybe that’s the best way to go.


#4

Thanks guys. I really appreciate all that you do for this project. Hell, you are more responsive than most services that require a monthly fee!!!

While I doubt that my skillset would ever make me a minion. I have a computer science degree and some testing experience. If you ever need some testing, add me to your list.

To be very clear, my degree is from 1989. I’m fairly certain that servers as we know them didn’t exist yet and “mini-computers” running UNIX were all the rage.


#5

I read your roadmap for this project. Is the idea for a user to backup a piston to a local (text? xml?) file that could later be imported (restored)?

If so, that would be a great thing and certainly useable to accomplish the the global replace. A user could save the file locally, make the changes (replacements) and import the modified piston.

If you are speaking of a backup file that is binary, then some sort of GUI would be necessary for users to map the changes. A lot more work, but (obviously) a larger population would find it useful.


#6

For search I wouldn’t actually generate the file, just use the logic from the backup to gather all of the piston data. It has a nice dropdown to select pistons and a progress bar while the data loads. My hope is that some of that is reusable and that the data can be generated once, stored locally, updated as necessary, and then queried in the browser with something like Sifter.

The backup file is encrypted and even unencrypted the piston data format is quite… obfuscated (the piston “text editor” is just a view of that complex data structure). Some people may be able to successfully modify pistons that way but it would be extremely risky with a steep learning curve.

In the piston backup restore feature coming in the next release I worked on something adjacent to device replacement. When pistons are imported back into a new webCoRE environment the piston IDs are guaranteed to change, so I wrote some code to traverse the piston data to find all of the Execute Piston calls. With those I used the import data to automatically map the old piston ID to the new piston ID.

It wasn’t very fun but that kind of replacement is certainly possible. In the case of global replace I would probably use the same approach as the import… use the search or a pattern match to find all pistons that contain the device id or name then present those as a list. You would have to go through those one-by-one to save changes but the piston editor would automatically map. Maybe not ideal to fix pistons one by one but I’m very hesitant to do bulk piston writes and it would take reorganization of the code to allow that sort of thing.


#7

This is my number 1 item on my wishlist. With all the power of webcore, I was very disappointed there was no way to identify all the pistons that reference a device. Even if you allowed export of the pistons in text format (I know, I know, it would be useless because you can’t edit them) at least you could do text searches, but you can’t even do that right now.

My thought was to be able to filter on device in the dashboard view.


#8

It is possible to capture as text, but unfortunately only one piston at a time.

temp


Another possibility (in the meantime) is to use a full PC web browser, and click a piston that might contain the device in question. Then press Ctrl-F and type in the name in the Find window. Then use the highlight option to make that one word stand out. If you don’t see the device there, just back up and try another piston.

temp


#9

Oh, I almost forgot…
You can log into the IDE, and click on the device you are interested in.
At the bottom (In Use By) you will see all the pistons that use that device.


#10

:blush: That’s perfect!