Closed ldupont226 closed 3 months ago
Hi,
The first thing to say is that I do not have X10 devices so I have no way of trying/testing anything....
The problem I have is that I do not know what kind of X10 device each one is, I haven't been able to spot this in the EPROM data from the panel. I currently set them all to "type: Dimmer Switch" but this is meaningless. I then only allow ON and OFF commands and I create a simple "switch" Entity in Home Assistant (that also only allows on/off).
However, on a positive, I've already implemented most of the code to do brightness control for X10 devices and have had it in there for years, I simply haven't created a Home Assistant way of commanding it.
So a couple of questions for you:
Rgds Dave
Hi Dave
There is no selection in the panel to set the device type, nor in the PowerMaster application.
In my personal case, I have 1 x10 wall socket, 6 dimmable wall switches and 2 non dimmable wall switches, In home assistant I change all the switches to light in the entity settings. I think that the majority of X10 device uses are lights. I think it would be more appropriate to define them as light. And if there is a switch unit we can change it in Home Assistant. But these light switches are not controllable in percentage (I think), it is only by ON, OFF, DIM or Bright commands. There is no intensity monitoring. You can check the OpenHab binding page: https://www.openhab.org/addons/bindings/powermax/
3- No problem to do the tests, I will be happy to do so.
Here we go, there are 2 files in this zip file light.zip
Put both files in the /config/custom_components/visonic directory. client.py should replace what is there already, light.py is new.
Restart Home Assistant
This should, for every X10 device:
As I have no idea what I'm doing as I don't have any X10 devices, all I can do is verify that I believe the correct messages are being sent to the panel.
These files are just a test, if you set the brightness higher then it send a single command to the panel to increase brightness, similarly, if you set a brightness lower in HA then it sends a single command to the panel to decrease brightness.
The panel only tells me on and off state for X10 devices and not the brightness. So the integration does not understand what the current brightness level is of the device itself.
Can you let me know what happens (if anything).
Hi Dave, It works well, the command is transmitted well, but it is a little counter-intuitive for people. Because the displayed gradation does not mean anything, and with a mobile we cannot use the arrows as with a PC, so we must do down, down, down slide up down, down But for me it meets my needs well, because I can control it .
But I would have another proposal, if you leave the light as non-variable and you create an action or command (service) that can transmit the DIM or BrIGHT command, with this we can create 2 buttons Dim and Bright .
Hi,
I understand what you mean, I did wonder that myself but I thought I'd let you give it a go. If it's non-variable (i.e. on/off) then I'd rather leave it as a switch, for 2 reasons.
The first is that it doesn't change anything for existing users, for the people who have X10 devices then they already have them set up as switches in Home Assistant.
The second reason is that in Home Assistant you can change it anyway, like this
So if we keep it as a Switch but I add a new service (action in the new HA release) to command off, on, dim or brighten against the switch entity that would be OK
Dave
Yes I think that actions would be the best solution. I was already doing the switch conversion to light in HA. And indeed it will not change anything for other users.
By the way I am leaving this Sunday for a week and the network is not really available. So between the 11th and the 18th I will not be able to do a test.
Hello Dave. Everything works very well. Thank you very much for this new feature.
Rgds Luc
Closing this issue, I'll release it in to the main "master" release in the coming month or so.
Hi Dave, I know you are currently working on the latest version, which works extremely well and faster. But I would like to know if it is possible to send an X10 command to the panel. Before being with Home Assistant, I was with OpenHab and I could send DIM and BRIGHT commands to my X10 lights. It is not really urgent, but if a rainy day, you are looking for something to do :-).