Support for Philips SBC SP370?

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
Cent
Posts: 6
Joined: Tuesday 05 November 2013 10:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Support for Philips SBC SP370?

Post by Cent »

According to the RFXtrx433 manual, the Philips SBC SP370 devices are supported by the RFXtrx433 (for transmit that is, did not find anything on receive). And indeed I could control the with RFXmgr but not yet with Domoticz.

Then I found a comment in another topic on this forum (here: http://www.domoticz.com/forum/viewtopic.php?f=17&t=563), from b_weijenberg that it is just that the entry for Philips SBC (and RisingSun as well) is missing from the selection box in Domoticz when you want to manually add a switch. Can this be fixed?

Thanks, Vincent
Cent
Posts: 6
Joined: Tuesday 05 November 2013 10:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for Philips SBC SP370?

Post by Cent »

In the mean time I explored on this myself a bit. In examining the source code, it looks like most of the support for Philips SBC370 is already implemented. I compared lines for another Lighting1 type (Energenie) with those for Philips SBC:

Code: Select all

$ grep -H -r "Energenie" domoticz-code/
domoticz-code/main/RFXNames.cpp:		{ pTypeLighting1, sTypeEnergenie, "Energenie" },
domoticz-code/main/RFXNames.cpp:		case sTypeEnergenie:
domoticz-code/main/mainworker.cpp:		case sTypeEnergenie:
domoticz-code/main/mainworker.cpp:			case sTypeEnergenie:
domoticz-code/main/mainworker.cpp:				WriteMessage("subtype       = Energenie");
domoticz-code/main/RFXtrx.h:	Lighting1 Energenie added
domoticz-code/main/RFXtrx.h:#define sTypeEnergenie 0x8
domoticz-code/www/lights.html:						<option value="8">Energenie</option>

$ grep -H -r "Philips" domoticz-code/
domoticz-code/main/RFXNames.cpp:		{ pTypeLighting1, sTypePhilips, "Philips" },
domoticz-code/main/RFXNames.cpp:		case sTypePhilips:
domoticz-code/main/mainworker.cpp:		case sTypePhilips:
domoticz-code/main/mainworker.cpp:			WriteMessage("subtype       = Philips SBC");
domoticz-code/main/RFXtrx.h:  Lighting1 - Philips SBC added
domoticz-code/main/RFXtrx.h:#define sTypePhilips 0x7
It looked indeed like only the entry for Philips SBC was missing from the selection box in Domoticz in the lights.html file. I then manually added "<option value="7">Philips SBC</option>", restarted domoticz and the web-browser and I could add my Philips switches. It looks like they work okay, did not test everything yet but so for so good. It only makes me wonder whethere this missing line in the lights.html file by by accident or on purpose (and if so, for what reason)?
Cent
Posts: 6
Joined: Tuesday 05 November 2013 10:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for Philips SBC SP370?

Post by Cent »

Tried the above method once more (as I had deleted one Philips SBC switch from my set-up, I now want to re-use it for the X-mas tree) but it failed. It looks like the list of supported switches is no longer read from the lights.html file anymore (there are 2 lights.html files in different directories, both don't seem to work). Anyone any idea how to fix this?

For reference, all my other Philips SBC switches that are in my system for over a year still work flwlessly, as set up.
ronh123
Posts: 23
Joined: Monday 12 January 2015 13:30
Target OS: Linux
Domoticz version:
Contact:

Re: Support for Philips SBC SP370?

Post by ronh123 »

I just installed Domoticz on a small windows server. I own a lot of Philips SBC 370 adapters. What do I need to control them via Domoticz?
Cent
Posts: 6
Joined: Tuesday 05 November 2013 10:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for Philips SBC SP370?

Post by Cent »

ronh123 wrote:I just installed Domoticz on a small windows server. I own a lot of Philips SBC 370 adapters. What do I need to control them via Domoticz?
Hi ronh123,

I assume you have an RFXTRX433 connected to your system as well?

If so, then all you need to do is what is described a couple of posts above. I tried it again last December and at first it failed, but after flushing the cache it worked again. So follow these steps:
0) Optionally but recommended if you have devices in your database already: save a backup of your domoticz.db file
1) Stop domoticz
2) Open the lights.html file in the domoticz-code/www/ directory (at least, that is where this file is on my RPI)
3) Added a line with "<option value="7">Philips SBC</option>" at the proper location, just above the "<option value="8">Energenie</option>" line should do
4) Restart domoticz
5) Restart web-browser, go to domoticz, make sure you flush the cache to reload the lights.html instead of cached file
6) Add your Philips switches
ronh123
Posts: 23
Joined: Monday 12 January 2015 13:30
Target OS: Linux
Domoticz version:
Contact:

Re: Support for Philips SBC SP370?

Post by ronh123 »

Hi, just received the RFXTRX433E. Works fine after these steps mentioned above.
Question. Is there a possibility to add switch 9 - 16? I own a old Philips remote control that can do it. Unfortunately I cannot select it in Domoticz.
Cent
Posts: 6
Joined: Tuesday 05 November 2013 10:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for Philips SBC SP370?

Post by Cent »

I don't know. I did not dive deeper in the source code than mentioned above. I have only 6 devices.
harryneck
Posts: 3
Joined: Tuesday 05 January 2016 23:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for Philips SBC SP370?

Post by harryneck »

I am just starting with Domoticz (first step with home domotics) on a RaspBerry Pi and tried to add the Philips SBC 370 adapters, however i cannot choose them (not visible adding light/switch) in Domoticz. Ofcourse I can replace the adapters with KaKu ones but wanted to test if Domoticz is the fit for me and already used the SBC SP370 adapters for years and the wife is used to this ;)

I flashed the RFXTRX433E with the type2 194 software and can switch the SBC 370 adapters with the RFXmngr application on a Windows box. I tried to find the lights.html when i ssh'ed into the Pi but it's not in the /Domoticz or the /Domoticz/www directory. I am bit of a n00b on linux....

Any ideas how to solve this?
harryneck
Posts: 3
Joined: Tuesday 05 January 2016 23:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for Philips SBC SP370?

Post by harryneck »

Took a bit of time but problem solved:
- the lights.html was in the /domoticz/www/view directory and indeed the (7th) options entry for "Philips SBC" was missing.
User avatar
gizmocuz
Posts: 2548
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Support for Philips SBC SP370?

Post by gizmocuz »

Please note that any direct modifications in the source/www files will be overwritten when you update
Thats why it might be a good idea to notify me or add an issue on github the next time...
In the upcoming beta it will be possible to manually add the Philips SBC by default

(i cant read all forum posts, stumbled on this post while searching for philips hue messages)
Quality outlives Quantity!
harryneck
Posts: 3
Joined: Tuesday 05 January 2016 23:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Support for Philips SBC SP370?

Post by harryneck »

Thx gizmocuz for putting this on the issue list!

Next time I will report to github...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest