Pulse functionality MultiSwitch plugin

Hi akbooer,

I’m trying to get the pulse functionality of the MultiSwitch plugin to work in openluup, but I can’t figure it out.

The situation:
I have installed the MultiSwitch plugin on my Vera (not in openLuup, not possible because I want to use it with Google Assistant). I’ve set a button to pulse and in Vera it seems to work fine. However, in openluup the button does not work. I have put a watch in a scene to see if it triggers, but it doesn’t

In the log I get this:

2018-05-04 11:59:18.201 openLuup.server:: GET /data_request?id=action&output_format=json&DeviceNum=10337&serviceId=urn:dcineco-com:serviceId:MSwitch1&action=SetStatus6&newStatus6=-1 HTTP/1.1 tcp{client}: 0x161f0e8 2018-05-04 11:59:18.201 luup.call_action:: 10337.urn:dcineco-com:serviceId:MSwitch1.SetStatus6 2018-05-04 11:59:18.201 luup.call_action:: action will be handled by parent: 6 2018-05-04 11:59:18.201 luup_log:6: http://192.168.1.14/port_3480/data_request?id=action&serviceId=urn:dcineco-com:serviceId:MSwitch1&action=SetStatus6&DeviceNum=337&action=SetStatus6&newStatus6=%2d1&serviceId=urn%3adcineco%2dcom%3aserviceId%3aMSwitch1

It seems that openluup only sets it to Off (-1) and it is not setting it to On (1) first.

Can you tell me why this doesn’t work? The behavior should be the same as in Vera, right? Thanks!

EDIT:
O BTW. I thought it had to do something with the delay of 200ms for the pulse button to turn back off. So I changed it to 2000ms. But this didn’t make a difference.

Hi there

Thanks for the impeccable problem description and diagnostics.

I don’t use Multiswitch, and so am not familiar with the implementation of pulse functionality.

However, from the log I can tell:

[ul][li]you’re not using the latest development branch release (this is not the problem)[/li]
[li]openLuup receives an HTTP request (from AltUI?) to do a SetStatus6 to -1[/li]
[li]this is converted to an action call to the local clone device #10337[/li]
[li]that action is passed to device #6, the VeraBridge plugin[/li]
[li]VeraBridge issues an HTTP request to Vera device #337[/li]
[li]the newStatus6 value in that request appears to be completely screwed up[/li][/ul]

So there is definitely something for me to look at here. You didn’t, by chance, get the cut and paste of the log wrong? However, aside from that, from the log you have shown me, there is nothing there that should set the value to On in the first place.

Are we missing an earlier part of the log?

For a variety of reasons, it may take me a little while to fix this. Feel free to PM me for a fuller explanation, but in the meantime, an explanation of the pulse mode would help.

Thanks.

[quote=“akbooer, post:2, topic:199106”]Are we missing an earlier part of the log?

For a variety of reasons, it may take me a little while to fix this. Feel free to PM me for a fuller explanation, but in the meantime, an explanation of the pulse mode would help.

Thanks.[/quote]

I have not missed an earlier part in the log. I have checked several times, in several test cases.

See here the readme of the plugin:
https://drive.google.com/file/d/0BykZKwGsCBsAaTJiWnNKLWdvR2c

See here the log of Vera, so you can compare:

08 05/04/18 15:03:48.399 JobHandler_LuaUPnP::HandleActionRequest device: 337 service: urn:dcineco-com:serviceId:MSwitch1 action: SetStatus6 <0x7371e520> 08 05/04/18 15:03:48.399 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=337 <0x7371e520> 08 05/04/18 15:03:48.400 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:dcineco-com:serviceId:MSwitch1 <0x7371e520> 08 05/04/18 15:03:48.400 JobHandler_LuaUPnP::HandleActionRequest argument action=SetStatus6 <0x7371e520> 08 05/04/18 15:03:48.401 JobHandler_LuaUPnP::HandleActionRequest argument newStatus6=-1 <0x7371e520> 06 05/04/18 15:03:48.403 Device_Variable::m_szValue_set device: 337 service: urn:dcineco-com:serviceId:MSwitch1 variable: Status6 was: 0 now: 1 #hooks: 1 upnp: 0 skip: 0 v:0xddc7e0/NONE duplicate:0 <0x77178000> 07 05/04/18 15:03:48.404 Event::Evaluate 6 scene test pulse is true users: allow:1 <0x77178000> 08 05/04/18 15:03:48.404 Scene::RunScene running 72 test pulse <0x77178000> 06 05/04/18 15:03:48.605 Device_Variable::m_szValue_set device: 337 service: urn:dcineco-com:serviceId:MSwitch1 variable: Status6 was: 1 now: 0 #hooks: 1 upnp: 0 skip: 0 v:0xddc7e0/NONE duplicate:0 <0x77178000> 07 05/04/18 15:03:48.606 Event::Evaluate 6 scene test pulse is false repeat 0/1 <0x77178000> 04 05/04/18 15:03:48.607 <Job ID="1665" Name="" Device="337" Created="2018-05-04 15:03:48" Started="2018-05-04 15:03:48" Completed="2018-05-04 15:03:48" Duration="0.205086000" Runtime="0.203779000" Status="Successful" LastNote=""/> <0x77178000>

OK, thanks.

This is encouraging… the Vera version only sends a -1 too. The plugin itself should take care of the rest. I just need to find out quite how I have screwed up the argument to set.

@RHCPNG

…however, what version of the system ARE you using?

[quote=“akbooer, post:5, topic:199106”]@RHCPNG

…however, what version of the system ARE you using?[/quote]

That would be v18.4.7.

Hi Akbooer,

Have you made any progress on this? It would be very nice to be able to use the pulse functionality.

Sorry,

This had slipped my mind, such as it is. I may also have confused this issue with the AutoUntrip mechanism for security sensors, which I did implement.

Just reviewing your posts, I remain perplexed by the fact that the request statement seems to be wrong. If this were generally true then almost nothing would work.

I’ll take a look.

[quote=“akbooer, post:8, topic:199106”]Sorry,

This had slipped my mind, such as it is. I may also have confused this issue with the AutoUntrip mechanism for security sensors, which I did implement.

Just reviewing your posts, I remain perplexed by the fact that the request statement seems to be wrong. If this were generally true then almost nothing would work.

I’ll take a look.[/quote]

Thanks, I would be very grateful.

Well, I can duplicate the problem, so that’s a good start!

I have fixed a generic error in VeraBridge actions , which may fix this problem for you. Certainly, on my test machines this works and the Vera log shows:

06	08/23/18 12:14:26.858	Device_Variable::m_szValue_set device: 91 service: urn:dcineco-com:serviceId:MSwitch1 variable: eStatus8e was: 0 now: 1 #hooks: 0 upnp: 0 skip: 0 v:0xdcec20/NONE duplicate:0 <0x77da0000>
06	08/23/18 12:14:27.059	Device_Variable::m_szValue_set device: 91 service: urn:dcineco-com:serviceId:MSwitch1 variable: eStatus8e was: 1 now: 0 #hooks: 0 upnp: 0 skip: 0 v:0xdcec20/NONE duplicate:0 <0x77da0000>

Update to the development branch (v18.8.23)

Give it a go and let me know!

I believe it is indeed working now. Thanks, Akbooer!