jbasen / Crestron-Shelly

26 stars 1 forks source link

Relay 2.5 #18

Closed micdre closed 2 years ago

micdre commented 2 years ago

Hi, When i use the Crestron V16 test program, the relay25 unit responds fast on the first two commands it receives. But sending a third (or more) command it takes app 20 sec. to react. Did i miss something?

Kind regards, Michel

jbasen commented 2 years ago

Thanks. I’ll try to take a look at this. In the mean time can you set Startup Debug Message to Console, capture the output, reproduce the issue, and post the captured output here. If I have problems reproducing the problem it might give some hints as to what is going on.

thanks

jbasen commented 2 years ago

I hooked up a Shelly 2.5 in relay mode and created a test program by taking v18 of the demo program and deleting all the modules except the Shelly comm manager, the stepper the comm manager kicks off to initialize the other Shelly modules, and the Shelly Relay Module v4 for the Shelly 2.5 in relay mode.

I then added I/O url actions for each output being switched on/off, pointing back to my MC3 processor, using the Shelly 2.5 web interface.

I then set watches on all signals of the Shelly Relay v4 module, loaded the program to my MC3, and connected to the program using debugger.

Using the debugger I can turn either output on/off about once per second over and over without any issues.

I've included my test program in this post. Without additional information I'm not sure how to address your problem. I've also attached my test program to this post.

NOTE V18 FIXED A BUG IN THE RELAY MODULE THAT MIGHT BE CAUSING AN ISSUE FOR YOU

Thanks

Shelly Demo 25 Test.zip

micdre commented 2 years ago

Hi,

Here's a part of the debug iformation. When i use the relay mode of the Shelly 25 it works fine. But when i use the rolle/shutterr mode the things happened i mentioned before. Could be some errrors from other programs that are running. So after i deleted the other programs just to be shure, nothing changed.

Shelly - Send_Roller_Command - Error Sending Device Command: System.StackOverflowException: StackOverflowException at Crestron.Logos.SplusObjects.SplusObject.SetOutputValue(SignalEventArgs Signal) at Crestron.Logos.SplusObjects.DigitalOutput.set_Value(Int32 value) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password)

Kind regards, Michel

jbasen commented 2 years ago

Thanks Michel.

Since you said you were working with a Shelly "relay25" I thought you meant you were using the device in relay mode; not roller shutter mode. I'll take a look at the operation in roller shutter mode.

jbasen commented 2 years ago

This is fixed in the new v19 version I've uploaded. There is a new v2.1 version of the roller shade module that includes a separate digital input to poll for position information. The automatic polling I was trying to perform was causing a problem.

micdre commented 2 years ago

Great!. Thanks again for your work on the Shelly modules. Appreciate it!

micdre commented 2 years ago

Hi,

here's a part of the debug iformation. When i use the relay mode of the Shelly 25 it works fine. Butwhen i use the roller mode the things happened i mentioned earlier.

Shelly - Send_Roller_Command - Error Sending Device Command: System.StackOverflowException: StackOverflowException at Crestron.Logos.SplusObjects.SplusObject.SetOutputValue(SignalEventArgs Signal) at Crestron.Logos.SplusObjects.DigitalOutput.set_Value(Int32 value) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2.PROCESSFEEDBACK(SplusExecutionContext context, CrestronString ROLLER_STATE, Int16 POSITION) at UserModule_SHELLY_ROLLER_V2.UserModuleClass_SHELLY_ROLLER_V2._ONSERIALVALUECHANGE(Object sender) at Shelly_Integration.SignalChangeEvents.SerialValueChange(String Device_IP, Int16 Channel, Int16 Relay_Is_On, String Roller_State, Int16 Position, String Power_Under_or_Over, String Action, String Button, String Output, UInt16 Brightness_Gain, Int16 Red, Int16 Green, Int16 Blue, Int16 White, Int16 Effect, String Lux, Int16 Temperature, String Humidity, Int16 Temperature_Tenths, Int16 Target_Temperature_Enabled, Int16 Schedule_Enabled, Int16 Schedule_Profile_ID, String Schedule_Profile_Name, String Valve_Position, Int16 Target_Temperature, Int16 Target_Temperature_Tenths, Int16 Battery_Percentage, String Error_Condition) at Shelly_Integration.Shelly.Send_Roller_Command(String Device_IP, Int16 Command, String Username, String Password)

