PIR using Si-Way not work in Home Assistant

SPC Web Gateway support issues
doz&doe
Posts: 6
Joined: Tue 16 Feb 2021, 21:27

PIR using Si-Way not work in Home Assistant

Post by doz&doe »

Hi,

I have a problem getting my PIR's to work in Home Assistant.

It shows up as an entity and I can see them in logg. But there is no action. Seem there is no data from them. Only get the value "false".

Have PIR on some cameras, that works ok.

It seems that I get data from the PIR when looking in the loggs. They do what supposed to as PIR in the alarm system :)

{"status":"success","data":{"systemlog":{"event":[{"time":"1615931403","raw":"0010000100000000","text":"Zone 16 IR-Kitchen Closed"},{"time":"1615932196","raw":"0010000200000000","text":"Zone 16 IR-Kitchen Open"},{"time":"1615932196","raw":"0010000100000000","text":"Zone 16 IR-Kitchen Closed"},{"time":"1615934291","raw":"0010000200000000","text":"Zone 16 IR-Kitchen Open"},{"time":"1615934291","raw":"0010000100000000","text":"Zone 16 IR-Kitchen Closed"},{"time":"1615934366","raw":"0C000F2700000000","text":"WWW LOGIN OK, User 9999 Engineer"},{"time":"1615934842","raw":"0010000200000000","text":"Zone 16 IR-Kitchen Open"},{"time":"1615934842","raw":"0010000100000000","text":"Zone 16 IR-Kitchen Closed"}]}}}



Running latest version of HA and SPC4300 | ver. 3.11.1 | R.38577



Thanks
/Christian
Last edited by doz&doe on Thu 25 Mar 2021, 12:05, edited 1 time in total.
gol
Webbplatsadministratör
Posts: 72
Joined: Sun 01 Jun 2014, 19:38

Re: PIR not work in Home Assistant

Post by gol »

Hi Christian,
Just to be sure, you are aware that as long you are logged in as Full Engineer no events are sent from the Panel to the SPC Web Gateway.

Check also your event profile settings. You can also run the gateway with the -d option to log the communication with the Panel to the terminal. Please see the manual.

Regards,
Goran
doz&doe
Posts: 6
Joined: Tue 16 Feb 2021, 21:27

Re: PIR not work in Home Assistant

Post by doz&doe »

Hi Göran,

Thanks for quick answer!!

Normaly not logged in as engineer, but was not aware of that.

The log seems to tell me that there is some data from the PIR, is that correct? Does the "systemlog" shows what data that are send via the web gateway or "only" read log from panel?

I will check the other things you mentioned tomorrow, get back after that with status..

Thanks again
/Christian
doz&doe
Posts: 6
Joined: Tue 16 Feb 2021, 21:27

Re: PIR not work in Home Assistant

Post by doz&doe »

Hi Göran,

Regarding Event Profiles is it some specific that are used, or does it use all profiles. I can see that the one called "Default Events [SPC Connect]" not have "Sektionstatusändring" activated. I think that setting could show PIR info Open or Close?
I could add one more profile to activate that setting, but not sure if SPC Web Gateway read that.

Kind Reagrds
/Christian
gol
Webbplatsadministratör
Posts: 72
Joined: Sun 01 Jun 2014, 19:38

Re: PIR not work in Home Assistant

Post by gol »

Which events are sent to SPC Web Gateway depends only on the Filter settings in the EDP configuration. Zone State need to be selected to get events from your detectors.
doz&doe
Posts: 6
Joined: Tue 16 Feb 2021, 21:27

Re: PIR not work in Home Assistant

Post by doz&doe »

OK,

Well for EDP all boxes are checked and all Zones are activated.

In the SystemLogs for SPC WebGateway, I got this

{"time":"1616618448","raw":"0010000200000000","text":"Zone 16 IR-Kitchen Open"},
{"time":"1616618448","raw":"0010000100000000","text":"Zone 16 IR-Kitchen Closed"},
{"time":"1616618726","raw":"0010000200000000","text":"Zone 16 IR-Kitchen Open"},
{"time":"1616618726","raw":"0010000100000000","text":"Zone 16 IR-Kitchen Closed"},

