Callback in C#

Moderator: Telldus

moryoav
Posts: 33
Joined: Fri Mar 17, 2023 9:45 am

Post by moryoav »

I just want to confirm the previous poster's report.
When my C# application is open, the events stop working at all in TelldusCenter.
In addition, the same things happen with NexaHome 1.7.0 (written in Java I think) -

1. Open TelldusCenter - everything works fine.
2. Open my software and send an "On" command through the Nexa remote - works fine sometimes...! If TelldusCenter has focus, this can sometimes work, if my program has focus then it doesn't work.
3. Click on the "Off" button - this doesn't work at all, ever. TelldusCenter doesn't show a status change, no matter which program has focus.
4. Exit my program and suddenly TelldusCenter changes status for this receiver from On to Off, it's like the command was waiting in some buffer and only when my software existed TelldusCenter got the command and changed the status.
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Post by micke.prag »

I think I see the problem now. At least that's a start. Now I just need to find the solution ;-)
Micke Prag
Software
Telldus Technologies
moryoav
Posts: 33
Joined: Fri Mar 17, 2023 9:45 am

Post by moryoav »

Another problem, I'm not sure if it's related:
It seems that there is a problem with multiple tellstick-using software running at the same time. If NexaHome is running on my computer and I then load my software, then tdGetNumberOfDevices() will return (-7) instead of 4. Obviously a problem. Then I exit NexaHome and check my software again and it returns the right number.

I'm not sure if it's the same problem or a different one, but it's still a problem...

Needless to say, this problem was only introduced with Duo/latest driver.

Thanks Micke!
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Post by micke.prag »

-7 means TELLSTICK_ERROR_UNKNOWN_RESPONSE. Some mixup between the messages?

So before I investigate further, lets see what happens when I have fixed the other issue.
Micke Prag
Software
Telldus Technologies
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Post by micke.prag »

Great success today. I am going to let the screenshot talk for itself:

Image

Now, I have to clean up the code so we can release a new beta for you!
Micke Prag
Software
Telldus Technologies
krambriw
Posts: 654
Joined: Fri Mar 17, 2023 9:45 am

Post by krambriw »

wow...great
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Post by micke.prag »

2.0.101 is out. Lets hope this one works better. You should all have received an email about this.
Micke Prag
Software
Telldus Technologies
krambriw
Posts: 654
Joined: Fri Mar 17, 2023 9:45 am

Post by krambriw »

Oh yes, it works fine now (with python)

Also Telldus Center can be running in parallel and status changes are shown in both applications

Best regards, Walter
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Post by micke.prag »

Great news.
Hopefully the C# guys can get something working aswell!
Micke Prag
Software
Telldus Technologies
Zeko
Posts: 16
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Post by Zeko »

Unfortunately it still doesn't work for me.

I could not get the current house code for my remote, since installing eVentTool seems
to overwrite some files and could not be used. I also tried the new "scan"-function in TelldusCenter
but could not get it to work.
When selecting scan and then pushing a remote button something happens, the expand nodes
for all different devices in the list disappears, but when selecting "Save" I only get "Du måste välja en enhet" and
there is nothing to select.

Because of the above I have only tested to register and fire the RawDeviceEvent in my C# application without
any success. I have tried when the TelldusService is running and when its not.
It works fine to send commands.

Please let me know if there is anything I can do to simplify troubleshooting or if there is something obvious
I may have missed (maybe some installation issue).
krambriw
Posts: 654
Joined: Fri Mar 17, 2023 9:45 am

Post by krambriw »

Hi Zeko,

I think you need to stop the Telldus Service for eventtool to work (for me it takes rather long time after start until the first events appears)

On the other hand, you can also do testing without knowing the remote code

1) define a new nexa self learning device and "randomize" a code

2) control the device from telldus center and you should see events in your app and you should see the status change in telldus center too

3) edit the device (like change name) and event should also be seen in your app (provided you implemented that callback too)
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Post by micke.prag »

Is the green led flashing on the Duo?
If it is, try to hold down the button on the remote longer to see if any devices will show shen using the "scan" function.

TelldusService must be running for everything else than eVentTool to work.
Micke Prag
Software
Telldus Technologies
Zeko
Posts: 16
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Post by Zeko »

Yes, the green led is flashing when I press the remote buttons. I have also tried to hold the button pressed for several seconds.
TelldusService is running.

I have not performed any more troubleshooting using my c# application since it seems like there is some underlying problem with my Telldus Center installation/software.

:help:

Update: Ive succeded to change the status of a device using my C# application and it also changes in Telldus Center. However it would be nice to get it working the other way around.
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Post by micke.prag »

Do you get device-events in your C#-application when manually update the status in TelldusCenter?
Micke Prag
Software
Telldus Technologies
Zeko
Posts: 16
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Post by Zeko »

No, I dont get any duo events working in my C# app. Im not so familiar with dll callbacks, maybe its my coding. Have someone else succeded to get the events triggered in C#?

Another question, is the new scan-function supposed to work or is it in somekind of beta-state?
Post Reply