Search found 280 matches

by Snowbird
Thu Apr 19, 2018 7:23 am
Forum: Coding Corner
Topic: Define a dictionary during its first update, is this possible ?
Replies: 9
Views: 112

Re: Define a dictionary during its first update, is this possible ?

thanks for this in-depth explanation, it's still a bit fuzzy in my head but I'm about to understand this, I need to reread a couple of times and do some tests to definitely get it ! I'm sooooo close :p

Thanks again for your time and patience, it's rare to see people with this much passion ;)
by Snowbird
Thu Apr 19, 2018 7:12 am
Forum: Bug Reports
Topic: bug with command line "eventghost.exe -e"
Replies: 47
Views: 2705

Re: bug with command line "eventghost.exe -e"

that's a very good news :) if you want me to test it just let me know, since I'm concerned by this "bug" almost daily, I can tell you right away if there is improvement on my end ;)

thanks !
by Snowbird
Mon Apr 16, 2018 5:07 pm
Forum: Coding Corner
Topic: Define a dictionary during its first update, is this possible ?
Replies: 9
Views: 112

Re: Define a dictionary during its first update, is this possible ?

ok, I think I got it this time. I was thinking that the statement "global" and "eg.globals" were doing the same thing :) in fact "global" is used to set/read a variable anywhere in the script even inside functions (as opposed to local where each variable is controlled in its own space), and "eg.glob...
by Snowbird
Mon Apr 16, 2018 1:40 pm
Forum: Coding Corner
Topic: Define a dictionary during its first update, is this possible ?
Replies: 9
Views: 112

Re: Define a dictionary during its first update, is this possible ?

Kevin to the rescue :) ok, I have understood everything in your first post, the thing that helped a better understanding is when you stated that global variables are in fact pointers to local variables, this I didn't know, and it's a detail that makes a huge difference in the comprehension ! thanks ...
by Snowbird
Mon Apr 16, 2018 8:03 am
Forum: Coding Corner
Topic: Define a dictionary during its first update, is this possible ?
Replies: 9
Views: 112

Define a dictionary during its first update, is this possible ?

Hi all, I'm wondering if there is a better way or a shorter way to do this : try: MyDict except NameError: MyDict = {} MyDict[Var1] = {Var2: Var3} eg.globals.MyDict = MyDict 1/ is there a way to define a dictionary upon its first update of key:value ? 2/ why can't I use a global variable from the st...
by Snowbird
Sun Apr 15, 2018 8:33 am
Forum: Plugin Support
Topic: XMPP Plus
Replies: 25
Views: 1050

Re: XMPP Plus

Hi, I hope things are getting better for you :wink: did you get any chance to check this yet ? It's really frustrating to use something great on a daily basis that stops working all of a sudden, it really kills the user experience. I'm pretty sure you can fix this in no time since everything works p...
by Snowbird
Tue Apr 10, 2018 9:11 pm
Forum: General Support
Topic: Command line payloads
Replies: 16
Views: 698

Re: Command line payloads

) Traceback (most recent call last): File "EventGhost.pyw", line 53, in <module> File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module> import Cli File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 30, in <module> import NamedPipe File "C:\Program Files (x86)\EventGhost...
by Snowbird
Tue Apr 10, 2018 7:19 pm
Forum: General Support
Topic: Command line payloads
Replies: 16
Views: 698

Re: Command line payloads

that's great, it worked ! the equal sign is now accepted :d
thank you !

are you also investigating on the error I reported regarding the named pipe ?
by Snowbird
Tue Apr 10, 2018 2:59 pm
Forum: Plugin Support
Topic: MQTT Client
Replies: 200
Views: 46999

Re: MQTT Client

that's not possible, if your broker is installed on your RPi it means it's listening on some port, I gave you the default ones earlier but maybe you have changed them ? what port is set in EG ? Are you sure your broker is installed on your RPi ? it looks like you are using an external broker and tha...
by Snowbird
Tue Apr 10, 2018 9:33 am
Forum: Plugin Support
Topic: MQTT Client
Replies: 200
Views: 46999

Re: MQTT Client

Well I'm not saying anything in particular, just trying to tell you that it's normal to connect/disconnect every time a message is published, I was just confirming what you were wondering about. So if I understand well, if you publish this way : EG mqtt plugin --> RPi --> HomeAssistant --> Light (it...
by Snowbird
Tue Apr 10, 2018 8:36 am
Forum: Plugin Support
Topic: MQTT Client
Replies: 200
Views: 46999

Re: MQTT Client

This is strange, it shouldn't take this long... I usually get a couple of hundred milliseconds. EG keeps the connection opened only if you are subscribed to a topic, if you just use EG to publish messages the connection is made to the mqtt broker just during the publishing time (very short time). So...
by Snowbird
Mon Apr 09, 2018 7:34 pm
Forum: General Support
Topic: Command line payloads
Replies: 16
Views: 698

Re: Command line payloads

I'm using the latest WIP of EG, his changes are in it ? here's the error I get when 3 events are generated at almost the same time, I think approximately 100ms separates them : Traceback (most recent call last): File "EventGhost.pyw", line 53, in <module> File "C:\Program Files (x86)\EventGhost\eg\_...
by Snowbird
Mon Apr 09, 2018 7:08 pm
Forum: General Support
Topic: Command line payloads
Replies: 16
Views: 698

Re: Command line payloads

thanks, although this method works perfectly, it doesn't work with my program, I can't pass the variable as the payload, it's not being interpreted for some reason, plus I don't like to have many cmd shell opened/closed (one per event), it's not very "clean" if I may say. :) Anyway, if there is no w...
by Snowbird
Mon Apr 09, 2018 8:29 am
Forum: General Support
Topic: Command line payloads
Replies: 16
Views: 698

Re: Command line payloads

ok, thanks for your help. I've tried both ways and could get anything out of it, or maybe I didn't understand what it was supposed to do. Anyway, as you may have understood the example "a = b" was just... an example to help you reproduce the error :), I don't need to pass or set any variables throug...
by Snowbird
Sun Apr 08, 2018 2:26 pm
Forum: General Support
Topic: Command line payloads
Replies: 16
Views: 698

Re: Command line payloads

wrap the payload values in double quotes. eventghost -event Some.Event.Name "Payload1 Payload2" events that are sent in from the cli have always had a payload that is a string. so if you want to make it easy to split the payload values you would format the CLI options like so eventghost -event Some...