We have moved at community.getvera.com

Author Topic: Pulse functionality MultiSwitch plugin  (Read 852 times)

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Pulse functionality MultiSwitch plugin
« on: May 04, 2018, 05:58:29 am »
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:

Code: [Select]
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.
« Last Edit: May 04, 2018, 06:06:10 am by RHCPNG »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Pulse functionality MultiSwitch plugin
« Reply #1 on: May 04, 2018, 06:58:39 am »
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:
  • you're not using the latest development branch release (this is not the problem)
  • openLuup receives an HTTP request (from AltUI?) to do a SetStatus6 to -1
  • this is converted to an action call to the local clone device #10337
  • that action is passed to device #6, the VeraBridge plugin
  • VeraBridge issues an HTTP request to Vera device #337
  • the newStatus6 value in that request appears to be completely screwed up

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.

3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Pulse functionality MultiSwitch plugin
« Reply #2 on: May 04, 2018, 09:10:45 am »
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.



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:
Code: [Select]
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>

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Pulse functionality MultiSwitch plugin
« Reply #3 on: May 04, 2018, 09:35:27 am »
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.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Pulse functionality MultiSwitch plugin
« Reply #4 on: May 04, 2018, 12:52:56 pm »
@RHCPNG

you're not using the latest development branch release (this is not the problem)

...however, what version of the system ARE you using?
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Pulse functionality MultiSwitch plugin
« Reply #5 on: May 04, 2018, 01:11:16 pm »
@RHCPNG

you're not using the latest development branch release (this is not the problem)

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


That would be v18.4.7.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Pulse functionality MultiSwitch plugin
« Reply #6 on: August 22, 2018, 04:10:57 am »
Hi Akbooer,

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

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Pulse functionality MultiSwitch plugin
« Reply #7 on: August 22, 2018, 06:00:17 am »
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.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Pulse functionality MultiSwitch plugin
« Reply #8 on: August 22, 2018, 11:19:58 am »
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.


Thanks, I would be very grateful.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Pulse functionality MultiSwitch plugin
« Reply #9 on: August 22, 2018, 01:00:58 pm »
Thanks, I would be very grateful.

Well, I can duplicate the problem, so that's a good start!
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Pulse functionality MultiSwitch plugin
« Reply #10 on: August 23, 2018, 07:16:38 am »
Have you made any progress on this? It would be very nice to be able to use the pulse functionality.

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:

Code: [Select]
06 08/23/18 12:14:26.858 Device_Variable::m_szValue_set device: 91 service: urn:dcineco-com:serviceId:MSwitch1 variable: Status8 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: Status8 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!
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Pulse functionality MultiSwitch plugin
« Reply #11 on: August 23, 2018, 10:02:18 am »
I believe it is indeed working now. Thanks, Akbooer!