Welcome to Smart Home Forum by FIBARO
Extracts all info from Unit ID 100
-- READ Venus Register 840-846 UNIT ID 100
By gucio1234Text To Speach (TTS) solution for HC2 and Apple Mac (OS X) :
It took me two months of tests to make this solution at present stage and I had to learn a little Python and Applescript.
I am aware that lots of details can be improved. However all programmers knows there are no software without bugs and there is never final version. The attached OS X app is fully functional and it is called “Fibaro Airfoil Bridge v.0.1”.
I had no experience with OS X programming. This is the very first OS X app I wrote.
I have noticed that wide used solution for TTS and multiroom is to use Sonos speakers (probably because of the Fibaro plugin available) and VoiceRSS (http://www.voicerss.org/).
My solution is different. It uses the text synthesizer (TTS) which we have already implemented in our computers and which can speak in variety of languages – also those not supported by VoiceRSS. To change text into speech I used “SAY” command of OS X. The other advantage is that we are independent on internet connection and there are no charges for TTS processing. It has also multiroom solution. You can have installed all over your place a number of speakers. The volume of each speaker can be individually adjusted from HC2 (Volume range from 0 to 100 %) so it is possible to select in which room/rooms you hear the voice announcement.
The supported speakers/devices/protocols are as for now :
- Apple AirPlay
- Google Chromcast
- Windows computers (with installed app to become AirPlay compatible)
The supported languages/voices of OS X v. 10.12.2 (macOS Sierra) :
PLANS FOR FUTURE :
Fine tune the app and improve GUI of Fibaro Airfoil Bridge application.
Enhance the functionality with multiroom audio with distribution music from internet radio and iTunes.
This is an open project and I count on your constructive comments.
If there is anybody who would like to be involved in future enhancements please let me know in private message.
WHAT WE NEED :
- Fibaro HC2
- Apple Mac computer
- Audio Mixer VD installed on HC2
- Some LUA experience to fine tune VD on HC2 and have your user defined TTS messages in your scenes
- Airfoil by Rouge Amoeba application installed on Mac (for TTS it is OK to use free demo version)
- Fibaro Airfoil Bridge by Marcin S. Milewski (gucio1234) installed on Mac
- Speakers/audio receivers (any from the list of compatible devices) :
o Apple AirPlay
o Google Chromcast
o Mac , Windows or Linux computer with Airfoil Satellite installed
o iOS or Android device with Airfoil Speakers installed (if one wants to have TTS on mobile device)
The presented solution was tested with the following software versions / hardware :
- Airfoil for Mac v. 5.5.1
- Airfoil Sattelite for Windows v.5.1.6
- OS X v. 10.12.2 (macOS Sierra)
- Apple AirPort versions A1088, A1264, A1392
- JBL Flip 3 Bluetooth Speaker
- Fibaro Airfoil Bridge v. 0.1
- Fibaro HC 2 v. 4.110
It was not tested with Google Chromcast (as I do not have any) but this is supported by Airfoil.
Please read the whole instruction carefully before you start.
Define the global variables in your HC2 (top part of the Variables’ Panel):
“PAMessage” - This variable will store the text you want to convert to speech.
“AudioMixer” – This variable will store the audio mixer settings for the devices.
Install Audio Mixer VD on your HC 2.
Define parameters of this VD :
Set IP address of your Apple Mac computer
Set port number as 7000. The communication between HC2 and Mac will be on two ports: 7000 and 7001.
Define in VD as many audio mixer sliders as you have audio devices to be linked with your multi room audio system. Provide names for each slider corresponding to the devices/rooms you want to control. You may use your local language names, with spaces and local characters.
Remember what is the order of your sliders. It is needed in next steps for proper link between HC2 and Mac.
The LUA code for each slider has to be same but it depends on the number of sliders one has defined. Here are examples :
If there are two sliders, LUA definition for each should be :
If there are four sliders, LUA definition for each should be :
Adjust the LUA code of each slider according to number of sliders there are in your VD.
There are four buttons on Audio Mixer VD (they can be adjusted for user’s preferences ):
“Test Message” – to send a test message to TTS system. In my VD the predefined test message is in Polish. It should be adjusted to your language.
“TTS” – to execute TTS with the text taken from global variable “PAMessage”
“Weather Outside” – to send present weather conditions to TTS system. In my case it is based on global weather variables received from Netatmo weather station. The message is in Polish. It should be adjusted to your local language and preferences.
“Send Data” – to send audio mixer settings from HC2 to Airfoil without processing any TTS
Test and select desired language/voice for your TTS.
To change text into speech I used “SAY” command of OS X.
Open “Terminal “ application on your Mac.
Type ‘SAY –v ?’ to see the list of available voices/languages
Type ‘SAY –v <name of the voice>’ to select the voice of your preference
Type ‘SAY “THIS IS A TEST MESSGE IN MY LANGUAGE” ’ to test your selected voice
More details on this can be found here: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/say.1.html
Setup Airplay/Chromecast/Bluetoth devices with your Mac
If you want to have other computers to act as clients with speakers install Airfoil Sattelite for each of them. The app is to be downloaded from https://rogueamoeba.com/airfoil/
If you want to have mobile devices to act as clients with speakers install Airfoil Speakers for each of them. The info on these apps can be found on https://rogueamoeba.com/airfoil/
Install “Airfoil” for Mac downloaded from https://rogueamoeba.com/airfoil/
NOTE: The free demo version lets to transmit audio up to 10 minutes long (which is more than enough for TTS). After that time the noise distortion will be added by the application.
If one wants to use Airfoil for transmission of music (which I hope will be introduced with future version of my solution) it is recommended to purchase a license.
All the names of the audio devices configured with Airfoil HAVE TO HAVE names of the speakers without spaces and without any special/national characters. Rename the devices in Airfoil if it is needed.
Copy the “Fibaro Airfoil Bridge v.0.1” application to your Mac computer. DO NOT RUN IT YET.
Attached is the zipped file. You have to unzip it to have .app file.
Right click on “Fibaro Airfoil Bridge v.0.1” and select “Show Package Content”
Navigate to Contents -> Resources
Locate the file “SpeakersNAME.txt”
Edit the file “SpeakersNAME.txt”. Put names of your speakers each in the new line. They have to be same as names defined in Airfoil (paragraph 7.). The order of the speakers is EXACTLY SAME as order of the sliders of your HC 2 VD “Audio Mixer” (paragraph 2.) .
NOTE: The very first speaker has to be “LocalSpeaker” which is the default speaker of your Mac computer. This has to be defined even if you do not use the speaker of your Mac.
Here is an example of “SpeakersNAME.txt” file:
LocalSpeaker JADALNIA AppleTV PC-ANTRESOLA POKOJ-3 WIATROLAP MIODARNIA
After the “SpeakersNAME.txt” is updated one can run “Fibaro Airfoil Bridge v.0.1” applicaton.
If it happens that HC2 needs to be restarted, it is required to restart “Fibaro Airfoil Bridge v.0.1”also (Exit and Run).
Restart of “Fibaro Airfoil Bridge v.0.1” is to be done after HC2 is back operational.
This is known bug with 0.1 version. If you want to close the app use the EXIT button on the main window or the EXIT option of the second pull down menu.
If you close the app with red circle on top left corner of the application’s window or with the QUIT option from the first pull down menu the application is not closed completely. In this case you have to find its icon on the bottom bar of OS X, right click and force close it .
This is for Canbus BMS
I have a BYD Battery monitor.
Most of the Registers are have only "0" valiues and I extracted only what I found having some values.
-- Unit ID /DeviceInstance Remark
-- 225 512 CAN-bus BMS
Fan speed Temperature of the Pit and core temperatures of Food1, Food2 and Food 3 probes in Celsius or Fahrenheit. Status of each of the temperature sensors ("OK", "HIGH", "LOW", "DONE", "ERROR", "HOLD", "ALARM", "SHUTDOWN"). Status codes are also available as global variables for use in block scenes. Control:
1. Temperature setpoints for the Pit and Food1, Food2 and Food 3 cores.
2. Timer and timeout actions (none, sound alarm, hold pit at set temperature, shutdown fan; or any scene-based action you specify.
3. Ramp the pit temperature (cook and hold) from any selected food item.
Installation and configuration:
Install the CyberQ WIFI VD, which you can download below. I will also post it on Fibaro Marketplace.
Enter the CyberQ WIFI IP address and port number in the advanced settings. Scroll down to the main loop section to set the authentication details.
By m4rlb0r0Urządzenie wirtualne wyświetlające parametry pogodowe pobierane ze stacji meteorologicznej UMK. Najbardziej przyda się osobom z Torunia i okolic
Samo urządzenie wyświetla dane ze zmiennych globalnych, które są przy pomocy api fibaro aktualizowane przy pomocy skryptu php. Wymagane jest wobec tego posiadanie w sieci lokalnej serwera z apachem i php oraz dodanie skryptu do harmonogramu zadań cron dla cyklicznej aktualizacji.
Mam nadzieję, że komuś się przyda.
Heating solution VD, based on Danfoss's thermostats and temperature sensors.