I want to build a door sensor there trough a wireless solution should tell a controller ie openhab when the door change its state.
I want this solution to run on battery, what parts would be prefered so get the longest battery time, and how long should I exept it to run on battery?
Speedy911:
If a use atiny85 what type of communikation should I ain after to preserve as much battery time as posible
It really depends on what you're looking for. Obviously a wired connection would be the most battery efficient but if you need it to be wireless you can go with Bluetooth or wifi and just use a bigger battery. The thing about not being wireless though is if you're planning to have wires you may as well just plug it in the wall and never have to worry about battery.
Bluetooth is a horrible idea. Pairing limitations, power usage, skip BT.
If you watch the vid I posted, the sensor module directly connects to the internet.
Otherwise with an ATTiny, you're better off going with a cheap RF link that would send a message to a base unit that's wall-powered. But if you have a base station, there's no need for the ATTiny, as there are plenty of PT2262 type pairs which can work as the entire transmitter/sensor module for cheap.