Still waiting for some new 315Mhz PIR’s in transit from China, but in the meantime started playing with attiny.
Had to dust of the programmer and chips, but for now it looks promising.
I have created a sketch that will go into deepsleep when started and only wakes by PIR interrupt. There is some extra code that will compare some time between the last send update and current to avoid to much RF traffic. Same goes for sending battery percentage, it’s only allowed to send at least after 24 hour since last transmit.
When it doesn’t get out of sleep for a couple of days it won’t transmit battery percentage.
PIR info is send with kaku protocol, battery percentage with pimatic_generic protocol. Hopefully later this day I can add the physical PIR to the chip and start testing how long it will run on 2 AA batterys. Perhaps I will be making my own PIR’s after all