Kind regards, Michel


Van: jbasen @.> Verzonden: zaterdag 1 oktober 2022 23:42 Aan: jbasen/Crestron-Shelly @.> CC: micdre @.>; Author @.> Onderwerp: Re: [jbasen/Crestron-Shelly] Relay 2.5 (Issue #18)

I hooked up a Shelly 2.5 in relay mode and created a test program by taking v18 of the demo program and deleting all the modules except the Shelly comm manager, the stepper the comm manager kicks off to initialize the other Shelly modules, and the Shelly Relay Module v4 for the Shelly 2.5 in relay mode.

I then added I/O url actions for each output being switched on/off, pointing back to my MC3 processor, using the Shelly 2.5 web interface.

I then set watches on all signals of the Shelly Relay v4 module, loaded the program to my MC3, and connected to the program using debugger.

Using the debugger I can turn either output on/off about once per second over and over without any issues.

I've included my test program in this post. Without additional information I'm not sure how to address your problem. I've also attached my test program to this post.

NOTE V18 FIXED A BUG IN THE RELAY MODULE THAT MIGHT BE CAUSING AN ISSUE FOR YOU

Thanks

Shelly Demo 25 Test.ziphttps://github.com/jbasen/Crestron-Shelly/files/9691377/Shelly.Demo.25.Test.zip

— Reply to this email directly, view it on GitHubhttps://github.com/jbasen/Crestron-Shelly/issues/18#issuecomment-1264509519, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGQC3ZG2GTKXPQSD7NOJ3NDWBDD7ZANCNFSM6AAAAAAQ2BPFE4. You are receiving this because you authored the thread.Message ID: @.***>

micdre commented 2 years ago

Hi,

Thanks so much for your work on the Crestron Shelly modules and your extensive explanation.

Sorry for my late reaction and not posting any debug data. I'm working this weekend. So no time on my hands.

I run the test you send me tomorrow.

Met vriendelijke groet, With kind regards, Michel Drenthen Op 2 okt. 2022, om 01:42, jbasen @.**@.>> schreef:

I hooked up a Shelly 2.5 in relay mode and created a test program by taking v18 of the demo program and deleting all the modules except the Shelly comm manager, the stepper the comm manager kicks off to initialize the other Shelly modules, and the Shelly Relay Module v4 for the Shelly 2.5 in relay mode.

I then added I/O url actions for each output being switched on/off, pointing back to my MC3 processor, using the Shelly 2.5 web interface.

I then set watches on all signals of the Shelly Relay v4 module, loaded the program to my MC3, and connected to the program using debugger.

Using the debugger I can turn either output on/off about once per second over and over without any issues.

I've included my test program in this post. Without additional information I'm not sure how to address your problem. I've also attached my test program to this post.

NOTE V18 FIXED A BUG IN THE RELAY MODULE THAT MIGHT BE CAUSING AN ISSUE FOR YOU

Thanks

Shelly Demo 25 Test.ziphttps://github.com/jbasen/Crestron-Shelly/files/9691377/Shelly.Demo.25.Test.zip

— Reply to this email directly, view it on GitHubhttps://github.com/jbasen/Crestron-Shelly/issues/18#issuecomment-1264509519, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGQC3ZG2GTKXPQSD7NOJ3NDWBDD7ZANCNFSM6AAAAAAQ2BPFE4. You are receiving this because you authored the thread.Message ID: @.***>

jbasen commented 2 years ago

You need to update to the latest version code that I've uploaded to GitHub. Per my earlier comment on this thread this problem has been fixed. The updated code includes a v2.1 of the Shelly Roller module as well as a new Shelly.clz. From the debug output you are still running v2.0 of the Shelly Roller module and with that an older version of Shelly.clz