cyberjunky / RTL-SDR-P2000Receiver-HA

Receive P2000 messages using RTL-SDR stick and post them to Home Assistant
MIT License
23 stars 11 forks source link

not realy a issue but more a question.... #33

Closed firefigther0575 closed 2 years ago

firefigther0575 commented 2 years ago

i wanted to use 2 sdr-receivers on 2 diffferent pi's, to split some capcodes for different home assistant automations. once up in the air, i couldnt get it to work as i wanted... they both spit out the same sensor name. "sensor.p2000_capcode"

is there a way to change this? or a other workaround?

Dinges28 commented 2 years ago

Yes there is.

In the current code, it can create multiple sensors. And for both sensors, you can give different capcodes or regions or keywords or....

firefigther0575 commented 2 years ago

Just want for every capcode a different entity if possible. And how do I do that?

Dinges28 commented 2 years ago

What are you trying to create? A sensor for 1 capcode might not be the best option.

Yes, you can change te parameters that every capcode creates its own HASS sensor, but HASS will be flooded with errors if you create automations on a perticular sensor and it has not triggered once after a HASS reboot (sensor in HAAS will be created the first time when the sensor is send to hass).

firefigther0575 commented 2 years ago

the reason i want to split it is simple.... i'm a firefighter and when i'm home i want to create a automation to trigger lights and get spoken word for 4 capcodes. the other capcode is 1 and that only speaks out the data. sensor that way wont be floodded.

something like this?

[sensor_p2000_capcode_mon] friendlyname = P2000_MON searchcapcode = 000806240

[sensor_p2000_capcode_b2] friendlyname = P2000_B2 searchcapcode = 0000804059,000804047,000804056*

Dinges28 commented 2 years ago

Than the option with the new code is a good solution.

I would suggest changing the sensor names a bit.

[sensor_p2000_capcode_mon] friendlyname = P2000 capcode MON searchcapcode = 000806240

[sensor_p2000_capcode_b2] friendlyname = P2000 capcode B2 searchcapcode = 0000804059,000804047

firefigther0575 commented 2 years ago

first make it word then make pretty 😄