Phone line status of an obihai voip adapter

I guess I’m still not clear on how I install the regular repository. I’m running hass.io, but it’s on Ubuntu.

Tried to install on hass.io addon and got the following error…
18-04-10 13:23:40 ERROR (SyncWorker_3) [hassio.docker.addon] Can’t build 2ceff5c9/armhf-addon-obihai2mqtt:1.0-1: The command ‘/bin/sh -c apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing composer’ returned a non-zero code: 1

Any idea what the issue is? I click install on the addon and it just sits there but does not install. I tried with Hassio 0.65.3 then with 0.66.1,

1 Like

Having the same problem as Jason. Any fix found? Hassio on pi3

My approach to getting ring notification out of the OBI is to direct it’s syslog messages to a UDP port in Node-Red. While I haven’t integrated this to home assistant, I note that node-red is available under hassio homeassistant. It seems reasonable to think that instead of polling the OBI all day you could simply listen for the correct information. If you use a higher port like 1514 instead of 514, Node-Red won’t need to run with root permissions.

One more approach using following project. It’s Obihai device monitor for on/off hook status, incoming/outgoing call number etc.

Here’s an example node-red flow to get the incoming caller ID Number from the syslog flow. It calls a SMTP notify service in Home Assistant. It’s commented and a lot shorter than it looks here.

[{“id”:“c2f8169a.377028”,“type”:“udp in”,“z”:“54bf0a6e.8817f4”,“name”:“Obi Syslog on UDP 1514”,“iface”:"",“port”:“1514”,“ipv”:“udp4”,“multicast”:“false”,“group”:"",“datatype”:“utf8”,“x”:170,“y”:98,“wires”:[[“bf271f8a.6d3d3”]]},{“id”:“4f3fbaae.836004”,“type”:“debug”,“z”:“54bf0a6e.8817f4”,“name”:“View Service Call Data”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“true”,“x”:651,“y”:457,“wires”:[]},{“id”:“bf271f8a.6d3d3”,“type”:“function”,“z”:“54bf0a6e.8817f4”,“name”:“Remove Quote, CR, LF “.” characters”,“func”:“var message = msg.payload.replace(/[”\r\n\.]/g,’’);\nmsg.payload = message;\nreturn msg;",“outputs”:1,“noerr”:0,“x”:210,“y”:157,“wires”:[[“255eb9b7.e3e646”]]},{“id”:“4f2827b0.df1d48”,“type”:“change”,“z”:“54bf0a6e.8817f4”,“name”:" Extract Calling Number using Regular Expression",“rules”:[{“t”:“change”,“p”:“payload”,“pt”:“msg”,“from”:"<6> fxst_ccapi_new_call: .->(\d).*",“fromt”:“re”,“to”:"$1",“tot”:“str”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:250,“y”:338,“wires”:[[“4411086.a5aedf8”]]},{“id”:“255eb9b7.e3e646”,“type”:“switch”,“z”:“54bf0a6e.8817f4”,“name”:“Allow only “New Call” messages through”,“property”:“payload”,“propertyType”:“msg”,“rules”:[{“t”:“cont”,“v”:"<6> fxst_ccapi_new_call: “,“vt”:“str”},{“t”:“else”}],“checkall”:“false”,“repair”:false,“outputs”:2,“x”:220,“y”:218,“wires”:[[“4a588f40.7070e”],[]]},{“id”:“d5b2c44a.be0708”,“type”:“api-call-service”,“z”:“54bf0a6e.8817f4”,“name”:“Home Assistant API Call”,“server”:“180d6481.20685b”,“service_domain”:“notify”,“service”:“gmail”,“data”:”{“title”: “New Phone Call Arriving”}",“mergecontext”:"",“x”:170,“y”:458,“wires”:[[“4f3fbaae.836004”]]},{“id”:“522a2f37.29b3a”,“type”:“comment”,“z”:“54bf0a6e.8817f4”,“name”:“To see all syslog messages, connect Obi Syslog to Obi Debug, otherwise keep debug output to a minimum.”,“info”:"",“x”:420,“y”:37,“wires”:[]},{“id”:“690dad9b.f9ae74”,“type”:“comment”,“z”:“54bf0a6e.8817f4”,“name”:“Test message can be copied from syslog output.”,“info”:"",“x”:200,“y”:800,“wires”:[]},{“id”:“4a588f40.7070e”,“type”:“deduplicate”,“z”:“54bf0a6e.8817f4”,“name”:“De-Duplicate in case calls go to two separate phone ports”,“keyproperty”:"",“expiry”:5,“x”:270,“y”:278,“wires”:[[“4f2827b0.df1d48”],[]]},{“id”:“32c61a93.0730c6”,“type”:“template”,“z”:“54bf0a6e.8817f4”,“name”:“template”,“field”:“payload”,“fieldType”:“msg”,“format”:“handlebars”,“syntax”:“mustache”,“template”:"{ “data”: {“title”:“New Phone Call”,“message”:"{{payload}}" } }",“output”:“json”,“x”:80,“y”:760,“wires”:[[]]},{“id”:“4411086.a5aedf8”,“type”:“function”,“z”:“54bf0a6e.8817f4”,“name”:“Put Calling Number in payload.data”,“func”:“message = “{\“message\”: \”” + msg.payload + “\”}";\nmsg.payload = “{\“data\”: " + message + " }”;\nreturn msg;",“outputs”:1,“noerr”:0,“x”:200,“y”:400,“wires”:[[“d5b2c44a.be0708”]]},{“id”:“6f37e316.88a75c”,“type”:“debug”,“z”:“54bf0a6e.8817f4”,“name”:“Obi Debug”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“true”,“x”:683,“y”:100,“wires”:[]},{“id”:“3f288265.a5217e”,“type”:“comment”,“z”:“54bf0a6e.8817f4”,“name”:“General Notes”,“info”:“I used a gmail SMTP notification as an example for\nthis exercise. Apply this flow to whatever Home\nAssistant service works for you.\n\nI suspect the character encoding used by the OBI\nis causing problems with the Home Assistant\nAPI service call node. When I give it any\nalphabetic text, the payload.data portion of the \nmessage leaving the “Put Calling Number in \npayload.data” function node is not used.\nWhen it’s kept to numerals, it works. Again, I \nsuspect character encoding. Notepad++ says the\ntext coming out of the OBI syslog is ANSI, but\nwhen I’ve tried to use the “convert” node to change\nthe encoding, it complains the text is not ANSI.\nI’m setting this aside and calling it good enough,\nfor now.\n\nUsing a UDP port above 1000 for Syslog means \nNode-Red doesn’t need to run with root permissions. \n\nI use an OBI202 with two phone ports, and\nexperienced duplicate call messages because I \ndeliver calls to both ports. This explains the\nDe-Duplicate node. \n\nLink node is included in case I/You decide to use\nsyslog output in another Node-Red flow, maybe to \ntrigger call recording from a specific calling\nnumber, for instance, or to monitor when your\ngoogle hangouts contacts appear online. You decide.”,“x”:90,“y”:540,“wires”:[]},{“id”:“81edb262.2689b”,“type”:“link out”,“z”:“54bf0a6e.8817f4”,“name”:“Future link to another flow…”,“links”:[],“x”:629,“y”:159,“wires”:[]},{“id”:“180d6481.20685b”,“type”:“server”,“z”:"",“name”:“Home Assistant”,“url”:“http://hassio/homeassistant",“pass”:"f8e813e53fc0411698ff1ca39fbb4654”}]