For me, that seems like I got information to the SPC WebGateway, but in Home Assistant it only shows closed.
gol
Webbplatsadministratör
Posts: 72
Joined: Sun 01 Jun 2014, 19:38

Re: PIR not work in Home Assistant

Post by gol »

The systemlog request is using a REST API GET to fetch the log from the SPC panel.
Are you really sure that you get any events on the websockets API? You can test it in the Test panel.
doz&doe
Posts: 6
Joined: Tue 16 Feb 2021, 21:27

Re: PIR not work in Home Assistant

Post by doz&doe »

I must admit it's now a little bit outside my knowledge and comfort zone. :)

But I find this. I have my Kitchen PIR as zone ID 16

When using browser http://192.168.0.xxx:8088/spc/zonelog/16

I get this answer

{"status":"success","data":{"zonelog":{"zone":"16","event":[{"time":"1616420379","input":"1"},{"time":"1616420379","input":"0"},{"time":"1616420569","input":"1"},{"time":"1616420569","input":"0"},{"time":"1616420746","input":"1"},{"time":"1616420746","input":"0"},{"time":"1616421223","input":"1"},{"time":"1616421223","input":"0"},{"time":"1616421855","input":"1"},{"time":"1616421855","input":"0"},{"time":"1616423574","input":"1"},{"time":"1616423574","input":"0"},{"time":"1616425210","input":"1"},{"time":"1616425210","input":"0"},{"time":"1616425558","input":"1"},{"time":"1616425558","input":"0"},{"time":"1616428054","input":"1"},{"time":"1616428054","input":"0"},{"time":"1616428887","input":"1"},{"time":"1616428887","input":"0"},{"time":"1616429130","input":"1"},{"time":"1616429130","input":"0"},{"time":"1616431168","input":"1"},{"time":"1616431168","input":"0"},{"time":"1616434108","input":"1"},{"time":"1616434108","input":"0"},{"time":"1616434470","input":"1"},{"time":"1616434470","input":"0"},{"time":"1616434948","input":"1"},{"time":"1616434948","input":"0"},{"time":"1616435290","input":"1"},{"time":"1616435290","input":"0"},{"time":"1616438068","input":"1"},{"time":"1616438068","input":"0"},{"time":"1616439538","input":"1"},{"time":"1616439538","input":"0"},{"time":"1616441375","input":"1"},{"time":"1616441375","input":"0"},{"time":"1616441825","input":"1"},{"time":"1616441825","input":"0"},{"time":"1616443256","input":"1"},{"time":"1616443256","input":"0"},

Does that mean that I got the information I looking for? I can read in the documentation that 0 = Closed and 1 = Open

Thanks for your patience.

BR
doz&doe
Posts: 6
Joined: Tue 16 Feb 2021, 21:27

Re: PIR not work in Home Assistant

Post by doz&doe »

Hi,

After more investigation, I have found whats the problem.

The problem depends on that I use wireless sensors that use Si-Way for communication.

In short, as you can see in the previous message, there is no time difference between close and open. They get the same timestamp.

There is more to read about this here https://github.com/mbrrg/pyspcwebgw/issues/3. and also a solution.

Göran has tested this with new PIR that use the new communication protocol and they don't seem to have the same problem.
crallian
Posts: 6
Joined: Thu 30 Jan 2020, 13:03

Re: PIR using Si-Way not work in Home Assistant

Post by crallian »

doz&doe wrote: Thu 25 Mar 2021, 12:04 Hi,

After more investigation, I have found whats the problem.

The problem depends on that I use wireless sensors that use Si-Way for communication.

In short, as you can see in the previous message, there is no time difference between close and open. They get the same timestamp.

There is more to read about this here https://github.com/mbrrg/pyspcwebgw/issues/3. and also a solution.

Göran has tested this with new PIR that use the new communication protocol and they don't seem to have the same problem.
Hi,
I found this thread and just want to share that Martin Berg (mbrrg) has polished my workaround for this issue (linked above), and we are currently testing the code.
So the solution/workaround will hopefully be merged into Home Assistant soon.

Best Regards
Christer
Post Reply