S_LOCK device

Moderator: leecollings

Post Reply
fets
Posts: 21
Joined: Monday 21 September 2015 20:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2969
Contact:

S_LOCK device

Post by fets »

Hello,
Please forgive my english which is not my native language : I'm french
I'm new to the forum and domoticz (which seems to be quite powerfull) and young too with mysensors.

I would like to control my garage door using domoticz/mysensors.
In order to open/close my door, I have to use a relay and close the contacts for a second or 2.
So I created a node : S_LOCK.
But, in domoticz device interface, it appears as Lighting 2 :shock:
I managed to change type using EDIT feature but can't find something matching my expectation.
What have I wrong ?
What domoticz type do I have to use ?
I tried Push Off Button but my arduino sketch received a message with type V_LIGHT (2) instead of V_LOCK_STATUS (36) which not seems good.
Does somebody experienced the same issue ?

In a second time I would like to send the door status (open or closed) obtained using reed switches in order to see the current state in domoticz interface.
So I plan to use a message typed V_LOCK_STATUS and send it according the reed switch state.
How could I do that ?

Thanks for any answer.
Regards
User avatar
gizmocuz
Posts: 2488
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: S_LOCK device

Post by gizmocuz »

which version of domoticz are you using?

There have been many changes for mysensors recently.

You should get a light switch, you can set the type to 'door' if you want, or just add a custom icon and leave it as an on/off switch

when you send a switch command from domoticz, it should send the message with V_LOCK_STATUS
Quality outlives Quantity!
fets
Posts: 21
Joined: Monday 21 September 2015 20:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2969
Contact:

Re: S_LOCK device

Post by fets »

Hi thanks for your answer gizmocuz
I'm running V2.2969 on a raspberry pi2.

My node present itself as :
send: 11-11-0-0 s=2,c=0,t=19,pt=0,l=0,sg=0,st=ok:
t=19 means S_LOCK

Indeed by default on domoticz, I have a light switch which I changed to Door Lock
this is my node output by hitting 2 times the door button:
1st time : read: 0-0-11 s=2,c=1,t=2,pt=0,l=1,sg=0:1
2nd time : read: 0-0-11 s=2,c=1,t=2,pt=0,l=1,sg=0:0
something change on the data part 0:1 and 0:0
but the receive type is t=2 meaning V_LIGHT or V_STATUS

Do you think this issue is fixed in a newer release ?
User avatar
gizmocuz
Posts: 2488
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: S_LOCK device

Post by gizmocuz »

well I am unable to debug right now, but looking at the code:

Code: Select all

				std::string lState = (light_command == light2_sOn) ? "1" : "0";
				if (FindChildWithValueType(node_id, V_LOCK_STATUS) != NULL)
				{
					//Door lock
					SendCommand(node_id, child_sensor_id, MT_Set, V_LOCK_STATUS, lState);
				}
				else if ((FindChildWithValueType(node_id, V_SCENE_ON) != NULL) || (FindChildWithValueType(node_id, V_SCENE_OFF) != NULL))
				{
					//Scene Controller
					SendCommand(node_id, child_sensor_id, MT_Set, (light_command == light2_sOn) ? V_SCENE_ON : V_SCENE_OFF, lState);
				}
				else
				{
					//normal
					SendCommand(node_id, child_sensor_id, MT_Set, V_STATUS, lState);
				}
if your node has a child with V_LOCK_STATUS, it should work.... otherwise please try to debug with for example visual studio, ir codelite
Quality outlives Quantity!
tbowmo
Posts: 7
Joined: Thursday 11 June 2015 13:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2480
Location: Denmark
Contact:

Re: S_LOCK device

Post by tbowmo »

Hmm.. just updated to domoticz 2.3220

Using nodered to mock up a sensors, and inject the following

Code: Select all

100;255;3;0;11;LockTest
100;255;3;0;12;0.1
100;1;0;0;19;Door lock
Then in domoticz a mysensor device with the id of 0064 turns up, with the type of "Lighting 2", and on the LightSwitch page it turns up as a bulb.. Shouldn't this be a door, or a lock?

It does send the correct V_LOCK_STATUS to the nodes, when activating the device in domoticz. However, it seems that it inverts the status, so 0 means locked, and 1 means open.. While the mysensors API states that 1 is locked, and 0 is open.
Mysensors HW developer / hacker.
Creator of Sensebender Micro temperature / humidity sensor
User avatar
gizmocuz
Posts: 2488
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: S_LOCK device

Post by gizmocuz »

Press edit on the switch and change it's type to door lock (from the switches page)
Quality outlives Quantity!
tbowmo
Posts: 7
Joined: Thursday 11 June 2015 13:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2480
Location: Denmark
Contact:

Re: S_LOCK device

Post by tbowmo »

I know, but wouldn't it make sense to auto assign the door icon, when it's a lock?

Anyways, if I use the door symbol, then the state is inverted, so that 0 is shown as door locked, and 1 is shown as door open. While the mysensors api states the opposite.
Mysensors HW developer / hacker.
Creator of Sensebender Micro temperature / humidity sensor
Flopp
Posts: 279
Joined: Sunday 03 January 2016 14:55
Target OS: -
Domoticz version:
Location: Sweden
Contact:

S_LOCK device

Post by Flopp »

I have same type of wrong name. It show up as Lightning_2 , AC

I am sending S_DOOR and V_TRIPPED

What does Lightning_2 mean?
What does AC mean?
User avatar
gizmocuz
Posts: 2488
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: S_LOCK device

Post by gizmocuz »

It is just a internal type, forget about it
Just edit the switch, and select the correct type as you have done
Quality outlives Quantity!
Flopp
Posts: 279
Joined: Sunday 03 January 2016 14:55
Target OS: -
Domoticz version:
Location: Sweden
Contact:

Re: S_LOCK device

Post by Flopp »

Ok
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest