[SOLVED] Sitemap why checkbox on Switch items?


(Juan) #1

Hi there,

I dont know why, but I can not get the switch slider on the sitemap. it shows the tick box instead of. ¿?

Anyone knows what is happening?
Thanks.

49

Sitemap:

Frame label="Salon"
{
       Switch item=sonoffD1_1 icon="soundvolume" mappings=[OFF="OFF", ON="ON"]
       Switch item=sonoffD1_2  icon="light" mappings=[OFF="OFF", ON="ON"]
       Switch item=sonoff06  icon="batterylevel" mappings=[OFF="OFF", ON="ON"]
}```

(Harry) #2

If you want a slider you have to define

Slider item=

(Juan) #3

Not that kind of slider.
Usually Switches have this kind of little sliders, and I have a checkpoint, I do not why. I use Chrome, but in Safari I have the same result.

14


(Jerome) #4

Try to remove the mappings from yout items.

Anyway:
What browser are you using?
I have never seen checkboxes before on a sitemap.

Also a switch doesn’t make much sense for the volume and batterylevel items.


(Juan) #5

It is not volumes, I putted that icon to test, I switch on/off the Sound System and I putted that icon.

I use Chrome Versión 67.0.3396.99 (Build oficial) (64 bits)

OK. I already know what is causing the issue, it is this sentence, when I remove it, everything is fine, if I add it, everything change to checkboxes.

Webview url="http://192.168.0.17/video.cgi" height=8 visibility=[Iphone_Sw=="OFF"]

So, I can not use the video image if I want to have the little sliders?

19


(Jerome) #6

It is not volumes, I putted that icon to test
Yes, my bad. Its only the icon and i wrote faster than thinking about it.

The WebView shouldn’t affect all other elements that much.

Can you try another url for testing?
I am not sure about the cgi url.


(Juan) #7

Well, If I try other url, for example www.google.com, is working fine (I do not see nothing but the little slider are working fine), with local IP for video.cgi not working.

40


(Jerome) #8

Then the url is the problem, not the webview itself.
Is this the only url available for your video stream?

I think local is not the problem.
Seems that the cgi of your video device is injecting some kind of style into the sitemap.


(Juan) #9

Mmm I do not know. I use the Camera DCS-930LB… I do not think so :confused:

http://192.168.xx.xx/video.cgi not working
http://192.168.xx.xx/image/jpeg.cgi is working but I only have a photo.

The problem is the video, I could not see the video…


(Jerome) #10

Seems that the camera has only those two urls available.

Did you try the Video Element already?


(Juan) #11

Actually not. I should.

Do you think it would work fine? Tomorrow I will try :smiley:

Thank you for your help.


(Jerome) #12

I am not usre, but its of course worth a try.


(Juan) #13

sure! tomorrow I will let you know how it is going…


(Juan) #14

items:

       Video url="http://192.168.xx.xx/video.cgi" encoding="MJPEG"

It is working, although after 20-30 seconds the video dissapears automatically, even through myopenhab is not working. There is not any image. :confused:

Working…
27

and after some seconds, disappear:
45

  • Is this normal?

EDIT: the problem is still there even with images:

Image url="http://192.168.xx.xx/image/jpeg.cgi" refresh=1000

(Vincent Regaud) #15

Have you checked the autorefresh setting of your browser?


(Juan) #16

No. I do not finde any autofresh in chrome, at least in the preferences.


(Vincent Regaud) #17

No,
What happens when you refresh the browser.
Does the video come back?


(Juan) #18

Yes,
When I refresh (F5), the video comes back, but after 20 seconds aprox. goes off the video again. It is wierd.


(Vincent Regaud) #19

Maybe try this:


(Juan) #20

Yes, I will try that.

Anyway, the Video url=..... does not work in iphone through myopenhab, I have to use webview in order to get working on iphone, and if I use webview I lose the style, I have checkboxes… so I will see.

I can not have the video embebed in the sitemap with Video url=... keep the style properly and gets working through myopenhab in the iphone. :confused:

I mark the thread as solved, but not 100%.