You might be surprised...

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: You might be surprised...

Post by Livin » Mon Oct 11, 2010 5:23 pm

I agree - we really need to make sure BM will hand the site to a new owner - or move the content to a new site.

Brett has taken over development of the core and is making some great changes. His site is http://www.satori-project.com

The code is early Alpha so most plugins and such are not yet supported and some of the larger features (like If-Then-Else) is not implemented yet.

I highly recommend all plug devs look at Brett's work and port/test the plugins soon to ensure compatibility.

The branch he is working on is going to be great - there are some revolutionary improvements in the works.
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system

derelict
Posts: 38
Joined: Sun Mar 01, 2009 12:55 pm

Re: You might be surprised...

Post by derelict » Mon Oct 11, 2010 5:51 pm

The satori project sounds very promising..... but like it has been said in another thread.... if it's not quite stable and most of the needed plugins (PS3 remote anyone ?? :-) ) have been ported... most people will not migrate to satori. It's a hard time for a new project to grow up in an alpha state!

however..... until that project is "stable" and usable, all informations and the plugins in this forum are still very much needed!

has anyone a "direct" contact to bitmonster in order to do an "emergency move" of the whole site if needed and soon enough ?

also we have to tell the people enough in advance if the site name is going to change!

again... i could offer the webhosting and svn access on one of our servers.... for free..... if nothing else is possible!

Marcel

stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: You might be surprised...

Post by stottle » Mon Oct 11, 2010 6:09 pm

Livin wrote:The branch he is working on is going to be great - there are some revolutionary improvements in the works.
Thanks :D
derelict wrote:has anyone a "direct" contact to bitmonster in order to do an "emergency move" of the whole site if needed and soon enough ?
I would bet that Bitmonster would still answer PM's. If that doesn't work, the copyright notice on each of the files includes an email address you might try....

Very nice offer, BTW

Brett

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: You might be surprised...

Post by jitterjames » Mon Oct 11, 2010 7:04 pm

It is pretty weird that Bitmonster has never come back at all since February. I hope he is ok. Derelict, are you going to try to PM him? Or... do we need to make a group assault?

derelict
Posts: 38
Joined: Sun Mar 01, 2009 12:55 pm

Re: You might be surprised...

Post by derelict » Mon Oct 11, 2010 7:06 pm

jitterjames wrote:It is pretty weird that Bitmonster has never come back at all since February. I hope he is ok. Derelict, are you going to try to PM him? Or... do we need to make a group assault?
that... and the reason for leaving he has given!?

let me try it first... i think he is german speaking... isn't he ?

marcel

jsonnabend
Experienced User
Posts: 127
Joined: Wed Apr 23, 2008 7:35 pm

Re: You might be surprised...

Post by jsonnabend » Mon Oct 11, 2010 7:29 pm

Glad to hear someone has picked up the mantle of EG. Where is the SatoriHub source?

- Jeff

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: You might be surprised...

Post by jitterjames » Mon Oct 11, 2010 8:00 pm

his reason from the first post is:
The main reason is, that I decided to switch all my automation and HTPC stuff to Linux, so I will no longer use EG daily.

derelict
Posts: 38
Joined: Sun Mar 01, 2009 12:55 pm

Re: You might be surprised...

Post by derelict » Mon Oct 11, 2010 8:04 pm

yes... that's what i meant..... i find that quite an odd reason.... not ?

stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: You might be surprised...

Post by stottle » Mon Oct 11, 2010 8:34 pm

jsonnabend wrote:Glad to hear someone has picked up the mantle of EG. Where is the SatoriHub source?

- Jeff
The source is now available on the Downloads page. I'm having to learn a lot of the web design and administration as I go - this is one of the tweaks I hadn't figured out until someone asked. Along those lines, feedback on the site is welcome.

Brett

stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: You might be surprised...

Post by stottle » Wed Oct 13, 2010 1:31 am

derelict wrote:The satori project sounds very promising..... but like it has been said in another thread.... if it's not quite stable and most of the needed plugins (PS3 remote anyone ?? :-) ) have been ported... most people will not migrate to satori. It's a hard time for a new project to grow up in an alpha state!
SatoriHub 0.2.9 is available for download. It includes a couple of fixes that will help stability and fix some error messages in the logs. I couldn't agree more about it being a hard time for a project in alpha state. Maybe this will help - I've added three new plugins - NetworkSender, NetworkReceiver and Ps3.

Since I don't have the Ps3 hardware, you will have to test that one out. I think it is in pretty good shape - if there are bugs I think they will be easy to fix.

As for the Alpha state, I hope everyone keeps in mind a couple of things. First off, a lot of the changes are UI changes to a program (EventGhost) that is very stable. Also, it is python and dealing with remotes and external programs. If SatoriHub does have an issue, it really isn't going to break anything. You may have to kill a process and restart the app - worst case.

The reason I consider it Alpha is because its Python - it can be hard (if not impossible) to find bugs until you run through all of the code paths. And trying to port (and test) all of the paths from EG is a huge task. I will consider it Alpha code until more people run it through some paces and check out paths and use-cases I haven't checked out. But I expect it to move fairly quickly from Alpha to Beta to Stable.

I'm not sure how many people have seen my FAQ answer to "What are the differences between SatoriHub and EventGhost?". The end of the answer says:
While the Alpha version of SatoriHub does not include a mature capability yet, we are looking at innovative ways to enable rich two-way interfaces with SatoriHub from webbrowser and smart devices as well.
Well, with the NetworkSend and NetworkReceiver plugins, you get a chance to see what I'm talking about. The two plugins have been updated to support passing a payload over the connection. That, by itself, is not nearly as interesting as the Trigger event handler. Already built into SatoriHub is a handler that takes Events that end in "Trigger" and looks at their payloads. If the payload is a dictionary that contains an "action" key, the value for that key is interpreted and then run as an action - you don't need to create a Macro to call.

So if you create a NetworkSender action with "Trigger" as the Message, select "Use this payload" in the options, and paste

Code: Select all

{"action":"System.ShowOSD()","osdText":"Hello?"} 
into the edit window - you can get "Hello?" to show up in an OSD on the remote machine. I hope that gets a few people thinking about the things SatoriHub can do that EG cannot.
:D
derelict wrote:however..... until that project is "stable" and usable, all informations and the plugins in this forum are still very much needed!
Hopefully Bitmonster will help get this moved over. And let us know when the domain is going to expire....

Brett

miljbee
Experienced User
Posts: 146
Joined: Fri Mar 27, 2009 1:29 pm
Location: Orléans, France

Re: You might be surprised...

Post by miljbee » Thu Oct 21, 2010 9:23 am

I have not tried satorihub yet, but since it's in alpha state, I would like to express some of my needs and ideas. Of course you can do whatever yiou want with this including just ignoring. It's your soft and I don't want to interfere with your vision or roadmap.

Actually, I am using EG mainly for home automation, but also to control XBMC with my remotes, and some other little tasks.

My eg tree is in constant evolution, because I have a lot of ideas to automate things in my home, and also, because the more I use it, the more I learn, and the more I re code to get a smaller, cleaner tree.

Often, I need some functionnality that are not offered by existing plugins.

While python is great, it is not always the simplest language for me to implement things. Thus, I sometimes choose to go with .Net, java, or simply basics cmd. These progs run outside Eventghost, and I need a reliable and efficient way to make them talk with eventghost.
When I started, I generated event from external app by calling eg.exe with -e arg. I stopped that because when eg was heavy loaded or had some sort of troubles, it was creating a lot of eg processes that at a certain point would never end. A rebbot of the computer was then needed.
I switched to HTTP. It's quiet easy in any language to call a URL. The eg WebServer plugin generates events easily. and with the dynamic webserver, I can get data from eg in my external apps when doing an http request.
Of course, it woks, but I don't feel it's very clean and efficient.

So here comes my suggestion for satorihub :
Provide ready to use classes for popular dev platforms that enables bidirectionnal dialog with satorihub.

With this, people who have programming skills but are not fluent with python could easily integrate there ideas in satorihub.

Good luck with SatoriHub !
miljbee
TCP Events : A Better Network Event Sender/Receiver Plugin.
The Network Event Sender/Receiver in C#
Get events in EG from Google Calendar.

stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: You might be surprised...

Post by stottle » Thu Oct 21, 2010 12:18 pm

miljbee wrote:I have not tried satorihub yet, but since it's in alpha state, I would like to express some of my needs and ideas. Of course you can do whatever yiou want with this including just ignoring. It's your soft and I don't want to interfere with your vision or roadmap.
No problem, I want to hear what people want to use EG/SatoriHub for, and how to make SatoriHub easier to use.
miljbee wrote:So here comes my suggestion for satorihub :
Provide ready to use classes for popular dev platforms that enables bidirectionnal dialog with satorihub.

With this, people who have programming skills but are not fluent with python could easily integrate there ideas in satorihub.

Good luck with SatoriHub !
Unless you have a brilliant idea no one else has thought of (that would be pretty cool), I don't see this as something you can just build into the program. When you deal with communicating between different languages, you are dealing with IPC, which usually means sockets of some sort (especially if programs are not on the same machine). You can use a known protocol, like HTTP, TCP/IP or UDP (built into the Webserver, NetworkSender/NetworkReceiver and Broadcaster plugins, respectively), or you can create your own interface. If you create your own interface, then you are forced to make an API, so that both ends of the socket know how to format and interpret the data they send and receive. Making a "generic" API is the tricky part!

If you want to send strings or integers, you can easily create a simple protocol. This is what I did in the MceRemote_Vista and new MCE/WMCA (for Window's Media Center Actions) plugins for SatoriHub, which talk between Python and C++/C#. But you still need some amount of validation which is always going to be specific to the app you are writing, and you probably need to use threading to avoid locking up one side of the interface or the other. If you want to be more generic, you are left with text protocols like html, xml or json to avoid the problems with how different languages create objects.

With all of these different permutations, I don't see a single solution that fits every need. Instead, the approach taken is to provide plugins with a baseline capability covering the more common approaches, that can then be tailored to a specific need. More along the line of code-snippets than an all-in-one solution.

I guess what I'm saying, in a hopefully not too long-winded of a manner, is that I think you should look for the best IPC solution for the specific task you want to accomplish. Different tasks will likely require different types of interfaces. If the interface is something that EG/SatoriHub don't support already, we can create a new plugin and add to the "code-snippet" library.

I guess what it sounds like is that you have a use case that the existing plugins don't cover. I'd like to get the specifics on the use case(s), as I certainly want to get more developers working with SatoriHub.

Brett

miljbee
Experienced User
Posts: 146
Joined: Fri Mar 27, 2009 1:29 pm
Location: Orléans, France

Re: You might be surprised...

Post by miljbee » Thu Oct 21, 2010 1:46 pm

I guess what it sounds like is that you have a use case that the existing plugins don't cover. I'd like to get the specifics on the use case(s), as I certainly want to get more developers working with SatoriHub.
For now, I have 3 programs written in C# that talks with eg :
The first one is for the CC128. It's a power metter with a serial interface. A few months ago, I tried to make a plugin in python for it, but didn't manage to get the info from the serial port. It was straightforward with C#. Now, the C# program has evolved and generate stats, and also ready made URL to get graphs from google charts.

The second one is a pinger utility. Initially, I wrote a plugin with python, but after several months of use I rewrite it with C# because there was some issues with the python version that I wasn't able to solve. The goal of this plugin is to receive events when a host become alive or dead on my lan. I use this to know :
1 - When my TV is switched On or Off (it has a built in network interface). When it's switched on Eg send a WOL packet to wake up the htpc.
2 - When me or my wife is at home or not (Meaning eg can switch On or Off the heaters). If the TV is ON : someone is in the house. If my iPhone is connected to my wifi hotspot, it will start to respond to ping, meanning I am at home.

The third one is more specific. It connects to the web interface of my home security system, to know if it's enabled or not, but also to know if some doors or windows are open.

Finally, I wanted to get a secured remote access to the system. The eg webserver isn't secured at all, so I set up Tomcat with, strong auth, ssl, ... and have some servlets that access eg on the local computer.

Eg is the brain of all that.
Inside eg, I am using ready made plugins :
CM11A for X10
Timers
Scheduler
Webserver
MCE
USBUIRT

I also have xPl installed to get events from bluetooth devices.


Reguarding, your remarks on the difficulty to devellop an interface which would fit evey specific needs, I don't agree with you. Of course, we can dream of universal compatibility and think of something like CORBA IIOP JSON, ... But I don't think that this level of complexity is required.
I agree with you concerning a simple IP protocol. Let me explain what I have in mind :
SatoriHub should be able to receive from the network :
1 - python expressions : simple text, that satori hub interprets when received. something like "eg.globals.myVar=2" or "eg.plugin.X10.Send('A1','ON')", and perhaps returning the result to the caller
2 - Queries : again, python expression which are evaluated when received and the result is returned. might be the same as 1.
3 - events : the goal is obvious : firing an event from an external app, but it might also be the same as 1, if we send "eg.TriggerEvent('blablabla')"
SatoriHub should also be able to send requests to those external apps. Obviously, SatoriHub won't know anything from this external app. So the protocol should really be basic. something like just sending text and eventually receiving an ACK.
It's up to the coder of the external app to (eventually) send a response.

This means that we need a class in C# for exemple, that implement the transport, the listenner, and the sender.

It seems obvious that UDP would be great for that.

With something like this, I can't see anything that couldn't be done with an external app to extend satorihub functionnalities.

Regards,
miljbee
TCP Events : A Better Network Event Sender/Receiver Plugin.
The Network Event Sender/Receiver in C#
Get events in EG from Google Calendar.

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: You might be surprised...

Post by jitterjames » Thu Oct 21, 2010 1:56 pm

sounds like all of this is pretty much possible with the broadcaster plugin as it already is. I refer to the one in eventGhost. I don't know if the one for SatoriHub is the same. For some of your ideas like setting a variable, you could either modify the plugin to extend its capabilities, or you could write some simple python scripts to act on events generated by the current plugin.

stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: You might be surprised...

Post by stottle » Thu Oct 21, 2010 6:39 pm

That gives me a better idea of what you were thinking of. :)

I have just been finishing the ports of the networking plugins (all of the ones mentioned above) to SatoriHub, and I modified the Webserver and NetworkSend/Receive to allow "pickling" of a payload to pass over the socket. This allows you to send a dictionary, say for instance a playing now message, to another machine and maybe have it run a ShowOSD on track changes. I was thinking about eventually modifying the ShowOSD to allow it to show cover art, too, so you can pickle an image and send that along the socket.

With this in mind, hopefully it makes more sense why I thought this was a more difficult problem than what you were thinking of. Implementing pickle/unpickle in Java/C++? :shock:

I'm a little surprised that you say UDP is an obvious solution for what you want, because you also talk about dialog. To me, UDP is a one-way notification to anyone who is listening. There's no guarantee the message is received by anyone. Or it could be received by several machines. Which ones do you expect a response from? For dialog, as in asking "what's playing now" and getting a response, I'd think you'd want TCP/IP. This also let's you use the enduring events, which UDP doesn't (maybe that doesn't make sense for your use case, but it is cool to hold down the volume+ button on a webpage and have the volume keep increasing until you let go...)

Here's an idea that may be a little unorthodox, but I think would readily support what you are after. What if you run Webserver in EG and use it to simply trigger events in EG/SatoriHub. You don't need to get HTML back, a GET request can just trigger the event, and you don't need to parse any HTML response in your application. If you need a response from EG/SatoriHub, have the triggered event call a Broadcast sendmessage action to send whatever response you need over UDP. Then different applications can listen over different ports, and you don't have too much complexity on either side.

Thoughts?
Brett

Post Reply