-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.txt
312 lines (228 loc) · 21.6 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
* going to playlist page and then back to remote left the player popup on the bottom of the page
* issue with dialog boxes not being centred =/
* fix tabs
* make sure errors are handled in callbacks
* should you use promises
* somehow make it possible to have module-specific javascript... should they all be programmed like components?
* get medialib stuff working
* separate player state stuff into its own device
* where should RGB component go?
* add pulseaudio controls, so you can set them to specific amounts
* add a volume 80% button to vlc, if possible
* add timer object thing to async tasks?
* when subscribing to an aliased object, it doesn't create a remote subscription... (slider subscribes to rrgb/intensity which does nothing,
instead of subscribing to the target of rrgb, ws://kitty:8889/devices/rgb)
* should remote subscriptions use id() or the url, would the url have to be encoded to remove [+#$]
* medialib playlist can have a popup or something, when selecting a song? That allows you to get info, search, add tags, maybe a ++ button?
* integrate loss of signal into mysensors such that the last value will go to None if the sensor has not been heard from
* add publish method, and possibly subscribe method?? to ObjectNode? It would really just publish(self.get_pathname() + topic, ...)
* should event routing/dispatching be moved to a separate thread to decouple it from the publish call?
* make a way of subscribing to events published by other computers on the network. It would need a return address of some kind. What
about symlinks specifically? is it possible to subscribe to the value of a symlink and have it forward the subscription to the
remote machine?
* add on_setting_update callback? (maybe already done)
* move query code somewhere else than main?
* fix alternate module location support, it can't load modules from the 'modules' toplevel dir
* add readline support to tcpserver/shell
* add notifications to the db so that they persist across restarts. Maybe make a systemdb for users, notifications, and anything else
* what about making notify a static module so that it's easily accessible
* add a system of notifications/messages that's global to the system but specific to a user (ie. can leave messages for individual users)
* add alarms, such that you can notify that something's gone wrong. Like if a mysensors node hasn't sent any data and hasn't responded to
pings for more than 30 minutes, you raise an alarm so I can fix it in a timely manner
* need a way to send a ping to a mysensors node when it hasn't responeded, so we can *accurately* know when a sensor is not responding
* there still isn't a clean way of notifying that a medialib update on another machine (remote medialib) has finished updating. It only
works locally but notifications aren't sent to all the other machines
* notifications webpage when updating it forgets the checkbox values, which makes it irritating to ack or clear select notifications
this is a general issue with the entire frontend system
* fix config display for lists and dicts (datalog datapoints is just str()'d)
* make backups of settings file when saving, or possible add a revision control type system to it
* make sure it creates a sane default settings file if the config dir doesn't have a file already
* add run and config instructions to the readme (so that somebody could actually run the thing)
* add zoom and pan control to vertical scale too?
* add ability to have live trends
* fix datalog to allow variable periods per datalog (right now it's always 60 seconds)
* add optional limits to how long the datalog data is kept
* add way to analyze, integrate, differentiate, etc, by selecting a range of time (more on asana)
* make datalogs reorderable, colour selectable; this could be done through config, but should also be doable directly through interface
(see it, change it; rather than hunting in a config somewhere)
* a common feature is to use mqtt through websockets, so it can be directly connected to the browser/client to get push updates. There
are already some javascript client libraries. Might even be possible to have an off the shelf mqtt broker, tied into nerve
* you could run the sensors handling and collection using a different process on the panther, running in the background, with the
webserver/controllers being in the main process that vlc is controlled through. It should be possible with symlinks to add all
the sensor process's data to local references. You may want to add/improve another protocol for data transfer rather than HTTP/POST
You could even run the process on the server, and have it collect data centrally
* move asynctasks into its own module?
* should asynctasks be merged with the proposed actions module (actions which respond to events)?
* rename tasks to threads?
* move db to its own module?
* standardize on some humanize formatting stuff?
* add publish/subscribe to things like connect module, irc module etc
* make a separate 'actions' module, like irremote, which can take ir codes, or button presses, or any other condition, and run associated
code. At this point, I guess this is just an objnode which subscribes to an event, but I need a nice way of setting them up, like irremote
* fix pyhtml to ignore tags in comments
* add support for sending ir codes with irremote. It should use the irremote device, with a setting for target, and rgbnode needs to accept
the colon separated code, or irremote must send a space separated code
* add a description field to each mysensors node so it can be labelled (ie. which relay switch is which)
* add a morse code device of some sorts, which could be used by notify or by anything, to encode/decode/play/etc morse code
* add power consumption measurement
* add mqtt device (which is actually a broker) and server (which is actually a client) to extend the event system to other computers
* add XMPP peer ability, to use it as IoT (need to look into this more)
* wsgi needs a better way to handle userpermissionsrequired
* modify to use websocket (optionally, if available) for all data requests. This might require big changes to all the frontend code
which you might do anyways. Then notifications and other data updates could be done (somehow) as data pushes, so you don't have to
poll the server constantly. Also notifications could happen instantaneously
* change /assets paths to /base/assets so it's more consistent. This will require either a blank assets controller or http
will have to accept more complex controller names
* rename controllers to routes in server object
* should there be a Router type separate from server, which is responsible for dispatching, and the server would have some kind of
reference to the router object. There could still be multiple router objects, but there can also be a shared router object
* change server's 'controllers' to 'routes' to allow multiple parts in the path name ("/things/stuff/config" -> "config controller")
* add a config setting to controllers to specify the path of the model/device they should access, rather than hard coding it
* make medialib controller use a single medialib request for modifying tags
* make a popup view at the bottom of the screen, a tab sort of thing, that you can drag upwards to show the "Remote" tab, so it's
easy to change the song or turn something on quick while in the middle of something else, like making a playlist/searching media
* add advanced web editor widget, with support for tab, indent-selected, etc
* change queries to use @nerve.public (I'm not sure I want to do that)
* make projectm kill the process when the program quits
* move the save/load state feature to the common player object, and have it use the backend driver to actually get and restore the state
* add help system that uses docstrings
Frontend:
* you need to redesign the frontend to be more responsive/interactive. Changing settings on the fly, using widgets pieces all over. There
is some merit in going all js or something so that it's easier to have widget components (or you could use web components somehow)
* have a slide up panel with the remote control on it, so it's easy to switch to it while in the middle of something
* make tabs appear as a fixed bar when scrolling up (hides when scrolling down, shows when scrolling up no matter where you are on the page)
* change all uses of document to document.body??
* do something about notices and errors... the message should be visible without scrolling to the top... maybe insert it after the button
* should you change js names to camelcase?
* when adding an irremote action via the dialog-open button, there is no way to add the red dot without reloading the page
* is there a way to specify that a submit action (on forms?) should reload the page
* add an optional delete button to forms to delete the object you're editing? (would this only be for config objects)
* make use of nerve.join_path() in js and python
* when you delete a block, it does not update the list of blocks
* make it so that if a block is renamed, it's references in page definitions is updated
Modules:
* you need to address the modules system as it's currently implemented. the issue of config data would be the same if tasks were objnodes
* you kinda need a way to organize modules into subdirectories, so these types of modules don't clutter the system
ObjectFS:
* with an eye towards REST, objects like the playlists, mysensors, and possibly others could have a 'list' function, such that
GET playlists would return a list of playlist names, and GET playlists/A%20Playlist would return the playlist itself. This might
not fully work across all REST functions though, since the same method is called during a get or post
* make http support REST api, maybe use that for models/devices
* the issue with REST is that it doesn't map well onto the object system that GET/POST requests are making. To make it work, I'd
have to establish a clear mapping, like translating them into 'put', 'delete' methods on the object, or tying them to 'add_child',
'remove_child' but those might be too low level
* add a clone() method to objects, to clone the object, and use it for controllers, so that the server will have an instantiated
controller object for each controller, and it clones that object for each request.
* should you re-unify the config namespace, or make it accessible somehow through the filesystem (like /devices/rgb/config:baud)
* make it easier to access the settings config for a specific object without opening the whole thing. ie. open the datalog config from
the datalog page, to add and remove tags from the log
* what about making a database of objects, where the config dictionary is saved as json encoded text, along with the pathname where it belongs.
It would be quicker to update config for just one object, but it would be harder to edit the objects/config data manually
* should it be allowed to have special arguments passed to nerve.query() so that an http request can have options specified? It will conflict
with the kwargs, unfortunately. Could there be a special way of refering to them? They would have to be removed before encoding the query.
* should multiquery/notify use get_object/keys_queries+keys_children? Should it selectively recurse or always recurse? How should a subobject
be allowed to override that behaviour
* re-evaluate use of getattr for getting objects on ObjectNode and stuff... does it cause too many potential conflicts? or does
it simplify objects such as Main where attributes are directly on the object but should also be accessible through the ObjectNode
system
* you could have tasks be added to the ObjectFS... you could have tasks be started automatically (or some tasks at least), after
everything initializes. Then you could have the EventThreadPool and mediaupdater threads be essentially loose threads in the system,
started by the system, and accessible through the config system, with config options for them?... Well EventThreadPool is still
a static object created by the system rather than a configurable object...
Users:
* integrate user permissions and stuff into everything
* more directly integrate the user system. especially with mud, there must be much better security and access controls. This also could apply for an
irc device that is owned by one user and represents that user, and can only be accessed by that user
* make it possible for each user to customize their own views somehow (customized remote layouts)
* make theme user selectable somehow
Databases:
* add db method to create or alter table (so that it updates existing databases automatically)
* add support for JOIN to db driver
* can you make it use a different SQL database? At the very least, you could alter init() to take just the db name without the extension (which
could be used by a MySQL driver as a table name prefix or something)
* it would be cool if you could have multiple database sources, so like datalog module could use a different db for example, and medialib another
Medialib:
* make it possible to add songs from one playlist to another playlist
* it should be possible to easily remove items from the current playlist (like delete current song/delete all by artist/delete previous song)
The changes should take effect immediately. Possibly could have a list of recently played songs to delete
* you could have a playlog of recently played tracks, and then you can delete previously played items (so it should list it even if the song played for 2 sec)
* add is-playing animated icon next to the song title (info to be sent with getsong())
* add pagation to media search results (should be possible through offset/limit)
* medialib file updater should check to make sure there isn't some accessing or missing filesystem condition before removing a media file entry
from the database
* should medialib be a model instead of a device?
Connections:
* A connection could be either text/plain (line terminated), application/json (messages), or possibly text/html, which would be similar to
text/plain but allow html tags in the stream. Sort out how connections negotiate mimetype of messages, and how messages are structured
* could you make something (server or connection handler or something), that will act like a terminal, that will respond to arrow
keys, completion, and so on, just like console does, but for tcpserver connections, and other things (even the websocket shell)
* add command/path completion to shell
Misc:
* you could add something to views themselves where you specify the support files (js/css), and a parent view will integrate those into
the final template-generated code
* should you overload print instead of redirecting stdout in pyhtml?? This wont work for code in other files that use print, since they have the global vars of their scope
* add type parameters (like object(Server) to give a list of only objects that inherit from Server, or objectref(/devices) to only list
object names (path/ref) in the dropdown
* there's an issue accessing google's oauth and having it redirect to an internal ip. This prevents it from working on phone
* could you have a redirect on jabberwocky.ca that just redirects the browser to a local address?
* would it be useful (or more complicated) to add a 'parent' or 'template' field to pages in the pages module, so that a parent
page can be specified other than '__default__'?
* make mud using a special module
* add irc/chat sort of things?
* make more advanced widgets for various things (ideas?)
* there could be a way to automatically minify js and css files on the fly
* add support for multiline comments in pyhtml
* perhaps you could make it so that servers can be individually stopped and started
* add voice commands or clapping commands (beepish?). Only critical controls are needed, like play/pause, skip, volume up/down
* make it as much like a generic hmi/plc/data disemination/control thing as possible. Make it so that it's easy to have it automatically
query the server to fill in data fields.
STRUCTURAL/REFACTORING:
* should you change as many private variables to _leading notation? I've already done this for ObjectNode because self.config was conflicting
with path names used by controllers. In light of the filter that prevents _leading queries to be issued, this might be effective at
enforcing attribute access permissions. This rule could be enforced more strictly
* change module type references to include the '/modules/' part (objfs name)
* if you convert jquery files to send post requests as json, then it will preserve the numeric/string type distinction. Without it,
any method called through that mechanism must be cognizant and convert strings to numeric if needed.
* make all threads use the same method of invocation, if possible?? Or at least clean them up a bit
* perhaps PyHTML could be renamed PyHP, or the filename extension could be .pyhp so it's a bit shorter or something
BUGS:
* it's possible to enter anything after a url. It doesn't throw an error, which it probably should (a 404 error), but some things use
this feature to implement subreferences
ANDROID:
* try to move settings button/action bar into bottom bar, or something... maybe you can make it hide itself
* add a refresh button to the menu, to reload the current page
ARDUINO:
* add a query discovery thing to nerve serial devices to get the list of queries that device can respond to
* should you switch to sending queries as query strings instead of as positional arguments?
* add share-to link, so that in other apps, you can share a link to nerve, which sends the link to the server to eg. enqueue a youtube link
OTHER APPLICATIONS:
* when vlc plays a youtube link, it converts the link to the direct link to the flv, but that link expires, and causes an error when played
* with vlc, is there a way to not receive the json when sending a command (to speed up commands)
POSSIBLE FEATURES:
* add module that can maximize a particular window (like firefox), and then have a means of programming mouse clicks on the screen and mapping
them to queries, so that a nerve button can cause that mouse click to happen, with the window focused and maximized. You could also click an
area, and if the colour of that pixel is a certain one, then return true instead of false (eg. a play/pause status indicator that uses some kind
of html element to drive it). The ease of programmability of this is the key to it being usable
* you could add an auto discovery feature where the phone sends a broadcast message to the default port number and all the
servers respond. It could be used for some normal operations even, and the server would just send a message back like
it normally would, in response to the request. It could also be for config though, to know what servers are around
* you could add a mechanism for registering for 'push notifications' by something like rgb.* <- wildcard so that all rgb
messages would be automatically sent to that endpoint
* make a vlc extension that interacts better with nerve, particularly being able to push media info to nerve
* how possible would it be to make like a gtk app window to act as a player control. I'm thinking if vlc was replaced with
gstreamer, we'd still want the player window, with any video to be played (basically like the ob gtk thing)
* for an IR/Remote Control Emulation type device, you could program the system such that... you take a picture of the remote
control you're adding, you could take a picture on your phone of the remote control (maybe there could be image recognition
to break it into buttons, or else you can indicate with a mouse box). You'd then click on each button in the picture with
the computer mouse or touch, and then it waits for an IR code, which you can then press on the remote, and it will record
what button produces what code for each button. You can then refer to that table to send the code you want (somehow)
* make a mysensors node for the fridge to monitor temperature
* you could have some system to assign a mood or energy level to a song, possibly something automatic or something manually
assigned (or at the least manually adjustable). Then you can randomly generate a playlist using certain rules of what
types of songs should come after which, to more intelligently currate a playlist. It could also use data from the
environment to select songs to play.
* a datasource that gives you information on the phases of the moon, position of planets, possibly space weather and so on
* irc server (or device driver) that reports on data of IRC server, recently said things in particular channels, and possibly also an
interface so users on IRC can query things inside nerve (a controller running on the IRC connection)
* add recognition of clapping signals (beepish?) and/or voice commands to control things
* add gstreamer media player (the big thing is how difficult would it be to make gstreamer play youtube files?)