Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


davanha

Member
  • Posts

    31
  • Joined

  • Last visited

About davanha

Profile information

  • Gender
    Male
  • Country
    Sweden
  • Gateway/s
    Home Center 2

Recent Profile Visitors

250 profile views

davanha's Achievements

Learner

Learner (2/8)

7

Reputation

  1. maybe an answer, not sure :=) Each device manufacturer seem to have different ways to configure which apps/services are allowed to run in the background and it also seems to differ how its done between different android versions. However even if the app is allowed to run in the background it can still be periodically stopped by android (battery saving feature called doze). So when the phone screen is turned off and the phone is in standby, android can disable network access which then cause interrupt in apps/services that requires network access, like my app that starts a webserver... . According to android documentation, keeping the device in a charger will keep network access enabled, however when testing I noticed that at least huawei phones still drop network connection. So currently I run the app on a device with android 5 (before doze), it never kills my app and it also never shut down network access even when not in charger =)
  2. Hi Sure I can publish the VD and scenes I use, but just for your information, it should be possible to integrate the app it with different virtualdevices, I guess it is more about being able to configure it correctly in the app and I dont think that I have documented that properly :=). But basically in HC2 I have one virtualdevice from where I can arm/disarm the alarm or perimeter protection, then I have 5-6 scenes that performs the actual arming/disarming and finally 2 variables "AlarmState", "AlarmType" defined that keeps the current state of the system. AlarmState can have values like Disarmed/Armed/Arming/Disarming/Breached and AlarmType like "Alarm"/"Perimeter" How this then works is that when you press/click arm/disarm button in the app, the app will send a http request that will push a arm/disarm button in the virtual device. My VD and scenes are not that that pretty looking today, I will spend a day to shape it up and then publish it.
  3. yes I agree, keeping HC2 in sync with the ipaddress of the phone will probably be difficult to get reliable. I was thinking about another way, I dont know if you are aware already but there is an application named "tasker" in which you can do all sorts of automation stuff with your phone and which could probably be used here. Lets say that you send all your notifications/messages from HC2 to your phone via Telegram then you dont have to care about the ipaddress of your phone, the phone will receive all notifications With tasker on your phone you can then create a "task" that intercepts notifications from Telegram, perform TTS on the notifications and then play it in your phone speakers. I did a quick test of it this morning and it seems to work.
  4. @cag014 Could you please give a more detailed explanation about how you would like to use the TTS outside wifi, (just so I dont missunderstand you ideas). besides, I see a security risk of using cellular network and that is because the app starts an (open source) webserver, and exposing the android device on the cellular network would open up for attacks. You might argue that the same apply for local wifi network aswell and that is of course true but I believe most routers have built-in firewalls which keep the local network fairly safe.
  5. @cag014 I am glad to hear you find the app usefull!. Yes I have been working with a new version, however the new feature (sound detection) is mainly for the keypad app. I still have problem with signing the app which unfortunatly make upgrade fail and a reinstall/reconfigure of the app is required ... Your idea of using TTS outside wifi sounds good, I will test and see what happens if I remove the current wifi requirement.
  6. I added an option to play silence for a configurable amount of milliseconds before playing ding-dong and the actual message. You can try it out and see if it works, download the from https://github.com/davandev/AlarmController/releases/tag/v.0.1.651 New option needed to configure: Settings -> http services -> play speech on device -> Add silence before speech, then configure the amount of time to wait.
  7. Hi, Seems like a cool project! I have a wallmounted android device at home that I would like to be able to talk to and that could invoke scenes in my HC2. I will give it a try and let you know the outcome. Regards david
  8. I just noticed that android tts lib has an metod to play silence. So it should be possible to add an configurable silence to play before playing the speech, this would then give some time for the bt speaker to connect.
  9. ok, next time this happens can you run following in a webbrowser : "http:<ip address>:8080/log" this should give you the apps log file and with it I might be able to determine the cause.
  10. I also use a APC Back-UPS ES 700 for hc2, router, modem and a raspberry pi. With this load the ups can run about 30 min in case of power outage. It also have a port where its current state can be monitored. I use a rpi to monitor the ups and send notifications of state changes.
  11. Hi, @Albert Seems you have been busy testing during the afternoon :=) I will try to fix the faults you found (including a workaround for autostart in android 6), just a few comments. - I have also noticed on my devices that it takes some time after android is booted until the app is actually auto-started. Could you after a reboot when the app starts to respond to http requests, but no speech, try to run "http://<ipaddress:8080>/log" then you should get the logfile, maybe it is possible to determine what is the cause of the failure with it. - The reason for restarting the app when icon is selected was actually by intention, I had problems that android seem to close the server socket when the battery level decreases under some level even though the app service was suppose to always run, when that happened the socket was not released and would be hanging and required some manual enable/disable things start working again. - The "play speech" button only applies for the case when the app is configured to send a "ttsCompleted" callback. When configured to send a ttsCompleted callback it needs to store the generated speech to be able to return it when the initiator asks for it and this is the only case when the play message button works. When the app is configured to play speech on device it does not store the speech, it simply generates it and plays it immediately. I realize that the button is a bit miss leading, I can probably disable the button in case it is configured to play on device only or maybe remove it since the purpose is really only for testing. I like your idea, a message cache could be useful. I have also some more ideas, the highest on my wish list is currently to implement support for speech recognition as a service running in background, then I would for example be able to say "status" to the android device and it would then invoke some scene on hc2 to collect house status and then get the status read in speakers. This home automation is like an addict and I am totally hooked.. I don't dare to think about how many hours I spent on it since I bought my HC2 last year, all other house projects are currently put on hold :=)
  12. Hi, @RH_Dreambox I have added an option to play a announcement message ("ding-dong") before the speech is played, In settings choose "Application Settings" -> "Http services" -> "Play Speech on device" Check "Play intro announcement before speech" and select the audio file to use as announcement message. @Albert I have added option to restart application after reboot. In settings choose "Application Settings" Check "Autostart application after reboot" The settings starts to become a bit gory I know I will try to restructure it somehow. You find the latest build here https://github.com/davandev/AlarmController/releases/tag/v.0.1.587
  13. Hi, Getting the app to auto start after reboot seemed pretty easy, at least for android 5.0 and 7.0. However on android 6.0 there seem to be some kind of bug related to permissions which cause the app not to autostart (not for me anyway). What version of android are you running on your Pine64? Regarding the displayed ip address, yes there are multiple ways of retrieving the ip address and I just picked one way that seemed to work. I have updated the app but I don't have any device to test this on, so please feel free to test it. You can download an updated version of the app from: https://github.com/davandev/AlarmController/releases/tag/v.0.1.573
  14. I dont think there is builtin support for generating mp3 in android, however it seems there are different options to get still get support for it, for example https://github.com/adrielcafe/AndroidAudioConverter. I will have a look at it.
  15. Without looking into details of your code I would think your problem is the whitespace in the message it needs to be html encoded. You can use string.gsub to replace the whitespace with a valid ascii format, for example : fibaro:debug("OrigMsg:" .. message) encodedmsg = string.gsub(message,'%s','%%20') fibaro:debug("EncodedMsg" .. encodedmsg ) Since you are swedish you might also want to encode å,ä,ö, you can find correct conversion here :https://www.w3schools.com/tags/ref_urlencode.asp
×
×
  • Create New...