IRC Logs for #circuits Monday, 2014-07-21

prologicmron’n all00:21
*** clixxIO has joined #circuits01:20
clixxIOHello01:21
clixxIOWhere can I find an example for 'notify'?01:23
prologichello clixxIO01:28
prologicin examples/dirwatch.py01:28
clixxIOHi01:28
prologicyou mean circuits.io.INotify?01:28
clixxIOI saw that, but don't know how to link to the events01:28
clixxIOexamples/dirwatch.py does exactly what I want01:29
clixxIObut, how do I add my own method01:29
prologicsorry it is Notify :)01:29
prologicahh01:29
prologicSo see all the events defined in circuits.io.events?01:30
prologicYou’ll want to write a Component such as:01:30
prologicclass MyNotifyHandler(Component):01:30
prologic   channel = “notify"01:30
prologic   def moved(self, *args):01:30
prologic    …01:30
prologicbad component name but tyou get the idea01:30
clixxIOoh ok01:30
clixxIOCan I say your package would be awesome. It's just a bit short on examples01:31
clixxIOand documentation01:31
prologicWell short on “some” examples :)01:31
prologicthere are lot sof examples on other things!01:31
prologicYeah documentation is hard01:31
prologicwe contiually try to improve it01:32
prologicYou are reading circuits.readthedocs.org right?01:32
clixxIODon't worry, it's the pot calling the kettle black01:32
prologicindeed :)01:32
prologicif I may … how could I imprive this dirwatch.py example?01:32
prologicor perhaps write another example of using Notify?01:32
clixxIOIt only just needs what you have written above, to be shown on say the open or closed event01:33
prologicOkay01:33
prologiclet me quickly do that and test it01:34
clixxIOA simple example, with a list of files open in a directory, ie open_file_list = [], then - and + to the list01:34
clixxIOWhat I need to do specifically for the ANU is not do an upload when a file is open01:35
clixxIOso I need to wait on a close event to signal a transfer01:35
clixxIOhttps://github.com/borevitzlab/spc-eyepi/blob/master/image_uploader.py01:36
prologicthere you go01:38
prologicit’s improved :)01:38
clixxIOThanks - what's the link?01:39
prologichttps://bitbucket.org/circuits/circuits/src/tip/examples/dirwatch.py01:39
prologicbtw; how did you discover circuits?01:40
*** circuits_github has joined #circuits01:40
circuits_github[circuits] therealprologic pushed 1 new commit to master: http://git.io/f78xZA01:40
circuits_githubcircuits/master 9978312 James Mills: Improved the dirwatch example01:40
*** circuits_github has left #circuits ()01:40
clixxIOThat's perfect!01:41
clixxIOThanks very much01:41
prologicno problems :)01:41
prologicalways glad to help01:41
prologicI’m presenting circuits to PyConAU this year01:42
prologicnext weekend in fact01:42
clixxIOah ok01:42
clixxIOThat's cool01:42
prologicHere’s a sneak peek of the slides: http://arrow.shortcircuit.net.au:8000/#101:42
clixxIOI think your package is vastly underpopular01:42
prologicI’m after some useful feedback from fellow circuits users :)01:43
prologicyou’re not the first to say that01:43
prologicand typically my response has been01:43
prologic“I’m horrible at merketting” :)01:43
prologicwe just do what we can01:43
clixxIOIt's not easy01:44
prologicno it’s not :)01:44
clixxIOWhat I really need though is GPIO triggers, then I can use it properly01:45
prologicI’m an engineer not a business person01:45
prologic:)01:45
clixxIOwithin my project01:45
prologicsure01:45
clixxIOI'm sort of a technical business person01:45
prologicwrite us such a component :)01:45
prologicthere is already circuits.io.Serial01:45
clixxIOnot sure exactly how01:45
prologicquite a few folk have used this in many home automation project(s)01:45
prologicAFAIK I think you’d want to wrap around some eisting gpio library01:46
prologicand fire events on gpio inputs01:46
clixxIOThe GPIO libaries are mostly crap01:46
clixxIOproblem is that they are tied to a particular machine01:46
clixxIOThe best one is rpi.gpio but only works on rpi01:47
prologichttps://pypi.python.org/pypi?%3Aaction=search&term=gpio&submit=search01:47
prologichmm01:47
prologicnot a lot of useful stuff there01:47
prologicmaybe sysfs-gpio01:47
prologicyou might very well be able to just write a wrapper component using circuits.io.File01:47
prologicand read gpio data asynchronously01:48
clixxIOhttp://www.avrfreaks.net/wiki/index.php/Documentation:Linux/GPIO01:48
prologicI’m actually into AVR stuff myself lately01:49
prologicArduino, TinyDuino01:49
prologicfew projects I’m working on outside of work at home01:49
clixxIOok, well I did a port to AVR, C++ and got something circuits-like01:50
clixxIOhttps://github.com/clixx-io/clixx.io/tree/master/eventframework01:51
prologicfrom the looks doesn’t look all that hard to wrap it up into some circuits components01:51
clixxIOYou might find that uncanilly like a C++ version of Circuits01:51
clixxIOIt shouldn't be so hard01:51
prologiclooks interesting01:53
clixxIOIt's very much styled on circuits, only in C++01:55
clixxIOfwiw, I think a major move into Raspberry-Pi would be worth the time investment01:57
prologicI have a RPi02:00
prologicBut I think I’m more interested in the VoCore, WeIO board and Arduino YUN02:00
clixxIObut the linux mechanisms are all the same as far as I am aware02:04
clixxIOThere shouldn't be anything specific to the boards, it's just a normal linux implementation02:05
clixxIOso GPIO pin #1 should be the same code for whatever board02:05
clixxIObasically the requirement is to easily catch a "keypress" then do something on that02:06
clixxIOIoT is an excellent growth area at the moment02:06
clixxIO    from circuits.io import Notify02:09
clixxIOImportError: cannot import name Notify02:09
prologicpip install pyinotify02:10
clixxIOok, that worked02:11
prologic:)02:12
clixxIOGood luck with pycon02:13
clixxIOhave you tried talking in Europe or Japan?02:13
clixxIObtw, the Serial class needs some better examples. Are there any?02:16
clixxIOhmm - now that dirwatch.py program is awesome !!02:22
prologiclunch time bbs02:26
*** Workster has joined #circuits03:14
prologicback04:07
prologicexamples of serial?04:07
prologicno not relaly04:07
prologiccan you develop some? :)04:08
prologicI’ve honestly not tried to do much serial stuff myself04:08
prologicbut I suppose I could in theory do so with Arduino now (no reason why I can’t now!)04:08
clixxIOI can develop serial code in my sleep04:32
clixxIObut I sort of need a small example04:32
clixxIOThis is one of my examples: https://github.com/clixx-io/clixx.io/blob/master/examples_eventframework/remoteswitch/remoteswitch.cpp04:34
clixxIOIt receives lines of text, which are bunched up, then when a whole line is available it fires an event04:35
clixxIOhaving that in circuits would be handy04:37
clixxIOWhat I need to know with circuits serial, how to read data when it's available?05:46
clixxIOin the "notify" example, def created(self..... is useful also to see05:47
clixxIOIt's also handy to see if the file being actioned is a directory05:48
clixxIOif not os.path.isdir(fullpath):05:48
clixxIO..05:49
clixxIOelse:05:49
clixxIO..05:49
clixxIOI'm guessing in Serial,  write(data), data is the data that is received?06:40
*** clixxIO has quit IRC06:58
prologiceven'n all07:40
Yamahi logic07:41
prologichi :)08:09
*** ircnotifier has quit IRC08:43
*** kdb has joined #circuits08:44
*** ircnotifier has joined #circuits08:45
kdbYo ircnotifier08:45
*** kdb has quit IRC08:49
*** ircnotifier has quit IRC08:49
*** ircnotifier has joined #circuits08:49
*** kdb has joined #circuits08:49
prologicUpdated: http://arrow.shortcircuit.net.au:8000/#112:28
*** qwebirc38941 has joined #circuits12:39
kdbHeya qwebirc3894112:39
qwebirc38941hello12:40
qwebirc38941i'm reading this:12:41
qwebirc38941http://circuits.readthedocs.org/en/latest/man/handlers.html12:41
qwebirc38941"The handler decorator on line 14 turned the method _on_started into an event handler for the event started."12:42
qwebirc38941is really: "The handler decorator on line 14 turned the method system_started into an event handler for the event started." ??12:43
prologichello12:43
prologicqwebirc38941, thanks for the catch12:44
prologicI'll fix that :P12:44
qwebirc38941ah ok... I was thinking I was missing the point.. Ok Thanks12:46
*** circuits_github has joined #circuits12:46
circuits_github[circuits] therealprologic pushed 1 new commit to master: http://git.io/JdVIrQ12:46
circuits_githubcircuits/master 051e723 James Mills: Fixed typo in manual for handlers12:46
*** circuits_github has left #circuits ()12:46
kdbHowdy circuits_github12:46
prologicno just a typo :)12:46
prologicwell someone suggested we name methods after more useful things12:46
prologici.e: system_started vs. on_started12:46
prologicanyway12:47
prologicwelcome to circuits :)12:47
qwebirc38941oh thanks.. we just started talking last week. Now I'm reading the documentations without hurry... seems very interesting.12:49
prologicahh right12:50
prologicsorry if I didn't recognize you12:51
prologicyou're using (I presume) out chat link which uses the freenode web chat12:51
prologichence the nick qwebirc38941  :)12:51
qwebirc38941yes!12:52
qwebirc38941another typo maybe:12:57
qwebirc38941http://circuits.readthedocs.org/en/latest/man/handlers.html12:57
qwebirc38941find:12:57
qwebirc38941As this is already decorated with the ``@handler1112:57
qwebirc38941is 11   ->  " ?12:58
prologicFixed thanks :012:59
*** circuits_github has joined #circuits12:59
circuits_github[circuits] therealprologic pushed 1 new commit to master: http://git.io/9UkgDw12:59
circuits_githubcircuits/master 620ac1f James Mills: Fixed another typo12:59
*** circuits_github has left #circuits ()12:59
qwebirc38941....    Therefore, our handler method must declare one argument (Line 15).13:12
qwebirc38941Line 14 ?13:12
prologicthanks :)13:19
*** circuits_github has joined #circuits13:20
circuits_github[circuits] therealprologic pushed 1 new commit to master: http://git.io/3R8bgw13:20
circuits_githubcircuits/master 8645b10 James Mills: Fixed another typo13:20
*** circuits_github has left #circuits ()13:20
*** koobs has quit IRC14:57
*** koobs has joined #circuits15:01
kdbHeya koobs15:01
*** qwebirc38941 has quit IRC15:38
anunnakihey any LED experts in here19:42
anunnakiim trying to build a grow light19:43
anunnakithey sell this which has the Flowering leds already to or i can buy a cheaper roll of RGB 5050 SMD that come with a controller to change the colors.. im just not sure which would be better when it comes to lumens.. these strip lights.. or the led chips like the 3W ones..19:44
jpennyanunnaki, try #electronics19:54
prologicmorn'n all21:31
Yamagn822:48

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!