-
Notifications
You must be signed in to change notification settings - Fork 9
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
When server and device ids change after each reboot it hurts productivity and joy in the Zetta browser #9
Comments
The server's id changes at startup when it is generated and thus the urls change. In some refactoring I did yesterday here it will no longer generate unique ids for the servers. The new way of addressing the server through the api is based on the servers name. Which does not change after you restart. After the PR is merged you will only have to refresh the page. As for device id's depending on your scout/driver implementation they should not changing after a reboot. a) When not using a scout, b) If you specifically use a scout to discover devices, you may need to use |
I understand the server part. Thanks for the heads-up. I look forward to the next rev. As for the device part, is that also part of a future release? Or should it be working now? If now, then is the key part to include the provision() function? I have a discover function working already. |
yep. Provision will help keep the ids consistent. Link below is to a basic https://github.com/zettajs/zetta/blob/master/sample/BasicServer/devices/Spark/index.js -- On Fri, Oct 10, 2014 at 3:07 PM, brian mulloy [email protected]
|
thanks. although I don’t want to understand what all is going on here, it sounds like I need to in order to build the driver well. if there an explanation somewhere? when I call provision() what is actually happening under the covers? same with discover(). what is it actually doing? -b On Oct 10, 2014, at 3:10 PM, Matthew Dobson [email protected] wrote:
|
No worries. I'll break down the process.
Sorry for the wall of text. Hopefully this clears some things up. -Matt -- On Fri, Oct 10, 2014 at 4:08 PM, brian mulloy [email protected]
|
That does help. Very clear. So, at this point I think I understand why I as the scout author would need to create a discover method: most importantly seems to be mapping to my device constructor at the time of discovery. Zetta doesn't know how to call the constructor otherwise. Cool. I can also understand why at times I might want to get my hands on the provision function: to have control at a critical point of device re-discovery. But I don't understand why I NEED to create a provision function for what feels like ought to be default behavior. This logic: That is the aspect that I'm still not understanding. Are there common situations where including that logic would be a mistake? Sent from my iPhone
|
Nope. The only scout that I know of where this set of functionality is well harnessed is the hue module for Zetta. CC: @AdamMagaluk Remember your motivations for this stuff at all? |
The main reason for having If I understand your issue @landlessness you would expect zetta to figure out if the device was already in the registry vs a new device then run the correct logic behind each method. Currently zetta does not have enough information to know if a device is unique/existing, zetta only has the device Currently all we allow is a scout author to create a unique query to figure out which parameter on a device is the unique and run the desired logic when the query returns. There was a card in the backlog (or maybe freezer now) that addresses this issue with regards to finding out if there could be better ways of doing this. Few options i've explored: a) Add some property on the b) The scout author could pass zetta the query for each type of device it's scouting for. This would at least remove the responsibility of running the query from within the scout. |
ok. lots to think about there. On Oct 13, 2014, at 10:02 AM, Adam Magaluk [email protected] wrote:
|
Whenever I change code, I have to reboot the server. Whenever I reboot, the server and device IDs change. Every time the server and device IDs change I have to hop out of my current Zetta browser state and start over at the Zetta browser home.
Building a device driver involves quite a bit of repetition on the same device page. So what should be a quick form submission becomes a 3-click productivity drag.
The text was updated successfully, but these errors were encountered: