SoundGraph iMON API Plugin

Questions and comments specific to a particular plugin should go here.
Coy_08
Posts: 10
Joined: Mon Dec 09, 2019 1:02 am

Re: SoundGraph iMON API Plugin

Post by Coy_08 » Mon Dec 23, 2019 7:34 pm

kgschlosser wrote:
Mon Dec 23, 2019 6:23 pm
I do not have an iMon device. So I am not able to fully test this thing.. But could you do me a favor.. send me the iMon application.. I want to have a look at it.. I should be able to install it and start it up and see if I can figure out why that error is occurring,
I can't send you the program. If I add an attachment, it's saying it's too large...
However, I've found a link: https://imon.en.lo4d.com/windows where you can download it, if that's okay with you.
The version I'm running is, 8.12.1202. So it should be the correct version you can install.

Coy_08
Posts: 10
Joined: Mon Dec 09, 2019 1:02 am

Re: SoundGraph iMON API Plugin

Post by Coy_08 » Mon Dec 23, 2019 7:39 pm

kgschlosser wrote:
Mon Dec 23, 2019 6:28 pm
I can't use any information from winlirc because it does not support it.. and lirc has made their own driver for the thing and from what I have read is the driver doesn't even work all that well..
Is that the reason, I can't get it to work with winlirc? Sorry, I'm new to all of this.
kgschlosser wrote:
Mon Dec 23, 2019 6:28 pm
you might be able to help out with it if you are able to locate more information on the API..
How do I do that?

The iMON API Plugin from this page, works though... but not for the numbers.

User avatar
kgschlosser
Site Admin
Posts: 5212
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SoundGraph iMON API Plugin

Post by kgschlosser » Mon Dec 23, 2019 9:55 pm

Coy_08 wrote:
Mon Dec 23, 2019 7:39 pm
Is that the reason, I can't get it to work with winlirc? Sorry, I'm new to all of this.
yes.
Coy_08 wrote:
Mon Dec 23, 2019 7:39 pm
How do I do that?
if you happen to stumble across any information on the internet regarding their API... share the wealth so to speak.. LOL
There is information out there but it is in bits and pieces, nothing complete.. I am hoping that with enough information we are able to reassemble the whole API properly.
Coy_08 wrote:
Mon Dec 23, 2019 7:39 pm
The iMON API Plugin from this page, works though... but not for the numbers.
that is because I am using a whole lot more of the API then this plugin is. So I am also using additional checks to make sure things are set properly or not. and one of these checks is where you are having an issue.. I think I have found the issue tho.. attached is a new version of the plugin you can try. I was checking to see if plugin mode was enabled before I had even connected to the API.. so that may have been the issue. We will know if the problem still exists when you run this version..

I do not know if you have a display or not. I do not know if these things were made as a remote only version.. if that is the case then you may still get an error but this time for the display.. let me know if that is the case and I will fix it. I currently have it set up so that both have to be there.
Attachments
iMON-0.0.2b.egplugin
(220.17 KiB) Downloaded 14 times
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5212
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SoundGraph iMON API Plugin

Post by kgschlosser » Mon Dec 23, 2019 10:14 pm

Coy_08 wrote:
Mon Dec 23, 2019 7:39 pm
Sorry, I'm new to all of this.
No need to be sorry. I was new to this at some point as well.

I did not know of the lack of support by winlirc until i started digging through the code for it and also lirc..

The issue is if you wanted to be able to use the iMon with any kind of a remote a driver would need to be made for Windows to access the low level hardware. this is not so easily done. However it is by far easier to do in linux.. that is the reason why there is a driver made for lirc and the iMon... so us poor Windows users are forced to use the iMon drivers as well as their API for accessing the drivers.. The thing is their drivers are keyed to a specific IR protocol and we are only going to get signals for the buttons they support on that protocol. It really limits things.. I do not know if the issues with the iMon and lirc are because of the lirc driver or the iMon receiver.. receivers are made differently. they may not have put in filters for other protocols other then the one they use. this would cause crappy results in lirc. it could be either or.. and to make a driver for Windows and find out it's a limitation in the hardware.. well that would be really shitty and a lot of time wasted on a antique piece of hardware.

I am always here to answer questions.. if I do not know the answer i will go and get it.. and if I am not able to locate an answer I will do my best to educate myself to provide some kind of an answer.. it may be a correct answer. or it could be a wrong one.. But it will usually end up pointing to something that does give the correct answer/solution.. There are users on this forum that would probably agree with me on that statement.

everyone has to start somewhere... I was a "newbie" also just 5 years ago. not a clue about anything. I didn't have anyone to ask either. save yourself from getting frustrated and ask away.. if you want to send me a PM.. then by all means.. I like things to be in the open forum for historical purposes and so that other users can benefit from the information. Some people prefer to have private conversations.. which ever way is fine and I can appreciate both. I will help in any way that I can. do not get discouraged if things take a bit to sort out.. I am pretty good at troubleshooting.. I am not perfect by any stretch.. I am getting faster at it then i was a few years back.. with experience comes knowledge. the same thing will happen for you.. I like to provide very detailed information about how things work and why.. these long detailed "books" i write are not just for the benilit of you but also for the others that happen to view it.

I do not know your skill level nor do i know what you have stored in your brain. I tend to very methodical and walk through everything.. most of the time this is for my old ass. to make sure i am not having some kind of a short in my bean due to the disappearing insulation on my head and the brain getting cold :shock:

so keep that in mind.. It is also a great habit to get into..

"it is the simple overlooked thing that leads to the most complex problems" --Kevin
If you like the work I have been doing then feel free to Image

Coy_08
Posts: 10
Joined: Mon Dec 09, 2019 1:02 am

Re: SoundGraph iMON API Plugin

Post by Coy_08 » Tue Dec 24, 2019 12:02 am

kgschlosser wrote:
Mon Dec 23, 2019 9:55 pm
I do not know if you have a display or not. I do not know if these things were made as a remote only version.. if that is the case then you may still get an error but this time for the display.. let me know if that is the case and I will fix it. I currently have it set up so that both have to be there.
Yes, I have a display.
I've installed the new version.. just by double clicking.. right?
I choose the plugin and again an error.

Code: Select all

   Error starting plugin: iMON
   Traceback (most recent call last) (1722):
     File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 177, in Start
       self.instance.__start__(*self.args)
     File "C:\ProgramData\EventGhost\plugins\iMON\__init__.py", line 268, in __start__
       self._event.clear()
   AttributeError: 'iMON' object has no attribute '_event'
Did I something wrong?
Last edited by Coy_08 on Tue Dec 24, 2019 12:07 am, edited 1 time in total.

Coy_08
Posts: 10
Joined: Mon Dec 09, 2019 1:02 am

Re: SoundGraph iMON API Plugin

Post by Coy_08 » Tue Dec 24, 2019 12:07 am

Thank you for your informative post :)
I think, it will take me some time to get the hang of it.
A few months ago, I've started creating Autohotkey scripts. I found it challenging as well. And pretty hard to get them to work.
The problem is usually not how to get it to work, but to use the correct commands. But hey, that's a whole other story! :D

User avatar
kgschlosser
Site Admin
Posts: 5212
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SoundGraph iMON API Plugin

Post by kgschlosser » Tue Dec 24, 2019 1:27 am

sorry about that I forgot to rename that attribute.


Here is a fixed version
Attachments
iMON-0.0.2b.egplugin
(220.16 KiB) Downloaded 13 times
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5212
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SoundGraph iMON API Plugin

Post by kgschlosser » Tue Dec 24, 2019 1:37 am

all there is to programming is syntax and verbage.

syntax is knowing how to form the code...

so an an example..

in c or c++ you have to put a ; after most things. this is what tells the compiler that is the end of a directive or operation to perform. when using if statements the code to be run if the expression evaluates to true needs to be surrounded by { }'s

in python there are still directives and if statements.. except there is no ; or { }'s used. python uses new lines and indents (4 spaces) to determine what is supposed to be grouped where..

I do not recall what autohot key used.. for some reason I think it used a custom deal they made.. hence why it was more difficult to use. less information on the syntax and verbage to be found.

python is a great language for a first language.. the syntax make sense as does the verbage..

Code: Select all

if "hello" not in "this is a test string":
    run this code
it makes sense. if i want to test if something is in something else or not in something else that is how you go about it. you can also use this.. but it is harder to read.

Code: Select all

if "some text".find("hello") == -1:
    run this code

and there is also a wealth of information to be had for learning Python..
If you like the work I have been doing then feel free to Image

Coy_08
Posts: 10
Joined: Mon Dec 09, 2019 1:02 am

Re: SoundGraph iMON API Plugin

Post by Coy_08 » Tue Dec 24, 2019 2:59 am

kgschlosser wrote:
Tue Dec 24, 2019 1:27 am
sorry about that I forgot to rename that attribute.


Here is a fixed version
Still no luck...

