Home Live Radio Podcast Live TV Vodcast Forum Files Login Register :     Contact : 
 
Forum index Forum: ListenLive Network Remote control development Topic: Home automation ideas/Network Remote - Technical aspects Last replied to: January 6, 2014, 12:43 pm Back to post view
AuthorPostOptions
Posted by penbex Message # 1     Posted at May 13, 2013, 9:13 am,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 2261 posts
Registration date: May 21, 2009
Status: Offline

This thread is to talk about the technical aspects of the home automation ideas posted here.


(Last Edited by penbex on May 13, 2013, 9:39 am)
 
Posted by penbex Message # 2     Posted at May 13, 2013, 9:21 am,     subject: Ideas for home automation - Technical aspects  
Messages: 2261 posts
Registration date: May 21, 2009
Status: Offline

Regarding our devices as a generic infra red capture device:

The device can only pick up some infra red signals.
I have tested a large number of remotes and it can not detect signals from philips, samsung, sony and a whole bunch of other remotes. It was able to see the signals from a bunch of credit card style remotes.
It looks like it can only receiver remote control signals in the 38khz range and it also seems to depend on the actual encoding method.
So it will not be possible to get the device to operate like a generic remote control receiver.

However, we can do things with for example Logitech Harmony remote controls.
In that case we need to select a base model that generates scancodes that the device can detect.
It also needs to have "unused" scancodes, meaning codes that are not on the remote controls that come with our device.
For example, if our device has scancodes 1-20 for the buttons, we can use scancodes 21-256 for additional functionality.
Since this is not a very likely scenario there might be some other options.

Like we could make an app that shows some buttons on the screen that has functions like lights on/off assigned to it.
Although this kind of functionality is normally already present through smartphone/tablet apps.

 
Posted by penbex Message # 3     Posted at May 13, 2013, 9:25 am,     subject: Ideas for home automation - Technical aspects  
Messages: 2261 posts
Registration date: May 21, 2009
Status: Offline

Regarding sending text messages to the radio:

The message command is partially implemented already.

If you send: MESSAGE [text to display]
the text between the brackets gets displayed as a popup and gets removed after a keypress.

That would make it possible to send:
MUTE
MESSAGE [Incoming call from: ++4912345678]
or
MESSAGE [Ignoring call from: Mom]  
 


 

 
Posted by penbex Message # 4     Posted at May 13, 2013, 9:34 am,     subject: Ideas for home automation - Technical aspects  
Messages: 2261 posts
Registration date: May 21, 2009
Status: Offline

Regarding controlling the device from an external source:

Open a socket/connection to the device IP address @ port 8080 and send a text command.

In the 1.49 version the following commands are supported:
UP, LEFT, DOWN, RIGHT, EXIT, POWER, OK, VOLp, VOLm, STOP, REPEAT, PGUP, PGDN, RECORD, HOME,
MENU, MUTE, FORWARD, REWIND, FMRADIO, IRADIO, ITV, PAUSE, CLOCK

In 1.50 so far the following commands have been added:
MENUINFO  > replies some numbers to know what the position within the menu is
LISTINFO     > replies the texts of lists and the position within the list.
METAINFO  > replies the meta data that is displayed during playback.
MESSAGE [text]   > prints text in a popup box

 

 
Posted by penbex Message # 5     Posted at May 13, 2013, 9:47 am,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 2261 posts
Registration date: May 21, 2009
Status: Offline

The following is done within the firmware to let external devices communicate to it:

  1. Create a socket with the socket() system call.
  2. Bind the socket to an address using the bind() system call. For a server socket on the Internet, an address consists of a port number on the host machine.
  3. Listen for connections with the listen() system call.
  4. Accept a connection with the accept() system call. This call typically blocks until a client connects with the server.
  5. Send and receive data using the read() and write() system calls.

It should be fairly easy to get this working on any platform.


(Last Edited by penbex on May 13, 2013, 9:57 am)
 
Posted by herrmannj Message # 6     Posted at May 13, 2013, 11:08 am,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 6 posts
Registration date: January 6, 2013
Status: Offline

Hi Penbex,

I've outlined a scenario in http://www.listenlive.nl/board/message.php?id=4148#2

Basically your firmware would need to implement a feature to allow a local server to push a image thats instantly is displayed. Like message=[xxx] i.e. image=(bin code).  

In this mode the remote server would render a gui into one image, perform navigation between and push the resulting image as needed to your device (that would be my job), while your device is displaying it and reporting back the rc codes and keystrokes received.

There are refinements buts thats the basic idea behind, hope I'm clear to get you a notion.

Any chance for adding this?

regards
joerg





 
Posted by penbex Message # 7     Posted at May 13, 2013, 12:50 pm,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 2261 posts
Registration date: May 21, 2009
Status: Offline

Quote:
In this mode the remote server would render a gui into one image, perform navigation between and push the resulting image as needed to your device (that would be my job), while your device is displaying it and reporting back the rc codes and keystrokes received.
There are refinements buts thats the basic idea behind, hope I'm clear to get you a notion.
Any chance for adding this?

Hi,

Almost clear   I can easily add a command like:
IMAGE [full path/filename]  (Image preferrably a jpg or png file)
which would be displayed on top of whatever is happening at that moment. So far no problem.
It is not exactly clear what you want to do next?

During the displaying of the image, you want the firmware to report rc codes to some server address?
It would need to know the server address, what button(s) to report back, perhaps a button to abort the image being displayed (exit button?) (and what to report to the server in that case.
Do you send a single image with some button explanations..
like a screen saying left button for lights off, right button for lights on etc, user presses button, firmware reports to server and removes image.. ?

Is the server side software not already capable of doing this with other devices? If so, what kind of interface does it use for that?

I am using a Micasaverde Vera controller with a zwave network here. The controller uses LUA scripting. Other controllers use other plugin/scripting methods.

BR,
William


(Last Edited by penbex on May 13, 2013, 1:03 pm)
 
Posted by penbex Message # 8     Posted at May 13, 2013, 12:56 pm,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 2261 posts
Registration date: May 21, 2009
Status: Offline

I just got a Global Caché iTach Wifi device.
This is a bridge between send and receive remote control commands and the wifi network.
So you can send a string of RC codes from a network connected device (tablet/phone/pc) and it can receive RC codes and give that a device on the network...

Also, note that we are running Linux. Perhaps there are already some daemons or tools that can be included.


(Last Edited by penbex on May 13, 2013, 1:02 pm)
 
Posted by herrmannj Message # 9     Posted at May 13, 2013, 2:31 pm,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 6 posts
Registration date: January 6, 2013
Status: Offline

Hi,

quote:
Almost clear  

Almost

quote:
I can easily add a command like: IMAGE [full path/filename]  (Image preferrably a jpg or png file) which would be displayed on top of whatever is happening at that moment. So far no problem. It is not exactly clear what you want to do next?


Exactly! Preferrably IMAGE [LEN?][stream if bytes]. Technicaly:

Server (i.e. 192.168.1.20:XX) sends this msg: IMAGE [imagedata] to the Radio (say 192.169.1.30:8080). The Image contain a rendert fullscreen Menu, telling whatever, may be actual temperature and presenting choices to navigate to submenu items. Lets say three submenus:  1: chose alarm / time 2: chose temperature / 3: (De)activate Burglar alarm. (in context of bedroom)

Now, radio knows the IP of the Server (either by server telling it explicit or by (radio is) watching from where the command is comming, whatever is easyer for you).

Now: every Device-Keystroke and every rc command received by the radio is reported over the existing tcp link back to the server. Lets say 192.168.1.30 -> 192.168.1.20:XX RC_CMD (0x20) where 0x20 is the rc code for rc button "two". The Server is responsible for taking the appropriate action. In this case it renders and send a new Image, Containing a menu-mask for setting a temperature. IMAGE [imagedata] -> Radioip 192.168.1.30:8080 (existing link). Now the User may input a desired room temp. Every keystroke (again) will be send back and the server respond with an new image, digit by digit to maintain the gui.

After all the server would know about the desired temp and sending out a command to the temperature control device.

quote:
Is the server side software not already capable of doing this with other devices? If so, what kind of interface does it use for that?

The server software resides usually on a small headless system like fritzbox, nas or rasberry pi. There are numerous rf interfaces usable that will "speak" directly with actors (like dimmer or heating control or ...) or sensors (wall switch, motion sensor, smoke detector...) from different vendors. So the usual way to "communicate" with the server is trough wall switches, rf remotes or whatever (while the server itself of course provides a webinterface, accessible by tablet or smartphone and there are even some apps.)

The server itself (simple spoken thereby provides only a framework for linking to various home devices. The user link the wallswitch with the lamp or blinds by more or less complex scripting.

So your radio device would become a additional (and in most cases more natural) way to communicate with the server (the entire installation). Speaking for myself: I already have a alarm clock in my bedroom and a radio in my kitchen, and a arnova in the room of my dughter.

But my alarm clock in bedroom (it is a philips wakeup light, but I suddenly want to replace it with a internet radio device isnt connected to the server, because it does not have a interface to do so.

So, what I do is, adjusting my wake-up time at the philips alarm clock, AND have a second time wake-up time programmed at the server (via smartphone) which handle some actions like switching lamps, reduce heating per night, burglar alarm - and so on.

So its basically not just to send simple remote commands to the server (you are right, there are other and simpler ways to to that) instead its a way to make a complete integration by radio device an living environment.

So it even would be nice if the radio could be instructed by server (i.e. PLAY [path/to/message.mp3] to radio ip) to play a audio message (telling "Basement door opened" or whatever) additional to some visual Messages (IMAGE[data]).

I hope this are not to much wishes, and I'm very happy if you choose to support this.

br
joerg







 
Posted by penbex Message # 10     Posted at May 13, 2013, 3:27 pm,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 2261 posts
Registration date: May 21, 2009
Status: Offline

Ok, got it. Mostly it is ok.

Sending push messages to notify the user:
message [grandma is calling] for a popup or 
play [server//garagedooropen.mp3] are ok for me.
These are also pretty much global commands that can be used for multiple things.

I just wonder if the method of sending all the gui images is the best option.
In this case you are going to instruct the server via the device.
Perhaps it is better to let the device do all the drawing etc.

What about having a Home Automation app and upon entering the app it requests an XML or JSON file with 'current/actual' details from the server..
Home automation systems are always individual, one might have a burgler alarm, another a garden watering system, electric window blinds, lights, heating, temp sensors indoor and/or outdoor etc.
The server constructs this xml with the features that are available in the users setup and provides this to the device.
The device displays everything and gives some setting options. When the user changes a setting the device reports to the server what changed.

From the device's perspective most data comes in from extrnal servers in xml or json format.
All data is displayed as list that can be browsed. Even the settings screen can be browsed in a similar way.
So you enter the HA app, app pulls data from server, burgler alarm is not armed, you select arm burglar alarm, device sends command or updated xml to server.
server can then push a PLAY [burglar alarm armed.mp3] to the device and you can move to night clock mode and get some sleep.. or the server tells the device to go the night clock mode.
The internal alarm / real time clock can then play a wakeup sound when it is morning... or the server can control this task..
(Probably need to think of power outage and wifi/internet outage conditions..)

~William

 

 



 

 
Posted by herrmannj Message # 11     Posted at May 13, 2013, 6:17 pm,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 6 posts
Registration date: January 6, 2013
Status: Offline

Hi,

quote:
Sending push messages to notify the user:
message [grandma is calling] for a popup or 
play [server//garagedooropen.mp3] are ok for me.


Check! I'm greedy to play with, what a fun. Thanks.

quote:
What about having a Home Automation app and upon entering the app it requests an XML or JSON file

Thats clearly a option, especially because a json interface exist. But first: it transfers a lot of work to you.

And further; in this case the data interface has to be very carefully defined. You are absolutely right in stating that the installations are highly individual and there are a lot of settings (that could be exposed) which doesn't matter in a given context (say room or user). Some values are internal dummy types needed for computing states. Some simple are dangerous, the garden watering system for example is (in my Opinion) not used from bedroom, and more, you may want to stop the Kiddys from playing with or arm or disarm the alarm system. So, this settings have all selectively excluded or included.

Some settings (like temp) has to be checked for validity before apply (sure that can be don at serverside) and often requiring special input fields (temp vs time).  Some Actions are initiated by setting values (temp) other by triggering predefined actions (pushbutton), which afterwards will be performed by scripts and often its a combination. Setting the wake-up time may trigger a shutting down of unused lights, power off some electric devices, lowering the temp and finally start a sleep sequenz with slowly dim down a light and playing 20min music (thats what I've done in my daughters room and I'm sure people doing things much more crazy and complex).

So it would need a abstraction layer to transfer the "what choices and how to present" constructed with virtually almost possible combinations in mind.

On the other hand, much of these is easily to implement on the server side, because there it can be scripted (even in therms of presentation layer) and customizable (as per gusto) from users point. Not really end-user, (to name my wife but the family "admin" can do so.

Therefore my suggestion, but anyhow, its only my opinion and I'm happy to go with - wherever the road ends

regards
joerg



 
 
Posted by Rince Message # 12     Posted at May 14, 2013, 6:01 am,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 9 posts
Registration date: April 30, 2013
Status: Offline

Hi,

this is really a cool idea, but I wouldn't prefer this at the moment.
As Jörg stated, not every item should be displayed, or modified.

I would go one step further:
1. Text is 90s style
2. different interfaces demand different concepts

To explain this:
WAF is much higher with a graphical interface
A small display in the bedroom (3,5") was never intended to controll an irrigation system (or to controll the heating with 10th degrees)

Please wait until 12 o'clock today, I will draw a few pictures to make myself clearer.

 
Posted by penbex Message # 13     Posted at May 14, 2013, 9:29 am,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 2261 posts
Registration date: May 21, 2009
Status: Offline

Quote:
As Jörg stated, not every item should be displayed, or modified.

Thats a job for the server. It should be easy to see if a request comes from the kids room (eg only current temps and kids room lights can be controlled)
or from a master device that has more options. So this should not be an issue. 

Quote:

1. Text is 90s style

Partially agree.
It can be graphics and/or text but still created at the device rather than doing a full gui from a server which easily could lead to big issues for the device.

Quote:

A small display in the bedroom (3,5") was never intended to controll an irrigation system (or to controll the heating with 10th degrees)

Why not? It is done with smartphones that have similar screen sizes (though higher resolutions)
Also, I have a device in the bedroom, the office, the living room (connected to a yamaha stagepass 500 + American Audio PXW 18P subwoofer) and kitchen..
They all identify differently on the home network so a server should not have any issues with the rights to see/edit some settings.

W.

 
Posted by Rince Message # 14     Posted at May 14, 2013, 2:29 pm,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 9 posts
Registration date: April 30, 2013
Status: Offline

This is right.
Deciding what should be sent is only one single command.
attr RadioSleepingRoom
for example should be enough

Drawing graphics on the device itself of course causes less network traffic. Probaly it is even faster.

I am eager to see how this will work. Do you have any ideas yet?

Greetings

Rince
 
Posted by Rince Message # 15     Posted at June 27, 2013, 10:39 am,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 9 posts
Registration date: April 30, 2013
Status: Offline

Hi,
I´ve made a quick & dirty hack to get the listenlive radio controlled by FHEM.
So far I´ve succesfully tried CLOCK and two other commands, but the other commands should work the same way

I´ve not yet implemented any feedback from the radio.

But now I can set a timer in my home automation to wake me up at a given time, and the radio will start playing

Greetings,

Rince
 
Posted by betateilchen Message # 16     Posted at July 14, 2013, 10:55 am,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 23 posts
Registration date: July 12, 2013
Status: Offline

I agree it would make more sense to do the rendering on the device itself. Would it be possible to integrate a GD engine for rendering? This will give the possibility to send a "layout file" (preferrably ASCII clear-text) to the listenlive-device and this file must be interpreted on the device to generate the image.

Yesterday I started writing/maintaining the FHEM module 71_LISTENLIVE to control LL-devices via FHEM as far as this is possible now with firmware 1.49.
As soon as 1.50 will be available, I will start implementing the GET() part into this module.

I recognized the news reader on LL is not capable handling RSS feeds with images? My FHEM installation already generates status pages via RSS-Module on FHEM but it is not possible to display those RSS-feed on ListenLive. If it would be possible to show those status pages on LL this would solve a lot of ideas to use LL-Devices as information-point.

Regards
Udo


 
Posted by betateilchen Message # 17     Posted at July 14, 2013, 11:22 am,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 23 posts
Registration date: July 12, 2013
Status: Offline

I would like to have a command to "ask" the LL-device for power-state and mute-state.

Since both parameters are controlled by a toggle-command (same command POWER to switch on AND off) it is important to have an information about the current state. This could prevent to switch the radio off with an "on"-command and it would be possible to integrate a dedicated POWERON and POWEROFF command in remote control software.

Same issue for mute state.

 
Posted by betateilchen Message # 18     Posted at January 6, 2014, 12:43 pm,     subject: Home automation ideas/Network Remote - Technical aspects  
Messages: 23 posts
Registration date: July 12, 2013
Status: Offline

Quote:
The new Listenlive firmware is nearly done. The aim is to have a release before christmas.

Okay... christmas... but which year?