I just discovered open hab yesterday and from what I understand it may be able to meet my needs. But being that the last language I learned to code was visual basic. (things are a little different in OpenHab) I wanted to make sure I am not barking up the wrong tree.
Here is what my company needs.
raspberry Pi connected to our intercom system by audio out. (I have a PI with OpenHab on it, and just about every ui installed)
Shortcut on desktop computers with a switch pertaining to each PC in the business where users can flip a digital switch causing an alarm.
The alarm would sound until the switch was flipped off again at the inial PC or another PC.
Hopefully, the alarm could contain spoken text and a song (mp3 or wav)
Is this doable with a single Raspberry pi and html based user interaction?
Thank you so much for your help and pointing me in the right direction.
Welcome to the openHAB community!
Check out our documentation on Audio Sinks and Multimedia
It’s a concept that allows you to play any audio over a specific device.
rule "Play a tune when switch goes on"
when
Item Intercom_Alarm changed to ON
then
playSound("someTune.mp3") // this file is located in $openhab-config/sounds/
end
You can also setup a text-to-speech add-on like VoiceRSS or Amazon Polly and use spoken text instead:
rule "Play a tune when switch goes on"
when
Item Intercom_Alarm changed to ON
then
say("What's up everyone!")
end
The PC desktop shortcut is the tricky part.
Ideally you’d need to write some bash script that would do a POST request to the openHAB REST API with curl or something. Here you can find wget approach.
Yep. Simplest would probably be set up HabPanel with a single switch on it for that item. Then each user accesses it from a browser, if that is acceptable.
Depending on number of users, you could give them an actual physical button very easily that will trigger the alarm. Cheap wifi enabled arduino and a big red button to hit.
To my knowledge, there is not a published book at this time. OH is changing so much right now by the time one was published it would become out of date before it was even published. There is a new rules engine in the works and the administration UIs are gaining new features almost constantly.
I’m sure there are tons of videos but I caution you to be a little careful as many are dated. Be sure that video or tutorial you are reviewing is specifically addressing OH 2.x and not 1.x.
Beyond that, search the forum and post questions. We are happy to help.
Rick thank you so much for your reply
I have noticed that a lot of the videos and stuff I found online I’ve been varied and a little confusing
I appreciate all the help from everyone here
What I’m really trying to find is a place that explains the setup and what each of these little programing parts are and how they interact
Is there a good tutorial section in this forums to walk me through just even a basic program
I love all the help and good coding that was already sent to me in this discussion however I wouldn’t even know where to put it
I’ve tried working with the UI quite a bit however it seems to have some holes in it at least from my understanding to link things and actually get things to happen
Thank you all again for your patience and your knowledge and your help
Peter
Start with the Beginners Tutorial and the Concepts section of the User Manual at the link I provided.
Then install the demo and play around with it. The demo includes a complete though basic setup that utilizes the core parts of OH: Things, Items, Rules, Persistence, and Sitemaps. Use it as a jumping off point.