Code: Select all

   Error starting plugin: iMON
   Traceback (most recent call last) (1722):
   iMon: Remote Control plug-in mode not enabled
     File "_ctypes/callbacks.c", line 295, in 'calling callback function'
     File "C:\Program Files (x86)\EventGhost\eg\Classes\MessageReceiver.py", line 138, in WindowProc
    res = handler(hwnd, mesg, wParam, lParam)
  File "C:\ProgramData\EventGhost\plugins\iMON\__init__.py", line 209, in __callback
    self.TriggerEvent(suffix, RCRemote.get(lParam).string)
AttributeError: 'int' object has no attribute 'string'
If I press a button on the remote, EG responds and sends the code in the program. So that works, regarding the errors code.
No such luck with the number keys however...
And my display is now blank as well...

User avatar
kgschlosser
Site Admin
Posts: 5212
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SoundGraph iMON API Plugin

Post by kgschlosser » Tue Dec 24, 2019 5:43 am

OK so the initial error is gone now.. and we are moving onto a new problem..
I am assuming you saying that your display is still blank is that you have an iMon display as well as the remote capabilities..

Lets set the display portions aside for a bit.. we will walk through the problem as we come across them..

Now the issue with the remote right now should be an easy one to solve.. I created a wrapper class around integers that would provide a string that could be used as the event name.. each remote button is given a number to represent the actual button. I wanted to try something new with wrapping a string as an integer and still be able to access the underlying string.. This may or may not work.. who knows.. the idea is sound enough and made it worth an attempt. otherwise I am going to have to go back to the "traditional" lookup table methods. which is a non issue But I wanted to try and keep true to form with the iMon API and keep the enum structures in pace that contain the integer values.

I do not know exactly where the failure point is. it may not be returning the right things when i am pulling the numbers. I have to go and check.. I should have a solution in the next 10 or 15 minutes..

once we get the remote bits working properly we will then address the display portion of the API.. for the time being the display should not be showing anything because we have not told it to display anything yet..
if you want to create a macro and add one of the display actions and then run the action manually to see if anything gets displayed.. have a blast.. let me know if you get anything.. if you get an error or it does not work we will revisit the problem after the remote portions are done.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5212
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SoundGraph iMON API Plugin

Post by kgschlosser » Tue Dec 24, 2019 5:57 am

OK I believe I found the issue. I did at least account for the error so it should let us know the number that is incoming. This API is all patchwork so I am sure that i am missing some things. we just need to figure out what is missing..

This new version should not error. It will provide some additional information as to what is happening as well.
Attachments
iMON-0.0.2b.egplugin
(220.28 KiB) Downloaded 10 times
If you like the work I have been doing then feel free to Image

Coy_08
Posts: 10
Joined: Mon Dec 09, 2019 1:02 am

Re: SoundGraph iMON API Plugin

Post by Coy_08 » Tue Dec 24, 2019 2:59 pm

Still some error:

Code: Select all

   Error starting plugin: iMON
   iMon: Remote Control plug-in mode not enabled
Yes, my remote control is the same as my display.

I don't mind the display. I did find some problem when using Kodi. When I play a song, it doesn't seem to show trackinformation on the display.
It also doesn't find Kodi. But it does support XBMC. I thought I could maybe fix this in iMon itself, but I tried to make a symbolic link, but it doesn't seem to work.
Attachments
Veris-RM200-Remote-Control-For-Antec-Veris-Multimedia.jpg
31WbobfJp0L.jpg

User avatar
kgschlosser
Site Admin
Posts: 5212
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SoundGraph iMON API Plugin

Post by kgschlosser » Tue Dec 24, 2019 4:37 pm

i want you to restart the iMon software then start the plugin and see if it goes.. because we are now back to that same initial error...
If you like the work I have been doing then feel free to Image

Coy_08
Posts: 10
Joined: Mon Dec 09, 2019 1:02 am

Re: SoundGraph iMON API Plugin

Post by Coy_08 » Tue Dec 24, 2019 5:31 pm

Nope, didn't solve the problem

Code: Select all

---> Welcome to EventGhost <---
Autostart
Main.OnInit
Plugin: iMON
   Error starting plugin: iMON
   iMon: Remote Control plug-in mode not enabled
iMON.Display.Connected (0) 'NoInformation(1)'
iMON.Display.Connected (0)
iMON.Display.LCD.Unsupported
iMON.Display.VFD.Supported
iMON.Display.TextScrollComplete (4096)

User avatar
kgschlosser
Site Admin
Posts: 5212
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SoundGraph iMON API Plugin

Post by kgschlosser » Tue Dec 24, 2019 9:34 pm

the display side of it is working...

have you tried pressing a button on the remote??

also there are 2 spots to enable plugin mode.. one for the display and one for the remote... so you will want to check that. I am going to try and install the iMon software and see where i can get with it.
If you like the work I have been doing then feel free to Image

Post Reply